-
Notifications
You must be signed in to change notification settings - Fork 179
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
SparseZoo V2 Compatibility #1233
Conversation
Feeling a little uneasy about the backward compatibility here. @bfineran should we care about it? |
if not zoo_model.sample_originals.files: | ||
zoo_model.sample_originals.unzip() | ||
data_originals_path = zoo_model.sample_originals.path | ||
if zoo_model.sample_inputs is not None: |
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.
Do we not have sample_originals anymore?
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.
Some models do not have originals.
sample-originals were uploaded, deleted from the source that triggers the deployment to save to db and blob storage, but it does not trigger deletion. . |
This PR fixes two issues related to the SparseZoo V2 upgrade:
sample_originals
was deleted from some models but still being referenced in tests. The tested were updated to usesample_inputs
insteadThe new sparsezooAPI includes subfolder names in thedisplay_name
field ofDirectories
when previously it did notbefore(V1):{'display_name': 'config.json', 'file_size': 799, 'model_id': '41dc6dcb-88cd-45f4-ae5e-8c34c0eaef00', 'file_type': 'training', 'url': 'https://api.neuralmagic.com/v2/models/41dc6dcb-88cd-45f4-ae5e-8c34c0eaef00/files/config.json'}
after(V2): {'display_name': 'deployment/config.json', 'file_size': 799, 'model_id': '41dc6dcb-88cd-45f4-ae5e-8c34c0eaef00', 'file_type': 'deployment', 'url': 'https://api.neuralmagic.com/v2/models/41dc6dcb-88cd-45f4-ae5e-8c34c0eaef00/files/deployment/config.json'}References to config.json, tokenizer.json and tokenizer_config.json were updated to reflect this change.This is now handled by a change to SparseZoo instead: neuralmagic/sparsezoo@9d9b2baNOTE: A bit unsure about hardcoding the deployment folder name, but since we are already searching for that particular directory name in the sparsezoo repo(seeALLOWED_FILE_TYPES
) I think it should be OK to do here too. However, this does remove compatibility with V1The remaining errors are caused by test cases referencing sparsezoo stubs that are deprecated. George is working on replacing these stubs in a separate PR: #1234