Skip to content

Conversation

@erusseil
Copy link
Collaborator

Brand new SLSN classifier for the ZTF stream.
It relies on feature extraction of light curve and the model has been trained on a high quality dataset with expert labels.
Currently slow and meaningless because it is meant to run after a drastic filter in the incomings alerts (trained almost only with transient) that should be added in the near future.
This first PR is a test to ensure that the module doesn't crash and isn't intended to run on the full stream.

@erusseil erusseil marked this pull request as ready for review July 18, 2025 14:11
Copy link
Member

@JulienPeloton JulienPeloton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @erusseil ! I've done a first pass on the code -- looks good to me. You can just update the CI script to enable the tests to run:

- name: Run test suites for ZTF
      run: |
        rm -f /tmp/forest_*.onnx
        pip install sncosmo==2.12.1  # Cette ligne là
        pip install xgboost==2.1.4   # Et cette ligne là
        ./run_tests.sh -s rubin
        curl -s https://codecov.io/bash | bash

Once the tests run, I will perform profiling on the code to see the bottlenecks, and we can think on pre-filtering to apply on the stream before this science module is applied.

Copy link
Member

@JulienPeloton JulienPeloton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @erusseil -- nearly there, I suggested some change to improve the performance :-)

@erusseil
Copy link
Collaborator Author

erusseil commented Sep 26, 2025

Thanks @JulienPeloton for the review ! I implemented all your requests :)
I will later work on improving the coverage of the doctests.

@JulienPeloton
Copy link
Member

JulienPeloton commented Sep 26, 2025

Thanks! So now with the current code, one has:

  • score of -1.0 if not a valid transient
  • score of 0.0 if a valid transient but not features extracted
  • score > 0.0 if processed transients

Am I right?

@erusseil
Copy link
Collaborator Author

Yes you were right, but this is not an ideal behaviour in the end. I changed so code so that any invalid alert is reported as -1. That way 0 can directly be read as "the classifier gives a 0% chance of this events being a SLSN".

@JulienPeloton JulienPeloton merged commit cb09fe2 into astrolabsoftware:master Sep 26, 2025
4 of 5 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.

2 participants