-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Support tfjs converter options in JAX conversion #7331
Support tfjs converter options in JAX conversion #7331
Conversation
This allows configuring the options passed to tfjs converter during conversion of a jax model, such as quantization.
@@ -60,7 +60,8 @@ def convert_jax( | |||
*, | |||
input_signatures: Sequence[Tuple[Sequence[Union[int, None]], DType]], | |||
model_dir: str, | |||
polymorphic_shapes: Optional[Sequence[Union[str, PolyShape]]] = None): | |||
polymorphic_shapes: Optional[Sequence[Union[str, PolyShape]]] = None, | |||
**tfjs_converter_params): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we should grab the remaining arguments with **
or have the user pass a dictionary of TFJS converter arguments here. What do reviewers think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The former is more pythonic.
Fixes #7330 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: complete! 1 of 1 approvals obtained (waiting on @chunnienc and @mattsoulanille)
tfjs-converter/python/tensorflowjs/converters/jax_conversion.py
line 64 at r1 (raw file):
Previously, chunnienc wrote…
The former is more pythonic.
thanks, it will be good to update the doc for the extra params
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: complete! 2 of 1 approvals obtained (waiting on @chunnienc and @pyu10055)
tfjs-converter/python/tensorflowjs/converters/jax_conversion.py
line 64 at r1 (raw file):
Previously, pyu10055 (Ping Yu) wrote…
thanks, it will be good to update the doc for the extra params
good point. Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: complete! 2 of 1 approvals obtained (waiting on @chunnienc)
Support configuring the options, such as quantization, passed to tfjs converter during conversion of a jax model.
To see the logs from the Cloud Build CI, please join either our discussion or announcement mailing list.
This change is