-
Notifications
You must be signed in to change notification settings - Fork 47
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
Refactor model and metrics #100
Conversation
See |
`load_preset` is the only function in `loaders.py` worth testing
Issue with ViT
TODO: Vision Transformer is broken. Up to you whether I should fix that in this PR or in a future one. |
Let's leave this for a future PR. |
@jasonjewik thanks a lot for this crucial PR. I have done an initial review for the I am starting my review on the |
@prakhar6sharma I don't see your comments - perhaps you did not submit the review? |
I disagree. For clean abstraction of code, the models should not be aware of the variable names. It is the loader functions' responsibility to ensure that the requested model is legal. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some more comments.
Do we assume that the user would create the models using the loader functions only?
|
Yes. I assume the user to create models with the loader function only. Side-by-side comparison of the number of lines of code required, assuming the data module # using the loaders
import climate_learn as cl
model, optimizer, lr_scheduler = cl.load_preset("forecasting", dm, "persistence")
# do it yourself
from climate_learn.models.hub import Persistence
model = Persistence() Besides, as the user wishes to load more models, the first approach scales better since they don't have to add a new import for each model. If the user chooses to do the second route (load it manually) and something like what you describe happens, IMO it is the user's fault, not the code's fault. Happy to discuss further. |
Looks good to me. It's just that the Also, can you please add support for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully, this one should be the last request change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully, this one should be the last request change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!!!
I'll come back to add examples later of how to use the code, and I'm really spotty on documentation, but I'm opening the PR so folks can take a look. Primary changes are such: