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
Currently, adding a processor in order to use the cnlp_transformers library for new tasks requires the following steps:
Clone the repository and install it in editable mode
Write a class in cnlp_processors.py that inherits from the proper base class, defining get_labels and get_one_score
Add the class to the cnlp_processors dictionary, defining a task name as the key
Add the task name and output mode (mtl, classification, tagging, or relex) to the cnlp_output_modes dictionary
If the task isn't a classification task, edit cnlp_compute_metrics to define which metrics to calculate for the task
Steps 2-4 can currently be done dynamically, without editing any files, obviating step 1. Step 5 requires code be edited or the cnlp_compute_metrics function be manually replaced in the cnlpt.cnlp_processors module, which is not a user-friendly workflow.
This process could be simplified so that users never have to clone the repository unless they want to contribute to the project itself; specifically, steps 3-5 could be abstracted into a function so that direct modification of module state is not exposed to the user.
The text was updated successfully, but these errors were encountered:
Currently, adding a processor in order to use the cnlp_transformers library for new tasks requires the following steps:
cnlp_processors.py
that inherits from the proper base class, definingget_labels
andget_one_score
cnlp_processors
dictionary, defining a task name as the keymtl
,classification
,tagging
, orrelex
) to thecnlp_output_modes
dictionarycnlp_compute_metrics
to define which metrics to calculate for the taskSteps 2-4 can currently be done dynamically, without editing any files, obviating step 1. Step 5 requires code be edited or the
cnlp_compute_metrics
function be manually replaced in thecnlpt.cnlp_processors
module, which is not a user-friendly workflow.This process could be simplified so that users never have to clone the repository unless they want to contribute to the project itself; specifically, steps 3-5 could be abstracted into a function so that direct modification of module state is not exposed to the user.
The text was updated successfully, but these errors were encountered: