<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Deep Learning: cannot get arcgis.learn.install() to work in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/deep-learning-cannot-get-arcgis-learn-install-to/m-p/1145658#M51697</link>
    <description>&lt;P&gt;Yes, I've installed the deep learning installer (2.9) and all of the corresponding packages are installed. I was able to create a model, but I cannot use the following lines without throwing the runtime error provided above:&lt;/P&gt;&lt;PRE&gt;detect_objects_model = Model(detect_objects_model_package)
detect_objects_model
detect_objects_model.install()&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Feb 2022 16:30:57 GMT</pubDate>
    <dc:creator>lkline97</dc:creator>
    <dc:date>2022-02-18T16:30:57Z</dc:date>
    <item>
      <title>Deep Learning: cannot get arcgis.learn.install() to work</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/deep-learning-cannot-get-arcgis-learn-install-to/m-p/1145581#M51684</link>
      <description>&lt;P data-unlink="true"&gt;I am attempting to save a deep learning model to my arcgis online account using arcgis.learn, then install the model to run on a raster. However, using the Model() function outputs &amp;lt;empty Model&amp;gt; even after I am able to fetch the model, and .install() outputs:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN class=""&gt;RuntimeError&lt;/SPAN&gt;                              Traceback (most recent call last)
In  &lt;SPAN class=""&gt;[86]&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;1&lt;/SPAN&gt;:     detect_objects_model.install()

File &lt;SPAN class=""&gt;C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\Lib\site-packages\arcgis\learn\__init__.py&lt;/SPAN&gt;, in &lt;SPAN class=""&gt;install&lt;/SPAN&gt;:
Line &lt;SPAN class=""&gt;1412&lt;/SPAN&gt;:  &lt;SPAN class=""&gt;"&lt;/SPAN&gt;&lt;SPAN class=""&gt;model object should be created from a portal item or a portal url&lt;/SPAN&gt;&lt;SPAN class=""&gt;"&lt;/SPAN&gt;

&lt;SPAN class=""&gt;RuntimeError&lt;/SPAN&gt;: model object should be created from a portal item or a portal url&lt;/PRE&gt;&lt;P&gt;I've set up my gis using my university portal and logged in successfully. I'm not sure why this is happening; it's doing this for every model.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcgis
import sys
from arcgis import GIS, learn
from arcgis.raster import analytics
from arcgis.raster.functions import extract_band, apply, clip
from arcgis.raster.analytics import list_datastore_content
from arcgis.learn import SingleShotDetector, prepare_data, Model, list_models, detect_objects 
arcgis.env.verbose = True
from arcgis.geocoding import geocode
import os
from pathlib import Path

gis = GIS('https://umainegis.maps.arcgis.com/', '#####', '#####')

data_path = Path(r"I:\Other Maps\Deep_Learning\dl_trial1")
data_path
data = prepare_data(data_path, {0:'GBBG', 1:'HERG', 2:'DCCO'}, batch_size=162, no_check=True)
data.classes
data.show_batch()

ssd = SingleShotDetector(data, grids=[8], zooms=[1.0], ratios=[[1.0, 1.0]])
ssd.lr_find()
ssd.fit(10, lr=slice(2e-3, 3e-2))
ssd.show_results(thresh=0.8)

ssd.save('BirdDetector-ssd3', publish=True, gis=gis)
detect_objects_model = gis.content.get('4f22749c8265400ea560303dd708b90b')
detect_objects_model

detect_objects_model = Model(detect_objects_model_package)
detect_objects_model
detect_objects_model.install()&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;ArcGIS version 2.9.1.&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 14:21:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/deep-learning-cannot-get-arcgis-learn-install-to/m-p/1145581#M51684</guid>
      <dc:creator>lkline97</dc:creator>
      <dc:date>2022-02-18T14:21:14Z</dc:date>
    </item>
    <item>
      <title>Re: Deep Learning: cannot get arcgis.learn.install() to work</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/deep-learning-cannot-get-arcgis-learn-install-to/m-p/1145654#M51696</link>
      <description>&lt;P&gt;Are you using these frameworks and instructions?&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/Esri/deep-learning-frameworks" target="_blank"&gt;Esri/deep-learning-frameworks: Installation support for Deep Learning Frameworks for the ArcGIS System (github.com)&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 16:16:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/deep-learning-cannot-get-arcgis-learn-install-to/m-p/1145654#M51696</guid>
      <dc:creator>DanPatterson</dc:creator>
      <dc:date>2022-02-18T16:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: Deep Learning: cannot get arcgis.learn.install() to work</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/deep-learning-cannot-get-arcgis-learn-install-to/m-p/1145658#M51697</link>
      <description>&lt;P&gt;Yes, I've installed the deep learning installer (2.9) and all of the corresponding packages are installed. I was able to create a model, but I cannot use the following lines without throwing the runtime error provided above:&lt;/P&gt;&lt;PRE&gt;detect_objects_model = Model(detect_objects_model_package)
detect_objects_model
detect_objects_model.install()&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Feb 2022 16:30:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/deep-learning-cannot-get-arcgis-learn-install-to/m-p/1145658#M51697</guid>
      <dc:creator>lkline97</dc:creator>
      <dc:date>2022-02-18T16:30:57Z</dc:date>
    </item>
    <item>
      <title>Re: Deep Learning: cannot get arcgis.learn.install() to work</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/deep-learning-cannot-get-arcgis-learn-install-to/m-p/1146339#M51796</link>
      <description>&lt;P&gt;The main problem is that&amp;nbsp;detect_objects_model_package is not declared or populated anywhere in your script.&lt;/P&gt;&lt;P&gt;It should be something like (from &lt;A href="https://community.esri.com/t5/arcgis-api-for-python-questions/installing-a-dlpk-file-using-arcgis-learn/m-p/1119042" target="_blank" rel="noopener"&gt;this answer)&lt;/A&gt;&lt;/P&gt;&lt;PRE&gt;detect_objects_model_package = gis.content.get(item_id)
detect_objects_model = Model(detect_objects_model_package)
detect_objects_model.install(gis=gis)&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;You have hardcoded the AGOL ItemID as well - are you sure that's the correct one? Running the script again will probably give you a new ItemID each time.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Feb 2022 04:17:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/deep-learning-cannot-get-arcgis-learn-install-to/m-p/1146339#M51796</guid>
      <dc:creator>Tim_McGinnes</dc:creator>
      <dc:date>2022-02-22T04:17:31Z</dc:date>
    </item>
  </channel>
</rss>

