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

Update mldesigner component env style #1954

Merged
merged 2 commits into from
Dec 2, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,11 @@ def train_model(
(Path(model_output) / "model").write_text(model)


# init customer environment with conda YAML
# the YAML file shall be put under your code folder.
conda_env = dict(
# note that mldesigner package must be included.
conda_file=Path(__file__).parent / "conda.yaml",
image="mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04",
)


@command_component(
display_name="Score",
environment=conda_env,
# init customer environment with conda YAML
# the YAML file shall be put under your code folder.
environment="./env.yaml",
# specify your code folder, default code folder is current file's parent
# code='.'
)
Expand Down Expand Up @@ -79,7 +72,7 @@ def score_data(
(Path(score_output) / "score").write_text("scored with {}".format(model))


@command_component(display_name="Evaluate", environment=conda_env)
@command_component(display_name="Evaluate", environment="./env.yaml")
def eval_model(
scoring_result: Input(type="uri_folder"), eval_output: Output(type="uri_folder")
):
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

image: mcr.microsoft.com/azureml/openmpi4.1.0-ubuntu20.04
name: mldesigner_environment
conda_file:
name: default_environment
channels:
- defaults
dependencies:
- python=3.8.12
- pip=21.2.2
- pip:
- mldesigner==0.1.0b4