-
Notifications
You must be signed in to change notification settings - Fork 901
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# Description Please add an informative description that covers that changes made by the pull request and link all relevant issues. # All Promptflow Contribution checklist: - [ ] **The pull request does not introduce [breaking changes].** - [ ] **CHANGELOG is updated for new features, bug fixes or other significant changes.** - [ ] **I have read the [contribution guidelines](../CONTRIBUTING.md).** - [ ] **Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: [suggested workflow](../CONTRIBUTING.md#suggested-workflow).** ## General Guidelines and Best Practices - [ ] Title of the pull request is clear and informative. - [ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, [see this page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md). ### Testing Guidelines - [ ] Pull request includes test coverage for the included changes. # Description Please add an informative description that covers that changes made by the pull request and link all relevant issues. # All Promptflow Contribution checklist: - [ ] **The pull request does not introduce [breaking changes].** - [ ] **CHANGELOG is updated for new features, bug fixes or other significant changes.** - [ ] **I have read the [contribution guidelines](../CONTRIBUTING.md).** - [ ] **Create an issue and link to the pull request to get dedicated review from promptflow team. Learn more: [suggested workflow](../CONTRIBUTING.md#suggested-workflow).** ## General Guidelines and Best Practices - [ ] Title of the pull request is clear and informative. - [ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, [see this page](https://github.com/Azure/azure-powershell/blob/master/documentation/development-docs/cleaning-up-commits.md). ### Testing Guidelines - [ ] Pull request includes test coverage for the included changes. --------- Co-authored-by: Philip Gao <yigao@microsoft.com>
- Loading branch information
1 parent
a700ec0
commit 3af352f
Showing
14 changed files
with
803 additions
and
229 deletions.
There are no files selected for viewing
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
examples/tutorials/run-flow-with-pipeline/components/data-prep/conda.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,15 @@ | ||
name: my-env | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python=3.9 | ||
- pip | ||
- pip: | ||
- mlflow | ||
- azureml-core | ||
- azure-ai-ml>=1.12.0 | ||
- azureml-dataset-runtime[pandas,fuse] | ||
- azureml-telemetry | ||
- mltable>=1.2.0 | ||
- pandas | ||
- pillow |
21 changes: 21 additions & 0 deletions
21
examples/tutorials/run-flow-with-pipeline/components/data-prep/data-prep.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,21 @@ | ||
# Copyright (c) Microsoft. All rights reserved. | ||
# Licensed under the MIT license. | ||
|
||
import os | ||
import pandas as pd | ||
import argparse | ||
|
||
parser = argparse.ArgumentParser() | ||
parser.add_argument("--input_data_file", type=str) | ||
parser.add_argument("--output_data_folder", type=str) | ||
|
||
args, _ = parser.parse_known_args() | ||
|
||
input_df = pd.read_json(args.input_data_file, lines=True) | ||
|
||
# data preparation, e.g. data sampling, data cleaning, etc. | ||
processed_data = input_df.sample(n=20, replace=True, random_state=1) | ||
|
||
# export data into output folder | ||
output_file_path = os.path.join(args.output_data_folder, "processed_data.csv") | ||
processed_data.to_csv(output_file_path, index=False, header=True) |
26 changes: 26 additions & 0 deletions
26
examples/tutorials/run-flow-with-pipeline/components/data-prep/data-prep.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,26 @@ | ||
$schema: https://azuremlschemas.azureedge.net/latest/commandComponent.schema.json | ||
|
||
type: command | ||
|
||
name: data_prep | ||
display_name: data preparation | ||
version: 0.0.1 | ||
|
||
inputs: | ||
input_data_file: | ||
type: uri_file | ||
|
||
outputs: | ||
output_data_folder: | ||
type: uri_folder | ||
|
||
code: ./ | ||
|
||
environment: | ||
image: mcr.microsoft.com/azureml/inference-base-2004:latest | ||
conda_file: ./conda.yaml | ||
|
||
command: >- | ||
python data-prep.py | ||
--input_data_file ${{inputs.input_data_file}} | ||
--output_data_folder ${{outputs.output_data_folder}} |
15 changes: 15 additions & 0 deletions
15
examples/tutorials/run-flow-with-pipeline/components/result-parser/conda.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,15 @@ | ||
name: my-env | ||
channels: | ||
- conda-forge | ||
dependencies: | ||
- python=3.9 | ||
- pip | ||
- pip: | ||
- mlflow | ||
- azureml-core | ||
- azure-ai-ml>=1.12.0 | ||
- azureml-dataset-runtime[pandas,fuse] | ||
- azureml-telemetry | ||
- mltable>=1.2.0 | ||
- pandas | ||
- pillow |
Oops, something went wrong.