File tree Expand file tree Collapse file tree 4 files changed +37
-9
lines changed
native-experiment-tracking Expand file tree Collapse file tree 4 files changed +37
-9
lines changed Original file line number Diff line number Diff line change 1+ # :: Track experiments in ZenML natively
2+
3+ Although ZenML plugs into many [ experiment trackers] ( https://www.zenml.io/vs/zenml-vs-experiment-trackers ) , a lot of
4+ the functionality of experiment trackers is already covered by ZenML's native metadata and artifact tracking.
5+ This project aims to show these capabilities.
6+
7+ ## :running : Run locally
8+
9+
10+ #### Option 1 - Interactively explore the quickstart using Jupyter Notebook:
11+ ``` bash
12+ pip install notebook
13+ jupyter notebook
14+ # open quickstart.ipynb
15+ ```
16+
17+ #### Option 2 - Execute the whole ML pipeline from a Python script:
18+ ``` bash
19+ # Pip install all requirements
20+ pip install -r requirements.txt
21+
22+ # Install required zenml integrations
23+ zenml integration install sklearn pandas -y
24+
25+ # Initialize ZenML
26+ zenml init
27+ ```
28+
29+ ## Explore your experiments
30+
31+ ...
32+
33+
34+
35+
Original file line number Diff line number Diff line change 1- zenml [server ]>= 0.50 .0
1+ zenml [server ]>= 0.67 .0
22notebook
33scikit-learn
44pyarrow
Original file line number Diff line number Diff line change 1818
1919import click
2020
21- from zenml .client import Client
2221from zenml .logger import get_logger
2322
2423from pipelines import training
@@ -46,8 +45,6 @@ def main(
4645 Args:
4746 no_cache: If `True` cache will be disabled.
4847 """
49- client = Client ()
50-
5148 config_folder = os .path .join (
5249 os .path .dirname (os .path .realpath (__file__ )),
5350 "configs" ,
@@ -61,7 +58,7 @@ def main(
6158 )
6259 training .with_options (** pipeline_args )()
6360 training .with_options (** pipeline_args )()
64- logger .info ("Training pipeline with SGD finished successfully!\n \n " )
61+ logger .info ("Training pipeline finished successfully!\n \n " )
6562
6663if __name__ == "__main__" :
6764 main ()
Original file line number Diff line number Diff line change @@ -109,11 +109,8 @@ def model_evaluator(
109109
110110 client = Client ()
111111 mv = get_step_context ().model
112- print ("got mv" )
113112 m = client .list_model_versions (model_name_or_id = mv .model_id , size = 1 )
114- print ("got m" )
115113 number_of_versions = m .total
116- print (f"num mv { number_of_versions } " )
117114
118115 # Initialize a list to store test accuracies
119116 versions = [str (mv .number )]
@@ -124,7 +121,6 @@ def model_evaluator(
124121
125122 # Fetch test accuracies until we have 10 versions or reach the start
126123 while len (versions ) < 15 and index > 0 :
127- print (f"getting index: { index } " )
128124 zenml_model_version = client .get_model_version ("breast_cancer_classifier" , index , hydrate = False )
129125 if zenml_model_version .run_metadata :
130126 test_accuracy = zenml_model_version .run_metadata ['test_accuracy' ].value
You can’t perform that action at this time.
0 commit comments