Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to generate "predict_dev.jsonl" #36

Open
Chen-PengF opened this issue Nov 29, 2022 · 7 comments
Open

How to generate "predict_dev.jsonl" #36

Chen-PengF opened this issue Nov 29, 2022 · 7 comments

Comments

@Chen-PengF
Copy link

when I run the file "main.py/main.sh", an error has occurred as follow:

@Chen-PengF
Copy link
Author

File "Span-ASTE-main/aste/main.py", line 239, in eval
with open(path) as f:
FileNotFoundError: [Errno 2] No such file or directory: 'model_outputs/14lap_0/predict_dev.jsonl'

@chiayewken
Copy link
Owner

Hi, please use wrapper.py, I have updated the colab demo and demo.ipynb to the latest version

@Chen-PengF
Copy link
Author

Hi, please use wrapper.py, I have updated the colab demo and demo.ipynb to the latest version
Hi, but I have run the setup.py before wrapper.py, and there is still an error as follows:

File "/home/miniconda3/envs/span/lib/python3.7/site-packages/allennlp/common/params.py", line 352, in pop_choice
raise ConfigurationError(message)
allennlp.common.checks.ConfigurationError: span_model not in acceptable choices for dataset_reader.type: ['conll2003', 'interleaving', 'sequence_tagging', 'sharded', 'babi', 'text_classification_json']. You should either use the --include-package flag to make sure the correct module is loaded, or use a fully qualified class name in your config file like {"model": "my_module.models.MyModel"} to have it imported automatically.

Is this a version of allennlp problem?

@chiayewken
Copy link
Owner

Hi, it may be an environment issue, can I check that you are using Python 3.7 and ran setup.sh based on the installation instructions?

Also, are you using the demo notebook, if not, can you provide the exact command and you ran?

@Chen-PengF
Copy link
Author

Thank you for your help.
1、This is my Python environment: Python 3.7.13 (default, Mar 29 2022, 02:18:16) [GCC 7.5.0] :: Anaconda, Inc. on Linux
2、I ran: bash setup.sh and show the picture for you [](https://pan.baidu.com/s/1pS-lIg43Uj3NH2EYwHHGaQ?pwd=hsfv
提取码:hsfv)

@Chen-PengF
Copy link
Author

3、I run "python wrapper.py" for file wrapper.py

@chiayewken
Copy link
Owner

For training instructions, you can use the model as shown in the demo notebook or command-line style here:

python aste/wrapper.py run_train_many \
--save_dir_template "outputs/14lap/seed_{}" \
--random_seeds [0,1,2,3,4] \
--path_train data/triplet_data/14lap/train.txt \
--path_dev data/triplet_data/14lap/dev.txt

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants