class_docstr: Class representing a model in the model registry.
  
  A Model object is usually obtained from :func:`determined.experimental.client.create_model`
  or :func:`determined.experimental.client.get_model`. It contains methods for model
  versions and metadata.
class_docstr_tok: ["Class","representing","a","model","in","the","model","registry",".","A","Model","object","is","usually","obtained","from",":","func",":","`","determined.experimental.client.create_model","`","or",":","func",":","`","determined.experimental.client.get_model","`",".","It","contains","methods","for","model","versions","and","metadata","."]
docstr: Retrieve the checkpoint corresponding to the specified id of the
  model version. If the specified version of the model does not exist,
  an exception is raised.
  
  If no version is specified, the latest version of the model is
  returned. In this case, if there are no registered versions of the
  model, ``None`` is returned.
  
  Arguments:
      version (int, optional): The model version ID requested.
docstr_tok: ["Retrieve","the","checkpoint","corresponding","to","the","specified","id","of","the","model","version",".","If","the","specified","version","of","the","model","does","not","exist",",","an","exception","is","raised",".","If","no","version","is","specified",",","the","latest","version","of","the","model","is","returned",".","In","this","case",",","if","there","are","no","registered","versions","of","the","model",",","``","None","``","is","returned",".","Arguments",":","version","(","int",",","optional",")",":","The","model","version","ID","requested","."]
code: def get_version(self, version: int = -1) -> Optional[ModelVersion]:
      """
      Retrieve the checkpoint corresponding to the specified id of the
      model version. If the specified version of the model does not exist,
      an exception is raised.
  
      If no version is specified, the latest version of the model is
      returned. In this case, if there are no registered versions of the
      model, ``None`` is returned.
  
      Arguments:
          version (int, optional): The model version ID requested.
      """
      if version == -1:
          resp = bindings.get_GetModelVersions(
              self._session,
              modelName=self.name,
              limit=1,
              sortBy=bindings.v1GetModelVersionsRequestSortBy.VERSION,
              orderBy=bindings.v1OrderBy.DESC,
          )
          if not resp.modelVersions:
              return None
          return ModelVersion._from_bindings(
              resp.modelVersions[0], self._session
          )
  
      r = bindings.get_GetModelVersion(
          self._session, modelName=self.name, modelVersionNum=version
      )
  
      return ModelVersion._from_bindings(r.modelVersion, self._session)
  
imports: import datetime
  import enum
  import itertools
  import json
  import warnings
  from typing import Any, Dict, Iterable, List, Optional
  from determined.common import api, util
  from determined.common.api import bindings
  from determined.common.experimental import checkpoint, metrics
  from determined.common.experimental._util import OrderBy
label_desc: Use image node_id 2 for calling the Model obj's underlying member method code with example usage: obj.get_version(version) and returns: ModelVersion, ModelVersion, None