class_docstr: Determined gives access to Determined API objects.
  
  Arguments:
      master (string, optional): The URL of the Determined master. If
          this argument is not specified, the environment variables ``DET_MASTER`` and
          ``DET_MASTER_ADDR`` will be checked for the master URL in that order.
      user (string, optional): The Determined username used for
          authentication. (default: ``determined``)
docstr: Get a list of all models in the model registry.
  
  Arguments:
      sort_by: Which field to sort by. See :class:`~determined.experimental.ModelSortBy`.
      order_by: Whether to sort in ascending or descending order. See
          :class:`~determined.experimental.OrderBy`.
      name: If this parameter is set, models will be filtered to only
          include models with names matching this parameter.
      description: If this parameter is set, models will be filtered to
          only include models with descriptions matching this parameter.
      model_id: If this parameter is set, models will be filtered to
          only include the model with this unique numeric id.
      workspace_names: Only return models with names in this list.
      workspace_ids: Only return models with workspace IDs in this list.
  
  Returns:
      A list of models.
docstr_tok: ["Get","a","list","of","all","models","in","the","model","registry",".","Arguments",":","sort_by",":","Which","field","to","sort","by",".","See",":","class",":","`","~determined.experimental.ModelSortBy","`",".","order_by",":","Whether","to","sort","in","ascending","or","descending","order",".","See",":","class",":","`","~determined.experimental.OrderBy","`",".","name",":","If","this","parameter","is","set",",","models","will","be","filtered","to","only","include","models","with","names","matching","this","parameter",".","description",":","If","this","parameter","is","set",",","models","will","be","filtered","to","only","include","models","with","descriptions","matching","this","parameter",".","model_id",":","If","this","parameter","is","set",",","models","will","be","filtered","to","only","include","the","model","with","this","unique","numeric","id",".","workspace_names",":","Only","return","models","with","names","in","this","list",".","workspace_ids",":","Only","return","models","with","workspace","IDs","in","this","list",".","Returns",":","A","list","of","models","."]
code: def list_models(
      self,
      sort_by: model.ModelSortBy = model.ModelSortBy.NAME,
      order_by: OrderBy = OrderBy.ASCENDING,
      name: Optional[str] = None,
      description: Optional[str] = None,
      model_id: Optional[int] = None,
      workspace_names: Optional[List[str]] = None,
      workspace_ids: Optional[List[int]] = None,
  ) -> List[model.Model]:
      """
      Get a list of all models in the model registry.
  
      Arguments:
          sort_by: Which field to sort by. See :class:`~determined.experimental.ModelSortBy`.
          order_by: Whether to sort in ascending or descending order. See
              :class:`~determined.experimental.OrderBy`.
          name: If this parameter is set, models will be filtered to only
              include models with names matching this parameter.
          description: If this parameter is set, models will be filtered to
              only include models with descriptions matching this parameter.
          model_id: If this parameter is set, models will be filtered to
              only include the model with this unique numeric id.
          workspace_names: Only return models with names in this list.
          workspace_ids: Only return models with workspace IDs in this list.
  
      Returns:
          A list of models.
      """
  
      # TODO: more parameters?
      #   - archived
      #   - labels
      #   - userIds
      #   - users
      def get_with_offset(offset: int) -> bindings.v1GetModelsResponse:
          return bindings.get_GetModels(
              self._session,
              archived=None,
              description=description,
              id=model_id,
              labels=None,
              name=name,
              offset=offset,
              orderBy=order_by._to_bindings(),
              sortBy=sort_by._to_bindings(),
              limit=None,
              userIds=None,
              users=None,
              workspaceNames=workspace_names,
              workspaceIds=workspace_ids,
          )
  
      bindings_models: Iterable[
          bindings.v1Model
      ] = itertools.chain.from_iterable(
          r.models for r in api.read_paginated(get_with_offset)
      )
  
      return [
          model.Model._from_bindings(m, self._session)
          for m in bindings_models
      ]
  
imports: import itertools
  import logging
  import pathlib
  import warnings
  from typing import Any, Dict, Iterable, List, Optional, Sequence, Union
  import determined
  from determined.common import api, context, util
  from determined.common.api import authentication, bindings, certs, errors
  from determined.common.experimental import checkpoint, experiment, metrics, model, oauth2_scim_client, trial, user, workspace
  from determined.common.experimental._util import OrderBy
label_desc: Use image node_id 23 for calling the Determined obj's underlying member method code with example usage: obj.list_models(sort_by, order_by, name, description, model_id, workspace_names, workspace_ids) and returns: unknown, bindings