Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ad/multiple_models #184

Merged
merged 39 commits into from
Jul 30, 2024
Merged

Ad/multiple_models #184

merged 39 commits into from
Jul 30, 2024

Conversation

Knispel2
Copy link
Collaborator

@Knispel2 Knispel2 commented Jun 2, 2024

Added the option to upload notifications to https://anomaly.fink-portal.org/.

It could be used like this, for example:

MODELS = ['', '_gamma', '_delta', '_epsilon', '_theta', '_omega'] # '' corresponds to the model for a telegram channel

df = df.withColumn('lc_features', extract_features_ad(*ad_args)))
for model in MODELS:
    df = df.withColumn(f'anomaly_score{model}', anomaly_score('lc_features', F.lit(model))))

for model in MODELS:
    df_proc = df.select(
        'objectId', 'candidate.ra',
        'candidate.dec', 'candidate.rb',
        f'anomaly_score{model}', "timestamp")
    if model == '':
        df_out = anomaly_notification_(df_proc, threshold=10,
           send_to_tg=True, channel_id=...,
           send_to_slack=True, channel_name=...)
    else:
        df_out = anomaly_notification_(df_proc, send_to_tg=False, send_to_slack=False, send_to_anomaly_base=True, model=model)

If model=='', notifications are only uploaded to the telegram and slack channels. Notifications from other models can be uploaded to both messengers and anomaly base.

@JulienPeloton JulienPeloton merged commit c0d7211 into master Jul 30, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants