Gradient Docs
Gradient HomeHelp DeskCommunitySign up free
Gradient Next
Gradient Next
  • About Gradient
  • Get Started
    • Quick Start
      • Install the Gradient CLI
    • Core Concepts
    • Organizing Projects
      • Secrets
      • Storing an API key as a Secret
    • Tutorials
      • Gradient Notebooks Tutorial
      • Gradient Workflows Tutorial
      • Gradient Deployments Tutorial
    • FAQ
    • Common Errors
  • Gradient Platform
    • Gradient Notebooks
      • Runtimes
      • Files and storage
      • Machines
      • Terminal
      • Shortcuts
      • Sharing
      • TensorBoard
      • Run on Gradient
    • Gradient Workflows
      • Basic operations
      • Understanding Inputs & Outputs
      • Workflow Spec
      • Gradient Actions
      • Environment Variables
      • Using YAML for Data Science
    • Gradient Deployments
      • Basic operations
      • Deployment Spec
  • Artifacts
    • Container Management
      • Custom Containers
    • Data
      • Versioned Data
        • Public Datasets Repository
        • Storage Providers
      • Persistent Storage
    • Models
      • Managing Models
        • Model Types & Metadata
        • Public Models
    • Code
    • Metrics
      • Push Metrics
      • View & Query Metrics
  • Gradient Cluster
    • Overview
      • Setup
        • Managed Private Clusters
        • Self-Hosted Clusters
          • Pre-installation steps
          • Gradient Installer CLI
          • Terraform
            • Pre-installation steps
            • Install on AWS
            • Install on bare metal / VMs
            • Install on NVIDIA DGX
          • Let's Encrypt DNS Providers
          • Updating your cluster
      • Usage
  • More
    • SDK
      • Projects Client
      • Models Client
      • Deployments Client
      • Workflows Client
      • SDK Examples
      • Full SDK Reference
    • Machine Types
      • Machine Tiers
      • Free Machines (Free Tier)
    • Your Account
      • Teams
        • Creating a Team
        • Upgrading to a Team Plan
      • Hotkeys
      • Billing & Subscriptions
        • Storage Billing
      • Public Profiles
    • Release notes
    • Roadmap
Powered by GitBook
On this page
  1. More
  2. SDK

Models Client

PreviousProjects ClientNextDeployments Client

Last updated 6 years ago

CtrlK
  • Importing
  • Models List

Importing

from gradient import ModelsClient
api_key='YOUR_API_KEY'

models_client = ModelsClient(api_key)

Models List

List the models created by an experiment or within a project

models = models_client.list(project_id = project_id)
print(models[0])

The model object

Model(id='mo301q57sawrvw', name=None, project_id='prlvf0u05', 
    experiment_id='esxfbgzu7xanst', tags=None, model_type='Tensorflow', 
    url='s3://ps-projects/prlvf0u05/esxfbgzu7xanst/model/', 
    model_path='/storage/models/sdk_test', deployment_state='Stopped',
    summary={'accuracy': {'result': {'max': 0.8986999988555908, 'median': 0.8986999988555908, 
    'min': 0.8986999988555908, 'stddev': 0, 'var': 0, 'mean': 0.8986999988555908},
    'scalar': 'accuracy'}, 'loss': {'result': {'max': 0.3866434097290039, 'median': 0.3866434097290039,
    'min': 0.3866434097290039, 'stddev': 0, 'var': 0, 'mean': 0.3866434097290039}, 'scalar': 'loss'}},
    detail=None)

Sorting models by accuracy is really easy since these are just python objects