본문 바로가기
Kubeflow/기능 탐방 (Kubeflow 1.0)

Kubeflow 1.0 기능 #6 (Metadata)

by 여행을 떠나자! 2021. 9. 25.

2020.03.23

 

1. Kubeflow Metadata ?

- Tracking and managing metadata of machine learning workflows in Kubeflow

- metadata means information about executions (runs), models, datasets, and other artifacts. 

   Artifacts are the files and objects that form the inputs and outputs of the components in your ML workflow

 

 

2. Try the Metadata SDK in a sample Jupyter notebook

- demo.ipynb download from Github

   Terminal 실행: Jupyter > New > Terminal 

- demo.ipynb download

$ wget -O demo.ipynb https://github.com/kubeflow/metadata/blob/master/sdk/python/sample/demo.ipynb?raw=true

- open and run the demo.ipynb 

      Log the evaluation of a model (demo.ipynb의 일부 내용)

          metrics = exec.log_output(

              metadata.Metrics(

                    name="MNIST-evaluation",

                    description="validating the MNIST model to recognize handwritten digits",

                    owner="someone@kubeflow.org",

                    uri="gcs://my-bucket/mnist-eval.csv",        

                    data_set_id=str(data_set.id),

                    model_id=str(model.id),

                    metrics_type=metadata.Metrics.VALIDATION,

                    values={"accuracy": 0.95},

                    labels={"mylabel": "l1"}))

 

 

3. Metadata 조회

- Jupyter notebook (demo.ipynb 마지막 2번쨰 셀)

   pandas.DataFrame.from_dict(ws1.list(metadata.Model.ARTIFACT_TYPE_NAME))

 

- Kubeflow UI

   Kubeflow Central dashboard 접속 (https://my-kubeflow.endpoints.my-kubeflow-271310.cloud.goog)

   Artifact Store 메뉴 선택

   ✓ A dataset metadata item with the name mytable-dump.

   ✓ A model metadata item with the name MNIST.

   ✓ A metrics metadata item with the name MNIST-evaluation.

댓글