noamgat / lm-format-enforcer

Enforce the output format (JSON Schema, Regex etc) of a language model

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Missing dependencies

remixer-dec opened this issue · comments

Hi, after installing lm-format-enforcer from pypi in a clean container, it fails to import some modules.
Running from lmformatenforcer import CharacterLevelParser, JsonSchemaParser

  File "/usr/local/lib/python3.10/dist-packages/lmformatenforcer/external/jsonschemaobjectutil.py", line 29, in <module>
    from packaging import version
ModuleNotFoundError: No module named 'packaging'
  File "/usr/local/lib/python3.10/dist-packages/lmformatenforcer/external/jsonschemaobjectutil.py", line 69, in <module>
    from yaml import CSafeLoader as SafeLoader
ModuleNotFoundError: No module named 'yaml'

installing packaging and PyYAML fixes this.

I don't think it has anything to do with poetry. These dependencies are not present in pyproject.toml and both pip and poetry do not install them.

Fixed in v0.9.1