I'm trying to deploy ML models by using Python on AWS SageMaker.
How could I get a project id from dr.Project.list()?
When I execute dr.Project.list(), all projects in my account are returned.
I hope I can get project id from the script, so I can continue to modify existing model.
Thank you in advance.
Another quick way to get the project id is through the GUI - open the project and the string after "project" in the url is the project. For example, in this url,
"https://app.datarobot.com/projects/62d45bcc5e2f0fad28e33cbc/", the project id is "62d45bcc5e2f0fad28e33cbc".
Note that the code from @Vinay will return a list of project IDs for all projects that have the name "XYZ" which could be multiple values.
You may want to also consider filtering by date or some other criteria if you might have multiple projects with the same name.
You can also get the project ID from the URL in the GUI, if you already happen to have it open:
when you set project automatically a project id is created, and to access it you just write project.id
I am assuming that you need to retrieve project id and you have the project name. If so, you can retrieve the project id from the dr.Project.list() using
[p.id for p in dr.Project.list() if p.project_name == "XYZ"]