Package to support pipeline local run
AML Pipeline Local Run Guide
This repository contains sdk code to run aml pipeline locally. So far there are 2 job running modes supported in pipeline local run:
- Native: this mode means run the job in native process
- Container: this mode the local pipeline executor will help building the container based on the environment defined in pipeline job component.
- Only support CommandJob (SweepJob and DistributedJob are not supported)
- Pure local run with local metrics/UI support (need to run local server container if want to see ui)
- piprunengine: main pkg for pipeline local executor
- tests: unit test to run all sample pipelines (defined in notebookxx)
- notebookxx: unit test pipeline definition and related resources.
- azure ml devplat-v2 sdk
- python version > 3.7
How to run it
1.1 clone this repo to local
1.2 create a new python env with conda
conda create -n <local_run_env> python=3.9
1.3 install the local run sdk
find the latest wheel in release folder and install it in the new created env
pip install pipelinelocalrun==0.1.9
1.4 install jupyter if want to run in notebook
pip install jupyter
1.5 start local web server if want to try local ui & mlflow (optional)
docker run -e AML_LOCAL_RUN_DB_PATH="/metadata/localrun.db" -e LOCALUI_START=true -p 127.0.0.1:4999:80/tcp -p 127.0.0.1:8080:8080/tcp -p 127.0.0.1:3001:3001/tcp -p 127.0.0.1:5000:5000/tcp --mount type=bind,source='<current-user-home-path>\.azureml\piprun',target=/metadata <image_name:tag>
- for windows:
- for linux:
<image_name:tag> is the image built in step 2.4
1.6 how to use in code/notebook
import the local run func from the install pkg
from piprunengine import run
following the normal steps in the notebook to build your pipeline(you can ignore all steps which need interaction with aml workspace)
start pipeline local run
output_root_dir = "./local-run-output/notebook_1a_native" # set pipeline name pipeline.name="test-pipeline" run(output_root_dir=output_root_dir, job=pipeline, experiment_name="test")
note: by default it runs in CONTAINER mode and it will build the curated container locally and run in container mode.
1.7 try with notebook demo
This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact email@example.com with any additional questions or comments.
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
Release history Release notifications | RSS feed
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for pipelinelocalrun-0.2.0-py3-none-any.whl