Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

SparseZoo V2 Compatibility#1233

Merged
bfineran merged 6 commits into
mainfrom
sa/zoo_debug
Sep 12, 2023
Merged

SparseZoo V2 Compatibility#1233
bfineran merged 6 commits into
mainfrom
sa/zoo_debug

Conversation

@Satrat

@Satrat Satrat commented Sep 8, 2023

Copy link
Copy Markdown

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
Copy Markdown
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
@Satrat Satrat requested review from bfineran and horheynm September 11, 2023 17:09
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
Copy Markdown
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
Copy Markdown

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
Copy Markdown

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
@bfineran bfineran deleted the sa/zoo_debug branch September 12, 2023 13:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants