diff --git a/markdown/step_01.md b/markdown/step_01.md index a944592..eee0f27 100644 --- a/markdown/step_01.md +++ b/markdown/step_01.md @@ -18,7 +18,7 @@ dependencies for our workflow. You can think of this as a high-level interface to define a container image: ```python -image = fl.ImageSpec(packages=["pandas", "pyarrow", "scikit-learn"]) +image = union.ImageSpec(packages=["pandas", "pyarrow", "scikit-learn"]) ``` Then, we define the `get_data` and `train_model` tasks and compose them @@ -56,19 +56,19 @@ def training_workflow( ``` Union supports seamless development from local to remote execution. -Run this workflow locally with the `union run` CLI command: +Run this workflow on the Workspace machine itself with the `union run` CLI command: -[▶️ Run locally in terminal](command:union-workspace.runTrainingLocal) +[▶️ Run locally in the Workspace](command:union-workspace.runTrainingLocal) ```bash union run workflows/train.py training_workflow --max_iter 100 ``` -Note that you can pass arguments to the workflow as flags. +This is useful for quickly debugging your workflow in the local environment. -Then, to run this on Union Serverless, simply supply the `--remote` flag: +To run this on Union Serverless, simply supply the `--remote` flag: -[▶️ Run remotely in terminal](command:union-workspace.runTrainingRemote) +[▶️ Run remotely on the Union cluster](command:union-workspace.runTrainingRemote) ```bash diff --git a/markdown/step_02.md b/markdown/step_02.md index e78b089..6fc914c 100644 --- a/markdown/step_02.md +++ b/markdown/step_02.md @@ -4,9 +4,9 @@ # 🔀 Parallelize Model Training -Union allows you to horizontally scale your workflows with `map_task`s. To -make this more concrete, we can define the hyperparameters of the model training -step as a dataclass and refactor the `train_model` task from the previous step: +Union horizontally scales your workflows with `map_task`s. To make this more +concrete, we can define the hyperparameters of the model training step as a +dataclass and refactor the `train_model` task from the previous step: ```python from dataclasses import dataclass asdict @@ -40,7 +40,7 @@ def training_workflow(hp_grid: list[Hyperparameters]) -> list[MLPClassifier]: Run this workflow by passing a list of hyperparameters to the workflow: -[▶️ Run remotely in terminal](command:union-workspace.runParallelizeWorkflow) +[▶️ Run remotely on the Union cluster](command:union-workspace.runParallelizeWorkflow) ```bash union run --remote workflows/parallelize.py training_workflow --hp_grid '[{"max_iter": 25}, {"max_iter": 500}, {"max_iter": 100}]' diff --git a/markdown/step_04.md b/markdown/step_04.md index 459b19b..5c7545a 100644 --- a/markdown/step_04.md +++ b/markdown/step_04.md @@ -19,3 +19,29 @@ You've successfully run your first Union workflows: Use this workspace environment to learn more about Union by checking out the [User Guide](https://docs.union.ai/serverless/user-guide/) and end-to-end [Tutorial](https://docs.union.ai/serverless/tutorials/) examples. + +Clone the Union examples repository to explore and run them: + +``` +git clone https://github.com/unionai/unionai-examples +cd unionai-examples +``` + +This repository contains `user_guide` and `tutorials` subfolders that correspond +to the [User Guide](https://docs.union.ai/serverless/user-guide/) and +[Tutorial](https://docs.union.ai/serverless/tutorials/) documentation, respectively. + +For instance, to run the `user_guide` example [here](https://github.com/unionai/unionai-examples/blob/main/user_guide/first_workflow/ml_workflow/ml_workflow.py), +run the following command: + +``` +union run --remote user_guide/first_workflow/ml_workflow/ml_workflow.py main --max_bins 64 +``` + +And to run the `tutorials` examples, simply run the instructions in the **Run on Union BYOC** dropdown. +For example, to train a [credit default model with XGBoost](https://docs.union.ai/byoc/tutorials/finance/credit-default-xgboost), +run the following command: + +``` +union run --remote tutorials/credit_default/credit_default.py credit_default_wf +``` diff --git a/package.json b/package.json index e607392..7aba797 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "union-workspace", "displayName": "Union Workspace Onboarding", "description": "Visual Studio Code onboarding experience for Union Workspaces", - "version": "0.0.10", + "version": "0.0.11", "publisher": "unionai", "engines": { "vscode": "^1.71.0"