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

Improve the offline support for the ONNX/TFLite export #1109

Merged
merged 4 commits into from Jun 14, 2023

Conversation

fxmarty
Copy link
Collaborator

@fxmarty fxmarty commented Jun 14, 2023

Fixes #1104

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 14, 2023

The documentation is not available anymore as the PR was closed or merged.

Copy link
Contributor

@regisss regisss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

optimum/exporters/tasks.py Outdated Show resolved Hide resolved
Copy link
Member

@michaelbenayoun michaelbenayoun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

optimum/exporters/onnx/__main__.py Show resolved Hide resolved
revision = f.read()
cached_path = Path(full_model_path, "snapshots", revision, subfolder)
all_files = [
os.path.relpath(os.path.join(dirpath, file), cached_path)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: We should stick to the pathlib API here instead of mixing pathlib and os.path IMO

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed

@fxmarty fxmarty merged commit 459525b into huggingface:main Jun 14, 2023
59 of 64 checks passed
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

Successfully merging this pull request may close these issues.

onnx exporter does NOT use cache_dir with task=auto
4 participants