" else:\n",
" print(f'Zip file not found: {zip_file_path}')\n",
"\n",
- " # Load the model in SavedModel format\n",
" # Path to the directory containing the saved model\n",
" model_path = f\"./Model/{modelversion}\"\n",
- " \n",
+ "\n",
+ " # Load the model in SavedModel format \n",
" model = tf.keras.models.load_model(model_path)\n",
+ " \n",
" model.compile(loss='mse', optimizer='adam', metrics=['mse'])\n",
" model.summary()\n",
"\n",
"requests.post(\"http://tm.traininghost:32002/pipelines/{}/upload\".format(pipeline_name), files={'file':open(pipeline_file,'rb')})"
]
},
- {
- "cell_type": "code",
- "execution_count": 14,
- "metadata": {},
- "outputs": [
- {
- "data": {
- "text/html": [
- "<a href=\"http://ml-pipeline-ui.kubeflow:80/#/experiments/details/c7714054-ee78-484d-ae94-086901f98693\" target=\"_blank\" >Experiment details</a>."
- ],
- "text/plain": [
- "<IPython.core.display.HTML object>"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- },
- {
- "data": {
- "text/html": [
- "<a href=\"http://ml-pipeline-ui.kubeflow:80/#/runs/details/86ef1c74-2978-4a1d-9743-831b9b9c9dfe\" target=\"_blank\" >Run details</a>."
- ],
- "text/plain": [
- "<IPython.core.display.HTML object>"
- ]
- },
- "metadata": {},
- "output_type": "display_data"
- }
- ],
- "source": [
- "from kfp.client import Client\n",
- "client = Client(host='http://ml-pipeline-ui.kubeflow:80')\n",
- "# client.upload_pipeline_version(pipeline_package_path='pipeline.yaml',pipeline_version_name='v2', pipeline_name='sample-pipeline')\n",
- "result = client.create_run_from_pipeline_package('qoe_model_pipeline_retrain_2.yaml', arguments={'trainingjob_name':'testing_influxdb_301', 'epochs':'5', 'version':'1'})"
- ]
- },
{
"cell_type": "code",
"execution_count": null,