You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem: Some taskmodules require different behavior during training.
Solution: Introduce a training flag (controlled by .train(..) and .eval(..)) similar to pytorch's Module, as users are already familiar with the usage.
The text was updated successfully, but these errors were encountered:
ChristophAlt
changed the title
Add train and eval model to taskmodules
Add train and eval mode to taskmodules
Mar 4, 2022
After thinking about this for a while, I'm not so much in favor of it since this introduces a flag that can be set in arbitrary locations and its state may not easy to track. I would propose another solution: a method Taskmodule.prepare_documents that is called before Taskmodule.encode_input and by default does nothing. However, it gets a boolean parameter ground_truth_available which is set to the value of encode_target. This method can be used to e.g. add missing annotation layers or some metadata to the document. It can also be used to e.g. add candidate entity pairs for RE with bit more sophisticated logic (this would facilitate some parts of the SAM models). See #102 for the required changes.
Problem: Some taskmodules require different behavior during training.
Solution: Introduce a training flag (controlled by .train(..) and .eval(..)) similar to pytorch's Module, as users are already familiar with the usage.
The text was updated successfully, but these errors were encountered: