Skip to content

Commit

Permalink
Added parameter names to convert_from_transformers call in question_a…
Browse files Browse the repository at this point in the history
…nswering_crossvalidation.py (#672)

Parameter names were missing, a change in the order of parameters caused a bug.
  • Loading branch information
julian-risch authored Jan 5, 2021
1 parent 4cac773 commit 1f046ca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/question_answering_crossvalidation.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def train_on_split(silo_to_use, n_fold):
logger.info(f"############ Crossvalidation: Fold {n_fold} ############")

# fine-tune pre-trained question-answering model
model = AdaptiveModel.convert_from_transformers(lang_model, device, "question_answering")
model = AdaptiveModel.convert_from_transformers(lang_model, device=device, task_type="question_answering")
model.connect_heads_with_processor(data_silo.processor.tasks, require_labels=True)
# If positive, thjs will boost "No Answer" as prediction.
# If negative, this will prevent the model from giving "No Answer" as prediction.
Expand Down

0 comments on commit 1f046ca

Please sign in to comment.