gpt-2 icon indicating copy to clipboard operation
gpt-2 copied to clipboard

Apologies, but HELP

Open OdincoGaming opened this issue 5 years ago • 4 comments

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)

OdincoGaming avatar Sep 26 '19 01:09 OdincoGaming

just per chance, do you happen to have anaconda 3 installed?

HandsomeDevilv112 avatar Nov 12 '19 07:11 HandsomeDevilv112

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.

zjm008 avatar Nov 30 '19 07:11 zjm008

just per chance, do you happen to have anaconda 3 installed?

I do, why?

OdincoGaming avatar Dec 03 '19 23:12 OdincoGaming

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)

HandsomeDevilv112 avatar Dec 28 '19 20:12 HandsomeDevilv112