New and exciting objectives appear in NLP research often, and the Adaptor library aims to make it as simple as possible to add them! If you'd like to add a new Objective
in Adaptor
follow these steps:
- Implement it: pick the logically-best-matching abstract objective from
objectives
, and implement the remaining abstract methods. - Test it: add a simple test for your objective to
tests/objectives_test.py
, that will passassert_module_objective_ok
. - End-to-end-test it: add a test to
end2end_usecases_test.py
with a complete demonstration on how to use your objective in a meaningful way - (optional): Create an example that will apply the objective in a real training process, on real data.
See other examples in
examples
folder. - Share! Create a PR or issue here in GitHub with a link to your fork, and we'll happily take a look!