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

fix: moving hl.init #687

Merged
merged 5 commits into from
Jul 12, 2024
Merged

fix: moving hl.init #687

merged 5 commits into from
Jul 12, 2024

Conversation

Daniel-Considine
Copy link
Contributor

@Daniel-Considine Daniel-Considine commented Jul 11, 2024

✨ Context

Currently we initialise hail (hl.init()) at the start of any steps that require it.
The behaviour of hail (v0.2.127) currently doesn't check if hail is already initialised. This means running the step again will cause hail to attempt to initialise another hail session and crash.

🛠 What does this PR implement

This PR makes it so that when start_hail is True at session creation, hl.init() is automatically ran. As a result it says in sync with the current spark session.

🙈 Missing

🚦 Before submitting

  • Do these changes cover one single feature (one change at a time)?
  • Did you read the contributor guideline?
  • Did you make sure to update the documentation with your changes?
  • Did you make sure there is no commented out code in this PR?
  • Did you follow conventional commits standards in PR title and commit messages?
  • Did you make sure the branch is up-to-date with the dev branch?
  • Did you write any new necessary tests?
  • Did you make sure the changes pass local tests (make test)?
  • Did you make sure the changes pass pre-commit rules (e.g poetry run pre-commit run --all-files)?

@github-actions github-actions bot added bug Something isn't working Step size-XS labels Jul 11, 2024
Copy link
Contributor

@ireneisdoomed ireneisdoomed left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you. Having this inside session makes more sense. Just remember to erase the hail init in gnomad_ingestion

src/gentropy/gnomad_ingestion.py Show resolved Hide resolved
@github-actions github-actions bot added size-S and removed size-XS labels Jul 11, 2024
@d0choa d0choa self-requested a review July 12, 2024 09:09
Copy link
Collaborator

@d0choa d0choa left a comment

Choose a reason for hiding this comment

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

There are 3 hl.init in the notebooks:

  • FineMapping_AlzheimerDisease.ipynb
  • Mapping_EFO_finngen.ipynb
  • Productionizing_LD_matrix.ipynb

Rest makes sense

@Daniel-Considine Daniel-Considine merged commit c5b4385 into dev Jul 12, 2024
4 checks passed
@Daniel-Considine Daniel-Considine deleted the dc_hail branch July 12, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working size-S Step
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants