Skip to content
This repository has been archived by the owner on Jan 20, 2023. It is now read-only.

Specify the entailment predictor manually #478

Merged
merged 3 commits into from
Jun 12, 2020
Merged

Conversation

dirkgr
Copy link
Member

@dirkgr dirkgr commented Jun 11, 2020

I'm afraid we need this as well to make entailment work.

@dirkgr dirkgr requested a review from schmmd June 11, 2020 08:59
@schmmd
Copy link
Member

schmmd commented Jun 11, 2020

@dirkgr do I need RC6?

(allennlp-rc5) michaels@allennlp-server3 ~ $ echo '{"hypothesis": "Two women are sitting on a blanket near some rocks talking about politics.", "premise": "Two women are wandering along the shore drinking iced tea."}' | allennlp predict https://storage.googleapis.com/allennlp-public-models/snli_roberta-2020.06.09.tar.gz -
Traceback (most recent call last):
  File "/home/michaels/miniconda2/envs/allennlp-rc5/bin/allennlp", line 8, in <module>
    sys.exit(run())
  File "/home/michaels/miniconda2/envs/allennlp-rc5/lib/python3.7/site-packages/allennlp/__main__.py", line 19, in run
    main(prog="allennlp")
  File "/home/michaels/miniconda2/envs/allennlp-rc5/lib/python3.7/site-packages/allennlp/commands/__init__.py", line 92, in main
    args.func(args)
  File "/home/michaels/miniconda2/envs/allennlp-rc5/lib/python3.7/site-packages/allennlp/commands/predict.py", line 197, in _predict
    predictor = _get_predictor(args)
  File "/home/michaels/miniconda2/envs/allennlp-rc5/lib/python3.7/site-packages/allennlp/commands/predict.py", line 102, in _get_predictor
    archive, args.predictor, dataset_reader_to_load=args.dataset_reader_choice
  File "/home/michaels/miniconda2/envs/allennlp-rc5/lib/python3.7/site-packages/allennlp/predictors/predictor.py", line 288, in from_archive
    ) if predictor_name is not None else cls
  File "/home/michaels/miniconda2/envs/allennlp-rc5/lib/python3.7/site-packages/allennlp/common/registrable.py", line 137, in by_name
    subclass, constructor = cls.resolve_class_name(name)
  File "/home/michaels/miniconda2/envs/allennlp-rc5/lib/python3.7/site-packages/allennlp/common/registrable.py", line 185, in resolve_class_name
    f"{name} is not a registered name for {cls.__name__}. "
allennlp.common.checks.ConfigurationError: textual_entailment is not a registered name for Predictor. You probably need to use the --include-package flag to load your custom code. Alternatively, you can specify your choices using fully-qualified paths, e.g. {"model": "my_module.models.MyModel"} in which case they will be automatically imported correctly.
2020-06-11 08:45:33,076 - INFO - allennlp.models.archival - removing temporary unarchived model dir at /tmp/tmprzzm83po

@dirkgr
Copy link
Member Author

dirkgr commented Jun 11, 2020

Did we cut RC6 yet? I tried it against the latest master.

@schmmd
Copy link
Member

schmmd commented Jun 11, 2020

No, we did not. Let's discuss in standup.

@dirkgr dirkgr merged commit 501e45a into master Jun 12, 2020
@dirkgr dirkgr deleted the SpecifyEntailmentPredictor branch June 12, 2020 08:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants