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

Kwargs propagation from _get_model in quantize_weights to MLModel in _get_model #2244

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

asafl
Copy link

@asafl asafl commented Jun 18, 2024

When running quantize_weights with the weights_dir parameter, it doesn’t propagate to MLModel, resulting in:
Exception: MLModel of type mlProgram cannot be loaded just from the model spec object. It also needs the path to the weights file. Please provide that as well, using the 'weights_dir' argument.
Adding **kwargs in line 1691, in _get_model of the quantization_utils module, in the _get_model signature and in the return MLModel(spec, compute_units=compute_units, **kwargs) line fixes it.

…e, and in MLModel instantiation, to propagate weights_dir to MLModel.
@TobyRoseman
Copy link
Collaborator

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.

2 participants