-
Notifications
You must be signed in to change notification settings - Fork 311
tests: Use pytest as a test runner for Jupyter and Python samples
#176
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Taken from template referred to in this article https://learn.microsoft.com/en-us/azure/machine-learning/how-to-manage-hub-workspace-template?view=azureml-api-2&tabs=cli
workspaces/endpoints is deprecated
This commit introduces a custom pytest plugin that forces
pytest to only collect samples that have changed either:
* in the working tree compared to HEAD
* in HEAD compared to main
We assume that a sample has changed if any file has changed in
the directory we collected a test from, which is consistent with
how the contributing guidelines specify to package a sample.
But this criteria to detect change may need to be iterated on later.
To prevent pytest from trying to run template.ipynb
Project deployments sometimes error when they happen concurrently
Referred to the ARM export of a resource group with a set up
ai project.
1fc2ccb to
644654f
Compare
nagkumar91
approved these changes
Jan 9, 2025
Redeploying CognitiveServices/accounts will sometimes fail with
"publicNetworkAccess" is required.
bba19b7 to
becef6a
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This pull request adds initial support for using
pytestto run Jupyter Notebooks to facilitate sample validation.Specifically this pull request:
Background
Azure/azureml-examples tests its samples using a github actions as a test runner. Maintaining this prior art revealed some pain points:
Additionally, infrastructure deployment is based on a large collection of bash scripts, which can make reasoning about the resources that get deployed difficult.
Using
pytestas a test runner forazureai-samplesaddresses several of those pain points:pytest).pytest-xdist,pytest-retry,pytest-randomly, etc...)Bicep for deployment should make maintaining infrastructure deployments easier (rule of least power).
Checklist