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

LSP_train.py failing - output_dir NoneType #42

Open
made-by-chris opened this issue May 21, 2020 · 4 comments
Open

LSP_train.py failing - output_dir NoneType #42

made-by-chris opened this issue May 21, 2020 · 4 comments

Comments

@made-by-chris
Copy link

line 154 fails

output_dir = join(args.output_dir,
                  'GPT2.{}.{}.{}gpu.{}'.format(args.learning_rate,
                                               args.train_batch_size, n_gpu, timestamp))

with:
´´´
Traceback (most recent call last):
File "./LSP_train.py", line 154, in
args.train_batch_size, n_gpu, timestamp))
File "/opt/conda/envs/pytorch-py3.6/lib/python3.6/posixpath.py", line 80, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType

Python 3.6.7
Ubuntu 16.04
@made-by-chris
Copy link
Author

I think its because initial args are missing

@made-by-chris
Copy link
Author

It would be really great to have a full example of the python ./LSP_train.py command with all required commands. My current experience of this is just jumping from error to error trying to guess which arguments are necessary. Thanks a lot.

@made-by-chris
Copy link
Author

I'm now just running a modified version of demo.py, with the default "train.tsv" replaced with my own tsv file.
I get as far as this:

root@bl:/workspace# python demo.py 
PROJECT_FOLDER = /workspace
Found existing models folder at /workspace/models, skip creating a new one!
05/27/2020 08:44:53 - INFO - __main__ -   Downloading models...
05/27/2020 08:44:53 - INFO - demo_utils -   /workspace/models/small/config.json exists, return!
05/27/2020 08:44:53 - INFO - demo_utils -   /workspace/models/small/vocab.json exists, return!
05/27/2020 08:44:53 - INFO - demo_utils -   /workspace/models/small/merges.txt exists, return!
05/27/2020 08:44:53 - INFO - demo_utils -   /workspace/models/small/pytorch_model.bin exists, return!
05/27/2020 08:44:53 - INFO - demo_utils -   /workspace/models/small/small_ft.pkl exists, return!
05/27/2020 08:44:53 - INFO - __main__ -   Done!

05/27/2020 08:44:53 - INFO - __main__ -   Downloading and Extracting Data...
05/27/2020 08:44:53 - INFO - __main__ -   Preparing Data...
prepro.py --corpus /workspace/data/pdp.tsv --max_seq_len 128
^[[Ferror occurred, b'Traceback (most recent call last):\n  File "prepro.py", line 221, in <module>\n    main(args)\n  File "prepro.py", line 158, in main\n    raise ValueError(\'Found existing DB, please backup\')\nValueError: Found existing DB, please backup\n'

@dreasysnail
Copy link
Contributor

Hi, you may need to first delete the existing db before creating a new one with the same output path.

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