-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add staticmethod decorator #1257
Conversation
I believe that the test by travis-ci was stopped at the place not related to my modifications. Could you check the following three points?
Thank you. |
@yahshibu thanks for adding this and please excuse the delay in checking the PR! The error was somewhere else and is now fixed so the PR is green! |
flair/nn.py
Outdated
@@ -68,13 +70,13 @@ def save(self, model_file: Union[str, Path]): | |||
torch.save(model_state, str(model_file), pickle_protocol=4) | |||
|
|||
@classmethod | |||
def load(cls, model: Union[str, Path]): | |||
def load(cls, model_file: Union[str, Path]): |
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.
@yahshibu The load()
method is also used to load a pre-trained tagger by passing a string, as in SequenceTagger.load('ner')
. In this case, the string is not a model file, so I think the original variable name model
might be better here.
1414856
to
1c16d12
Compare
@alanakbik Thank you for your help! I changed the argument's name back to the original one. It passed the tests by travis-ci. Thanks! |
@yahshibu Thanks! |
👍 |
1 similar comment
👍 |
Hello,
I suspect that it is better to attach the staticmethod decorator to some methods.
If you like it, please merge this into master.
Thank you.