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

Error in generator。py #40

Open
hxy-123-coder opened this issue Jan 9, 2023 · 2 comments
Open

Error in generator。py #40

hxy-123-coder opened this issue Jan 9, 2023 · 2 comments

Comments

@hxy-123-coder
Copy link

hxy-123-coder commented Jan 9, 2023

when I run generator.py on colab, errors occurs.
!python '/content/drive/MyDrive/Colab Notebooks/GraphWriter/generator.py' -save S
/content/drive/MyDrive/Colab Notebooks/GraphWriter
Loading Data from data/preprocessed.train.tsv
building vocab
done
Vocab sizes:
src 6343
ent 53343
nerd 8
rel 17
out 11738
graph
Traceback (most recent call last):
File "/content/drive/MyDrive/Colab Notebooks/GraphWriter/generator.py", line 71, in
cpt = torch.load(args.save)
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 579, in load
with _open_file_like(f, 'rb') as opened_file:
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 230, in _open_file_like
return _open_file(name_or_buffer, mode)
File "/usr/local/lib/python3.8/dist-packages/torch/serialization.py", line 211, in init
super(_open_file, self).init(open(name, mode))
IsADirectoryError: [Errno 21] Is a directory: 'S'

@rikdz
Copy link
Owner

rikdz commented Jan 9, 2023

i think the -save flag is expecting a checkpoint file

@hxy-123-coder
Copy link
Author

hxy-123-coder commented Jan 11, 2023

Thank u for your reply
but there are still another errors
when I run
!python eval.py "/content/drive/MyDrive/Colab Notebooks/GraphWriter/outputs/0.vloss-4.068954.lr-0.1.inputs.beam_predictions.cmdline" "/content/drive/MyDrive/Colab Notebooks/GraphWriter/data/preprocessed.test.tsv"

Traceback (most recent call last):
File "eval.py", line 93, in
x.evaluate(live=True, cand=cands, ref=refs)
File "eval.py", line 66, in evaluate
final_scores = self.score(ref, hypo)
File "eval.py", line 33, in score
score, scores = scorer.compute_score(ref, hypo)
File "/content/drive/MyDrive/Colab Notebooks/GraphWriter/pycocoevalcap/meteor/meteor.py", line 40, in compute_score
self.meteor_p.stdin.write(score_line + '\n')
BrokenPipeError: [Errno 32] Broken pipe

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