Models Client

Importing

1
from gradient import ModelsClient
2
api_key='YOUR_API_KEY'
3
4
models_client = ModelsClient(api_key)
Copied!

Models List

List the models created by an experiment or within a project
1
models = models_client.list(project_id = project_id)
2
print(models[0])
Copied!
The model object
1
Model(id='mo301q57sawrvw', name=None, project_id='prlvf0u05',
2
experiment_id='esxfbgzu7xanst', tags=None, model_type='Tensorflow',
3
url='s3://ps-projects/prlvf0u05/esxfbgzu7xanst/model/',
4
model_path='/storage/models/sdk_test', deployment_state='Stopped',
5
summary={'accuracy': {'result': {'max': 0.8986999988555908, 'median': 0.8986999988555908,
6
'min': 0.8986999988555908, 'stddev': 0, 'var': 0, 'mean': 0.8986999988555908},
7
'scalar': 'accuracy'}, 'loss': {'result': {'max': 0.3866434097290039, 'median': 0.3866434097290039,
8
'min': 0.3866434097290039, 'stddev': 0, 'var': 0, 'mean': 0.3866434097290039}, 'scalar': 'loss'}},
9
detail=None)
Copied!
Sorting models by accuracy is really easy since these are just python objects
Last modified 2yr ago
Copy link