-
Notifications
You must be signed in to change notification settings - Fork 37
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
Model use - relative imports #54
Comments
Hi, We have thought about it before but we thought it would make the relation among files to be more complicated and may cause some unexpected errors when your execution directory varies. A simple workaround is to add the root path of this project to
Then it should work well. |
This is not ideal as then it may be unclear if utils should be loaded from SaProt or my own utils directory that is somewhere in the path |
In real situation it hardly happens that two |
We have already uploaded a |
I cloned the repo yesterday and tried to import
from SaProt.model.saprot.base import SaprotBaseModel
as per some of the code examples. This failed as the "utils" import in many of the model files was not relative. Would suggest changing it to e.g.from ...utils.metrics import count_f1_max
and similar across model scripts.The text was updated successfully, but these errors were encountered: