Hello everybody,
I'm working on a deep learning project and I needed to use a trained model. But when i want to install it, an error shows up that i don't understand.
RunTimeError : model should be created from a portal item or a portal url.
Can anyone explain me the error and tell me how to fix it ?
Thanks for your attention and for your help.
Solved! Go to Solution.
Hi @mehdihamdoune ,
It should work if you first add the dlpk file to Portal/AGOL from Content > Add Item then get it in your script via item id as follows:
detect_objects_model_package = gis.content.get(item_id)
detect_objects_model = Model(detect_objects_model_package)
detect_objects_model.install(gis=gis)
I hope that helps.
Hi @mehdihamdoune ,
It should work if you first add the dlpk file to Portal/AGOL from Content > Add Item then get it in your script via item id as follows:
detect_objects_model_package = gis.content.get(item_id)
detect_objects_model = Model(detect_objects_model_package)
detect_objects_model.install(gis=gis)
I hope that helps.
Thank you for the response, it works.
Glad to hear that @Mehdi99 .
Thank you for the response, it works.
is it one of these tools?
Classify Pixels Using Deep Learning (Raster Analysis)—ArcGIS Pro | Documentation
The input model of this tool will only take a deep learning package (.dlpk) item from the portal.
It isn't this tool, but similar to it. We're classifying 3D pointclouds.
check the tool you are using, they have the restrictions listed in the tool's help topic