Hey everyone (and @KarthikDutt, who asked me to post this here!)
I ran into an issue while using Jupyter Notebook and arcgis.learn for the first time while following this Esri Youtube Video
I found the github location for the workflow and tried following the documentation but ran into dependency installation issues and deep learning tool model existence in certain versions of Anaconda.
I could not get this to work in a Jupyter Notebook. Maybe someone might have some insight!
I downloaded Anaconda, version 3.8, and installed ArcGIS API for Python (arcgis) per the blog "Three Ways to Get Jupyter Notebooks and the ArcGIS API for Python".
With my data in a notebook, I tried according to the video at timestamp 2:07:
ln[1]: from arcgis.learn import prepare_data, MultiTaskRoadExtractor
ln[2]: data_path=..... <<(I selected the path where my image chips were stored)
ln[3]: data = prepare_data(data_path, chip_size=256, batch_size=135)
I received a traceback error on ln[3] saying I was missing a number of dependencies required to use MultiTaskRoadExtractor. So, I opened the Anaconda command prompt and tried installing them, only to be told that there were a bunch of conflicts that prevented install.
So I researched how to create new Anaconda environments, and created one for Python 3.6, because some forums said some dependencies like earlier versions better. I installed arcgis so I could access Jupyter Notebooks in Python 3.6. Also, in my Python 3.6 environment, the dependencies now installed without issue. But then when I tried the above code again in a 3.6 Notebook, ln[1] returned a traceback error saying:
"ImportError: cannot import name 'MultiTaskRoadExtractor' from 'arcgis.learn' (C:\Users\JohnC\anaconda3\envs\snakes\lib\site-packages\arcgis\learn\__init__.py)"
To see if there was a model existence issue, I compared the 'lib\site-packages\arcgis\learn\__init__.py" files between environments, and the Python 3.6 environment did not have the MultiTaskRoadExtractor model. Version 3.8 does.
So I tried creating another anaconda environment in Version 3.7 to see if I could install these model dependencies and see if the MultiTaskRoadExtractor model was available for import into a Notebook. It also was not. It seems only Version 3.8 has this model, but the dependencies also won't download to the 3.8 environment.
So I'm unsure what to do, and I've exhausted my level of knowledge with this stuff (which is next to nothing).
Do you have any suggestions? Is there more information you need from me to answer this? Let me know and thank you in advance.