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

SparseZoo V2 Compatibility #1233

Merged
merged 6 commits into from
Sep 12, 2023
Merged

SparseZoo V2 Compatibility #1233

merged 6 commits into from
Sep 12, 2023

Conversation

Satrat
Copy link
Contributor

@Satrat Satrat commented Sep 8, 2023

This PR fixes two issues related to the SparseZoo V2 upgrade:

  1. sample_originals was deleted from some models but still being referenced in tests. The tested were updated to use sample_inputs instead
  2. The new sparsezooAPI includes subfolder names in the display_name field of Directories when previously it did not
    before(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@9d9b2ba

NOTE: A bit unsure about hardcoding the deployment folder name, but since we are already searching for that particular directory name in the sparsezoo repo(see ALLOWED_FILE_TYPES) I think it should be OK to do here too. However, this does remove compatibility with V1

The 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

@Satrat Satrat marked this pull request as ready for review September 8, 2023 19:37
horheynm
horheynm previously approved these changes Sep 8, 2023
bfineran
bfineran previously approved these changes Sep 8, 2023
@dbogunowicz
Copy link
Contributor

Feeling a little uneasy about the backward compatibility here. @bfineran should we care about it?

@Satrat Satrat dismissed stale reviews from bfineran and horheynm via d595952 September 11, 2023 16:04
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:
Copy link
Member

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?

Copy link
Member

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.

@horheynm
Copy link
Member

Feeling a little uneasy about the backward compatibility here. @bfineran should we care about it?

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. .
sample-input is more reliable, if the tests are not hardcoded to work with originals.

@bfineran bfineran merged commit da6ab6f into main Sep 12, 2023
7 of 13 checks passed
@bfineran bfineran deleted the sa/zoo_debug branch September 12, 2023 13:07
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.

None yet

5 participants