espnet/espnet_onnx

Hardcoded `tag_config_path`

tjysdsg opened this issue · 1 comments

Error encountered when trying to export a model to a custom output directory:

Traceback (most recent call last):
  File "xxx.py", line 59, in <module>
    main()
  File "xxx.py", line 33, in main
    m.export(
  File "E:\repos\on-device-speech-translation\onnx_utils\export_st.py", line 141, in export
    update_model_path(tag_name, base_dir)
  File "D:\Anaconda\Lib\site-packages\espnet_onnx\utils\config.py", line 55, in update_model_path
    save_config(config, tag_config_path)
  File "D:\Anaconda\Lib\site-packages\espnet_onnx\utils\config.py", line 32, in save_config
    with open(path, "w", encoding="utf-8") as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\xxx\\.cache\\espnet_onnx\\tag_config.yaml'

Seems like the path is hardcoded to home cache dir here

Thank you, @tjysdsg. I just created #102 to fix this.
Please check if you will not get the error with the latest version after the PR is merged.