cancel
Showing results for 
Search instead for 
Did you mean: 

Run predictions with API on zip folder instead of csv file

Run predictions with API on zip folder instead of csv file

Hi! 

 

I am trying to use the Predictions API to run predictions on images in a zipped folder. I can upload the zip folder on the UI predict but I want to use the API.

 

For example, instead of using this:

 

 

python predict.py <input-file.csv> <output-file.csv> <deployment_id> --api_key=<API_KEY> --host=https://app2.datarobot.com

 

 

I want to do something like this:

 

 

python predict.py <dataset.zip> <output-results-file.csv> <deployment_id> --api_key=<API_KEY> --host=https://app2.datarobot.com

 

 

Or same question but with this command line:

How can I do this?

 

Thank you!

 

Labels (2)
1 Solution

Accepted Solutions

Hey @MargauxMMF

The code for uploading a zip file is the same for uploading a CSV, you just need to make sure that the zip is structured correctly (post on correct structuring here).

 

import datarobot as dr
dr.Client(token='', endpoint='')

dr.Project.start("Sub Folders.zip",project_name="test_name")

 

With that in mind your command should work for both CSV and ZIP.

All the best,

Ira 

View solution in original post

1 Reply

Hey @MargauxMMF

The code for uploading a zip file is the same for uploading a CSV, you just need to make sure that the zip is structured correctly (post on correct structuring here).

 

import datarobot as dr
dr.Client(token='', endpoint='')

dr.Project.start("Sub Folders.zip",project_name="test_name")

 

With that in mind your command should work for both CSV and ZIP.

All the best,

Ira