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

Some issues encountered in reproduces the code #12

Open
PYMAQ opened this issue Jun 5, 2023 · 0 comments
Open

Some issues encountered in reproduces the code #12

PYMAQ opened this issue Jun 5, 2023 · 0 comments

Comments

@PYMAQ
Copy link

PYMAQ commented Jun 5, 2023

Hello, I encountered the following issue while trying to reproduce your code:

[nltk_data] Downloading package punkt to /home/isaac/nltk_data...
[nltk_data] Package punkt is already up-to-date!
[nltk_data] Downloading package punkt to /home/isaac/nltk_data...
[nltk_data] Package punkt is already up-to-date!
Finish loading stage 0 dataset!
Train size: 97
Val size: 20
Test size: 20
Start target matching of Stage 1. This may take several minutes.
637it [00:00, 1936066.41it/s]
122it [00:00, 1336044.62it/s]
139it [00:00, 1362168.82it/s]
Finish loading stage 1 dataset!
Train size: 637
Val size: 122
Test size: 139
2023-06-06 03:29:21 | INFO | fairseq.file_utils | Archive name 'stage_1/trainer_output' was not found in archive name list. We assumed 'stage_1/trainer_output' was a path or URL but couldn't find any file associated to this path or URL.
Traceback (most recent call last):
File "run.py", line 91, in
summary_generator = SummaryGenerator(args, split_source, fine_grained=False, test_mode=True)
File "/home/isaac/Summ-N/models/gen_summary/inference.py", line 18, in init
self.stage_cfg.trainer_output_folder,
File "/home/isaac/.conda/envs/summ-n/lib/python3.7/site-packages/fairseq/models/bart/model.py", line 122, in from_pretrained
**kwargs,
File "/home/isaac/.conda/envs/summ-n/lib/python3.7/site-packages/fairseq/hub_utils.py", line 55, in from_pretrained
kwargs["data"] = os.path.abspath(os.path.join(model_path, data_name_or_path))
File "/home/isaac/.conda/envs/summ-n/lib/python3.7/posixpath.py", line 80, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
scripts/run_AMI.sh: 19: --cuda-devices: not found

The error seems to occur in the initialization of BARTModel.from_pretrained in inference.py and the issue is TypeError: expected str, bytes or os.PathLike object, not NoneType:

self.bart = BARTModel.from_pretrained(
self.stage_cfg.trainer_output_folder,
checkpoint_file='checkpoints/checkpoint_best.pt',
data_name_or_path="./bin",
)

Question 1: Do you have any idea what might have caused this? How can I resolve it? Should I modify the data_name_or_path variable?
Question 2: What does the error scripts/run_AMI.sh: 19: --cuda-devices: not found mean?
Question 3: Why “2023-06-06 03:29:21 | INFO | fairseq.file_utils | Archive name 'stage_1/trainer_output' was not found in archive name list. We assumed 'stage_1/trainer_output' was a path or URL but couldn't find any file associated to this path or URL.”?

Thank you very much!

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

1 participant