allenai / allennlp

An open-source NLP research library, built on PyTorch.
http://www.allennlp.org
Apache License 2.0
11.74k stars 2.24k forks source link

unable to load predictor using from_path with cached_path version 1.1.0 #5585

Closed ksteimel closed 2 years ago

ksteimel commented 2 years ago

Checklist

Description

With cached_path version 1.1.0 released 4 days ago, the return value of cached_path was changed from str to Path. This causes issues when the json file is loaded since the json library is only compatible with string path representations. I can submit a PR to fix this shortly.

Python traceback:

``` n [2]: Predictor.from_path("test_fixtures/simple_tagger/serialization/model.tar.gz") 2022-03-07 11:18:33,618 - INFO - allennlp.models.archival - loading archive file test_fixtures/simple_tagger/serialization/model.tar.gz from cache at test_fixtures/simple_tagger/serialization/model.tar.gz 2022-03-07 11:18:33,618 - INFO - allennlp.models.archival - extracting archive file test_fixtures/simple_tagger/serialization/model.tar.gz to temp dir /tmp/tmpefwxrma7 2022-03-07 11:18:33,619 - INFO - allennlp.models.archival - removing temporary unarchived model dir at /tmp/tmpefwxrma7 --------------------------------------------------------------------------- TypeError Traceback (most recent call last) Input In [2], in () ----> 1 Predictor.from_path("test_fixtures/simple_tagger/serialization/model.tar.gz") File ~/allennlp_for_test/allennlp/predictors/predictor.py:366, in Predictor.from_path(cls, archive_path, predictor_name, cuda_device, dataset_reader_to_load, frozen, import_plugins, overrides, **kwargs) 363 if import_plugins: 364 plugins.import_plugins() 365 return Predictor.from_archive( --> 366 load_archive(archive_path, cuda_device=cuda_device, overrides=overrides), 367 predictor_name, 368 dataset_reader_to_load=dataset_reader_to_load, 369 frozen=frozen, 370 extra_args=kwargs, 371 ) File ~/allennlp_for_test/allennlp/models/archival.py:229, in load_archive(archive_file, cuda_device, overrides, weights_file) 226 weights_path = get_weights_path(serialization_dir) 228 # Load config --> 229 config = Params.from_file(os.path.join(serialization_dir, CONFIG_NAME), overrides) 231 # Instantiate model and dataset readers. Use a duplicate of the config, as it will get consumed. 232 dataset_reader, validation_dataset_reader = _load_dataset_readers( 233 config.duplicate(), serialization_dir 234 ) File ~/allennlp_for_test/allennlp/common/params.py:462, in Params.from_file(cls, params_file, params_overrides, ext_vars) 459 params_file = cached_path(params_file) 460 ext_vars = {**_environment_variables(), **ext_vars} --> 462 file_dict = json.loads(evaluate_file(params_file, ext_vars=ext_vars)) 464 if isinstance(params_overrides, dict): 465 params_overrides = json.dumps(params_overrides) TypeError: argument 1 must be str, not PosixPath ```

Related issues or possible duplicates

Environment

OS: Linux

Python version: 3.8.12

Output of pip freeze:

``` aiohttp @ file:///home/conda/feedstock_root/build_artifacts/aiohttp_1637087019853/work aiosignal @ file:///home/conda/feedstock_root/build_artifacts/aiosignal_1636093929600/work -e git+https://github.com/allenai/allennlp.git@99c93439fce9473fb0b1677bd1014fbe79e4f347#egg=allennlp argon2-cffi @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi_1640817743617/work argon2-cffi-bindings @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi-bindings_1640855148858/work asttokens @ file:///home/conda/feedstock_root/build_artifacts/asttokens_1618968359944/work async-timeout @ file:///home/conda/feedstock_root/build_artifacts/async-timeout_1640026696943/work attrs @ file:///home/conda/feedstock_root/build_artifacts/attrs_1640799537051/work backcall @ file:///home/conda/feedstock_root/build_artifacts/backcall_1592338393461/work backports.csv==1.0.7 backports.functools-lru-cache @ file:///home/conda/feedstock_root/build_artifacts/backports.functools_lru_cache_1618230623929/work base58 @ file:///home/conda/feedstock_root/build_artifacts/base58_1635724186165/work beautifulsoup4 @ file:///home/conda/feedstock_root/build_artifacts/beautifulsoup4_1631087867185/work bleach @ file:///home/conda/feedstock_root/build_artifacts/bleach_1629908509068/work blis @ file:///home/conda/feedstock_root/build_artifacts/cython-blis_1645002514022/work boto3 @ file:///home/conda/feedstock_root/build_artifacts/boto3_1646447578967/work botocore @ file:///home/conda/feedstock_root/build_artifacts/botocore_1646438083893/work brotlipy @ file:///home/conda/feedstock_root/build_artifacts/brotlipy_1636012188166/work cached-path @ file:///home/conda/feedstock_root/build_artifacts/cached_path_1646363586912/work cached-property @ file:///home/conda/feedstock_root/build_artifacts/cached_property_1615209429212/work cachetools @ file:///home/conda/feedstock_root/build_artifacts/cachetools_1640686991047/work catalogue @ file:///home/conda/feedstock_root/build_artifacts/catalogue_1638867392804/work certifi==2021.10.8 cffi @ file:///home/conda/feedstock_root/build_artifacts/cffi_1636046063618/work chardet @ file:///home/conda/feedstock_root/build_artifacts/chardet_1635814844635/work charset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1644853463426/work checklist @ file:///home/conda/feedstock_root/build_artifacts/checklist_1626355406222/work cheroot @ file:///home/conda/feedstock_root/build_artifacts/cheroot_1641335003286/work CherryPy @ file:///home/conda/feedstock_root/build_artifacts/cherrypy_1636828596465/work click==7.1.2 colorama @ file:///home/conda/feedstock_root/build_artifacts/colorama_1602866480661/work configparser @ file:///home/conda/feedstock_root/build_artifacts/configparser_1638573090458/work cryptography @ file:///home/conda/feedstock_root/build_artifacts/cryptography_1639699280509/work cymem @ file:///home/conda/feedstock_root/build_artifacts/cymem_1636053152744/work dataclasses @ file:///home/conda/feedstock_root/build_artifacts/dataclasses_1628958434797/work datasets==1.18.4 debugpy @ file:///home/conda/feedstock_root/build_artifacts/debugpy_1636043259437/work decorator @ file:///home/conda/feedstock_root/build_artifacts/decorator_1641555617451/work defusedxml @ file:///home/conda/feedstock_root/build_artifacts/defusedxml_1615232257335/work dill @ file:///home/conda/feedstock_root/build_artifacts/dill_1623610058511/work docker-pycreds==0.4.0 entrypoints @ file:///home/conda/feedstock_root/build_artifacts/entrypoints_1643888246732/work executing @ file:///home/conda/feedstock_root/build_artifacts/executing_1646044401614/work fairscale @ file:///home/conda/feedstock_root/build_artifacts/fairscale_1642208909799/work feedparser @ file:///home/conda/feedstock_root/build_artifacts/feedparser_1624371037925/work filelock @ file:///home/conda/feedstock_root/build_artifacts/filelock_1641470428964/work flit_core @ file:///home/conda/feedstock_root/build_artifacts/flit-core_1645629044586/work/source/flit_core frozenlist @ file:///home/conda/feedstock_root/build_artifacts/frozenlist_1643222566706/work fsspec==2022.2.0 future @ file:///home/conda/feedstock_root/build_artifacts/future_1635819504071/work gitdb @ file:///home/conda/feedstock_root/build_artifacts/gitdb_1635085722655/work GitPython @ file:///home/conda/feedstock_root/build_artifacts/gitpython_1645531658201/work google-api-core @ file:///home/conda/feedstock_root/build_artifacts/google-api-core-split_1644877687275/work google-auth @ file:///home/conda/feedstock_root/build_artifacts/google-auth_1644503159426/work google-cloud-core @ file:///home/conda/feedstock_root/build_artifacts/google-cloud-core_1642607638110/work google-cloud-storage @ file:///home/conda/feedstock_root/build_artifacts/google-cloud-storage_1644876711050/work google-crc32c @ file:///home/conda/feedstock_root/build_artifacts/google-crc32c_1636020895323/work google-resumable-media @ file:///home/conda/feedstock_root/build_artifacts/google-resumable-media_1635195007097/work googleapis-common-protos @ file:///home/conda/feedstock_root/build_artifacts/googleapis-common-protos-feedstock_1641396325888/work grpcio @ file:///home/conda/feedstock_root/build_artifacts/grpcio_1645230339993/work h5py @ file:///home/conda/feedstock_root/build_artifacts/h5py_1637963921863/work huggingface-hub @ file:///home/conda/feedstock_root/build_artifacts/huggingface_hub_1641988520462/work idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1642433548627/work importlib-metadata @ file:///home/conda/feedstock_root/build_artifacts/importlib-metadata_1646003237683/work importlib-resources @ file:///home/conda/feedstock_root/build_artifacts/importlib_resources_1635615662634/work iniconfig @ file:///home/conda/feedstock_root/build_artifacts/iniconfig_1603384189793/work ipykernel @ file:///home/conda/feedstock_root/build_artifacts/ipykernel_1644979757530/work/dist/ipykernel-6.9.1-py3-none-any.whl ipython @ file:///home/conda/feedstock_root/build_artifacts/ipython_1646324678335/work ipython-genutils==0.2.0 ipywidgets @ file:///home/conda/feedstock_root/build_artifacts/ipywidgets_1631590360471/work iso-639 @ file:///home/conda/feedstock_root/build_artifacts/iso-639_1626355260505/work jaraco.classes @ file:///home/conda/feedstock_root/build_artifacts/jaraco.classes_1619298134024/work jaraco.collections @ file:///home/conda/feedstock_root/build_artifacts/jaraco.collections_1641469018844/work jaraco.functools @ file:///home/conda/feedstock_root/build_artifacts/jaraco.functools_1641071972629/work jaraco.text @ file:///home/conda/feedstock_root/build_artifacts/jaraco.text_1636408436868/work jedi @ file:///home/conda/feedstock_root/build_artifacts/jedi_1637175084646/work Jinja2 @ file:///home/conda/feedstock_root/build_artifacts/jinja2_1636510082894/work jmespath @ file:///home/conda/feedstock_root/build_artifacts/jmespath_1589369830981/work joblib @ file:///home/conda/feedstock_root/build_artifacts/joblib_1633637554808/work jsonnet @ file:///home/conda/feedstock_root/build_artifacts/jsonnet_1636234864125/work jsonschema @ file:///home/conda/feedstock_root/build_artifacts/jsonschema-meta_1642000296051/work jupyter-client @ file:///home/conda/feedstock_root/build_artifacts/jupyter_client_1642858610849/work jupyter-core @ file:///home/conda/feedstock_root/build_artifacts/jupyter_core_1645024265313/work jupyterlab-pygments @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_pygments_1601375948261/work jupyterlab-widgets @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_widgets_1631590465624/work langcodes @ file:///home/conda/feedstock_root/build_artifacts/langcodes_1636741340529/work lmdb @ file:///home/conda/feedstock_root/build_artifacts/python-lmdb_1644189490626/work lxml @ file:///home/conda/feedstock_root/build_artifacts/lxml_1645124851601/work MarkupSafe @ file:///home/conda/feedstock_root/build_artifacts/markupsafe_1646594593472/work matplotlib-inline @ file:///home/conda/feedstock_root/build_artifacts/matplotlib-inline_1631080358261/work mistune @ file:///home/conda/feedstock_root/build_artifacts/mistune_1635844675081/work more-itertools @ file:///home/conda/feedstock_root/build_artifacts/more-itertools_1637732846337/work multidict @ file:///home/conda/feedstock_root/build_artifacts/multidict_1643055351442/work multiprocess==0.70.12.2 munch==2.5.0 murmurhash @ file:///home/conda/feedstock_root/build_artifacts/murmurhash_1636019583024/work mysqlclient @ file:///home/conda/feedstock_root/build_artifacts/mysqlclient_1639024663458/work nbclient @ file:///home/conda/feedstock_root/build_artifacts/nbclient_1646594625097/work nbconvert @ file:///home/conda/feedstock_root/build_artifacts/nbconvert_1644591289215/work nbformat @ file:///home/conda/feedstock_root/build_artifacts/nbformat_1617383142101/work nest-asyncio @ file:///home/conda/feedstock_root/build_artifacts/nest-asyncio_1638419302549/work nltk @ file:///home/conda/feedstock_root/build_artifacts/nltk_1633955089856/work notebook @ file:///home/conda/feedstock_root/build_artifacts/notebook_1643149609895/work numpy @ file:///home/conda/feedstock_root/build_artifacts/numpy_1643958805350/work packaging @ file:///home/conda/feedstock_root/build_artifacts/packaging_1637239678211/work pandas==1.4.1 pandocfilters @ file:///home/conda/feedstock_root/build_artifacts/pandocfilters_1631603243851/work parso @ file:///home/conda/feedstock_root/build_artifacts/parso_1638334955874/work pathtools==0.1.2 pathy @ file:///home/conda/feedstock_root/build_artifacts/pathy_1635227809952/work Pattern @ file:///home/conda/feedstock_root/build_artifacts/pattern_1588682046427/work pdfminer.six @ file:///home/conda/feedstock_root/build_artifacts/pdfminer.six_1634369700996/work pexpect @ file:///home/conda/feedstock_root/build_artifacts/pexpect_1602535608087/work pickleshare @ file:///home/conda/feedstock_root/build_artifacts/pickleshare_1602536217715/work Pillow @ file:///home/conda/feedstock_root/build_artifacts/pillow_1645323150784/work pluggy @ file:///home/conda/feedstock_root/build_artifacts/pluggy_1635832818738/work portend @ file:///home/conda/feedstock_root/build_artifacts/portend_1614149298816/work preshed @ file:///home/conda/feedstock_root/build_artifacts/preshed_1636077712344/work prometheus-client @ file:///home/conda/feedstock_root/build_artifacts/prometheus_client_1643395600215/work promise @ file:///home/conda/feedstock_root/build_artifacts/promise_1636078143998/work prompt-toolkit @ file:///home/conda/feedstock_root/build_artifacts/prompt-toolkit_1644497866770/work protobuf==3.19.4 psutil @ file:///home/conda/feedstock_root/build_artifacts/psutil_1640887117172/work ptyprocess @ file:///home/conda/feedstock_root/build_artifacts/ptyprocess_1609419310487/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl pure-eval @ file:///home/conda/feedstock_root/build_artifacts/pure_eval_1642875951954/work py @ file:///home/conda/feedstock_root/build_artifacts/py_1636301881863/work pyarrow==7.0.0 pyasn1==0.4.8 pyasn1-modules==0.2.7 pycparser @ file:///home/conda/feedstock_root/build_artifacts/pycparser_1636257122734/work pydantic @ file:///home/conda/feedstock_root/build_artifacts/pydantic_1636021149719/work Pygments @ file:///home/conda/feedstock_root/build_artifacts/pygments_1641580240686/work pyOpenSSL @ file:///home/conda/feedstock_root/build_artifacts/pyopenssl_1643496850550/work pyparsing @ file:///home/conda/feedstock_root/build_artifacts/pyparsing_1642753572664/work pyrsistent @ file:///home/conda/feedstock_root/build_artifacts/pyrsistent_1642534367111/work PySocks @ file:///home/conda/feedstock_root/build_artifacts/pysocks_1635862404924/work pytest==7.0.1 python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1626286286081/work python-docx @ file:///home/conda/feedstock_root/build_artifacts/python-docx_1622121039670/work pytz @ file:///home/conda/feedstock_root/build_artifacts/pytz_1633452062248/work pyu2f @ file:///home/conda/feedstock_root/build_artifacts/pyu2f_1604248910016/work PyYAML @ file:///home/conda/feedstock_root/build_artifacts/pyyaml_1636139793187/work pyzmq @ file:///home/conda/feedstock_root/build_artifacts/pyzmq_1635877406326/work regex @ file:///home/conda/feedstock_root/build_artifacts/regex_1646209958833/work repoze.lru==0.7 requests @ file:///home/conda/feedstock_root/build_artifacts/requests_1641580202195/work responses==0.18.0 Routes @ file:///home/conda/feedstock_root/build_artifacts/routes_1604230639459/work rsa @ file:///home/conda/feedstock_root/build_artifacts/rsa_1637781155505/work s3transfer @ file:///home/conda/feedstock_root/build_artifacts/s3transfer_1645745825648/work sacremoses @ file:///home/conda/feedstock_root/build_artifacts/sacremoses_1636276757411/work scikit-learn @ file:///home/conda/feedstock_root/build_artifacts/scikit-learn_1640464148960/work scipy @ file:///home/conda/feedstock_root/build_artifacts/scipy_1644357257999/work Send2Trash @ file:///home/conda/feedstock_root/build_artifacts/send2trash_1628511208346/work sentencepiece==0.1.96 sentry-sdk @ file:///home/conda/feedstock_root/build_artifacts/sentry-sdk_1645545793808/work setproctitle @ file:///home/conda/feedstock_root/build_artifacts/setproctitle_1635864195956/work sgmllib3k @ file:///home/conda/feedstock_root/build_artifacts/sgmllib3k_1600021450347/work shellingham @ file:///home/conda/feedstock_root/build_artifacts/shellingham_1612179560728/work shortuuid @ file:///home/conda/feedstock_root/build_artifacts/shortuuid_1636643755121/work simplejson @ file:///home/conda/feedstock_root/build_artifacts/simplejson_1637176768658/work six @ file:///home/conda/feedstock_root/build_artifacts/six_1620240208055/work smart-open @ file:///home/conda/feedstock_root/build_artifacts/smart_open_1630238320325/work smmap @ file:///home/conda/feedstock_root/build_artifacts/smmap_1611376390914/work soupsieve @ file:///home/conda/feedstock_root/build_artifacts/soupsieve_1638550740809/work spacy @ file:///home/conda/feedstock_root/build_artifacts/spacy_1644657943105/work spacy-legacy @ file:///home/conda/feedstock_root/build_artifacts/spacy-legacy_1645713043381/work spacy-loggers @ file:///home/conda/feedstock_root/build_artifacts/spacy-loggers_1634809367310/work sqlitedict==2.0.0 srsly @ file:///home/conda/feedstock_root/build_artifacts/srsly_1638879568141/work stack-data @ file:///home/conda/feedstock_root/build_artifacts/stack_data_1644872665635/work tempora @ file:///home/conda/feedstock_root/build_artifacts/tempora_1643789373873/work tensorboardX @ file:///home/conda/feedstock_root/build_artifacts/tensorboardx_1645578792360/work termcolor==1.1.0 terminado @ file:///home/conda/feedstock_root/build_artifacts/terminado_1646324387640/work testpath @ file:///home/conda/feedstock_root/build_artifacts/testpath_1645693042223/work thinc @ file:///home/conda/feedstock_root/build_artifacts/thinc_1638980259098/work threadpoolctl @ file:///home/conda/feedstock_root/build_artifacts/threadpoolctl_1643647933166/work tokenizers @ file:///home/conda/feedstock_root/build_artifacts/tokenizers_1632285665555/work tomli @ file:///home/conda/feedstock_root/build_artifacts/tomli_1644342247877/work torch @ file:///home/conda/feedstock_root/build_artifacts/pytorch-recipe_1643349930968/work torchvision==0.11.3 tornado @ file:///home/conda/feedstock_root/build_artifacts/tornado_1635819587273/work tqdm @ file:///home/conda/feedstock_root/build_artifacts/tqdm_1646031859244/work traitlets @ file:///home/conda/feedstock_root/build_artifacts/traitlets_1635260543454/work transformers @ file:///home/conda/feedstock_root/build_artifacts/transformers_1640232623006/work typer @ file:///home/conda/feedstock_root/build_artifacts/typer_1630326630489/work typing_extensions @ file:///home/conda/feedstock_root/build_artifacts/typing_extensions_1644850595256/work urllib3 @ file:///home/conda/feedstock_root/build_artifacts/urllib3_1641584929973/work wandb @ file:///home/conda/feedstock_root/build_artifacts/wandb_1646271144123/work wasabi @ file:///home/conda/feedstock_root/build_artifacts/wasabi_1638865582891/work wcwidth @ file:///home/conda/feedstock_root/build_artifacts/wcwidth_1600965781394/work webencodings==0.5.1 widgetsnbextension @ file:///home/conda/feedstock_root/build_artifacts/widgetsnbextension_1637174139311/work xxhash==3.0.0 yarl @ file:///home/conda/feedstock_root/build_artifacts/yarl_1636046814972/work yaspin @ file:///home/conda/feedstock_root/build_artifacts/yaspin_1630004424954/work zc.lockfile==2.0 zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1643828507773/work ```

Output of conda env export:

``` name: allennlp_test channels: - pytorch - conda-forge - huggingface dependencies: - _libgcc_mutex=0.1=conda_forge - _openmp_mutex=4.5=1_llvm - aiohttp=3.8.1=py38h497a2fe_0 - aiosignal=1.2.0=pyhd8ed1ab_0 - argon2-cffi=21.3.0=pyhd8ed1ab_0 - argon2-cffi-bindings=21.2.0=py38h497a2fe_1 - asttokens=2.0.5=pyhd8ed1ab_0 - async-timeout=4.0.2=pyhd8ed1ab_0 - attrs=21.4.0=pyhd8ed1ab_0 - backcall=0.2.0=pyh9f0ad1d_0 - backports=1.0=py_2 - backports.csv=1.0.7=py_0 - backports.functools_lru_cache=1.6.4=pyhd8ed1ab_0 - base58=2.1.1=pyhd8ed1ab_0 - beautifulsoup4=4.10.0=pyha770c72_0 - bleach=4.1.0=pyhd8ed1ab_0 - boto3=1.21.13=pyhd8ed1ab_0 - botocore=1.24.13=pyhd8ed1ab_0 - brotlipy=0.7.0=py38h497a2fe_1003 - bzip2=1.0.8=h7f98852_4 - c-ares=1.18.1=h7f98852_0 - ca-certificates=2021.10.8=ha878542_0 - cached-property=1.5.2=hd8ed1ab_1 - cached_path=1.1.0=py38h578d9bd_0 - cached_property=1.5.2=pyha770c72_1 - cachetools=5.0.0=pyhd8ed1ab_0 - catalogue=2.0.6=py38h578d9bd_1 - certifi=2021.10.8=py38h578d9bd_1 - cffi=1.15.0=py38h3931269_0 - chardet=4.0.0=py38h578d9bd_2 - charset-normalizer=2.0.12=pyhd8ed1ab_0 - checklist=0.0.11=pyhd8ed1ab_0 - cheroot=8.6.0=pyhd8ed1ab_0 - cherrypy=18.6.1=py38h578d9bd_2 - click=7.1.2=pyh9f0ad1d_0 - colorama=0.4.4=pyh9f0ad1d_0 - configparser=5.2.0=pyhd8ed1ab_0 - cryptography=36.0.1=py38h3e25421_0 - cudatoolkit=11.3.1=ha36c431_10 - cudnn=8.2.1.32=h86fa8c9_0 - cymem=2.0.6=py38h709712a_2 - cython-blis=0.7.6=py38h6c62de6_0 - dataclasses=0.8=pyhc8e2a94_3 - debugpy=1.5.1=py38h709712a_0 - decorator=5.1.1=pyhd8ed1ab_0 - defusedxml=0.7.1=pyhd8ed1ab_0 - dill=0.3.4=pyhd8ed1ab_0 - docker-pycreds=0.4.0=py_0 - entrypoints=0.4=pyhd8ed1ab_0 - executing=0.8.3=pyhd8ed1ab_0 - fairscale=0.4.5=cuda112py38h881568f_0 - feedparser=6.0.8=pyhd8ed1ab_0 - ffmpeg=4.3=hf484d3e_0 - filelock=3.4.2=pyhd8ed1ab_1 - flit-core=3.7.1=pyhd8ed1ab_0 - freetype=2.10.4=h0708190_1 - frozenlist=1.3.0=py38h497a2fe_0 - future=0.18.2=py38h578d9bd_4 - giflib=5.2.1=h36c2ea0_2 - gitdb=4.0.9=pyhd8ed1ab_0 - gitpython=3.1.27=pyhd8ed1ab_0 - gmp=6.2.1=h58526e2_0 - gnutls=3.6.13=h85f3911_1 - google-api-core=2.5.0=pyhd8ed1ab_0 - google-auth=2.6.0=pyh6c4a22f_1 - google-cloud-core=2.2.2=pyh6c4a22f_0 - google-cloud-storage=2.1.0=pyh6c4a22f_0 - google-crc32c=1.1.2=py38h8838a9a_2 - google-resumable-media=2.1.0=pyh6c4a22f_0 - googleapis-common-protos=1.54.0=py38h578d9bd_0 - grpcio=1.44.0=py38hdd6454d_0 - h5py=3.6.0=nompi_py38hfbb2109_100 - hdf5=1.12.1=nompi_h2386368_104 - huggingface_hub=0.4.0=pyhd8ed1ab_0 - icu=69.1=h9c3ff4c_0 - idna=3.3=pyhd8ed1ab_0 - importlib-metadata=4.11.2=py38h578d9bd_0 - importlib_metadata=4.11.2=hd8ed1ab_0 - importlib_resources=5.4.0=pyhd8ed1ab_0 - iniconfig=1.1.1=pyh9f0ad1d_0 - ipykernel=6.9.1=py38he5a9106_0 - ipython=8.1.1=py38h578d9bd_0 - ipython_genutils=0.2.0=py_1 - ipywidgets=7.6.5=pyhd8ed1ab_0 - iso-639=0.4.5=pyhd8ed1ab_0 - jaraco.classes=3.2.1=pyhd8ed1ab_1 - jaraco.collections=3.5.1=pyhd8ed1ab_0 - jaraco.functools=3.5.0=pyhd8ed1ab_0 - jaraco.text=3.6.0=py38h578d9bd_0 - jbig=2.1=h7f98852_2003 - jedi=0.18.1=py38h578d9bd_0 - jinja2=3.0.3=pyhd8ed1ab_0 - jmespath=0.10.0=pyh9f0ad1d_0 - joblib=1.1.0=pyhd8ed1ab_0 - jpeg=9e=h7f98852_0 - jsonnet=0.17.0=py38h709712a_2 - jsonschema=4.4.0=pyhd8ed1ab_0 - jupyter_client=7.1.2=pyhd8ed1ab_0 - jupyter_core=4.9.2=py38h578d9bd_0 - jupyterlab_pygments=0.1.2=pyh9f0ad1d_0 - jupyterlab_widgets=1.0.2=pyhd8ed1ab_0 - keyutils=1.6.1=h166bdaf_0 - krb5=1.19.2=h3790be6_4 - lame=3.100=h7f98852_1001 - langcodes=3.3.0=pyhd8ed1ab_0 - lcms2=2.12=hddcbb42_0 - ld_impl_linux-64=2.36.1=hea4e1c9_2 - lerc=3.0=h9c3ff4c_0 - libblas=3.9.0=13_linux64_mkl - libcblas=3.9.0=13_linux64_mkl - libcrc32c=1.1.2=h9c3ff4c_0 - libcurl=7.81.0=h2574ce0_0 - libdeflate=1.10=h7f98852_0 - libedit=3.1.20191231=he28a2e2_2 - libev=4.33=h516909a_1 - libffi=3.4.2=h7f98852_5 - libgcc-ng=11.2.0=h1d223b6_13 - libgfortran-ng=11.2.0=h69a702a_13 - libgfortran5=11.2.0=h5c6108e_13 - libiconv=1.16=h516909a_0 - liblapack=3.9.0=13_linux64_mkl - libnghttp2=1.47.0=h727a467_0 - libnsl=2.0.0=h7f98852_0 - libpng=1.6.37=h21135ba_2 - libprotobuf=3.19.4=h780b84a_0 - libsodium=1.0.18=h36c2ea0_1 - libssh2=1.10.0=ha56f1ee_2 - libstdcxx-ng=11.2.0=he4da1e4_13 - libsvm=325=h9c3ff4c_0 - libtiff=4.3.0=h542a066_3 - libwebp=1.2.2=h3452ae3_0 - libwebp-base=1.2.2=h7f98852_1 - libxcb=1.13=h7f98852_1004 - libxml2=2.9.12=h885dcf4_1 - libxslt=1.1.33=h0ef7038_3 - libzlib=1.2.11=h36c2ea0_1013 - llvm-openmp=13.0.1=he0ac6c6_1 - lxml=4.8.0=py38hf1fe3a4_0 - lz4-c=1.9.3=h9c3ff4c_1 - magma=2.5.4=h6103c52_2 - markupsafe=2.1.0=py38h0a891b7_1 - matplotlib-inline=0.1.3=pyhd8ed1ab_0 - mistune=0.8.4=py38h497a2fe_1005 - mkl=2022.0.1=h8d4b97c_803 - more-itertools=8.12.0=pyhd8ed1ab_0 - multidict=6.0.2=py38h497a2fe_0 - munch=2.5.0=py_0 - murmurhash=1.0.6=py38h709712a_2 - mysql-common=8.0.28=ha770c72_0 - mysql-libs=8.0.28=hfa10184_0 - mysqlclient=2.0.3=py38h709712a_2 - nbclient=0.5.12=pyhd8ed1ab_0 - nbconvert=6.4.2=py38h578d9bd_0 - nbformat=5.1.3=pyhd8ed1ab_0 - nccl=2.11.4.1=h5c60f85_2 - ncurses=6.3=h9c3ff4c_0 - nest-asyncio=1.5.4=pyhd8ed1ab_0 - nettle=3.6=he412f7d_0 - ninja=1.10.2=h4bd325d_1 - nltk=3.6.5=pyhd8ed1ab_0 - notebook=6.4.8=pyha770c72_0 - numpy=1.22.2=py38h6ae9a64_0 - openh264=2.1.1=h780b84a_0 - openjpeg=2.4.0=hb52868f_1 - openssl=1.1.1l=h7f98852_0 - packaging=21.3=pyhd8ed1ab_0 - pandoc=2.17.1.1=ha770c72_0 - pandocfilters=1.5.0=pyhd8ed1ab_0 - parso=0.8.3=pyhd8ed1ab_0 - pathtools=0.1.2=py_1 - pathy=0.6.1=pyhd8ed1ab_0 - pattern=3.6.0=pyh9f0ad1d_1 - pdfminer.six=20211012=pyhd8ed1ab_0 - pexpect=4.8.0=pyh9f0ad1d_2 - pickleshare=0.7.5=py_1003 - pillow=9.0.1=py38h0ee0e06_2 - pip=22.0.4=pyhd8ed1ab_0 - pluggy=1.0.0=py38h578d9bd_2 - portend=2.7.1=pyhd8ed1ab_0 - preshed=3.0.6=py38h709712a_1 - prometheus_client=0.13.1=pyhd8ed1ab_0 - promise=2.3=py38h578d9bd_5 - prompt-toolkit=3.0.27=pyha770c72_0 - protobuf=3.19.4=py38h709712a_0 - psutil=5.9.0=py38h497a2fe_0 - pthread-stubs=0.4=h36c2ea0_1001 - ptyprocess=0.7.0=pyhd3deb0d_0 - pure_eval=0.2.2=pyhd8ed1ab_0 - py=1.11.0=pyh6c4a22f_0 - pyasn1=0.4.8=py_0 - pyasn1-modules=0.2.7=py_0 - pycparser=2.21=pyhd8ed1ab_0 - pydantic=1.8.2=py38h497a2fe_2 - pygments=2.11.2=pyhd8ed1ab_0 - pyopenssl=22.0.0=pyhd8ed1ab_0 - pyparsing=3.0.7=pyhd8ed1ab_0 - pyrsistent=0.18.1=py38h497a2fe_0 - pysocks=1.7.1=py38h578d9bd_4 - pytest=7.0.1=py38h578d9bd_0 - python=3.8.12=ha38a3c6_3_cpython - python-dateutil=2.8.2=pyhd8ed1ab_0 - python-docx=0.8.11=pyhd8ed1ab_0 - python-lmdb=1.3.0=py38h709712a_0 - python_abi=3.8=2_cp38 - pytorch=1.10.2=cuda112py38h6425f36_0 - pytorch-gpu=1.10.2=cuda112py38h0bbbad9_0 - pytz=2021.3=pyhd8ed1ab_0 - pyu2f=0.1.5=pyhd8ed1ab_0 - pyyaml=6.0=py38h497a2fe_3 - pyzmq=22.3.0=py38h2035c66_1 - readline=8.1=h46c0cb4_0 - regex=2022.3.2=py38h0a891b7_0 - repoze.lru=0.7=py_0 - requests=2.27.1=pyhd8ed1ab_0 - routes=2.5.1=pyhd8ed1ab_0 - rsa=4.8=pyhd8ed1ab_0 - s3transfer=0.5.2=pyhd8ed1ab_0 - sacremoses=0.0.46=pyhd8ed1ab_0 - scikit-learn=1.0.2=py38h1561384_0 - scipy=1.8.0=py38h56a6a73_1 - send2trash=1.8.0=pyhd8ed1ab_0 - sentencepiece=0.1.96=py38h1fd1430_0 - sentry-sdk=1.5.6=pyhd8ed1ab_0 - setproctitle=1.2.2=py38h497a2fe_1 - setuptools=60.9.3=py38h578d9bd_0 - sgmllib3k=1.0.0=pyh9f0ad1d_0 - shellingham=1.4.0=pyh44b312d_0 - shortuuid=1.0.8=py38h578d9bd_0 - simplejson=3.17.6=py38h497a2fe_0 - six=1.16.0=pyh6c4a22f_0 - sleef=3.5.1=h9b69904_2 - smart_open=5.2.1=pyhd8ed1ab_0 - smmap=3.0.5=pyh44b312d_0 - soupsieve=2.3.1=pyhd8ed1ab_0 - spacy=3.2.2=py38h2b96118_0 - spacy-legacy=3.0.9=pyhd8ed1ab_0 - spacy-loggers=1.0.1=pyhd8ed1ab_0 - sqlite=3.37.0=h9cd32fc_0 - srsly=2.4.2=py38h709712a_1 - stack_data=0.2.0=pyhd8ed1ab_0 - tbb=2021.5.0=h4bd325d_0 - tempora=5.0.1=pyhd8ed1ab_0 - tensorboardx=2.5=pyhd8ed1ab_0 - termcolor=1.1.0=py_2 - terminado=0.13.2=py38h578d9bd_0 - testpath=0.6.0=pyhd8ed1ab_0 - thinc=8.0.13=py38h2b96118_0 - threadpoolctl=3.1.0=pyh8a188c0_0 - tk=8.6.12=h27826a3_0 - tokenizers=0.10.3=py38hb63a372_1 - tomli=2.0.1=pyhd8ed1ab_0 - torchvision=0.11.3=py38_cu113 - tornado=6.1=py38h497a2fe_2 - tqdm=4.63.0=pyhd8ed1ab_0 - traitlets=5.1.1=pyhd8ed1ab_0 - transformers=4.15.0=pyhd8ed1ab_0 - typer=0.4.0=pyhd8ed1ab_0 - typing-extensions=4.1.1=hd8ed1ab_0 - typing_extensions=4.1.1=pyha770c72_0 - urllib3=1.26.8=pyhd8ed1ab_1 - wandb=0.12.11=pyhd8ed1ab_0 - wasabi=0.9.0=pyhd8ed1ab_0 - wcwidth=0.2.5=pyh9f0ad1d_2 - webencodings=0.5.1=py_1 - wheel=0.37.1=pyhd8ed1ab_0 - widgetsnbextension=3.5.2=py38h578d9bd_1 - xorg-libxau=1.0.9=h7f98852_0 - xorg-libxdmcp=1.1.3=h7f98852_0 - xz=5.2.5=h516909a_1 - yaml=0.2.5=h7f98852_2 - yarl=1.7.2=py38h497a2fe_1 - yaspin=2.1.0=pyhd8ed1ab_0 - zc.lockfile=2.0=py_0 - zeromq=4.3.4=h9c3ff4c_1 - zipp=3.7.0=pyhd8ed1ab_1 - zlib=1.2.11=h36c2ea0_1013 - zstd=1.5.2=ha95c52a_0 - pip: - datasets==1.18.4 - fsspec==2022.2.0 - multiprocess==0.70.12.2 - pandas==1.4.1 - pyarrow==7.0.0 - responses==0.18.0 - sqlitedict==2.0.0 - xxhash==3.0.0 prefix: /opt/mambaforge/envs/allennlp_test ```

Steps to reproduce

Example source:

``` from allennlp.predictors import Predictor Predictor.from_path("test_fixtures/simple_tagger/serialization/model.tar.gz") ```