-
Notifications
You must be signed in to change notification settings - Fork 132
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
Abhisheku/mmlab model selection #3692
Open
abhishekMS2024
wants to merge
30
commits into
main
Choose a base branch
from
abhisheku/mmlab_model_selection
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
9069624
initial commit
476a37f
Review comments
71ad8a3
Fixes
1256ae7
Fixes
a13de9f
Fixes
1e45634
Fixes
5de9a42
Merge branch 'main' into groopa/vision/mmd
roopavidhya 74de879
If else rough
970d78e
test conditional block changes
abhishekMS2024 1e76215
test conditional block changes
abhishekMS2024 2241eaf
test conditional block changes
abhishekMS2024 a3459aa
test conditional block changes
abhishekMS2024 a88e05a
test conditional block changes
abhishekMS2024 1cc8bb5
test conditional block changes
abhishekMS2024 246d532
test conditional block changes
abhishekMS2024 a5f4628
test conditional block changes
abhishekMS2024 346c228
Removed unused code
abhishekMS2024 cfde392
Added output selector
abhishekMS2024 6c6fb01
Added output selector
abhishekMS2024 e05036b
remove un-needed components
deepanshMS 2d01260
updated component versions
abhishekMS2024 031a310
removed unused code
abhishekMS2024 fa226b4
updated the download component for mmlab
abhishekMS2024 7cabbf1
updated the download component for mmlab
abhishekMS2024 15f5bad
updated the import model component
abhishekMS2024 067952c
code refactoring
abhishekMS2024 79817c8
Fixed syntax issue
abhishekMS2024 1b683a9
Merge branch 'main' into abhisheku/mmlab_model_selection
abhishekMS2024 a72c14c
Merge branch 'main' into abhisheku/mmlab_model_selection
abhishekMS2024 f38333d
Merge branch 'main' into abhisheku/mmlab_model_selection
deepanshMS File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
assets/training/model_management/components/convert_model_to_mlflow/spec.yaml
This file contains 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
This file contains 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
3 changes: 3 additions & 0 deletions
3
assets/training/model_management/components/model_framework_selector/asset.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
type: component | ||
spec: spec.yaml | ||
categories: ["Models"] |
42 changes: 42 additions & 0 deletions
42
assets/training/model_management/components/model_framework_selector/spec.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
$schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json | ||
|
||
type: command | ||
name: model_framework_selector | ||
display_name: Model Framework Selector | ||
description: Checks the framework for model | ||
version: 0.0.1 | ||
|
||
is_deterministic: True | ||
|
||
inputs: | ||
|
||
model_framework: | ||
type: string | ||
enum: | ||
- Huggingface | ||
- MMLab | ||
- llava | ||
- AutoML | ||
default: Huggingface | ||
optional: false | ||
description: Framework from which model is imported from. | ||
|
||
validation_info: | ||
type: uri_file | ||
description: Path to the validation info file | ||
optional: false | ||
|
||
# Pipeline outputs | ||
outputs: | ||
is_mmd_framework: | ||
type: boolean | ||
mode: rw_mount | ||
is_control: true | ||
|
||
environment: azureml://registries/azureml/environments/model-evaluation/versions/37 | ||
code: ../../src | ||
command: mldesigner execute --source run_model_framework_selector.py --name validate --inputs model_framework='${{inputs.model_framework}}' --outputs output='${{outputs.is_mmd_framework}}' | ||
|
||
tags: | ||
Preview: "" | ||
Internal: "" |
This file contains 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
19 changes: 19 additions & 0 deletions
19
...s/training/model_management/src/azureml/model/mgmt/processors/pyfunc/vision/conda_is.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python=3.9.19 | ||
- pip<=24.0 | ||
- pip: | ||
- mlflow==2.12.1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
} |
||
- cloudpickle==2.2.1 | ||
- datasets==2.15.0 | ||
- openmim==0.3.9 | ||
- torch==2.0.1 | ||
- torchvision==0.15.2 | ||
- transformers==4.38.2 | ||
- accelerate==0.27.2 | ||
- albumentations==1.3.0 | ||
- scikit-image==0.19.3 | ||
- simplification==0.7.10 | ||
- fairscale==0.4.13 | ||
name: mlflow-env |
17 changes: 17 additions & 0 deletions
17
...s/training/model_management/src/azureml/model/mgmt/processors/pyfunc/vision/conda_od.yaml
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python=3.9.19 | ||
- pip<=24.0 | ||
- pip: | ||
- mlflow==2.12.1 | ||
- cloudpickle==2.2.1 | ||
- datasets==2.15.0 | ||
- openmim==0.3.9 | ||
- torch==2.0.1 | ||
- torchvision==0.15.2 | ||
- transformers==4.38.2 | ||
- accelerate==0.27.2 | ||
- albumentations==1.3.0 | ||
- fairscale==0.4.13 | ||
name: mlflow-env |
26 changes: 26 additions & 0 deletions
26
assets/training/model_management/src/run_model_framework_selector.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Copyright (c) Microsoft Corporation. | ||
# Licensed under the MIT License. | ||
|
||
"""Select Model Framework Component.""" | ||
from azureml.model.mgmt.config import ModelFramework | ||
from mldesigner import Input, Output, command_component | ||
from azureml.model.mgmt.utils.logging_utils import get_logger | ||
from azureml.model.mgmt.utils.exceptions import swallow_all_exceptions | ||
|
||
logger = get_logger(__name__) | ||
|
||
|
||
@command_component | ||
@swallow_all_exceptions(logger) | ||
def validate( | ||
model_framework: Input(type="string", optional=False) # noqa: F821 | ||
) -> Output(type="boolean", is_control=True): # noqa: F821 | ||
"""Entry function of model validation script.""" | ||
if model_framework == ModelFramework.MMLAB.value: | ||
result = True | ||
else: | ||
result = False | ||
|
||
logger.info(f"Model framework: {model_framework}, result: {result}") | ||
|
||
return result |
This file contains 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
Oops, something went wrong.
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.
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.
below is the list of vulnerabilities just for the first package https://pypi.org/pypi/mlflow/2.12.1/json