Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "cells": [
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "import kfp\n",
- "import os"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "client = kfp.Client()\n",
- "import datetime\n",
- "iteration = datetime.datetime.now().strftime('%Y%m%d%H%M%S')"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "if os.getenv(\"ML_PIPELINE_SERVICE_PORT\"):\n",
- " try: \n",
- " client.get_experiment(experiment_name='Hybrid Pipelines - The One with the Two steps')\n",
- " except:\n",
- " hybrid_experiment = client.create_experiment(name='Hybrid Pipelines - The One with the Two steps')"
- ]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {},
- "outputs": [],
- "source": [
- "if os.getenv(\"ML_PIPELINE_SERVICE_PORT\"):\n",
- " run = client.run_pipeline(client.get_experiment(experiment_name='Hybrid Pipelines - The One with the Two steps').id, \n",
- " 'hybrid_pipeline-'+str(iteration), 'hybrid_pipeline.tar.gz', \n",
- " params={})\n"
- ]
- }
- ],
- "metadata": {
- "kernelspec": {
- "display_name": "Python 3",
- "language": "python",
- "name": "python3"
- },
- "language_info": {
- "codemirror_mode": {
- "name": "ipython",
- "version": 3
- },
- "file_extension": ".py",
- "mimetype": "text/x-python",
- "name": "python",
- "nbconvert_exporter": "python",
- "pygments_lexer": "ipython3",
- "version": "3.7.3"
- }
- },
- "nbformat": 4,
- "nbformat_minor": 2
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement