From 9180830e1661ff64b65f270cdfd1c1ae9517fd7e Mon Sep 17 00:00:00 2001 From: Hamza Tahir Date: Sun, 25 Aug 2024 14:18:06 +0200 Subject: [PATCH] Delete starter-guide-1, starter-guide-2 introduction chapters --- .../user-guide/starter-guide-1/chapter1.md | 181 ------------------ .../starter-guide-1/introduction.md | 181 ------------------ .../user-guide/starter-guide-2/chapter1.md | 181 ------------------ .../starter-guide-2/introduction.md | 181 ------------------ .../chapter1.ipynb | 0 .../introduction.ipynb | 0 6 files changed, 724 deletions(-) delete mode 100644 docs/book/user-guide/starter-guide-1/chapter1.md delete mode 100644 docs/book/user-guide/starter-guide-1/introduction.md delete mode 100644 docs/book/user-guide/starter-guide-2/chapter1.md delete mode 100644 docs/book/user-guide/starter-guide-2/introduction.md rename tutorials/{starter-guide-1 => starter-guide-2}/chapter1.ipynb (100%) rename tutorials/{starter-guide-1 => starter-guide-2}/introduction.ipynb (100%) diff --git a/docs/book/user-guide/starter-guide-1/chapter1.md b/docs/book/user-guide/starter-guide-1/chapter1.md deleted file mode 100644 index a32ffd195e9..00000000000 --- a/docs/book/user-guide/starter-guide-1/chapter1.md +++ /dev/null @@ -1,181 +0,0 @@ -[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/zenml-io/zenml/blob/main/tutorials/starter-guide-1/chapter1.ipynb) [![Run Locally](https://img.shields.io/badge/run-locally-blue)](https://github.com/zenml-io/zenml/blob/main/tutorials/starter-guide-1/chapter1.ipynb) - -# 🐣 Starter guide - -Welcome to the ZenML Starter Guide! If you're an MLOps engineer aiming to build robust ML platforms, or a data scientist interested in leveraging the power of MLOps, this is the perfect place to begin. Our guide is designed to provide you with the foundational knowledge of the ZenML framework and equip you with the initial tools to manage the complexity of machine learning operations. - -![Embarking on MLOps can be intricate. ZenML simplifies the journey.](../../.gitbook/assets/01_pipeline.png) - -Throughout this guide, we'll cover essential topics including: - -- Creating your first ML pipeline -- Understanding caching between pipeline steps -- Fetching objects after pipelines have run -- Managing data and data versioning -- Tracking your machine learning models -- Structuring your pipelines, models, and artifacts - -Before jumping in, make sure you have a Python environment ready and `virtualenv` installed to follow along with ease. - - -```python -!pip install zenml -``` - -By the end, you will have completed a starter project, marking the beginning of your journey into MLOps with ZenML. - -Let this guide be not only your introduction to ZenML but also a foundational asset in your MLOps toolkit. Prepare your development environment, and let's get started! - - -```python -from zenml import pipeline, step - -@step -def load_data() -> dict: - """Simulates loading of training data and labels.""" - - training_data = [[1, 2], [3, 4], [5, 6]] - labels = [0, 1, 0] - - return {'features': training_data, 'labels': labels} - -@step -def train_model(data: dict) -> None: - """ - A mock 'training' process that also demonstrates using the input data. - In a real-world scenario, this would be replaced with actual model fitting logic. - """ - total_features = sum(map(sum, data['features'])) - total_labels = sum(data['labels']) - - print(f"Trained model using {len(data['features'])} data points. " - f"Feature sum is {total_features}, label sum is {total_labels}") - -@pipeline -def simple_ml_pipeline(): - """Define a pipeline that connects the steps.""" - dataset = load_data() - train_model(dataset) - -if __name__ == "__main__": - run = simple_ml_pipeline() - # You can now use the `run` object to see steps, outputs, etc. -``` - - -{% hint style="info" %} -* **`@step`** is a decorator that converts its function into a step that can be used within a pipeline -* **`@pipeline`** defines a function as a pipeline and within this function, the steps are called and their outputs link them together. -{% endhint %} - -Copy this code into a new file and name it `run.py`. Then run it with your command line: - - -```python -from zenml import pipeline, step - -@step -def load_data() -> dict: - """Simulates loading of training data and labels.""" - - training_data = [[1, 2], [3, 4], [5, 6]] - labels = [0, 1, 0] - - return {'features': training_data, 'labels': labels} - -@step -def train_model(data: dict) -> None: - """ - A mock 'training' process that also demonstrates using the input data. - In a real-world scenario, this would be replaced with actual model fitting logic. - """ - total_features = sum(map(sum, data['features'])) - total_labels = sum(data['labels']) - - print(f"Trained model using {len(data['features'])} data points. " - f"Feature sum is {total_features}, label sum is {total_labels}") - -@pipeline -def simple_ml_pipeline(): - """Define a pipeline that connects the steps.""" - dataset = load_data() - train_model(dataset) - -if __name__ == "__main__": - run = simple_ml_pipeline() - # You can now use the `run` object to see steps, outputs, etc. -``` - - -```python -from zenml import pipeline, step - -@step -def load_data() -> dict: - """Simulates loading of training data and labels.""" - - training_data = [[1, 2], [3, 4], [5, 6]] - labels = [0, 1, 0] - - return {'features': training_data, 'labels': labels} - -@step -def train_model(data: dict) -> None: - """ - A mock 'training' process that also demonstrates using the input data. - In a real-world scenario, this would be replaced with actual model fitting logic. - """ - total_features = sum(map(sum, data['features'])) - total_labels = sum(data['labels']) - - print(f"Trained model using {len(data['features'])} data points. " - f"Feature sum is {total_features}, label sum is {total_labels}") - -@pipeline -def simple_ml_pipeline(): - """Define a pipeline that connects the steps.""" - dataset = load_data() - train_model(dataset) - -if __name__ == "__main__": - run = simple_ml_pipeline() - # You can now use the `run` object to see steps, outputs, etc. -``` - - -```python -from zenml import pipeline, step - -@step -def load_data() -> dict: - """Simulates loading of training data and labels.""" - - training_data = [[1, 2], [3, 4], [5, 6]] - labels = [0, 1, 0] - - return {'features': training_data, 'labels': labels} - -@step -def train_model(data: dict) -> None: - """ - A mock 'training' process that also demonstrates using the input data. - In a real-world scenario, this would be replaced with actual model fitting logic. - """ - total_features = sum(map(sum, data['features'])) - total_labels = sum(data['labels']) - - print(f"Trained model using {len(data['features'])} data points. " - f"Feature sum is {total_features}, label sum is {total_labels}") - -@pipeline -def simple_ml_pipeline(): - """Define a pipeline that connects the steps.""" - dataset = load_data() - train_model(dataset) - -if __name__ == "__main__": - run = simple_ml_pipeline() - # You can now use the `run` object to see steps, outputs, etc. -``` - - diff --git a/docs/book/user-guide/starter-guide-1/introduction.md b/docs/book/user-guide/starter-guide-1/introduction.md deleted file mode 100644 index e29b7fb879d..00000000000 --- a/docs/book/user-guide/starter-guide-1/introduction.md +++ /dev/null @@ -1,181 +0,0 @@ -[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/zenml-io/zenml/blob/main/tutorials/starter-guide-1/introduction.ipynb) [![Run Locally](https://img.shields.io/badge/run-locally-blue)](https://github.com/zenml-io/zenml/blob/main/tutorials/starter-guide-1/introduction.ipynb) - -# 🐣 Starter guide - -Welcome to the ZenML Starter Guide! If you're an MLOps engineer aiming to build robust ML platforms, or a data scientist interested in leveraging the power of MLOps, this is the perfect place to begin. Our guide is designed to provide you with the foundational knowledge of the ZenML framework and equip you with the initial tools to manage the complexity of machine learning operations. - -![Embarking on MLOps can be intricate. ZenML simplifies the journey.](../../.gitbook/assets/01_pipeline.png) - -Throughout this guide, we'll cover essential topics including: - -- Creating your first ML pipeline -- Understanding caching between pipeline steps -- Fetching objects after pipelines have run -- Managing data and data versioning -- Tracking your machine learning models -- Structuring your pipelines, models, and artifacts - -Before jumping in, make sure you have a Python environment ready and `virtualenv` installed to follow along with ease. - - -```python -!pip install zenml -``` - -By the end, you will have completed a starter project, marking the beginning of your journey into MLOps with ZenML. - -Let this guide be not only your introduction to ZenML but also a foundational asset in your MLOps toolkit. Prepare your development environment, and let's get started! - - -```python -from zenml import pipeline, step - -@step -def load_data() -> dict: - """Simulates loading of training data and labels.""" - - training_data = [[1, 2], [3, 4], [5, 6]] - labels = [0, 1, 0] - - return {'features': training_data, 'labels': labels} - -@step -def train_model(data: dict) -> None: - """ - A mock 'training' process that also demonstrates using the input data. - In a real-world scenario, this would be replaced with actual model fitting logic. - """ - total_features = sum(map(sum, data['features'])) - total_labels = sum(data['labels']) - - print(f"Trained model using {len(data['features'])} data points. " - f"Feature sum is {total_features}, label sum is {total_labels}") - -@pipeline -def simple_ml_pipeline(): - """Define a pipeline that connects the steps.""" - dataset = load_data() - train_model(dataset) - -if __name__ == "__main__": - run = simple_ml_pipeline() - # You can now use the `run` object to see steps, outputs, etc. -``` - - -{% hint style="info" %} -* **`@step`** is a decorator that converts its function into a step that can be used within a pipeline -* **`@pipeline`** defines a function as a pipeline and within this function, the steps are called and their outputs link them together. -{% endhint %} - -Copy this code into a new file and name it `run.py`. Then run it with your command line: - - -```python -from zenml import pipeline, step - -@step -def load_data() -> dict: - """Simulates loading of training data and labels.""" - - training_data = [[1, 2], [3, 4], [5, 6]] - labels = [0, 1, 0] - - return {'features': training_data, 'labels': labels} - -@step -def train_model(data: dict) -> None: - """ - A mock 'training' process that also demonstrates using the input data. - In a real-world scenario, this would be replaced with actual model fitting logic. - """ - total_features = sum(map(sum, data['features'])) - total_labels = sum(data['labels']) - - print(f"Trained model using {len(data['features'])} data points. " - f"Feature sum is {total_features}, label sum is {total_labels}") - -@pipeline -def simple_ml_pipeline(): - """Define a pipeline that connects the steps.""" - dataset = load_data() - train_model(dataset) - -if __name__ == "__main__": - run = simple_ml_pipeline() - # You can now use the `run` object to see steps, outputs, etc. -``` - - -```python -from zenml import pipeline, step - -@step -def load_data() -> dict: - """Simulates loading of training data and labels.""" - - training_data = [[1, 2], [3, 4], [5, 6]] - labels = [0, 1, 0] - - return {'features': training_data, 'labels': labels} - -@step -def train_model(data: dict) -> None: - """ - A mock 'training' process that also demonstrates using the input data. - In a real-world scenario, this would be replaced with actual model fitting logic. - """ - total_features = sum(map(sum, data['features'])) - total_labels = sum(data['labels']) - - print(f"Trained model using {len(data['features'])} data points. " - f"Feature sum is {total_features}, label sum is {total_labels}") - -@pipeline -def simple_ml_pipeline(): - """Define a pipeline that connects the steps.""" - dataset = load_data() - train_model(dataset) - -if __name__ == "__main__": - run = simple_ml_pipeline() - # You can now use the `run` object to see steps, outputs, etc. -``` - - -```python -from zenml import pipeline, step - -@step -def load_data() -> dict: - """Simulates loading of training data and labels.""" - - training_data = [[1, 2], [3, 4], [5, 6]] - labels = [0, 1, 0] - - return {'features': training_data, 'labels': labels} - -@step -def train_model(data: dict) -> None: - """ - A mock 'training' process that also demonstrates using the input data. - In a real-world scenario, this would be replaced with actual model fitting logic. - """ - total_features = sum(map(sum, data['features'])) - total_labels = sum(data['labels']) - - print(f"Trained model using {len(data['features'])} data points. " - f"Feature sum is {total_features}, label sum is {total_labels}") - -@pipeline -def simple_ml_pipeline(): - """Define a pipeline that connects the steps.""" - dataset = load_data() - train_model(dataset) - -if __name__ == "__main__": - run = simple_ml_pipeline() - # You can now use the `run` object to see steps, outputs, etc. -``` - - diff --git a/docs/book/user-guide/starter-guide-2/chapter1.md b/docs/book/user-guide/starter-guide-2/chapter1.md deleted file mode 100644 index 23e06ee0a28..00000000000 --- a/docs/book/user-guide/starter-guide-2/chapter1.md +++ /dev/null @@ -1,181 +0,0 @@ -[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/zenml-io/zenml/blob/main/tutorials/starter-guide-2/chapter1.ipynb) [![Run Locally](https://img.shields.io/badge/run-locally-blue)](https://github.com/zenml-io/zenml/blob/main/tutorials/starter-guide-2/chapter1.ipynb) - -# 🐣 Starter guide - -Welcome to the ZenML Starter Guide! If you're an MLOps engineer aiming to build robust ML platforms, or a data scientist interested in leveraging the power of MLOps, this is the perfect place to begin. Our guide is designed to provide you with the foundational knowledge of the ZenML framework and equip you with the initial tools to manage the complexity of machine learning operations. - -![Embarking on MLOps can be intricate. ZenML simplifies the journey.](../../.gitbook/assets/01_pipeline.png) - -Throughout this guide, we'll cover essential topics including: - -- Creating your first ML pipeline -- Understanding caching between pipeline steps -- Fetching objects after pipelines have run -- Managing data and data versioning -- Tracking your machine learning models -- Structuring your pipelines, models, and artifacts - -Before jumping in, make sure you have a Python environment ready and `virtualenv` installed to follow along with ease. - - -```python -!pip install zenml -``` - -By the end, you will have completed a starter project, marking the beginning of your journey into MLOps with ZenML. - -Let this guide be not only your introduction to ZenML but also a foundational asset in your MLOps toolkit. Prepare your development environment, and let's get started! - - -```python -from zenml import pipeline, step - -@step -def load_data() -> dict: - """Simulates loading of training data and labels.""" - - training_data = [[1, 2], [3, 4], [5, 6]] - labels = [0, 1, 0] - - return {'features': training_data, 'labels': labels} - -@step -def train_model(data: dict) -> None: - """ - A mock 'training' process that also demonstrates using the input data. - In a real-world scenario, this would be replaced with actual model fitting logic. - """ - total_features = sum(map(sum, data['features'])) - total_labels = sum(data['labels']) - - print(f"Trained model using {len(data['features'])} data points. " - f"Feature sum is {total_features}, label sum is {total_labels}") - -@pipeline -def simple_ml_pipeline(): - """Define a pipeline that connects the steps.""" - dataset = load_data() - train_model(dataset) - -if __name__ == "__main__": - run = simple_ml_pipeline() - # You can now use the `run` object to see steps, outputs, etc. -``` - - -{% hint style="info" %} -* **`@step`** is a decorator that converts its function into a step that can be used within a pipeline -* **`@pipeline`** defines a function as a pipeline and within this function, the steps are called and their outputs link them together. -{% endhint %} - -Copy this code into a new file and name it `run.py`. Then run it with your command line: - - -```python -from zenml import pipeline, step - -@step -def load_data() -> dict: - """Simulates loading of training data and labels.""" - - training_data = [[1, 2], [3, 4], [5, 6]] - labels = [0, 1, 0] - - return {'features': training_data, 'labels': labels} - -@step -def train_model(data: dict) -> None: - """ - A mock 'training' process that also demonstrates using the input data. - In a real-world scenario, this would be replaced with actual model fitting logic. - """ - total_features = sum(map(sum, data['features'])) - total_labels = sum(data['labels']) - - print(f"Trained model using {len(data['features'])} data points. " - f"Feature sum is {total_features}, label sum is {total_labels}") - -@pipeline -def simple_ml_pipeline(): - """Define a pipeline that connects the steps.""" - dataset = load_data() - train_model(dataset) - -if __name__ == "__main__": - run = simple_ml_pipeline() - # You can now use the `run` object to see steps, outputs, etc. -``` - - -```python -from zenml import pipeline, step - -@step -def load_data() -> dict: - """Simulates loading of training data and labels.""" - - training_data = [[1, 2], [3, 4], [5, 6]] - labels = [0, 1, 0] - - return {'features': training_data, 'labels': labels} - -@step -def train_model(data: dict) -> None: - """ - A mock 'training' process that also demonstrates using the input data. - In a real-world scenario, this would be replaced with actual model fitting logic. - """ - total_features = sum(map(sum, data['features'])) - total_labels = sum(data['labels']) - - print(f"Trained model using {len(data['features'])} data points. " - f"Feature sum is {total_features}, label sum is {total_labels}") - -@pipeline -def simple_ml_pipeline(): - """Define a pipeline that connects the steps.""" - dataset = load_data() - train_model(dataset) - -if __name__ == "__main__": - run = simple_ml_pipeline() - # You can now use the `run` object to see steps, outputs, etc. -``` - - -```python -from zenml import pipeline, step - -@step -def load_data() -> dict: - """Simulates loading of training data and labels.""" - - training_data = [[1, 2], [3, 4], [5, 6]] - labels = [0, 1, 0] - - return {'features': training_data, 'labels': labels} - -@step -def train_model(data: dict) -> None: - """ - A mock 'training' process that also demonstrates using the input data. - In a real-world scenario, this would be replaced with actual model fitting logic. - """ - total_features = sum(map(sum, data['features'])) - total_labels = sum(data['labels']) - - print(f"Trained model using {len(data['features'])} data points. " - f"Feature sum is {total_features}, label sum is {total_labels}") - -@pipeline -def simple_ml_pipeline(): - """Define a pipeline that connects the steps.""" - dataset = load_data() - train_model(dataset) - -if __name__ == "__main__": - run = simple_ml_pipeline() - # You can now use the `run` object to see steps, outputs, etc. -``` - - diff --git a/docs/book/user-guide/starter-guide-2/introduction.md b/docs/book/user-guide/starter-guide-2/introduction.md deleted file mode 100644 index a7f9ac8f6b0..00000000000 --- a/docs/book/user-guide/starter-guide-2/introduction.md +++ /dev/null @@ -1,181 +0,0 @@ -[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/zenml-io/zenml/blob/main/tutorials/starter-guide-2/introduction.ipynb) [![Run Locally](https://img.shields.io/badge/run-locally-blue)](https://github.com/zenml-io/zenml/blob/main/tutorials/starter-guide-2/introduction.ipynb) - -# 🐣 Starter guide - -Welcome to the ZenML Starter Guide! If you're an MLOps engineer aiming to build robust ML platforms, or a data scientist interested in leveraging the power of MLOps, this is the perfect place to begin. Our guide is designed to provide you with the foundational knowledge of the ZenML framework and equip you with the initial tools to manage the complexity of machine learning operations. - -![Embarking on MLOps can be intricate. ZenML simplifies the journey.](../../.gitbook/assets/01_pipeline.png) - -Throughout this guide, we'll cover essential topics including: - -- Creating your first ML pipeline -- Understanding caching between pipeline steps -- Fetching objects after pipelines have run -- Managing data and data versioning -- Tracking your machine learning models -- Structuring your pipelines, models, and artifacts - -Before jumping in, make sure you have a Python environment ready and `virtualenv` installed to follow along with ease. - - -```python -!pip install zenml -``` - -By the end, you will have completed a starter project, marking the beginning of your journey into MLOps with ZenML. - -Let this guide be not only your introduction to ZenML but also a foundational asset in your MLOps toolkit. Prepare your development environment, and let's get started! - - -```python -from zenml import pipeline, step - -@step -def load_data() -> dict: - """Simulates loading of training data and labels.""" - - training_data = [[1, 2], [3, 4], [5, 6]] - labels = [0, 1, 0] - - return {'features': training_data, 'labels': labels} - -@step -def train_model(data: dict) -> None: - """ - A mock 'training' process that also demonstrates using the input data. - In a real-world scenario, this would be replaced with actual model fitting logic. - """ - total_features = sum(map(sum, data['features'])) - total_labels = sum(data['labels']) - - print(f"Trained model using {len(data['features'])} data points. " - f"Feature sum is {total_features}, label sum is {total_labels}") - -@pipeline -def simple_ml_pipeline(): - """Define a pipeline that connects the steps.""" - dataset = load_data() - train_model(dataset) - -if __name__ == "__main__": - run = simple_ml_pipeline() - # You can now use the `run` object to see steps, outputs, etc. -``` - - -{% hint style="info" %} -* **`@step`** is a decorator that converts its function into a step that can be used within a pipeline -* **`@pipeline`** defines a function as a pipeline and within this function, the steps are called and their outputs link them together. -{% endhint %} - -Copy this code into a new file and name it `run.py`. Then run it with your command line: - - -```python -from zenml import pipeline, step - -@step -def load_data() -> dict: - """Simulates loading of training data and labels.""" - - training_data = [[1, 2], [3, 4], [5, 6]] - labels = [0, 1, 0] - - return {'features': training_data, 'labels': labels} - -@step -def train_model(data: dict) -> None: - """ - A mock 'training' process that also demonstrates using the input data. - In a real-world scenario, this would be replaced with actual model fitting logic. - """ - total_features = sum(map(sum, data['features'])) - total_labels = sum(data['labels']) - - print(f"Trained model using {len(data['features'])} data points. " - f"Feature sum is {total_features}, label sum is {total_labels}") - -@pipeline -def simple_ml_pipeline(): - """Define a pipeline that connects the steps.""" - dataset = load_data() - train_model(dataset) - -if __name__ == "__main__": - run = simple_ml_pipeline() - # You can now use the `run` object to see steps, outputs, etc. -``` - - -```python -from zenml import pipeline, step - -@step -def load_data() -> dict: - """Simulates loading of training data and labels.""" - - training_data = [[1, 2], [3, 4], [5, 6]] - labels = [0, 1, 0] - - return {'features': training_data, 'labels': labels} - -@step -def train_model(data: dict) -> None: - """ - A mock 'training' process that also demonstrates using the input data. - In a real-world scenario, this would be replaced with actual model fitting logic. - """ - total_features = sum(map(sum, data['features'])) - total_labels = sum(data['labels']) - - print(f"Trained model using {len(data['features'])} data points. " - f"Feature sum is {total_features}, label sum is {total_labels}") - -@pipeline -def simple_ml_pipeline(): - """Define a pipeline that connects the steps.""" - dataset = load_data() - train_model(dataset) - -if __name__ == "__main__": - run = simple_ml_pipeline() - # You can now use the `run` object to see steps, outputs, etc. -``` - - -```python -from zenml import pipeline, step - -@step -def load_data() -> dict: - """Simulates loading of training data and labels.""" - - training_data = [[1, 2], [3, 4], [5, 6]] - labels = [0, 1, 0] - - return {'features': training_data, 'labels': labels} - -@step -def train_model(data: dict) -> None: - """ - A mock 'training' process that also demonstrates using the input data. - In a real-world scenario, this would be replaced with actual model fitting logic. - """ - total_features = sum(map(sum, data['features'])) - total_labels = sum(data['labels']) - - print(f"Trained model using {len(data['features'])} data points. " - f"Feature sum is {total_features}, label sum is {total_labels}") - -@pipeline -def simple_ml_pipeline(): - """Define a pipeline that connects the steps.""" - dataset = load_data() - train_model(dataset) - -if __name__ == "__main__": - run = simple_ml_pipeline() - # You can now use the `run` object to see steps, outputs, etc. -``` - - diff --git a/tutorials/starter-guide-1/chapter1.ipynb b/tutorials/starter-guide-2/chapter1.ipynb similarity index 100% rename from tutorials/starter-guide-1/chapter1.ipynb rename to tutorials/starter-guide-2/chapter1.ipynb diff --git a/tutorials/starter-guide-1/introduction.ipynb b/tutorials/starter-guide-2/introduction.ipynb similarity index 100% rename from tutorials/starter-guide-1/introduction.ipynb rename to tutorials/starter-guide-2/introduction.ipynb