Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. {
  2. "cells": [
  3. {
  4. "cell_type": "code",
  5. "execution_count": null,
  6. "metadata": {},
  7. "outputs": [],
  8. "source": [
  9. "import kfp\n",
  10. "import os"
  11. ]
  12. },
  13. {
  14. "cell_type": "code",
  15. "execution_count": null,
  16. "metadata": {},
  17. "outputs": [],
  18. "source": [
  19. "client = kfp.Client()\n",
  20. "import datetime\n",
  21. "iteration = datetime.datetime.now().strftime('%Y%m%d%H%M%S')"
  22. ]
  23. },
  24. {
  25. "cell_type": "code",
  26. "execution_count": null,
  27. "metadata": {},
  28. "outputs": [],
  29. "source": [
  30. "if os.getenv(\"ML_PIPELINE_SERVICE_PORT\"):\n",
  31. " try: \n",
  32. " client.get_experiment(experiment_name='Hybrid Pipelines - The One with the Two steps')\n",
  33. " except:\n",
  34. " hybrid_experiment = client.create_experiment(name='Hybrid Pipelines - The One with the Two steps')"
  35. ]
  36. },
  37. {
  38. "cell_type": "code",
  39. "execution_count": null,
  40. "metadata": {},
  41. "outputs": [],
  42. "source": [
  43. "if os.getenv(\"ML_PIPELINE_SERVICE_PORT\"):\n",
  44. " run = client.run_pipeline(client.get_experiment(experiment_name='Hybrid Pipelines - The One with the Two steps').id, \n",
  45. " 'hybrid_pipeline-'+str(iteration), 'hybrid_pipeline.tar.gz', \n",
  46. " params={})\n"
  47. ]
  48. }
  49. ],
  50. "metadata": {
  51. "kernelspec": {
  52. "display_name": "Python 3",
  53. "language": "python",
  54. "name": "python3"
  55. },
  56. "language_info": {
  57. "codemirror_mode": {
  58. "name": "ipython",
  59. "version": 3
  60. },
  61. "file_extension": ".py",
  62. "mimetype": "text/x-python",
  63. "name": "python",
  64. "nbconvert_exporter": "python",
  65. "pygments_lexer": "ipython3",
  66. "version": "3.7.3"
  67. }
  68. },
  69. "nbformat": 4,
  70. "nbformat_minor": 2
  71. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement