gpt-2
gpt-2 copied to clipboard
Apologies, but HELP
when I try to encode a custom data set I receive these errors, I am relatively new to python and am unable to debug this myself. Ive been at it for two days now and I still cant figure it out. please help :(
(base) C:\Users\ThisPC\Downloads\Python\AI\gpt-2-finetuning>python encode.py WordBank.txt WordBank.npz
Traceback (most recent call last):
File "encode.py", line 31, in
just per chance, do you happen to have anaconda 3 installed?
when I try to encode a custom data set I receive these errors, I am relatively new to python and am unable to debug this myself. Ive been at it for two days now and I still cant figure it out. please help :(
(base) C:\Users\ThisPC\Downloads\Python\AI\gpt-2-finetuning>python encode.py WordBank.txt WordBank.npz Traceback (most recent call last): File "encode.py", line 31, in main() File "encode.py", line 23, in main enc = encoder.get_encoder(args.model_name) File "C:\Users\ThisPC\Downloads\Python\AI\gpt-2-finetuning\encoder.py", line 110, in get_encoder encoder = json.load(f) File "C:\Users\ThisPC\Anaconda3\lib\json__init__.py", line 296, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "C:\Users\ThisPC\Anaconda3\lib\json__init__.py", line 348, in loads return _default_decoder.decode(s) File "C:\Users\ThisPC\Anaconda3\lib\json\decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "C:\Users\ThisPC\Anaconda3\lib\json\decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
I believe your json file is incorrectly formatted. check again in your json file with proper editor like vscode(json extension) to see where went wrong.
just per chance, do you happen to have anaconda 3 installed?
I do, why?
it might be trying to use python 2 instead of python 3, try python3 encode.py WordBank.txt WordBank.npz (note: I also have no idea what I'm doing)