dottxt-ai / outlines

Structured Text Generation
https://dottxt-ai.github.io/outlines/
Apache License 2.0
9.24k stars 471 forks source link

Modal example should include setting HF_TOKEN #1024

Closed ericmjl closed 3 months ago

ericmjl commented 4 months ago

Describe the issue as clearly as possible:

The Modal example fails if run by a user who has a Modal account but does not have HF_TOKEN set in their account as a secret. The failure shows up because the user must give authenticated access to the model:

╭─ Error ────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Image build for im-0ZgbiNtG0umeRsehsFHY8b failed with the exception:                                                           │
│ OSError('You are trying to access a gated repo.\nMake sure to have access to it at                                             │
│ https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2.\n401 Client Error. (Request ID:                                     │
│ Root=1-668b083f-0910e525158ec3831a5097cd;aaa8915b-97db-4545-95ea-02d5e233df65)\n\nCannot access gated repo for url             │
│ https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.2/resolve/main/config.json.\nAccess to model                           │
│ mistralai/Mistral-7B-Instruct-v0.2 is restricted. You must be authenticated to access it.')                                    │
╰────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯

I would like to propose that either the docs show the use of a model that has no such gating, or that the docs explicitly include the need to set HF_TOKEN and to accept the terms on the model page before accessing.

Steps/code to reproduce the bug:

# Ensure that you have HF_TOKEN unset in your Modal account, then execute https://github.com/outlines-dev/outlines/blob/main/examples/modal_example.py

Expected result:

I would have expected the example to run as-is.

Error message:

(See above)

Outlines/Python version information:

Version information

``` adal @ file:///home/conda/feedstock_root/build_artifacts/adal_1617781612176/work aiobotocore @ file:///home/conda/feedstock_root/build_artifacts/aiobotocore_1712100610409/work aiohttp==3.9.1 aioitertools @ file:///home/conda/feedstock_root/build_artifacts/aioitertools_1663521246073/work aiosignal @ file:///home/conda/feedstock_root/build_artifacts/aiosignal_1667935791922/work aiostream==0.5.2 annotated-types==0.6.0 anyio @ file:///home/conda/feedstock_root/build_artifacts/anyio_1688651106312/work/dist appnope @ file:///home/conda/feedstock_root/build_artifacts/appnope_1649077682618/work argcomplete @ file:///home/conda/feedstock_root/build_artifacts/argcomplete_1686587382193/work argon2-cffi @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi_1640817743617/work argon2-cffi-bindings @ file:///Users/runner/miniforge3/conda-bld/argon2-cffi-bindings_1666850813776/work arrow @ file:///home/conda/feedstock_root/build_artifacts/arrow_1662382474514/work asgiref==3.7.2 astor==0.8.1 asttokens @ file:///home/conda/feedstock_root/build_artifacts/asttokens_1670263926556/work async-lru @ file:///home/conda/feedstock_root/build_artifacts/async-lru_1690563019058/work async-timeout @ file:///home/conda/feedstock_root/build_artifacts/async-timeout_1640026696943/work attrs @ file:///home/conda/feedstock_root/build_artifacts/attrs_1683424013410/work auth0-python @ file:///home/conda/feedstock_root/build_artifacts/auth0-python_1674244134953/work azure-common @ file:///home/conda/feedstock_root/build_artifacts/azure-common_1643931587085/work azure-core @ file:///home/conda/feedstock_root/build_artifacts/azure-core_1686695114780/work azure-identity @ file:///home/conda/feedstock_root/build_artifacts/azure-identity_1634187555011/work azure-mgmt-containerservice @ file:///home/conda/feedstock_root/build_artifacts/azure-mgmt-containerservice_1634666960967/work azure-mgmt-core @ file:///home/conda/feedstock_root/build_artifacts/azure-mgmt-core_1680866304512/work b2==3.17.0 b2sdk==1.33.0 Babel @ file:///home/conda/feedstock_root/build_artifacts/babel_1677767029043/work backcall @ file:///home/conda/feedstock_root/build_artifacts/backcall_1592338393461/work backoff==2.2.1 backports.functools-lru-cache @ file:///home/conda/feedstock_root/build_artifacts/backports.functools_lru_cache_1618230623929/work bcrypt==4.1.2 beartype==0.15.0 beautifulsoup4 @ file:///home/conda/feedstock_root/build_artifacts/beautifulsoup4_1680888073205/work bibtexparser==1.4.0 binaryornot==0.4.4 bleach @ file:///home/conda/feedstock_root/build_artifacts/bleach_1674535352125/work blinker @ file:///home/conda/feedstock_root/build_artifacts/blinker_1681349778161/work bokeh==3.4.0 boltons @ file:///home/conda/feedstock_root/build_artifacts/boltons_1677499911949/work boto3 @ file:///home/conda/feedstock_root/build_artifacts/boto3_1709076140942/work botocore @ file:///home/conda/feedstock_root/build_artifacts/botocore_1709071494250/work Brotli==1.0.9 brotlipy @ file:///Users/runner/miniforge3/conda-bld/brotlipy_1666764759924/work build==1.0.3 cached-property @ file:///home/conda/feedstock_root/build_artifacts/cached_property_1615209429212/work cachetools @ file:///home/conda/feedstock_root/build_artifacts/cachetools_1674482203741/work case-converter==1.1.0 certifi==2023.11.17 cffi @ file:///Users/runner/miniforge3/conda-bld/cffi_1671179893800/work cfgv==3.4.0 chardet @ file:///Users/runner/miniforge3/conda-bld/chardet_1649184172579/work charset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1678108872112/work chroma-hnswlib==0.7.3 chromadb==0.4.22 click==8.1.7 cloudflare @ file:///home/conda/feedstock_root/build_artifacts/cloudflare_1669336629832/work cloudpickle==2.2.1 coiled==1.1.3 colorama @ file:///home/conda/feedstock_root/build_artifacts/colorama_1666700638685/work coloredlogs==15.0.1 comm @ file:///home/conda/feedstock_root/build_artifacts/comm_1679481329611/work commonmark==0.9.1 conda==23.3.1 conda-package-handling @ file:///home/conda/feedstock_root/build_artifacts/conda-package-handling_1669907009957/work conda_package_streaming @ file:///home/conda/feedstock_root/build_artifacts/conda-package-streaming_1685101166527/work contourpy==1.2.1 cookiecutter==2.6.0 cryptography @ file:///Users/runner/miniforge3/conda-bld/cryptography-split_1689056134643/work dask==2023.10.0 dataclasses @ file:///home/conda/feedstock_root/build_artifacts/dataclasses_1628958434797/work dataclasses-json==0.5.14 debugpy @ file:///Users/runner/miniforge3/conda-bld/debugpy_1680755676047/work decorator @ file:///home/conda/feedstock_root/build_artifacts/decorator_1641555617451/work defusedxml @ file:///home/conda/feedstock_root/build_artifacts/defusedxml_1615232257335/work Deprecated==1.2.14 deprecation==2.1.0 distlib==0.3.7 distributed==2023.10.0 distro==1.9.0 docutils==0.20.1 ecdsa @ file:///home/conda/feedstock_root/build_artifacts/ecdsa_1657437522792/work entrypoints @ file:///home/conda/feedstock_root/build_artifacts/entrypoints_1643888246732/work exceptiongroup @ file:///home/conda/feedstock_root/build_artifacts/exceptiongroup_1688381075899/work executing @ file:///home/conda/feedstock_root/build_artifacts/executing_1667317341051/work fabric==3.2.2 fastapi==0.103.2 fastjsonschema @ file:///home/conda/feedstock_root/build_artifacts/python-fastjsonschema_1690055433477/work/dist feedparser==6.0.10 filelock==3.12.2 flatbuffers==23.5.26 flit_core @ file:///home/conda/feedstock_root/build_artifacts/flit-core_1684084314667/work/source/flit_core fqdn @ file:///home/conda/feedstock_root/build_artifacts/fqdn_1638810296540/work/dist frozenlist @ file:///Users/runner/miniforge3/conda-bld/frozenlist_1667935502123/work fsspec==2023.6.0 future @ file:///home/conda/feedstock_root/build_artifacts/future_1673596611778/work gilknocker==0.4.1 git-filter-repo==2.38.0 gitbot @ git+https://github.com/ericmjl/gitbot.git@c18e4b6d1b7748a05216839cb254d59242c6efcb gitdb==4.0.10 gitignore-parser @ file:///home/conda/feedstock_root/build_artifacts/gitignore-parser_1625162418256/work GitPython==3.1.32 gmpy2 @ file:///Users/runner/miniforge3/conda-bld/gmpy2_1666808753481/work google-auth @ file:///home/conda/feedstock_root/build_artifacts/google-auth_1686724583094/work googleapis-common-protos==1.62.0 greenlet==3.0.3 grpcio==1.60.0 grpclib==0.4.7 h11==0.14.0 h2==4.1.0 hpack==4.0.0 httpcore==0.18.0 httptools==0.6.1 httpx==0.25.0 huggingface-hub==0.20.2 humanfriendly==10.0 hyperframe==6.0.1 icontract==2.6.2 identify==2.5.27 idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1593328102638/work importlib-metadata==6.11.0 importlib-resources @ file:///home/conda/feedstock_root/build_artifacts/importlib_resources_1689017639396/work interegular==0.3.2 invoke==2.2.0 ipykernel @ file:///Users/runner/miniforge3/conda-bld/ipykernel_1690311370777/work ipython @ file:///Users/runner/miniforge3/conda-bld/ipython_1685727999785/work ipython-genutils==0.2.0 ipywidgets @ file:///home/conda/feedstock_root/build_artifacts/ipywidgets_1690877070294/work isodate @ file:///home/conda/feedstock_root/build_artifacts/isodate_1639582763789/work isoduration @ file:///home/conda/feedstock_root/build_artifacts/isoduration_1638811571363/work/dist jedi @ file:///home/conda/feedstock_root/build_artifacts/jedi_1690896916983/work Jinja2 @ file:///home/conda/feedstock_root/build_artifacts/jinja2_1654302431367/work jinja2-strcase==0.0.2 jmespath @ file:///home/conda/feedstock_root/build_artifacts/jmespath_1655568249366/work joblib @ file:///home/conda/feedstock_root/build_artifacts/joblib_1691577114857/work json5 @ file:///home/conda/feedstock_root/build_artifacts/json5_1688248289187/work jsondiff==2.0.0 jsonlines @ file:///home/conda/feedstock_root/build_artifacts/jsonlines_1656714844214/work jsonpatch==1.33 jsonpointer==2.0 jsonschema @ file:///home/conda/feedstock_root/build_artifacts/jsonschema-meta_1689687135513/work jsonschema-specifications @ file:///home/conda/feedstock_root/build_artifacts/jsonschema-specifications_1689701150890/work jupyter @ file:///Users/runner/miniforge3/conda-bld/jupyter_1670249684111/work jupyter-bokeh==3.0.7 jupyter-console @ file:///home/conda/feedstock_root/build_artifacts/jupyter_console_1678118109161/work jupyter-events @ file:///home/conda/feedstock_root/build_artifacts/jupyter_events_1690807595996/work jupyter-lsp @ file:///home/conda/feedstock_root/build_artifacts/jupyter-lsp-meta_1685453365113/work/jupyter-lsp jupyter_client @ file:///home/conda/feedstock_root/build_artifacts/jupyter_client_1687700988094/work jupyter_core @ file:///Users/runner/miniforge3/conda-bld/jupyter_core_1686775679566/work jupyter_server @ file:///home/conda/feedstock_root/build_artifacts/jupyter_server_1687869799272/work jupyter_server_terminals @ file:///home/conda/feedstock_root/build_artifacts/jupyter_server_terminals_1673491454549/work jupyterlab @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_1694728214446/work jupyterlab-pygments @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_pygments_1649936611996/work jupyterlab-widgets @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_widgets_1688489450369/work jupyterlab_server @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_server_1690205927615/work kubernetes==29.0.0 lancedb==0.6.7 langchain==0.1.1 langchain-community==0.0.13 langchain-core==0.1.11 langsmith==0.0.81 lark==1.1.7 libmambapy @ file:///Users/runner/miniforge3/conda-bld/mamba-split_1669715363328/work/libmambapy linkify-it-py==2.0.2 litellm==1.16.16 llama-index==0.9.32 llamabot==0.4.4 locket==1.0.0 logfury==1.0.1 loguru==0.7.0 mamba @ file:///Users/runner/miniforge3/conda-bld/mamba-split_1669715363328/work/mamba Markdown==3.4.4 markdown-it-py==3.0.0 MarkupSafe @ file:///Users/runner/miniforge3/conda-bld/markupsafe_1685769224421/work marshmallow==3.20.1 matplotlib-inline @ file:///home/conda/feedstock_root/build_artifacts/matplotlib-inline_1660814786464/work mdit-py-plugins==0.4.0 mdurl==0.1.2 mistune @ file:///home/conda/feedstock_root/build_artifacts/mistune_1686313613819/work/dist mlx==0.0.4 mmh3==4.1.0 modal==0.63.41 monotonic==1.6 mpmath==1.3.0 msal @ file:///home/conda/feedstock_root/build_artifacts/msal_1681775359695/work msal-extensions @ file:///home/conda/feedstock_root/build_artifacts/msal_extensions_1639396301109/work msgpack==1.0.7 msrest @ file:///home/conda/feedstock_root/build_artifacts/msrest_1662028346497/work msrestazure @ file:///home/conda/feedstock_root/build_artifacts/msrestazure_1610096848287/work multidict @ file:///Users/runner/miniforge3/conda-bld/multidict_1672339514000/work mutagen==1.46.0 mypy-extensions==1.0.0 nbclassic @ file:///home/conda/feedstock_root/build_artifacts/nbclassic_1683202081046/work nbclient @ file:///home/conda/feedstock_root/build_artifacts/nbclient_1684790896106/work nbconvert @ file:///home/conda/feedstock_root/build_artifacts/nbconvert-meta_1690313290323/work nbformat @ file:///home/conda/feedstock_root/build_artifacts/nbformat_1690814868471/work nebari @ file:///home/conda/feedstock_root/build_artifacts/nebari_1670454649658/work nest-asyncio==1.5.9 networkx==3.1 nltk @ file:///home/conda/feedstock_root/build_artifacts/nltk_1672696305909/work nodeenv==1.8.0 notebook @ file:///home/conda/feedstock_root/build_artifacts/notebook_1680870634737/work notebook_shim @ file:///home/conda/feedstock_root/build_artifacts/notebook-shim_1682360583588/work numexpr==2.8.5 numpy==1.25.2 oauthlib @ file:///home/conda/feedstock_root/build_artifacts/oauthlib_1666056362788/work onnxruntime==1.16.3 openai==1.8.0 openapi-schema-pydantic==1.2.4 opentelemetry-api==1.22.0 opentelemetry-exporter-otlp-proto-common==1.22.0 opentelemetry-exporter-otlp-proto-grpc==1.22.0 opentelemetry-instrumentation==0.43b0 opentelemetry-instrumentation-asgi==0.43b0 opentelemetry-instrumentation-fastapi==0.43b0 opentelemetry-proto==1.22.0 opentelemetry-sdk==1.22.0 opentelemetry-semantic-conventions==0.43b0 opentelemetry-util-http==0.43b0 outlines==0.0.8 overrides @ file:///home/conda/feedstock_root/build_artifacts/overrides_1666057828264/work packaging==23.2 pandas==2.0.3 pandocfilters @ file:///home/conda/feedstock_root/build_artifacts/pandocfilters_1631603243851/work panel==1.4.0 param==2.1.0 paramiko==3.3.1 parso @ file:///home/conda/feedstock_root/build_artifacts/parso_1638334955874/work partd==1.4.1 pdfminer.six==20231228 pep517 @ file:///home/conda/feedstock_root/build_artifacts/pep517_1667916641627/work perscache==0.6.1 pexpect @ file:///home/conda/feedstock_root/build_artifacts/pexpect_1667297516076/work phx-class-registry==4.1.0 pickleshare @ file:///home/conda/feedstock_root/build_artifacts/pickleshare_1602536217715/work Pillow==10.0.0 pipx @ file:///home/conda/feedstock_root/build_artifacts/pipx_1678724028129/work pkgutil_resolve_name @ file:///home/conda/feedstock_root/build_artifacts/pkgutil-resolve-name_1633981968097/work platformdirs==3.11.0 pluggy @ file:///home/conda/feedstock_root/build_artifacts/pluggy_1687776318736/work portalocker @ file:///Users/runner/miniforge3/conda-bld/portalocker_1674135750919/work posthog==3.3.1 pre-commit==3.4.0 prometheus-client @ file:///home/conda/feedstock_root/build_artifacts/prometheus_client_1689032443210/work prompt-toolkit @ file:///home/conda/feedstock_root/build_artifacts/prompt-toolkit_1677600924538/work protobuf==4.25.2 psutil @ file:///Users/runner/miniforge3/conda-bld/psutil_1681775207008/work psycopg2-binary==2.9.9 ptyprocess @ file:///home/conda/feedstock_root/build_artifacts/ptyprocess_1609419310487/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl pulsar-client==3.4.0 pure-eval @ file:///home/conda/feedstock_root/build_artifacts/pure_eval_1642875951954/work py==1.11.0 pyarrow==15.0.0 pyasn1==0.4.8 pyasn1-modules==0.2.7 pycosat @ file:///Users/runner/miniforge3/conda-bld/pycosat_1666836623787/work pycparser @ file:///home/conda/feedstock_root/build_artifacts/pycparser_1593275161868/work pycryptodomex==3.18.0 pydantic==2.5.3 pydantic_core==2.14.6 pyds-cli==0.5.1 PyGithub==2.1.1 Pygments @ file:///home/conda/feedstock_root/build_artifacts/pygments_1681904169130/work PyJWT @ file:///home/conda/feedstock_root/build_artifacts/pyjwt_1683676063469/work pylance==0.10.9 PyNaCl @ file:///Users/runner/miniforge3/conda-bld/pynacl_1666862683901/work pyobjc-core @ file:///Users/runner/miniforge3/conda-bld/pyobjc-core_1686129289943/work pyobjc-framework-Cocoa @ file:///Users/runner/miniforge3/conda-bld/pyobjc-framework-cocoa_1686136016408/work pyOpenSSL @ file:///home/conda/feedstock_root/build_artifacts/pyopenssl_1685514481738/work pyparsing @ file:///home/conda/feedstock_root/build_artifacts/pyparsing_1652235407899/work pypdf==3.16.0 pyperclip==1.8.2 PyPika==0.48.9 pyproject_hooks==1.0.0 pyprojroot==0.3.0 PySocks @ file:///Users/runner/miniforge3/conda-bld/pysocks_1648857351433/work python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1626286286081/work python-dotenv==1.0.0 python-jose @ file:///home/conda/feedstock_root/build_artifacts/python-jose_1624701740191/work python-json-logger @ file:///home/conda/feedstock_root/build_artifacts/python-json-logger_1677079630776/work python-keycloak @ file:///home/conda/feedstock_root/build_artifacts/python-keycloak_1676025412884/work python-slugify==8.0.1 pytz @ file:///home/conda/feedstock_root/build_artifacts/pytz_1680088766131/work pyu2f @ file:///home/conda/feedstock_root/build_artifacts/pyu2f_1604248910016/work pyviz_comms==3.0.0 PyYAML @ file:///Users/runner/miniforge3/conda-bld/pyyaml_1666772543719/work pyzmq @ file:///Users/runner/miniforge3/conda-bld/pyzmq_1685519412652/work pyzotero==1.5.9 questionary @ file:///home/conda/feedstock_root/build_artifacts/questionary_1647298722583/work rank-bm25==0.2.2 ratelimiter==1.2.0.post0 referencing @ file:///home/conda/feedstock_root/build_artifacts/referencing_1689701127998/work regex @ file:///Users/runner/miniforge3/conda-bld/regex_1691539084301/work requests==2.32.3 requests-oauthlib @ file:///home/conda/feedstock_root/build_artifacts/requests-oauthlib_1643557462909/work requests-toolbelt==0.9.1 retry==0.9.2 rfc3339-validator @ file:///home/conda/feedstock_root/build_artifacts/rfc3339-validator_1638811747357/work rfc3986-validator @ file:///home/conda/feedstock_root/build_artifacts/rfc3986-validator_1598024191506/work rich @ file:///home/conda/feedstock_root/build_artifacts/rich_1664752510089/work rpds-py @ file:///Users/runner/miniforge3/conda-bld/rpds-py_1689705286341/work rsa @ file:///home/conda/feedstock_root/build_artifacts/rsa_1658328885051/work rst2ansi==0.1.5 ruamel-yaml-conda @ file:///Users/runner/miniforge3/conda-bld/ruamel_yaml_1666819987451/work ruamel.yaml @ file:///Users/runner/miniforge3/conda-bld/ruamel.yaml_1678273098088/work ruamel.yaml.clib @ file:///Users/runner/miniforge3/conda-bld/ruamel.yaml.clib_1670412881259/work s3fs @ file:///home/conda/feedstock_root/build_artifacts/s3fs_1717507255607/work s3transfer @ file:///home/conda/feedstock_root/build_artifacts/s3transfer_1710497251148/work safetensors==0.4.2 scikit-learn==1.4.1.post1 scipy==1.11.2 semver==3.0.2 Send2Trash @ file:///Users/runner/miniforge3/conda-bld/send2trash_1682601407921/work sentence-transformers==2.6.1 sgmllib3k==1.0.0 sh==2.0.6 shellingham @ file:///home/conda/feedstock_root/build_artifacts/shellingham_1676292972954/work sigtools==4.0.1 six @ file:///home/conda/feedstock_root/build_artifacts/six_1620240208055/work smmap==5.0.0 sniffio @ file:///home/conda/feedstock_root/build_artifacts/sniffio_1662051266223/work sortedcontainers==2.4.0 soupsieve @ file:///home/conda/feedstock_root/build_artifacts/soupsieve_1658207591808/work SQLAlchemy==2.0.20 stack-data @ file:///home/conda/feedstock_root/build_artifacts/stack_data_1669632077133/work starlette==0.27.0 sympy==1.12 synchronicity==0.6.7 tabulate==0.9.0 tantivy==0.21.0 tblib==2.0.0 tenacity==8.2.3 terminado @ file:///Users/runner/miniforge3/conda-bld/terminado_1670254106711/work text-unidecode==1.3 threadpoolctl==3.4.0 tiktoken==0.4.0 tinycss2 @ file:///home/conda/feedstock_root/build_artifacts/tinycss2_1666100256010/work tokenizers==0.15.0 toml==0.10.2 tomli @ file:///home/conda/feedstock_root/build_artifacts/tomli_1644342247877/work toolz @ file:///home/conda/feedstock_root/build_artifacts/toolz_1657485559105/work torch==2.0.1 tornado @ file:///Users/runner/miniforge3/conda-bld/tornado_1684150425472/work tqdm==4.66.1 traitlets @ file:///home/conda/feedstock_root/build_artifacts/traitlets_1675110562325/work transformers==4.39.3 typer==0.9.0 types-certifi==2021.10.8.3 types-toml==0.10.8.20240310 typing-inspect==0.9.0 typing-utils @ file:///home/conda/feedstock_root/build_artifacts/typing_utils_1622899189314/work typing_extensions==4.9.0 tzdata==2023.3 uc-micro-py==1.0.2 uri-template @ file:///home/conda/feedstock_root/build_artifacts/uri-template_1688655812972/work/dist urllib3==1.26.18 userpath @ file:///home/conda/feedstock_root/build_artifacts/userpath_1632758461979/work uvicorn==0.23.2 uvloop==0.19.0 virtualenv==20.24.5 watchfiles==0.21.0 wcwidth @ file:///home/conda/feedstock_root/build_artifacts/wcwidth_1673864653149/work webcolors @ file:///home/conda/feedstock_root/build_artifacts/webcolors_1679900785843/work webencodings==0.5.1 websocket-client @ file:///home/conda/feedstock_root/build_artifacts/websocket-client_1686999594811/work websockets==12.0 widgetsnbextension @ file:///home/conda/feedstock_root/build_artifacts/widgetsnbextension_1688504439014/work wrapt==1.15.0 xyzservices==2023.7.0 yarl @ file:///Users/runner/miniforge3/conda-bld/yarl_1685191847849/work yt-dlp==2024.7.2 zict==3.0.0 zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1666647772197/work zstandard @ file:///Users/runner/miniforge3/conda-bld/zstandard_1667296287896/work ```

Context for the issue:

I'm just trying out the Modal example as-is and seeing if there's any issues that I encounter, while putting on a "beginner user" persona.

Perdu commented 3 months ago

I don't think that's the problem. It seems modal deletes environment variables, which makes outlines.models.transformers("mistralai/Mistral-7B-Instruct-v0.2") fail even after login. The only workaround I found is to manually add a key before importing the model. (sending PR)