class_docstr: A class representing an Experiment object.
  
  An Experiment object is usually obtained from
  :func:`determined.experimental.client.create_experiment`
  or :func:`determined.experimental.client.get_experiment` and contains helper methods
  that support querying the set of checkpoints associated with an experiment.
  
  Attributes:
      id: ID of experiment object in database.
      session: HTTP request session.
      config: (Mutable, Optional[Dict]) Experiment config for the experiment.
      state: (Mutable, Optional[experimentv1State) State of the experiment.
      archived: (Mutable, bool) True if experiment is archived, else false.
      name: (Mutable, str) Human-friendly name of the experiment.
      progress: (Mutable, float) Completion progress of experiment in range (0, 1.0) where 1.0
          is 100% completion.
      description: (Mutable, string) Description of the experiment.
      notes: (Mutable, str) Notes for the experiment.
      labels: (Mutable, Optional[List]) Labels associated with the experiment.
      project_id: (Mutable, int) The ID of the project associated with the experiment.
      workspace_id: (Mutable, int) The ID of the workspace associated with the experiment.
  
  Note:
      All attributes are cached by default.
  
      Some attributes are mutable and may be changed by methods that update these values,
      either automatically (eg. :meth:`wait()`) or explicitly with :meth:`reload()`.
class_docstr_tok: ["A","class","representing","an","Experiment","object",".","An","Experiment","object","is","usually","obtained","from",":","func",":","`","determined.experimental.client.create_experiment","`","or",":","func",":","`","determined.experimental.client.get_experiment","`","and","contains","helper","methods","that","support","querying","the","set","of","checkpoints","associated","with","an","experiment",".","Attributes",":","id",":","ID","of","experiment","object","in","database",".","session",":","HTTP","request","session",".","config",":","(","Mutable",",","Optional","[","Dict","]",")","Experiment","config","for","the","experiment",".","state",":","(","Mutable",",","Optional","[","experimentv1State",")","State","of","the","experiment",".","archived",":","(","Mutable",",","bool",")","True","if","experiment","is","archived",",","else","false",".","name",":","(","Mutable",",","str",")","Human-friendly","name","of","the","experiment",".","progress",":","(","Mutable",",","float",")","Completion","progress","of","experiment","in","range","(","0",",","1.0",")","where","1.0","is","100","%","completion",".","description",":","(","Mutable",",","string",")","Description","of","the","experiment",".","notes",":","(","Mutable",",","str",")","Notes","for","the","experiment",".","labels",":","(","Mutable",",","Optional","[","List","]",")","Labels","associated","with","the","experiment",".","project_id",":","(","Mutable",",","int",")","The","ID","of","the","project","associated","with","the","experiment",".","workspace_id",":","(","Mutable",",","int",")","The","ID","of","the","workspace","associated","with","the","experiment",".","Note",":","All","attributes","are","cached","by","default",".","Some","attributes","are","mutable","and","may","be","changed","by","methods","that","update","these","values",",","either","automatically","(","eg",".",":","meth",":","`","wait","(",")","`",")","or","explicitly","with",":","meth",":","`","reload","(",")","`","."]
docstr: Returns a list of sorted :class:`~determined.experimental.Checkpoint` instances.
  
  Requires either both `sort_by` and `order_by` to be defined, or neither. If neither are
  specified, will default to sorting by the experiment's configured searcher metric, and
  ordering by `smaller_is_better`.
  
  Only checkpoints in a ``COMPLETED`` state with a matching ``COMPLETED`` validation
  are considered.
  
  Arguments:
      sort_by: (Optional) Parameter to sort checkpoints by. Accepts either
          ``checkpoint.CheckpointSortBy`` or a string representing a validation metric name.
      order_by: (Optional) Order of sorted checkpoints (ascending or descending).
      max_results: (Optional) Maximum number of results to return. Defaults to no maximum.
  
  Returns:
      A list of sorted and ordered checkpoints.
code: def list_checkpoints(
      self,
      sort_by: Optional[Union[str, checkpoint.CheckpointSortBy]] = None,
      order_by: Optional[OrderBy] = None,
      max_results: Optional[int] = None,
  ) -> List[checkpoint.Checkpoint]:
      """Returns a list of sorted :class:`~determined.experimental.Checkpoint` instances.
  
      Requires either both `sort_by` and `order_by` to be defined, or neither. If neither are
      specified, will default to sorting by the experiment's configured searcher metric, and
      ordering by `smaller_is_better`.
  
      Only checkpoints in a ``COMPLETED`` state with a matching ``COMPLETED`` validation
      are considered.
  
      Arguments:
          sort_by: (Optional) Parameter to sort checkpoints by. Accepts either
              ``checkpoint.CheckpointSortBy`` or a string representing a validation metric name.
          order_by: (Optional) Order of sorted checkpoints (ascending or descending).
          max_results: (Optional) Maximum number of results to return. Defaults to no maximum.
  
      Returns:
          A list of sorted and ordered checkpoints.
      """
      if (sort_by is None) != (order_by is None):
          raise AssertionError(
              "sort_by and order_by must be either both set, or neither."
          )
  
      if sort_by and not isinstance(
          sort_by, (checkpoint.CheckpointSortBy, str)
      ):
          raise ValueError(
              "sort_by must be of type CheckpointSortBy or str"
          )
  
      if not sort_by:
          sort_by = checkpoint.CheckpointSortBy.SEARCHER_METRIC
  
      def get_with_offset(
          offset: int,
      ) -> bindings.v1GetExperimentCheckpointsResponse:
          return bindings.get_GetExperimentCheckpoints(
              self._session,
              id=self._id,
              limit=max_results,
              offset=offset,
              orderBy=order_by._to_bindings() if order_by else None,
              sortByAttr=sort_by._to_bindings()
              if isinstance(sort_by, checkpoint.CheckpointSortBy)
              else None,
              sortByMetric=sort_by
              if isinstance(sort_by, str)
              else None,
              states=[bindings.checkpointv1State.COMPLETED],
          )
  
      resps = api.read_paginated(
          get_with_offset=get_with_offset,
          pages=api.PageOpts.single
          if max_results
          else api.PageOpts.all,
      )
  
      return [
          checkpoint.Checkpoint._from_bindings(c, self._session)
          for r in resps
          for c in r.checkpoints
      ]
  
imports: import base64
  import enum
  import pathlib
  import sys
  import time
  import warnings
  from typing import Any, Dict, Iterator, List, Optional, Set, Union
  from determined.common import api
  from determined.common.api import bindings
  from determined.common.experimental import checkpoint, trial, workspace
  from determined.common.experimental._util import OrderBy
label_desc: Use image node_id 26 for calling the Experiment obj's underlying member method code with example usage: obj.list_checkpoints(sort_by, order_by, max_results) and returns: unknown, bindings