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

Instantiate AstroPredictor with in-memory model weights #84

Merged
merged 1 commit into from
Dec 19, 2023

Conversation

drewoldag
Copy link
Collaborator

@drewoldag drewoldag commented Dec 19, 2023

Prior to this change model weights were only loaded from a file. However, to support wrapping with RAIL, we need to be able to accept the actual model weight dictionary directly (from the ceci DataStore).

This work allows the user to pass either a file path or a model weight dictionary, or rather a checkpoint, when initializing AstroPredictor.

Copy link

codecov bot commented Dec 19, 2023

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (63ccf58) 12.81% compared to head (d063ede) 12.80%.

Files Patch % Lines
src/deepdisc/astrodet/astrodet.py 0.00% 4 Missing ⚠️
src/deepdisc/inference/predictors.py 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #84      +/-   ##
==========================================
- Coverage   12.81%   12.80%   -0.01%     
==========================================
  Files          22       22              
  Lines        3465     3467       +2     
==========================================
  Hits          444      444              
- Misses       3021     3023       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@drewoldag drewoldag self-assigned this Dec 19, 2023
@drewoldag drewoldag changed the title WIP to accept model weights after big config update. Instantiate AstroPredictor with in-memory model weights Dec 19, 2023
@drewoldag drewoldag marked this pull request as ready for review December 19, 2023 21:25
Copy link
Owner

@grantmerz grantmerz left a comment

Choose a reason for hiding this comment

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

This looks good to me. I see the checkpointer code is buried in fvcore, but nice that the fix is a simple line change

@drewoldag drewoldag merged commit 54cfba2 into main Dec 19, 2023
2 of 4 checks passed
@drewoldag drewoldag deleted the awo/wip/support_model_weights branch December 19, 2023 21:49
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