| |
| |
| <!-- |
| Javascript to render AIRFLOW-XXX and PR references in text |
| as HTML links. |
| |
| Overrides extrahead block from sphinx_rtd_theme |
| https://www.sphinx-doc.org/en/master/templating.html |
| --> |
| |
| |
| <!DOCTYPE html> |
| <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> |
| <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> |
| <head> |
| <meta charset="utf-8"> |
| |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| |
| <title>airflow.contrib.hooks.sagemaker_hook — Airflow Documentation</title> |
| |
| |
| |
| |
| <link rel="shortcut icon" href="../../../../../_static/pin_32.png"/> |
| |
| |
| |
| |
| |
| <script type="text/javascript" src="../../../../../_static/js/modernizr.min.js"></script> |
| |
| |
| <script type="text/javascript" id="documentation_options" data-url_root="../../../../../" src="../../../../../_static/documentation_options.js"></script> |
| <script type="text/javascript" src="../../../../../_static/jquery.js"></script> |
| <script type="text/javascript" src="../../../../../_static/underscore.js"></script> |
| <script type="text/javascript" src="../../../../../_static/doctools.js"></script> |
| <script type="text/javascript" src="../../../../../_static/language_data.js"></script> |
| <script type="text/javascript" src="../../../../../_static/jira-links.js"></script> |
| |
| <script type="text/javascript" src="../../../../../_static/js/theme.js"></script> |
| |
| |
| |
| |
| <link rel="stylesheet" href="../../../../../_static/css/theme.css" type="text/css" /> |
| <link rel="stylesheet" href="../../../../../_static/pygments.css" type="text/css" /> |
| <link rel="stylesheet" href="../../../../../_static/graphviz.css" type="text/css" /> |
| <link rel="stylesheet" href="../../../../../_static/exampleinclude.css" type="text/css" /> |
| <link rel="index" title="Index" href="../../../../../genindex.html" /> |
| <link rel="search" title="Search" href="../../../../../search.html" /> |
| <link rel="next" title="airflow.contrib.hooks.salesforce_hook" href="../salesforce_hook/index.html" /> |
| <link rel="prev" title="airflow.contrib.hooks.redshift_hook" href="../redshift_hook/index.html" /> |
| |
| <script> |
| </script> |
| <style> |
| |
| </style> |
| |
| </head> |
| |
| <body class="wy-body-for-nav"> |
| |
| |
| <div class="wy-grid-for-nav"> |
| |
| <nav data-toggle="wy-nav-shift" class="wy-nav-side"> |
| <div class="wy-side-scroll"> |
| <div class="wy-side-nav-search" > |
| |
| |
| |
| <a href="../../../../../index.html" class="icon icon-home"> Airflow |
| |
| |
| |
| </a> |
| |
| |
| |
| |
| <div class="version"> |
| 1.10.8 |
| </div> |
| |
| |
| |
| |
| <div role="search"> |
| <form id="rtd-search-form" class="wy-form" action="../../../../../search.html" method="get"> |
| <input type="text" name="q" placeholder="Search docs" /> |
| <input type="hidden" name="check_keywords" value="yes" /> |
| <input type="hidden" name="area" value="default" /> |
| </form> |
| </div> |
| |
| |
| </div> |
| |
| <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> |
| |
| |
| |
| |
| |
| |
| <ul> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../project.html">Project</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../license.html">License</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../start.html">Quick Start</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../installation.html">Installation</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../tutorial.html">Tutorial</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../howto/index.html">How-to Guides</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../ui.html">UI / Screenshots</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../concepts.html">Concepts</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../profiling.html">Data Profiling</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../cli.html">Command Line Interface Reference</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../scheduler.html">Scheduling & Triggers</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../executor/index.html">Executor</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../plugins.html">Plugins</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../security.html">Security</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../timezone.html">Time zones</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../api.html">REST API Reference</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../integration.html">Integration</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../metrics.html">Metrics</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../errors.html">Error Tracking</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../kubernetes.html">Kubernetes</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../lineage.html">Lineage</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../dag-serialization.html">DAG Serialization</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../changelog.html">Changelog</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../best-practices.html">Best Practices</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../faq.html">FAQ</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../macros.html">Macros reference</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../privacy_notice.html">Privacy Notice</a></li> |
| </ul> |
| <p class="caption"><span class="caption-text">References</span></p> |
| <ul class="current"> |
| <li class="toctree-l1 current"><a class="reference internal" href="../../../../index.html">Python API</a><ul class="current"> |
| <li class="toctree-l2"><a class="reference internal" href="../../../../index.html#operators">Operators</a></li> |
| <li class="toctree-l2 current"><a class="reference internal" href="../../../../index.html#hooks">Hooks</a><ul class="current"> |
| <li class="toctree-l3 current"><a class="reference internal" href="../../../../index.html#hooks-packages">Hooks packages</a><ul class="current"> |
| <li class="toctree-l4"><a class="reference internal" href="../../../hooks/index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.hooks</span></code></a></li> |
| <li class="toctree-l4 current"><a class="reference internal" href="../index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.contrib.hooks</span></code></a></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="../../../../index.html#executors">Executors</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../../../index.html#models">Models</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="../../../../index.html#core-and-community-package">Core and community package</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l1"><a class="reference internal" href="../../../../../configurations-ref.html">Configurations</a></li> |
| </ul> |
| |
| |
| |
| </div> |
| </div> |
| </nav> |
| |
| <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> |
| |
| |
| <nav class="wy-nav-top" aria-label="top navigation"> |
| |
| <i data-toggle="wy-nav-top" class="fa fa-bars"></i> |
| <a href="../../../../../index.html">Airflow</a> |
| |
| </nav> |
| |
| |
| <div class="wy-nav-content"> |
| |
| <div class="rst-content"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div role="navigation" aria-label="breadcrumbs navigation"> |
| |
| <ul class="wy-breadcrumbs"> |
| |
| <li><a href="../../../../../index.html">Docs</a> »</li> |
| |
| <li><a href="../../../../index.html">Python API Reference</a> »</li> |
| |
| <li><a href="../index.html"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.contrib.hooks</span></code></a> »</li> |
| |
| <li><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.contrib.hooks.sagemaker_hook</span></code></li> |
| |
| |
| <li class="wy-breadcrumbs-aside"> |
| |
| |
| <a href="../../../../../_sources/_api/airflow/contrib/hooks/sagemaker_hook/index.rst.txt" rel="nofollow"> View page source</a> |
| |
| |
| </li> |
| |
| </ul> |
| |
| |
| <hr/> |
| </div> |
| <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> |
| <div itemprop="articleBody"> |
| |
| <div class="section" id="module-airflow.contrib.hooks.sagemaker_hook"> |
| <span id="airflow-contrib-hooks-sagemaker-hook"></span><h1><a class="reference internal" href="#module-airflow.contrib.hooks.sagemaker_hook" title="airflow.contrib.hooks.sagemaker_hook"><code class="xref py py-mod docutils literal notranslate"><span class="pre">airflow.contrib.hooks.sagemaker_hook</span></code></a><a class="headerlink" href="#module-airflow.contrib.hooks.sagemaker_hook" title="Permalink to this headline">¶</a></h1> |
| <div class="section" id="module-contents"> |
| <h2>Module Contents<a class="headerlink" href="#module-contents" title="Permalink to this headline">¶</a></h2> |
| <dl class="class"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.LogState"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.contrib.hooks.sagemaker_hook.</code><code class="sig-name descname">LogState</code><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#LogState"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.LogState" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.8)"><code class="xref py py-class docutils literal notranslate"><span class="pre">object</span></code></a></p> |
| <dl class="attribute"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.LogState.STARTING"> |
| <code class="sig-name descname">STARTING</code><em class="property"> = 1</em><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#LogState.STARTING"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.LogState.STARTING" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.LogState.WAIT_IN_PROGRESS"> |
| <code class="sig-name descname">WAIT_IN_PROGRESS</code><em class="property"> = 2</em><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#LogState.WAIT_IN_PROGRESS"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.LogState.WAIT_IN_PROGRESS" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.LogState.TAILING"> |
| <code class="sig-name descname">TAILING</code><em class="property"> = 3</em><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#LogState.TAILING"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.LogState.TAILING" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.LogState.JOB_COMPLETE"> |
| <code class="sig-name descname">JOB_COMPLETE</code><em class="property"> = 4</em><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#LogState.JOB_COMPLETE"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.LogState.JOB_COMPLETE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.LogState.COMPLETE"> |
| <code class="sig-name descname">COMPLETE</code><em class="property"> = 5</em><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#LogState.COMPLETE"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.LogState.COMPLETE" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| </dd></dl> |
| |
| <dl class="data"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.Position"> |
| <code class="sig-prename descclassname">airflow.contrib.hooks.sagemaker_hook.</code><code class="sig-name descname">Position</code><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#Position"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.Position" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="function"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.argmin"> |
| <code class="sig-prename descclassname">airflow.contrib.hooks.sagemaker_hook.</code><code class="sig-name descname">argmin</code><span class="sig-paren">(</span><em class="sig-param">arr</em>, <em class="sig-param">f</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#argmin"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.argmin" title="Permalink to this definition">¶</a></dt> |
| <dt> |
| <code class="sig-name descname">Return the index, i, in arr that minimizes f(arr[i])</code></dt> |
| <dd></dd></dl> |
| |
| <dl class="function"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.secondary_training_status_changed"> |
| <code class="sig-prename descclassname">airflow.contrib.hooks.sagemaker_hook.</code><code class="sig-name descname">secondary_training_status_changed</code><span class="sig-paren">(</span><em class="sig-param">current_job_description</em>, <em class="sig-param">prev_job_description</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#secondary_training_status_changed"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.secondary_training_status_changed" title="Permalink to this definition">¶</a></dt> |
| <dt> |
| <code class="sig-name descname">Returns true if training job's secondary status message has changed.</code></dt> |
| <dd><dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>current_job_description</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – Current job description, returned from DescribeTrainingJob call.</p></li> |
| <li><p><strong>prev_job_description</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – Previous job description, returned from DescribeTrainingJob call.</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>Whether the secondary status message of a training job changed or not.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="function"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.secondary_training_status_message"> |
| <code class="sig-prename descclassname">airflow.contrib.hooks.sagemaker_hook.</code><code class="sig-name descname">secondary_training_status_message</code><span class="sig-paren">(</span><em class="sig-param">job_description</em>, <em class="sig-param">prev_description</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#secondary_training_status_message"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.secondary_training_status_message" title="Permalink to this definition">¶</a></dt> |
| <dt> |
| <code class="sig-name descname">Returns a string contains start time and the secondary training job status message.</code></dt> |
| <dd><dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>job_description</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – Returned response from DescribeTrainingJob call</p></li> |
| <li><p><strong>prev_description</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – Previous job description from DescribeTrainingJob call</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>Job status string to be printed.</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="class"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook"> |
| <em class="property">class </em><code class="sig-prename descclassname">airflow.contrib.hooks.sagemaker_hook.</code><code class="sig-name descname">SageMakerHook</code><span class="sig-paren">(</span><em class="sig-param">*args</em>, <em class="sig-param">**kwargs</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Bases: <a class="reference internal" href="../aws_hook/index.html#airflow.contrib.hooks.aws_hook.AwsHook" title="airflow.contrib.hooks.aws_hook.AwsHook"><code class="xref py py-class docutils literal notranslate"><span class="pre">airflow.contrib.hooks.aws_hook.AwsHook</span></code></a></p> |
| <p>Interact with Amazon SageMaker.</p> |
| <dl class="attribute"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.non_terminal_states"> |
| <code class="sig-name descname">non_terminal_states</code><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.non_terminal_states"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.non_terminal_states" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.endpoint_non_terminal_states"> |
| <code class="sig-name descname">endpoint_non_terminal_states</code><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.endpoint_non_terminal_states"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.endpoint_non_terminal_states" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="attribute"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.failed_states"> |
| <code class="sig-name descname">failed_states</code><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.failed_states"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.failed_states" title="Permalink to this definition">¶</a></dt> |
| <dd></dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.tar_and_s3_upload"> |
| <code class="sig-name descname">tar_and_s3_upload</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">path</em>, <em class="sig-param">key</em>, <em class="sig-param">bucket</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.tar_and_s3_upload"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.tar_and_s3_upload" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Tar the local file or directory and upload to s3</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>path</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – local file or directory</p></li> |
| <li><p><strong>key</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – s3 key</p></li> |
| <li><p><strong>bucket</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – s3 bucket</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>None</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.configure_s3_resources"> |
| <code class="sig-name descname">configure_s3_resources</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">config</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.configure_s3_resources"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.configure_s3_resources" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Extract the S3 operations from the configuration and execute them.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>config</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – config of SageMaker operation</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)">dict</a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.check_s3_url"> |
| <code class="sig-name descname">check_s3_url</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">s3url</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.check_s3_url"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.check_s3_url" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Check if an S3 URL exists</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>s3url</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – S3 url</p> |
| </dd> |
| <dt class="field-even">Return type</dt> |
| <dd class="field-even"><p><a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)">bool</a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.check_training_config"> |
| <code class="sig-name descname">check_training_config</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">training_config</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.check_training_config"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.check_training_config" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Check if a training configuration is valid</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>training_config</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – training_config</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>None</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.check_tuning_config"> |
| <code class="sig-name descname">check_tuning_config</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">tuning_config</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.check_tuning_config"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.check_tuning_config" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Check if a tuning configuration is valid</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>tuning_config</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – tuning_config</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>None</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.get_conn"> |
| <code class="sig-name descname">get_conn</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.get_conn"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.get_conn" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Establish an AWS connection for SageMaker</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Return type</dt> |
| <dd class="field-odd"><p><a class="reference external" href="https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/sagemaker.html#SageMaker.Client" title="(in Boto 3 Docs v1.11.12)"><code class="xref py py-class docutils literal notranslate"><span class="pre">SageMaker.Client</span></code></a></p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.get_log_conn"> |
| <code class="sig-name descname">get_log_conn</code><span class="sig-paren">(</span><em class="sig-param">self</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.get_log_conn"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.get_log_conn" title="Permalink to this definition">¶</a></dt> |
| <dd><p>This method is deprecated. |
| Please use <code class="xref py py-meth docutils literal notranslate"><span class="pre">airflow.contrib.hooks.AwsLogsHook.get_conn()</span></code> instead.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.log_stream"> |
| <code class="sig-name descname">log_stream</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">log_group</em>, <em class="sig-param">stream_name</em>, <em class="sig-param">start_time=0</em>, <em class="sig-param">skip=0</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.log_stream"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.log_stream" title="Permalink to this definition">¶</a></dt> |
| <dd><p>This method is deprecated. |
| Please use <code class="xref py py-meth docutils literal notranslate"><span class="pre">airflow.contrib.hooks.AwsLogsHook.get_log_events()</span></code> instead.</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.multi_stream_iter"> |
| <code class="sig-name descname">multi_stream_iter</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">log_group</em>, <em class="sig-param">streams</em>, <em class="sig-param">positions=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.multi_stream_iter"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.multi_stream_iter" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Iterate over the available events coming from a set of log streams in a single log group |
| interleaving the events from each stream so they’re yielded in timestamp order.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>log_group</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – The name of the log group.</p></li> |
| <li><p><strong>streams</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.8)"><em>list</em></a>) – A list of the log stream names. The position of the stream in this list is |
| the stream number.</p></li> |
| <li><p><strong>positions</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#list" title="(in Python v3.8)"><em>list</em></a>) – A list of pairs of (timestamp, skip) which represents the last record |
| read from each stream.</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>A tuple of (stream number, cloudwatch log event).</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.create_training_job"> |
| <code class="sig-name descname">create_training_job</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">config</em>, <em class="sig-param">wait_for_completion=True</em>, <em class="sig-param">print_log=True</em>, <em class="sig-param">check_interval=30</em>, <em class="sig-param">max_ingestion_time=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.create_training_job"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.create_training_job" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Create a training job</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>config</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – the config for training</p></li> |
| <li><p><strong>wait_for_completion</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a>) – if the program should keep running until job finishes</p></li> |
| <li><p><strong>check_interval</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) – the time interval in seconds which the operator |
| will check the status of any SageMaker job</p></li> |
| <li><p><strong>max_ingestion_time</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) – the maximum ingestion time in seconds. Any |
| SageMaker jobs that run longer than this will fail. Setting this to |
| None implies no timeout for any SageMaker job.</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>A response to training job creation</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.create_tuning_job"> |
| <code class="sig-name descname">create_tuning_job</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">config</em>, <em class="sig-param">wait_for_completion=True</em>, <em class="sig-param">check_interval=30</em>, <em class="sig-param">max_ingestion_time=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.create_tuning_job"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.create_tuning_job" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Create a tuning job</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>config</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – the config for tuning</p></li> |
| <li><p><strong>wait_for_completion</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a>) – if the program should keep running until job finishes</p></li> |
| <li><p><strong>check_interval</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) – the time interval in seconds which the operator |
| will check the status of any SageMaker job</p></li> |
| <li><p><strong>max_ingestion_time</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) – the maximum ingestion time in seconds. Any |
| SageMaker jobs that run longer than this will fail. Setting this to |
| None implies no timeout for any SageMaker job.</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>A response to tuning job creation</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.create_transform_job"> |
| <code class="sig-name descname">create_transform_job</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">config</em>, <em class="sig-param">wait_for_completion=True</em>, <em class="sig-param">check_interval=30</em>, <em class="sig-param">max_ingestion_time=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.create_transform_job"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.create_transform_job" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Create a transform job</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>config</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – the config for transform job</p></li> |
| <li><p><strong>wait_for_completion</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a>) – if the program should keep running until job finishes</p></li> |
| <li><p><strong>check_interval</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) – the time interval in seconds which the operator |
| will check the status of any SageMaker job</p></li> |
| <li><p><strong>max_ingestion_time</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) – the maximum ingestion time in seconds. Any |
| SageMaker jobs that run longer than this will fail. Setting this to |
| None implies no timeout for any SageMaker job.</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>A response to transform job creation</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.create_model"> |
| <code class="sig-name descname">create_model</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">config</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.create_model"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.create_model" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Create a model job</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>config</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – the config for model</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>A response to model creation</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.create_endpoint_config"> |
| <code class="sig-name descname">create_endpoint_config</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">config</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.create_endpoint_config"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.create_endpoint_config" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Create an endpoint config</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>config</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – the config for endpoint-config</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>A response to endpoint config creation</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.create_endpoint"> |
| <code class="sig-name descname">create_endpoint</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">config</em>, <em class="sig-param">wait_for_completion=True</em>, <em class="sig-param">check_interval=30</em>, <em class="sig-param">max_ingestion_time=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.create_endpoint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.create_endpoint" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Create an endpoint</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>config</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – the config for endpoint</p></li> |
| <li><p><strong>wait_for_completion</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a>) – if the program should keep running until job finishes</p></li> |
| <li><p><strong>check_interval</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) – the time interval in seconds which the operator |
| will check the status of any SageMaker job</p></li> |
| <li><p><strong>max_ingestion_time</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) – the maximum ingestion time in seconds. Any |
| SageMaker jobs that run longer than this will fail. Setting this to |
| None implies no timeout for any SageMaker job.</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>A response to endpoint creation</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.update_endpoint"> |
| <code class="sig-name descname">update_endpoint</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">config</em>, <em class="sig-param">wait_for_completion=True</em>, <em class="sig-param">check_interval=30</em>, <em class="sig-param">max_ingestion_time=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.update_endpoint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.update_endpoint" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Update an endpoint</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>config</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#dict" title="(in Python v3.8)"><em>dict</em></a>) – the config for endpoint</p></li> |
| <li><p><strong>wait_for_completion</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a>) – if the program should keep running until job finishes</p></li> |
| <li><p><strong>check_interval</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) – the time interval in seconds which the operator |
| will check the status of any SageMaker job</p></li> |
| <li><p><strong>max_ingestion_time</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) – the maximum ingestion time in seconds. Any |
| SageMaker jobs that run longer than this will fail. Setting this to |
| None implies no timeout for any SageMaker job.</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>A response to endpoint update</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.describe_training_job"> |
| <code class="sig-name descname">describe_training_job</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">name</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.describe_training_job"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.describe_training_job" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Return the training job info associated with the name</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – the name of the training job</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>A dict contains all the training job info</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.describe_training_job_with_log"> |
| <code class="sig-name descname">describe_training_job_with_log</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">job_name</em>, <em class="sig-param">positions</em>, <em class="sig-param">stream_names</em>, <em class="sig-param">instance_count</em>, <em class="sig-param">state</em>, <em class="sig-param">last_description</em>, <em class="sig-param">last_describe_job_call</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.describe_training_job_with_log"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.describe_training_job_with_log" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Return the training job info associated with job_name and print CloudWatch logs</p> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.describe_tuning_job"> |
| <code class="sig-name descname">describe_tuning_job</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">name</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.describe_tuning_job"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.describe_tuning_job" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Return the tuning job info associated with the name</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – the name of the tuning job</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>A dict contains all the tuning job info</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.describe_model"> |
| <code class="sig-name descname">describe_model</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">name</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.describe_model"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.describe_model" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Return the SageMaker model info associated with the name</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – the name of the SageMaker model</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>A dict contains all the model info</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.describe_transform_job"> |
| <code class="sig-name descname">describe_transform_job</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">name</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.describe_transform_job"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.describe_transform_job" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Return the transform job info associated with the name</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – the name of the transform job</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>A dict contains all the transform job info</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.describe_endpoint_config"> |
| <code class="sig-name descname">describe_endpoint_config</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">name</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.describe_endpoint_config"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.describe_endpoint_config" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Return the endpoint config info associated with the name</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – the name of the endpoint config</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>A dict contains all the endpoint config info</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.describe_endpoint"> |
| <code class="sig-name descname">describe_endpoint</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">name</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.describe_endpoint"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.describe_endpoint" title="Permalink to this definition">¶</a></dt> |
| <dd><dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><p><strong>name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – the name of the endpoint</p> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>A dict contains all the endpoint info</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.check_status"> |
| <code class="sig-name descname">check_status</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">job_name</em>, <em class="sig-param">key</em>, <em class="sig-param">describe_function</em>, <em class="sig-param">check_interval</em>, <em class="sig-param">max_ingestion_time</em>, <em class="sig-param">non_terminal_states=None</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.check_status"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.check_status" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Check status of a SageMaker job</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>job_name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – name of the job to check status</p></li> |
| <li><p><strong>key</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – the key of the response dict |
| that points to the state</p></li> |
| <li><p><strong>describe_function</strong> (<em>python callable</em>) – the function used to retrieve the status</p></li> |
| <li><p><strong>args</strong> – the arguments for the function</p></li> |
| <li><p><strong>check_interval</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) – the time interval in seconds which the operator |
| will check the status of any SageMaker job</p></li> |
| <li><p><strong>max_ingestion_time</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) – the maximum ingestion time in seconds. Any |
| SageMaker jobs that run longer than this will fail. Setting this to |
| None implies no timeout for any SageMaker job.</p></li> |
| <li><p><strong>non_terminal_states</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#set" title="(in Python v3.8)"><em>set</em></a>) – the set of nonterminal states</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>response of describe call after job is done</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| <dl class="method"> |
| <dt id="airflow.contrib.hooks.sagemaker_hook.SageMakerHook.check_training_status_with_log"> |
| <code class="sig-name descname">check_training_status_with_log</code><span class="sig-paren">(</span><em class="sig-param">self</em>, <em class="sig-param">job_name</em>, <em class="sig-param">non_terminal_states</em>, <em class="sig-param">failed_states</em>, <em class="sig-param">wait_for_completion</em>, <em class="sig-param">check_interval</em>, <em class="sig-param">max_ingestion_time</em><span class="sig-paren">)</span><a class="reference internal" href="../../../../../_modules/airflow/contrib/hooks/sagemaker_hook.html#SageMakerHook.check_training_status_with_log"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#airflow.contrib.hooks.sagemaker_hook.SageMakerHook.check_training_status_with_log" title="Permalink to this definition">¶</a></dt> |
| <dd><p>Display the logs for a given training job, optionally tailing them until the |
| job is complete.</p> |
| <dl class="field-list simple"> |
| <dt class="field-odd">Parameters</dt> |
| <dd class="field-odd"><ul class="simple"> |
| <li><p><strong>job_name</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#str" title="(in Python v3.8)"><em>str</em></a>) – name of the training job to check status and display logs for</p></li> |
| <li><p><strong>non_terminal_states</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#set" title="(in Python v3.8)"><em>set</em></a>) – the set of non_terminal states</p></li> |
| <li><p><strong>failed_states</strong> (<a class="reference external" href="https://docs.python.org/3/library/stdtypes.html#set" title="(in Python v3.8)"><em>set</em></a>) – the set of failed states</p></li> |
| <li><p><strong>wait_for_completion</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#bool" title="(in Python v3.8)"><em>bool</em></a>) – Whether to keep looking for new log entries |
| until the job completes</p></li> |
| <li><p><strong>check_interval</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) – The interval in seconds between polling for new log entries and job completion</p></li> |
| <li><p><strong>max_ingestion_time</strong> (<a class="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.8)"><em>int</em></a>) – the maximum ingestion time in seconds. Any |
| SageMaker jobs that run longer than this will fail. Setting this to |
| None implies no timeout for any SageMaker job.</p></li> |
| </ul> |
| </dd> |
| <dt class="field-even">Returns</dt> |
| <dd class="field-even"><p>None</p> |
| </dd> |
| </dl> |
| </dd></dl> |
| |
| </dd></dl> |
| |
| </div> |
| </div> |
| |
| |
| </div> |
| |
| </div> |
| |
| |
| <footer> |
| |
| <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> |
| |
| <a href="../salesforce_hook/index.html" class="btn btn-neutral float-right" title="airflow.contrib.hooks.salesforce_hook" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> |
| |
| |
| <a href="../redshift_hook/index.html" class="btn btn-neutral float-left" title="airflow.contrib.hooks.redshift_hook" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> |
| |
| </div> |
| |
| |
| <hr/> |
| |
| <div role="contentinfo"> |
| <p> |
| |
| </p> |
| </div> |
| Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. |
| <div class="footer">This page uses <a href="https://analytics.google.com/"> |
| Google Analytics</a> to collect statistics. You can disable it by blocking |
| the JavaScript coming from www.google-analytics.com. Check our |
| <a href="../../../../../privacy_notice.html">Privacy Policy</a> |
| for more details. |
| </div> |
| |
| |
| </footer> |
| |
| </div> |
| </div> |
| |
| </section> |
| |
| </div> |
| |
| |
| |
| <script type="text/javascript"> |
| jQuery(function () { |
| SphinxRtdTheme.Navigation.enable(true); |
| }); |
| </script> |
| |
| |
| |
| |
| <!-- Theme Analytics --> |
| <script> |
| (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ |
| (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), |
| m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) |
| })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); |
| |
| ga('create', 'UA-140539454-1', 'auto'); |
| ga('send', 'pageview'); |
| </script> |
| |
| |
| |
| |
| </body> |
| </html> |