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

Add Model Zoo testing support #2990

Merged
merged 65 commits into from
Jul 2, 2024
Merged

Add Model Zoo testing support #2990

merged 65 commits into from
Jul 2, 2024

Conversation

attila-dusnoki-htec
Copy link
Contributor

This change adds 2 "Model Zoo" to test:

  • ONNX Zoo (https://onnx.ai/models/ and https://github.com/onnx/models)
    • The script will use the repository, and does automatically the following steps:
      • Downloads the models one-by-one with the provided test sample
      • Unzips and converts everything to test_runners.py format
      • Runs the test
      • Cleans up after the run
      • Repeats for all selected models
  • Sample Generator with Datasets
    • The provided pyhon modul can download models and generated test samples from real datasets for them
    • It is extendable with furter datasets and models
    • Current support
      • 3 Datasets for image, text and audio
        • ImageNet 2012 Val, SQuAD v1.1, LibriSpeech ASR
      • Models using those datasets
        • ResNet50 v1, ResNet50 v1.5, TIMM MobileNetv3-large, ViT-base-patch16-224, CLIP-ViT-large-patch14
        • BERT-large-uncased, DistilBERT-base-cased-distilled, Roberta-base, GPT-J, Llama2-7b-chat-hf, T5-base, Gemma-2b-it
        • Wav2Vec2-base-960h, Whisper-small-en

# THE SOFTWARE.
#
#####################################################################################
-f https://repo.radeon.com/rocm/manylinux/rocm-rel-6.0/
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you bump the version for this?


## Getting the repository

*Important: make sure to enable git-lfs*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*Important: make sure to enable git-lfs*
> [!IMPORTANT]
> Make sure to enable git-lfs.


## Running the tests

*Important: the argument must point to a folder, not a file*
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
*Important: the argument must point to a folder, not a file*
> [!IMPORTANT]
> The argument must point to a folder, not a file.

./test_models.sh generated/
```

Note: `generated` is the default output folder, make sure to match `--output-folder-prefix` name
Copy link
Collaborator

@kahmed10 kahmed10 Jun 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Note: `generated` is the default output folder, make sure to match `--output-folder-prefix` name
> [!NOTE]
> `generated` is the default output folder, make sure to match `--output-folder-prefix` name.

Max number of sum-samples generated for decoder models. Use 0 to ignore it. (Only for decoder models)
```

Note: Some models require permission to access, use `huggingface-cli login`
Copy link
Collaborator

@kahmed10 kahmed10 Jun 11, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Note: Some models require permission to access, use `huggingface-cli login`
> [!NOTE]
> Some models require permission to access, use `huggingface-cli login`.


## Adding more datasets

The 3 most common usecase are handled:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The 3 most common usecase are handled:
The 3 most common use cases are handled:

Copy link
Collaborator

@kahmed10 kahmed10 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From review side, looks good. Would need someone to test and verify it works. @causten

@causten causten requested a review from aarushjain29 June 26, 2024 02:44
Copy link
Contributor

@aarushjain29 aarushjain29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is working without any errors. By default, the numpy 2.0 is there but it requires numpy 1.24.1

@attila-dusnoki-htec
Copy link
Contributor Author

It is working without any errors. By default, the numpy 2.0 is there but it requires numpy 1.24.1

Oh right, it was released not long ago.
Probably everything needs to be pinned to a version, not just the critical part like torch.

@aarushjain29 aarushjain29 self-requested a review June 26, 2024 20:37
@causten causten merged commit 497c277 into develop Jul 2, 2024
41 of 44 checks passed
@causten causten deleted the test_dataset_generator branch July 2, 2024 15:52
umangyadav pushed a commit that referenced this pull request Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip bot checks Skips the Performance and Accuracy CI tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants