8000 FileNotFoundError: [Errno 2] No such file or directory: 'models/117M/encoder.json' · Issue #19 · rish-16/gpt2client · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Oct 3, 2021. It is now read-only.

FileNotFoundError: [Errno 2] No such file or directory: 'models/117M/encoder.json' #19

Open
rickwierenga opened this issue Nov 11, 2019 · 4 comments

Comments

@rickwierenga
Copy link
Contributor

Code:

from gpt2_client import GPT2Client
gpt2 = GPT2Client('117M')
gpt2.generate(interactive=True)

Crash:

FileNotFoundError: [Errno 2] No such file or directory: 'models/117M/encoder.json'

This error occurs for every model.

macOS Catalina 10.15

@rish-16
Copy link
Owner
rish-16 commented Nov 13, 2019

Hello there, I'll look into this at once. Thank you for highlighting this

@rish-16
Copy link
Owner
rish-16 commented Nov 13, 2019

Hey there,
You need to download the model first. Try out this code snippet:

from gpt2_client import GPT2Client

gpt2 = GPT2Client('117M')
gpt2.load_model() # if you already have the model checkpoints, then it will automatically search for it and use them
gpt2.generate(interactive=True)

Hope this helps!

@rickwierenga
Copy link
Contributor Author
rickwierenga commented Nov 13, 2019
AttributeError: 'GPT2Client' object has no attribute 'load_model'

This should probably be fixed in the README too.

@rish-16
Copy link
Owner
rish-16 commented Nov 14, 2019

I'll go check it out thanks

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

No branches or pull requests

2 participants
0