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

Update offline source probability for change to mchirp area #4882

Merged
merged 4 commits into from
Sep 18, 2024

Conversation

tdent
Copy link
Contributor

@tdent tdent commented Sep 17, 2024

Fix a from_cli bug and remove mass gap related options and code, as mass gap classification does not need to be supported for offline calculation

Standard information about the request

This is a: bug fix

This change affects: the offline search

This change changes: ability to produce a scientific result vs no result

This change: follows style guidelines (See e.g. PEP8)

Bug fix

Motivation

Offline source probability code fails to run as it was not updated for a module change

Contents

Try to make it run

Testing performed

To be tested by local install and attempting to run offline source probability

The author of this pull request confirms they will adhere to the code of conduct

AnaLorenzoMedina

This comment was marked as outdated.

@AnaLorenzoMedina AnaLorenzoMedina dismissed their stale review September 18, 2024 10:31

I missed some things

It still didn't work from Thomas' change, we needed a further fix for the missing gap entry. Also, even if we run the source probabilities offline with the 'include mass gap' option, the output file doesn't have a mass gap entry.
AnaLorenzoMedina

This comment was marked as outdated.

Copy link
Contributor

@AnaLorenzoMedina AnaLorenzoMedina left a comment

Choose a reason for hiding this comment

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

The first change was necessary but the code still didn't work, it produced the following error:

Traceback (most recent call last):
 File "/home/ana.lorenzo/git_repo/offline-analysis/production/o4/helper_scripts/psource_pycbc_offline.py", line 92, in <module>
  probs.pop("Mass Gap")
KeyError: 'Mass Gap'

so we needed one more fix for the missing gap entry.

Moreover, even if you run the 'run_probabilities_offline.sh' script with the '--include-mass-gap' option, the output file does not have a 'Mass Gap' entry.

@tdent
Copy link
Contributor Author

tdent commented Sep 18, 2024

OK, given the changes in the interface to mchirp_area.py to make no mass gap the default (45c9560) it seems we would need more work on this script to be able to actually produce classifications with mass gap.

However it doesn't seem that there is any need to support this option for offline results, so I will just remove it completely to simplify the script

Offline probabilities no longer to support mass gap
@tdent
Copy link
Contributor Author

tdent commented Sep 18, 2024

Hopefully it works without any issue after removing all mass gap option related code

Copy link
Contributor

@AnaLorenzoMedina AnaLorenzoMedina left a comment

Choose a reason for hiding this comment

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

I checked locally and it should run fine now.

@tdent tdent merged commit b07fd87 into master Sep 18, 2024
59 checks passed
@tdent tdent deleted the tdent-mchirp-from-cli branch September 18, 2024 15:13
@spxiwh spxiwh added the v23_release_branch PRs applied to the v2.3.X release branch or to be cherry-picked if merging to master label Sep 18, 2024
spxiwh pushed a commit to spxiwh/pycbc that referenced this pull request Sep 25, 2024
…4882)

* Update offline source probability for changes to mchirp area

* Update pycbc_source_probability_offline

It still didn't work from Thomas' change, we needed a further fix for the missing gap entry. Also, even if we run the source probabilities offline with the 'include mass gap' option, the output file doesn't have a mass gap entry.

* Remove mass gap option entirely

Offline probabilities no longer to support mass gap

* remove more mass gap code

---------

Co-authored-by: AnaLorenzoMedina <114947731+AnaLorenzoMedina@users.noreply.github.com>
spxiwh added a commit that referenced this pull request Sep 25, 2024
* Update offline source probability for change to mchirp area (#4882)

* Update offline source probability for changes to mchirp area

* Update pycbc_source_probability_offline

It still didn't work from Thomas' change, we needed a further fix for the missing gap entry. Also, even if we run the source probabilities offline with the 'include mass gap' option, the output file doesn't have a mass gap entry.

* Remove mass gap option entirely

Offline probabilities no longer to support mass gap

* remove more mass gap code

---------

Co-authored-by: AnaLorenzoMedina <114947731+AnaLorenzoMedina@users.noreply.github.com>

* Bump version

* Update GitHub actions to use modern versions (#4867)

* Depndabot

* Try to solve new issue due to upload-artifact@v2 deprecation

* Mimic what has been changed for PyPMC

* Still failing, try this…

* Include a fix for Node16 deprecation as well

* Fix one more error

* Also update setup-python to v5

* Remove some debugging stuff

---------

Co-authored-by: Tito Dal Canton <tito.dalcanton@ijclab.in2p3.fr>

* Pin to older ligo.skymap for tests

---------

Co-authored-by: Thomas Dent <thomas.dent@usc.es>
Co-authored-by: AnaLorenzoMedina <114947731+AnaLorenzoMedina@users.noreply.github.com>
Co-authored-by: Tito Dal Canton <tito.dalcanton@ijclab.in2p3.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug offline search v23_release_branch PRs applied to the v2.3.X release branch or to be cherry-picked if merging to master
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants