Skip to content

Commit

Permalink
Updated changes for delete_exp and removed unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
prem0912 committed Jun 3, 2020
1 parent a32fd50 commit 078841f
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 66 deletions.
58 changes: 23 additions & 35 deletions sdk/python/examples/bayesianoptimization-katib-sdk.ipynb
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [],
"source": [
"from kubernetes.client import V1PodTemplateSpec\n",
"from kubernetes.client import V1ObjectMeta\n",
"from kubernetes.client import V1PodSpec\n",
"from kubernetes.client import V1Container"
]
},
{
"cell_type": "code",
"execution_count": 26,
Expand All @@ -20,6 +8,7 @@
},
"outputs": [],
"source": [
"from kubernetes.client import V1ObjectMeta\n",
"import kubeflow.katib as kc\n",
"from kubeflow.katib import constants\n",
"from kubeflow.katib import utils\n",
Expand All @@ -28,7 +17,7 @@
"from kubeflow.katib import V1alpha3AlgorithmSpec\n",
"from kubeflow.katib import V1alpha3CollectorSpec\n",
"from kubeflow.katib import V1alpha3EarlyStoppingSetting\n",
"from kubeflow.katib import V1alpha3EarlyStoppingSpec\n",
"from kubeflow.katib import V1alpha3EarlyStoppingSpecs\n",
"from kubeflow.katib import V1alpha3Experiment\n",
"from kubeflow.katib import V1alpha3ExperimentCondition\n",
"from kubeflow.katib import V1alpha3ExperimentList\n",
Expand Down Expand Up @@ -282,7 +271,7 @@
}
],
"source": [
"kclient.get_experiment(name=\"bayesianoptimization\", namespace=None)"
"kclient.get_experiment(name=\"bayesianoptimization\", namespace=namespace)"
]
},
{
Expand Down Expand Up @@ -360,7 +349,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## get experiment status"
"## Get experiment status"
]
},
{
Expand Down Expand Up @@ -410,22 +399,6 @@
"kclient.is_experiment_succeeded(name=\"bayesianoptimization\", namespace=namespace)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## delete experiment"
]
},
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [],
"source": [
" kclient.delete_experiment(name=\"bayesianoptimization\", namespace=namespace)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -484,7 +457,14 @@
"kclient.list_experiments(namespace=namespace)\n"
]
},
{
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Get Optimal Hyperparameter"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
Expand All @@ -510,12 +490,21 @@
"kclient.get_optimal_hyperparmeters(name=\"bayesianoptimization\", namespace=namespace)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Delete experiment"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 36,
"metadata": {},
"outputs": [],
"source": []
"source": [
" kclient.delete_experiment(name=\"bayesianoptimization\", namespace=namespace)"
]
}
],
"metadata": {
Expand All @@ -540,4 +529,3 @@
"nbformat": 4,
"nbformat_minor": 2
}

59 changes: 28 additions & 31 deletions sdk/python/examples/tfjob-katib-sdk.ipynb
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"from kubernetes.client import V1PodTemplateSpec\n",
"from kubernetes.client import V1ObjectMeta\n",
"from kubernetes.client import V1PodSpec\n",
"from kubernetes.client import V1Container"
]
},
{
"cell_type": "code",
"execution_count": 4,
Expand All @@ -20,6 +8,7 @@
},
"outputs": [],
"source": [
"from kubernetes.client import V1ObjectMeta\n",
"import kubeflow.katib as kc\n",
"from kubeflow.katib import constants\n",
"from kubeflow.katib import utils\n",
Expand Down Expand Up @@ -397,7 +386,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"## get experiment status"
"## Get experiment status"
]
},
{
Expand Down Expand Up @@ -447,22 +436,6 @@
"kclient.is_experiment_succeeded(name=\"tfjob-example\", namespace=namespace)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## delete experiment"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"kclient.delete_experiment(name=\"tfjob-example\", namespace=namespace)"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -521,12 +494,37 @@
"kclient.list_experiments(namespace=namespace)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Get Optimal Hyperparameter"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
"source": [
"kclient.get_optimal_hyperparmeters(name=\"tfjob-example\", namespace=namespace)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Delete experiment"
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"kclient.delete_experiment(name=\"tfjob-example\", namespace=namespace)"
]
}
],
"metadata": {
Expand All @@ -551,4 +549,3 @@
"nbformat": 4,
"nbformat_minor": 2
}

0 comments on commit 078841f

Please sign in to comment.