How to use the cache_dir along with optimum-cli export
Dear team,I’m getting the annoying max number of requests message. I’m part of a organization. Thus, I have no time to investigate that.I just need to reuse weights that I downloaded last week. Can someone help me to do so?TheCLI programtakes acache_dir. Yet, the model insists on downloading Why!Is that a bug?BTW, there is a variable calllocal_files_onlyin the functionmain_exportnot exposed to the users.Smell like bugKIndly provide hints. Happy to submit PR!Cheers,Victor
2023-06-12T11:38:42Z
@fxmartyKindly consider reading my question & lemme know if I should file a issue in GH Bugor FR
2023-06-13T10:24:55Z
For anyone interested you can reproduce the issue as follows:optimum-cli export onnx --model t5-base checkpoints/t5-base_onnx/ --framework pt --optimize O3 --batch_size 1 --sequence_length 512 --atol 0.0001 --cache_dir ~/.cache/huggingface/hubAsktask='auto'(default), the code gets stuckhere sending a request to HF serversto infer something from catalog. IMHO, a patch is needed.cc@michaelbenayoun
2023-06-13T14:20:31Z
If anyone is facing the issue, the workaround is to specify the task.Perhaps, you downloaded the model & it’s in thecache_dirof HF (e.g.,~/.cache/huggingface/hubin Linux). If so, just use one of the supported taskshere
2023-06-14T15:15:56Z
Hi@escorciav, thank you for the report. Could you try on themainbranch if you still encounter the issue? Should be fixed withImprove the offline support for the ONNX/TFLite export by fxmarty · Pull Request #1109 · huggingface/optimum · GitHub
2023-06-16T17:21:35Z
Tried that out and report my findings inGithub. Thanks for the fix!