Open dhananjaybhandiwad opened 5 months ago
Hello @dhananjaybhandiwad,
Thank you for raising this issue. I did not encounter any problems when running your script. It might be a versioning issue. Could you please check which version of the package you are using?
On myside, by running directly from pypi using pip install transformers_cfg
, I get
(transformers-cfg-pypi) β transformers-CFG-dev git:(main) β pip show transformers_cfg
Name: transformers_cfg
Version: 0.2.1
Summary: Extension of Transformers library for Context-Free Grammar Constrained Decoding with EBNF grammars
Home-page: https://github.com/epfl-dlab/transformers-CFG
Author: EPFL-dlab
Author-email: saibo.geng@epfl.ch
License:
Location: /opt/anaconda3/envs/transformers-cfg-pypi/lib/python3.8/site-packages
Requires: line-profiler, numpy, protobuf, sentencepiece, setuptools, termcolor, tokenizers, torch, transformers
Required-by:
Hello @Saibo-creator, I cloned the latest repo for modifying some code in the parser.py file to accomadate the grammar of SPARQL. So I tried just running the file token_grammar_recognize.py, to see how the system works and it threw me the error mentioned in the previous comment.
To see if my changes in parser.py had effected the token_grammar_recognize.py, I reverted all my changes and ran the unchanged version of parser.py, still the error persisted.
This error also persists when I try to run the parser.py file independently. Specifically while parsing the Japanese.ebnf file.
Hello @dhananjaybhandiwad , I just tried to clone the lastest version (commit 86eccd) and I was able to run your script without encountering a problem. I think maybe it's a problem due to platform(not sure at all), are you using windows ? If so, could you try WSL ?
Dear Author, I encountered the below error when I tried to run the script file token_grammar_recognize.py
This is the main file:
Please could you help me regarding this issue.