Skip to content
This repository has been archived by the owner on Oct 9, 2024. It is now read-only.

[BUG] Colab produces error when zipping/downloading file and exporting model #11

Open
jaaaamIron opened this issue Jun 13, 2022 · 2 comments
Labels
bug Something isn't working model training Issues related to training/using custom models

Comments

@jaaaamIron
Copy link

Running Colab Pro+ and training via Google Drive (i.e. not web upload) when I finish training I get the following errors:

Exporting model...
Traceback (most recent call last):
File "/usr/local/lib/python3.7/dist-packages/ddsp/training/train_util.py", line 165, in get_latest_operative_config
restore_dir, prefix='operative_config-', suffix='.gin')
File "/usr/local/lib/python3.7/dist-packages/ddsp/training/train_util.py", line 106, in get_latest_file
f'No files found matching the pattern '{search_pattern}'.')
FileNotFoundError: No files found matching the pattern '/content/gdrive/MyDrive/Colab/operative_config-*.gin'.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/ddsp_export", line 8, in
sys.exit(console_entry_point())
File "/usr/local/lib/python3.7/dist-packages/ddsp/training/ddsp_export.py", line 364, in console_entry_point
app.run(main)
File "/usr/local/lib/python3.7/dist-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/usr/local/lib/python3.7/dist-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "/usr/local/lib/python3.7/dist-packages/ddsp/training/ddsp_export.py", line 333, in main
export_impulse_response(model_path, save_dir, FLAGS.reverb_sample_rate)
File "/usr/local/lib/python3.7/dist-packages/ddsp/training/ddsp_export.py", line 272, in export_impulse_response
ddsp.training.inference.parse_operative_config(model_path)
File "/usr/local/lib/python3.7/dist-packages/ddsp/training/inference.py", line 41, in parse_operative_config
operative_config = train_util.get_latest_operative_config(ckpt_dir)
File "/usr/local/lib/python3.7/dist-packages/ddsp/training/train_util.py", line 168, in get_latest_operative_config
os.path.dirname(restore_dir), prefix='operative_config-', suffix='.gin')
File "/usr/local/lib/python3.7/dist-packages/ddsp/training/train_util.py", line 106, in get_latest_file
f'No files found matching the pattern '{search_pattern}'.')
FileNotFoundError: No files found matching the pattern '/content/gdrive/MyDrive/operative_config-*.gin'.
Export complete! Zipping /content/gdrive/MyDrive/Colab Notebooks/VlandDatasets/Laura/ddsp-training-2022-06-13-1008/Laura to /content/gdrive/MyDrive/Colab Notebooks/VlandDatasets/Laura/ddsp-training-2022-06-13-1008/Laura.zip
/bin/bash: line 0: cd: too many arguments

@jaaaamIron jaaaamIron added the bug Something isn't working label Jun 13, 2022
@jaaaamIron
Copy link
Author

UPDATE: It seems to be related to the file path - when I put everything in a folder on the top level of my drive it worked fine.

@hargisss
Copy link

hargisss commented Jun 29, 2022

I experienced this too! The reason is that the 'Colab Notebooks' folder has a space in it. Spaces in folder names always crash the DDSP trainer. Notice that it looked for the config in '/content/gdrive/MyDrive/Colab/operative_config-*.gin'... it truncated the path to the correct folder at the space.

The solution is to modify the search pattern used to find the configuration file so that it doesn't treat whitespace as the end of the path.

@wilzh40 wilzh40 added the model training Issues related to training/using custom models label Nov 1, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working model training Issues related to training/using custom models
Projects
None yet
Development

No branches or pull requests

3 participants