ArneBinder / pytorch-ie-hydra-template-1

PyTorch-IE Hydra Template
8 stars 1 forks source link

predict.py expects tags by default #175

Open kai-car opened 2 months ago

kai-car commented 2 months ago

I tried starting inference on a trained model on the cluster (using Pegasus Bridle wrapper) with the following command:

pega_run python src/predict.py dataset=drugprot_prepared +pipeline.device=0 model_name_or_path=./models/drugprot/re_text_classification_with_indices/2024-08-01_11-21-41 dataset_split=test_background


I received the following warning and the process stopped:

[2024-08-06 09:54:28,173][src.utils.task_utils][INFO] - Enforcing tags! <cfg.extras.enforce_tags=True>
[2024-08-06 09:54:28,197][src.utils.rich_utils][WARNING] - No tags provided in config. Prompting user to input tags...


I provisionally solved this through adding the argument extras.enforce_tags=False to the initial command, as the default configuration in extras/default.yaml is True. In the end the command looked like this:

pega_run python src/predict.py dataset=drugprot_prepared +pipeline.device=0 model_name_or_path=./models/drugprot/re_text_classification_with_indices/2024-08-01_11-21-41 dataset_split=test_background extras.enforce_tags=False