# coding: utf-8

"""
    Determined API (Beta)

    Determined helps deep learning teams train models more quickly, easily share GPU resources, and effectively collaborate. Determined allows deep learning engineers to focus on building and training models at scale, without needing to worry about DevOps or writing custom code for common tasks like fault tolerance or experiment tracking.  You can think of Determined as a platform that bridges the gap between tools like TensorFlow and PyTorch --- which work great for a single researcher with a single GPU --- to the challenges that arise when doing deep learning at scale, as teams, clusters, and data sets all increase in size.  # noqa: E501

    OpenAPI spec version: 0.1
    Contact: <EMAIL>
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from determined._swagger.client.api_client import ApiClient


class ExperimentsApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def determined_activate_experiment(self, id, **kwargs):  # noqa: E501
        """Activate an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_activate_experiment(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1ActivateExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_activate_experiment_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_activate_experiment_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def determined_activate_experiment_with_http_info(self, id, **kwargs):  # noqa: E501
        """Activate an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_activate_experiment_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1ActivateExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_activate_experiment" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `determined_activate_experiment`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{id}/activate', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1ActivateExperimentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_archive_experiment(self, id, **kwargs):  # noqa: E501
        """Archive an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_archive_experiment(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1ArchiveExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_archive_experiment_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_archive_experiment_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def determined_archive_experiment_with_http_info(self, id, **kwargs):  # noqa: E501
        """Archive an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_archive_experiment_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1ArchiveExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_archive_experiment" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `determined_archive_experiment`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{id}/archive', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1ArchiveExperimentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_cancel_experiment(self, id, **kwargs):  # noqa: E501
        """Cancel an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_cancel_experiment(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1CancelExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_cancel_experiment_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_cancel_experiment_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def determined_cancel_experiment_with_http_info(self, id, **kwargs):  # noqa: E501
        """Cancel an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_cancel_experiment_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1CancelExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_cancel_experiment" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `determined_cancel_experiment`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{id}/cancel', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CancelExperimentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_delete_experiment(self, experiment_id, **kwargs):  # noqa: E501
        """Delete the requested experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_delete_experiment(experiment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: The ID of the experiment. (required)
        :return: V1DeleteExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_delete_experiment_with_http_info(experiment_id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_delete_experiment_with_http_info(experiment_id, **kwargs)  # noqa: E501
            return data

    def determined_delete_experiment_with_http_info(self, experiment_id, **kwargs):  # noqa: E501
        """Delete the requested experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_delete_experiment_with_http_info(experiment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: The ID of the experiment. (required)
        :return: V1DeleteExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['experiment_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_delete_experiment" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'experiment_id' is set
        if ('experiment_id' not in params or
                params['experiment_id'] is None):
            raise ValueError("Missing the required parameter `experiment_id` when calling `determined_delete_experiment`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'experiment_id' in params:
            path_params['experimentId'] = params['experiment_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{experimentId}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1DeleteExperimentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_get_experiment(self, experiment_id, **kwargs):  # noqa: E501
        """Get the requested experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment(experiment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: The id of the experiment. (required)
        :return: V1GetExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_get_experiment_with_http_info(experiment_id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_get_experiment_with_http_info(experiment_id, **kwargs)  # noqa: E501
            return data

    def determined_get_experiment_with_http_info(self, experiment_id, **kwargs):  # noqa: E501
        """Get the requested experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment_with_http_info(experiment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: The id of the experiment. (required)
        :return: V1GetExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['experiment_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_get_experiment" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'experiment_id' is set
        if ('experiment_id' not in params or
                params['experiment_id'] is None):
            raise ValueError("Missing the required parameter `experiment_id` when calling `determined_get_experiment`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'experiment_id' in params:
            path_params['experimentId'] = params['experiment_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{experimentId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetExperimentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_get_experiment_checkpoints(self, id, **kwargs):  # noqa: E501
        """Get a list of checkpoints for an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment_checkpoints(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :param str sort_by: Sort checkpoints by the given field.   - SORT_BY_UNSPECIFIED: Returns checkpoints in an unsorted list.  - SORT_BY_UUID: Returns checkpoints sorted by UUID.  - SORT_BY_TRIAL_ID: Returns checkpoints sorted by trial id.  - SORT_BY_BATCH_NUMBER: Returns checkpoints sorted by batch number.  - SORT_BY_START_TIME: Returns checkpoints sorted by start time.  - SORT_BY_END_TIME: Returns checkpoints sorted by end time.  - SORT_BY_VALIDATION_STATE: Returns checkpoints sorted by validation state.  - SORT_BY_STATE: Returns checkpoints sorted by state.  - SORT_BY_SEARCHER_METRIC: Returns checkpoints sorted by the experiment's `searcher.metric` configuration setting.
        :param str order_by: Order checkpoints in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :param int offset: Skip the number of checkpoints before returning results. Negative values denote number of checkpoints to skip from the end before returning results.
        :param int limit: Limit the number of checkpoints. A value of 0 denotes no limit.
        :param list[str] validation_states: Limit the checkpoints to those that match the validation states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.
        :param list[str] states: Limit the checkpoints to those that match the states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.
        :return: V1GetExperimentCheckpointsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_get_experiment_checkpoints_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_get_experiment_checkpoints_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def determined_get_experiment_checkpoints_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get a list of checkpoints for an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment_checkpoints_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :param str sort_by: Sort checkpoints by the given field.   - SORT_BY_UNSPECIFIED: Returns checkpoints in an unsorted list.  - SORT_BY_UUID: Returns checkpoints sorted by UUID.  - SORT_BY_TRIAL_ID: Returns checkpoints sorted by trial id.  - SORT_BY_BATCH_NUMBER: Returns checkpoints sorted by batch number.  - SORT_BY_START_TIME: Returns checkpoints sorted by start time.  - SORT_BY_END_TIME: Returns checkpoints sorted by end time.  - SORT_BY_VALIDATION_STATE: Returns checkpoints sorted by validation state.  - SORT_BY_STATE: Returns checkpoints sorted by state.  - SORT_BY_SEARCHER_METRIC: Returns checkpoints sorted by the experiment's `searcher.metric` configuration setting.
        :param str order_by: Order checkpoints in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :param int offset: Skip the number of checkpoints before returning results. Negative values denote number of checkpoints to skip from the end before returning results.
        :param int limit: Limit the number of checkpoints. A value of 0 denotes no limit.
        :param list[str] validation_states: Limit the checkpoints to those that match the validation states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.
        :param list[str] states: Limit the checkpoints to those that match the states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.
        :return: V1GetExperimentCheckpointsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'sort_by', 'order_by', 'offset', 'limit', 'validation_states', 'states']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_get_experiment_checkpoints" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `determined_get_experiment_checkpoints`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []
        if 'sort_by' in params:
            query_params.append(('sortBy', params['sort_by']))  # noqa: E501
        if 'order_by' in params:
            query_params.append(('orderBy', params['order_by']))  # noqa: E501
        if 'offset' in params:
            query_params.append(('offset', params['offset']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'validation_states' in params:
            query_params.append(('validationStates', params['validation_states']))  # noqa: E501
            collection_formats['validationStates'] = 'multi'  # noqa: E501
        if 'states' in params:
            query_params.append(('states', params['states']))  # noqa: E501
            collection_formats['states'] = 'multi'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{id}/checkpoints', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetExperimentCheckpointsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_get_experiment_labels(self, **kwargs):  # noqa: E501
        """Get a list of unique experiment labels (sorted by popularity).  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment_labels(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: V1GetExperimentLabelsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_get_experiment_labels_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.determined_get_experiment_labels_with_http_info(**kwargs)  # noqa: E501
            return data

    def determined_get_experiment_labels_with_http_info(self, **kwargs):  # noqa: E501
        """Get a list of unique experiment labels (sorted by popularity).  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment_labels_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: V1GetExperimentLabelsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_get_experiment_labels" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiment/labels', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetExperimentLabelsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_get_experiment_trials(self, experiment_id, **kwargs):  # noqa: E501
        """Get the list of trials for an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment_trials(experiment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: Limit trials to those that are owned by the specified experiments. (required)
        :param str sort_by: Sort trials by the given field.   - SORT_BY_UNSPECIFIED: Returns trials in an unsorted list.  - SORT_BY_ID: Returns trials sorted by id.  - SORT_BY_START_TIME: Return trials sorted by start time.  - SORT_BY_END_TIME: Return trials sorted by end time. Trials without end times are returned after trials that are.  - SORT_BY_STATE: Return trials sorted by state.  - SORT_BY_BEST_VALIDATION_METRIC: Return the trials sorted by the best metric so far, where the metric is specified by `searcher.metric` in the experiment configuration.  - SORT_BY_LATEST_VALIDATION_METRIC: Return the trials sorted by the latest metric so far, where the metric is specified by `searcher.metric` in the experiment configuration.  - SORT_BY_BATCHES_PROCESSED: Return the trials sorted by the number of batches completed.  - SORT_BY_DURATION: Return the trials sorted by the total duration.
        :param str order_by: Order trials in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :param int offset: Skip the number of trials before returning results. Negative values denote number of trials to skip from the end before returning results.
        :param int limit: Limit the number of trials. A value of 0 denotes no limit.
        :param list[str] states: Limit trials to those that match the provided state.   - STATE_UNSPECIFIED: The state of the experiment is unknown.  - STATE_ACTIVE: The experiment is in an active state.  - STATE_PAUSED: The experiment is in a paused state  - STATE_STOPPING_COMPLETED: The experiment is completed and is shutting down.  - STATE_STOPPING_CANCELED: The experiment is canceled and is shutting down.  - STATE_STOPPING_ERROR: The experiment is errored and is shutting down.  - STATE_COMPLETED: The experiment is completed and is shut down.  - STATE_CANCELED: The experiment is canceled and is shut down.  - STATE_ERROR: The experiment is errored and is shut down.  - STATE_DELETED: The experiment has been deleted.
        :return: V1GetExperimentTrialsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_get_experiment_trials_with_http_info(experiment_id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_get_experiment_trials_with_http_info(experiment_id, **kwargs)  # noqa: E501
            return data

    def determined_get_experiment_trials_with_http_info(self, experiment_id, **kwargs):  # noqa: E501
        """Get the list of trials for an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment_trials_with_http_info(experiment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: Limit trials to those that are owned by the specified experiments. (required)
        :param str sort_by: Sort trials by the given field.   - SORT_BY_UNSPECIFIED: Returns trials in an unsorted list.  - SORT_BY_ID: Returns trials sorted by id.  - SORT_BY_START_TIME: Return trials sorted by start time.  - SORT_BY_END_TIME: Return trials sorted by end time. Trials without end times are returned after trials that are.  - SORT_BY_STATE: Return trials sorted by state.  - SORT_BY_BEST_VALIDATION_METRIC: Return the trials sorted by the best metric so far, where the metric is specified by `searcher.metric` in the experiment configuration.  - SORT_BY_LATEST_VALIDATION_METRIC: Return the trials sorted by the latest metric so far, where the metric is specified by `searcher.metric` in the experiment configuration.  - SORT_BY_BATCHES_PROCESSED: Return the trials sorted by the number of batches completed.  - SORT_BY_DURATION: Return the trials sorted by the total duration.
        :param str order_by: Order trials in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :param int offset: Skip the number of trials before returning results. Negative values denote number of trials to skip from the end before returning results.
        :param int limit: Limit the number of trials. A value of 0 denotes no limit.
        :param list[str] states: Limit trials to those that match the provided state.   - STATE_UNSPECIFIED: The state of the experiment is unknown.  - STATE_ACTIVE: The experiment is in an active state.  - STATE_PAUSED: The experiment is in a paused state  - STATE_STOPPING_COMPLETED: The experiment is completed and is shutting down.  - STATE_STOPPING_CANCELED: The experiment is canceled and is shutting down.  - STATE_STOPPING_ERROR: The experiment is errored and is shutting down.  - STATE_COMPLETED: The experiment is completed and is shut down.  - STATE_CANCELED: The experiment is canceled and is shut down.  - STATE_ERROR: The experiment is errored and is shut down.  - STATE_DELETED: The experiment has been deleted.
        :return: V1GetExperimentTrialsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['experiment_id', 'sort_by', 'order_by', 'offset', 'limit', 'states']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_get_experiment_trials" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'experiment_id' is set
        if ('experiment_id' not in params or
                params['experiment_id'] is None):
            raise ValueError("Missing the required parameter `experiment_id` when calling `determined_get_experiment_trials`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'experiment_id' in params:
            path_params['experimentId'] = params['experiment_id']  # noqa: E501

        query_params = []
        if 'sort_by' in params:
            query_params.append(('sortBy', params['sort_by']))  # noqa: E501
        if 'order_by' in params:
            query_params.append(('orderBy', params['order_by']))  # noqa: E501
        if 'offset' in params:
            query_params.append(('offset', params['offset']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'states' in params:
            query_params.append(('states', params['states']))  # noqa: E501
            collection_formats['states'] = 'multi'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{experimentId}/trials', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetExperimentTrialsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_get_experiment_validation_history(self, experiment_id, **kwargs):  # noqa: E501
        """Get the validation history for an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment_validation_history(experiment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: The id of the experiment. (required)
        :return: V1GetExperimentValidationHistoryResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_get_experiment_validation_history_with_http_info(experiment_id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_get_experiment_validation_history_with_http_info(experiment_id, **kwargs)  # noqa: E501
            return data

    def determined_get_experiment_validation_history_with_http_info(self, experiment_id, **kwargs):  # noqa: E501
        """Get the validation history for an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment_validation_history_with_http_info(experiment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: The id of the experiment. (required)
        :return: V1GetExperimentValidationHistoryResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['experiment_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_get_experiment_validation_history" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'experiment_id' is set
        if ('experiment_id' not in params or
                params['experiment_id'] is None):
            raise ValueError("Missing the required parameter `experiment_id` when calling `determined_get_experiment_validation_history`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'experiment_id' in params:
            path_params['experimentId'] = params['experiment_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{experimentId}/validation-history', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetExperimentValidationHistoryResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_get_experiments(self, **kwargs):  # noqa: E501
        """Get a list of experiments.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiments(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str sort_by: Sort experiments by the given field.   - SORT_BY_UNSPECIFIED: Returns experiments in an unsorted list.  - SORT_BY_ID: Returns experiments sorted by id.  - SORT_BY_DESCRIPTION: Returns experiments sorted by description.  - SORT_BY_START_TIME: Return experiments sorted by start time.  - SORT_BY_END_TIME: Return experiments sorted by end time. Experiments without end_time are returned after the ones with end_time.  - SORT_BY_STATE: Return experiments sorted by state.  - SORT_BY_NUM_TRIALS: Return experiments sorted by number of trials.  - SORT_BY_PROGRESS: Return experiments sorted by progress.  - SORT_BY_USER: Return experiments sorted by user.
        :param str order_by: Order experiments in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :param int offset: Skip the number of experiments before returning results. Negative values denote number of experiments to skip from the end before returning results.
        :param int limit: Limit the number of experiments. 0 or Unspecified - returns a default of 100. -1               - returns everything. -2               - returns pagination info but no experiments.
        :param str description: Limit experiments to those that match the description.
        :param list[str] labels: Limit experiments to those that match the provided labels.
        :param bool archived: Limit experiments to those that are archived.
        :param list[str] states: Limit experiments to those that match the provided state.   - STATE_UNSPECIFIED: The state of the experiment is unknown.  - STATE_ACTIVE: The experiment is in an active state.  - STATE_PAUSED: The experiment is in a paused state  - STATE_STOPPING_COMPLETED: The experiment is completed and is shutting down.  - STATE_STOPPING_CANCELED: The experiment is canceled and is shutting down.  - STATE_STOPPING_ERROR: The experiment is errored and is shutting down.  - STATE_COMPLETED: The experiment is completed and is shut down.  - STATE_CANCELED: The experiment is canceled and is shut down.  - STATE_ERROR: The experiment is errored and is shut down.  - STATE_DELETED: The experiment has been deleted.
        :param list[str] users: Limit experiments to those that are owned by the specified users.
        :return: V1GetExperimentsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_get_experiments_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.determined_get_experiments_with_http_info(**kwargs)  # noqa: E501
            return data

    def determined_get_experiments_with_http_info(self, **kwargs):  # noqa: E501
        """Get a list of experiments.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiments_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str sort_by: Sort experiments by the given field.   - SORT_BY_UNSPECIFIED: Returns experiments in an unsorted list.  - SORT_BY_ID: Returns experiments sorted by id.  - SORT_BY_DESCRIPTION: Returns experiments sorted by description.  - SORT_BY_START_TIME: Return experiments sorted by start time.  - SORT_BY_END_TIME: Return experiments sorted by end time. Experiments without end_time are returned after the ones with end_time.  - SORT_BY_STATE: Return experiments sorted by state.  - SORT_BY_NUM_TRIALS: Return experiments sorted by number of trials.  - SORT_BY_PROGRESS: Return experiments sorted by progress.  - SORT_BY_USER: Return experiments sorted by user.
        :param str order_by: Order experiments in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :param int offset: Skip the number of experiments before returning results. Negative values denote number of experiments to skip from the end before returning results.
        :param int limit: Limit the number of experiments. 0 or Unspecified - returns a default of 100. -1               - returns everything. -2               - returns pagination info but no experiments.
        :param str description: Limit experiments to those that match the description.
        :param list[str] labels: Limit experiments to those that match the provided labels.
        :param bool archived: Limit experiments to those that are archived.
        :param list[str] states: Limit experiments to those that match the provided state.   - STATE_UNSPECIFIED: The state of the experiment is unknown.  - STATE_ACTIVE: The experiment is in an active state.  - STATE_PAUSED: The experiment is in a paused state  - STATE_STOPPING_COMPLETED: The experiment is completed and is shutting down.  - STATE_STOPPING_CANCELED: The experiment is canceled and is shutting down.  - STATE_STOPPING_ERROR: The experiment is errored and is shutting down.  - STATE_COMPLETED: The experiment is completed and is shut down.  - STATE_CANCELED: The experiment is canceled and is shut down.  - STATE_ERROR: The experiment is errored and is shut down.  - STATE_DELETED: The experiment has been deleted.
        :param list[str] users: Limit experiments to those that are owned by the specified users.
        :return: V1GetExperimentsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['sort_by', 'order_by', 'offset', 'limit', 'description', 'labels', 'archived', 'states', 'users']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_get_experiments" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'sort_by' in params:
            query_params.append(('sortBy', params['sort_by']))  # noqa: E501
        if 'order_by' in params:
            query_params.append(('orderBy', params['order_by']))  # noqa: E501
        if 'offset' in params:
            query_params.append(('offset', params['offset']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'description' in params:
            query_params.append(('description', params['description']))  # noqa: E501
        if 'labels' in params:
            query_params.append(('labels', params['labels']))  # noqa: E501
            collection_formats['labels'] = 'multi'  # noqa: E501
        if 'archived' in params:
            query_params.append(('archived', params['archived']))  # noqa: E501
        if 'states' in params:
            query_params.append(('states', params['states']))  # noqa: E501
            collection_formats['states'] = 'multi'  # noqa: E501
        if 'users' in params:
            query_params.append(('users', params['users']))  # noqa: E501
            collection_formats['users'] = 'multi'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetExperimentsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_get_trial(self, trial_id, **kwargs):  # noqa: E501
        """Get a single trial.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_trial(trial_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int trial_id: The requested trial's id. (required)
        :return: V1GetTrialResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_get_trial_with_http_info(trial_id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_get_trial_with_http_info(trial_id, **kwargs)  # noqa: E501
            return data

    def determined_get_trial_with_http_info(self, trial_id, **kwargs):  # noqa: E501
        """Get a single trial.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_trial_with_http_info(trial_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int trial_id: The requested trial's id. (required)
        :return: V1GetTrialResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['trial_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_get_trial" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'trial_id' is set
        if ('trial_id' not in params or
                params['trial_id'] is None):
            raise ValueError("Missing the required parameter `trial_id` when calling `determined_get_trial`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'trial_id' in params:
            path_params['trialId'] = params['trial_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/trials/{trialId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetTrialResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_get_trial_checkpoints(self, id, **kwargs):  # noqa: E501
        """Get a list of checkpoints for a trial.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_trial_checkpoints(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The trial id. (required)
        :param str sort_by: Sort checkpoints by the given field.   - SORT_BY_UNSPECIFIED: Returns checkpoints in an unsorted list.  - SORT_BY_UUID: Returns checkpoints sorted by UUID.  - SORT_BY_BATCH_NUMBER: Returns checkpoints sorted by batch number.  - SORT_BY_START_TIME: Returns checkpoints sorted by start time.  - SORT_BY_END_TIME: Returns checkpoints sorted by end time.  - SORT_BY_VALIDATION_STATE: Returns checkpoints sorted by validation state.  - SORT_BY_STATE: Returns checkpoints sorted by state.
        :param str order_by: Order checkpoints in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :param int offset: Skip the number of checkpoints before returning results. Negative values denote number of checkpoints to skip from the end before returning results.
        :param int limit: Limit the number of checkpoints. A value of 0 denotes no limit.
        :param list[str] validation_states: Limit the checkpoints to those that match the validation states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.
        :param list[str] states: Limit the checkpoints to those that match the states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.
        :return: V1GetTrialCheckpointsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_get_trial_checkpoints_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_get_trial_checkpoints_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def determined_get_trial_checkpoints_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get a list of checkpoints for a trial.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_trial_checkpoints_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The trial id. (required)
        :param str sort_by: Sort checkpoints by the given field.   - SORT_BY_UNSPECIFIED: Returns checkpoints in an unsorted list.  - SORT_BY_UUID: Returns checkpoints sorted by UUID.  - SORT_BY_BATCH_NUMBER: Returns checkpoints sorted by batch number.  - SORT_BY_START_TIME: Returns checkpoints sorted by start time.  - SORT_BY_END_TIME: Returns checkpoints sorted by end time.  - SORT_BY_VALIDATION_STATE: Returns checkpoints sorted by validation state.  - SORT_BY_STATE: Returns checkpoints sorted by state.
        :param str order_by: Order checkpoints in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :param int offset: Skip the number of checkpoints before returning results. Negative values denote number of checkpoints to skip from the end before returning results.
        :param int limit: Limit the number of checkpoints. A value of 0 denotes no limit.
        :param list[str] validation_states: Limit the checkpoints to those that match the validation states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.
        :param list[str] states: Limit the checkpoints to those that match the states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.
        :return: V1GetTrialCheckpointsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'sort_by', 'order_by', 'offset', 'limit', 'validation_states', 'states']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_get_trial_checkpoints" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `determined_get_trial_checkpoints`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []
        if 'sort_by' in params:
            query_params.append(('sortBy', params['sort_by']))  # noqa: E501
        if 'order_by' in params:
            query_params.append(('orderBy', params['order_by']))  # noqa: E501
        if 'offset' in params:
            query_params.append(('offset', params['offset']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'validation_states' in params:
            query_params.append(('validationStates', params['validation_states']))  # noqa: E501
            collection_formats['validationStates'] = 'multi'  # noqa: E501
        if 'states' in params:
            query_params.append(('states', params['states']))  # noqa: E501
            collection_formats['states'] = 'multi'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/trials/{id}/checkpoints', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetTrialCheckpointsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_kill_experiment(self, id, **kwargs):  # noqa: E501
        """Kill an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_kill_experiment(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1KillExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_kill_experiment_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_kill_experiment_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def determined_kill_experiment_with_http_info(self, id, **kwargs):  # noqa: E501
        """Kill an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_kill_experiment_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1KillExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_kill_experiment" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `determined_kill_experiment`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{id}/kill', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1KillExperimentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_kill_trial(self, id, **kwargs):  # noqa: E501
        """Kill a trial.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_kill_trial(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The trial id (required)
        :return: V1KillTrialResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_kill_trial_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_kill_trial_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def determined_kill_trial_with_http_info(self, id, **kwargs):  # noqa: E501
        """Kill a trial.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_kill_trial_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The trial id (required)
        :return: V1KillTrialResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_kill_trial" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `determined_kill_trial`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/trials/{id}/kill', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1KillTrialResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_patch_experiment(self, experiment_id, body, **kwargs):  # noqa: E501
        """Patch an experiment's fields.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_patch_experiment(experiment_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: The id of the experiment. (required)
        :param V1Experiment body: Patched experiment attributes. (required)
        :return: V1PatchExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_patch_experiment_with_http_info(experiment_id, body, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_patch_experiment_with_http_info(experiment_id, body, **kwargs)  # noqa: E501
            return data

    def determined_patch_experiment_with_http_info(self, experiment_id, body, **kwargs):  # noqa: E501
        """Patch an experiment's fields.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_patch_experiment_with_http_info(experiment_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: The id of the experiment. (required)
        :param V1Experiment body: Patched experiment attributes. (required)
        :return: V1PatchExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['experiment_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_patch_experiment" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'experiment_id' is set
        if ('experiment_id' not in params or
                params['experiment_id'] is None):
            raise ValueError("Missing the required parameter `experiment_id` when calling `determined_patch_experiment`")  # noqa: E501
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `determined_patch_experiment`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'experiment_id' in params:
            path_params['experiment.id'] = params['experiment_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{experiment.id}', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1PatchExperimentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_pause_experiment(self, id, **kwargs):  # noqa: E501
        """Pause an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_pause_experiment(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1PauseExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_pause_experiment_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_pause_experiment_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def determined_pause_experiment_with_http_info(self, id, **kwargs):  # noqa: E501
        """Pause an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_pause_experiment_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1PauseExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_pause_experiment" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `determined_pause_experiment`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{id}/pause', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1PauseExperimentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_preview_hp_search(self, body, **kwargs):  # noqa: E501
        """Preview hyperparameter search.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_preview_hp_search(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1PreviewHPSearchRequest body: (required)
        :return: V1PreviewHPSearchResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_preview_hp_search_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_preview_hp_search_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def determined_preview_hp_search_with_http_info(self, body, **kwargs):  # noqa: E501
        """Preview hyperparameter search.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_preview_hp_search_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1PreviewHPSearchRequest body: (required)
        :return: V1PreviewHPSearchResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_preview_hp_search" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `determined_preview_hp_search`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/preview-hp-search', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1PreviewHPSearchResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_trial_logs(self, trial_id, **kwargs):  # noqa: E501
        """Stream trial logs.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_trial_logs(trial_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int trial_id: The id of the trial. (required)
        :param int limit: Limit the number of trial logs. A value of 0 denotes no limit.
        :param bool follow: Continue following logs until the trial stops.
        :param list[str] agent_ids: Limit the trial logs to a subset of agents.
        :param list[str] container_ids: Limit the trial logs to a subset of containers.
        :param list[int] rank_ids: Limit the trial logs to a subset of ranks.
        :param list[str] levels: Limit the trial logs to a subset of agents.   - LOG_LEVEL_UNSPECIFIED: Unspecified log level.  - LOG_LEVEL_TRACE: A log level of TRACE.  - LOG_LEVEL_DEBUG: A log level of DEBUG.  - LOG_LEVEL_INFO: A log level of INFO.  - LOG_LEVEL_WARNING: A log level of WARNING.  - LOG_LEVEL_ERROR: A log level of ERROR.  - LOG_LEVEL_CRITICAL: A log level of CRITICAL.
        :param list[str] stdtypes: Limit the trial logs to a subset of output streams.
        :param list[str] sources: Limit the trial logs to a subset of sources.
        :param datetime timestamp_before: Limit the trial logs to ones with a timestamp before a given time.
        :param datetime timestamp_after: Limit the trial logs to ones with a timestamp after a given time.
        :param str order_by: Order logs in either ascending or descending order by timestamp.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :return: StreamResultOfV1TrialLogsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_trial_logs_with_http_info(trial_id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_trial_logs_with_http_info(trial_id, **kwargs)  # noqa: E501
            return data

    def determined_trial_logs_with_http_info(self, trial_id, **kwargs):  # noqa: E501
        """Stream trial logs.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_trial_logs_with_http_info(trial_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int trial_id: The id of the trial. (required)
        :param int limit: Limit the number of trial logs. A value of 0 denotes no limit.
        :param bool follow: Continue following logs until the trial stops.
        :param list[str] agent_ids: Limit the trial logs to a subset of agents.
        :param list[str] container_ids: Limit the trial logs to a subset of containers.
        :param list[int] rank_ids: Limit the trial logs to a subset of ranks.
        :param list[str] levels: Limit the trial logs to a subset of agents.   - LOG_LEVEL_UNSPECIFIED: Unspecified log level.  - LOG_LEVEL_TRACE: A log level of TRACE.  - LOG_LEVEL_DEBUG: A log level of DEBUG.  - LOG_LEVEL_INFO: A log level of INFO.  - LOG_LEVEL_WARNING: A log level of WARNING.  - LOG_LEVEL_ERROR: A log level of ERROR.  - LOG_LEVEL_CRITICAL: A log level of CRITICAL.
        :param list[str] stdtypes: Limit the trial logs to a subset of output streams.
        :param list[str] sources: Limit the trial logs to a subset of sources.
        :param datetime timestamp_before: Limit the trial logs to ones with a timestamp before a given time.
        :param datetime timestamp_after: Limit the trial logs to ones with a timestamp after a given time.
        :param str order_by: Order logs in either ascending or descending order by timestamp.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :return: StreamResultOfV1TrialLogsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['trial_id', 'limit', 'follow', 'agent_ids', 'container_ids', 'rank_ids', 'levels', 'stdtypes', 'sources', 'timestamp_before', 'timestamp_after', 'order_by']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_trial_logs" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'trial_id' is set
        if ('trial_id' not in params or
                params['trial_id'] is None):
            raise ValueError("Missing the required parameter `trial_id` when calling `determined_trial_logs`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'trial_id' in params:
            path_params['trialId'] = params['trial_id']  # noqa: E501

        query_params = []
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'follow' in params:
            query_params.append(('follow', params['follow']))  # noqa: E501
        if 'agent_ids' in params:
            query_params.append(('agentIds', params['agent_ids']))  # noqa: E501
            collection_formats['agentIds'] = 'multi'  # noqa: E501
        if 'container_ids' in params:
            query_params.append(('containerIds', params['container_ids']))  # noqa: E501
            collection_formats['containerIds'] = 'multi'  # noqa: E501
        if 'rank_ids' in params:
            query_params.append(('rankIds', params['rank_ids']))  # noqa: E501
            collection_formats['rankIds'] = 'multi'  # noqa: E501
        if 'levels' in params:
            query_params.append(('levels', params['levels']))  # noqa: E501
            collection_formats['levels'] = 'multi'  # noqa: E501
        if 'stdtypes' in params:
            query_params.append(('stdtypes', params['stdtypes']))  # noqa: E501
            collection_formats['stdtypes'] = 'multi'  # noqa: E501
        if 'sources' in params:
            query_params.append(('sources', params['sources']))  # noqa: E501
            collection_formats['sources'] = 'multi'  # noqa: E501
        if 'timestamp_before' in params:
            query_params.append(('timestampBefore', params['timestamp_before']))  # noqa: E501
        if 'timestamp_after' in params:
            query_params.append(('timestampAfter', params['timestamp_after']))  # noqa: E501
        if 'order_by' in params:
            query_params.append(('orderBy', params['order_by']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/trials/{trialId}/logs', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StreamResultOfV1TrialLogsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_trial_logs_fields(self, trial_id, **kwargs):  # noqa: E501
        """Stream trial log fields.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_trial_logs_fields(trial_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int trial_id: The ID of the trial. (required)
        :param bool follow: Continue following fields until the trial stops.
        :return: StreamResultOfV1TrialLogsFieldsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_trial_logs_fields_with_http_info(trial_id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_trial_logs_fields_with_http_info(trial_id, **kwargs)  # noqa: E501
            return data

    def determined_trial_logs_fields_with_http_info(self, trial_id, **kwargs):  # noqa: E501
        """Stream trial log fields.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_trial_logs_fields_with_http_info(trial_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int trial_id: The ID of the trial. (required)
        :param bool follow: Continue following fields until the trial stops.
        :return: StreamResultOfV1TrialLogsFieldsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['trial_id', 'follow']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_trial_logs_fields" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'trial_id' is set
        if ('trial_id' not in params or
                params['trial_id'] is None):
            raise ValueError("Missing the required parameter `trial_id` when calling `determined_trial_logs_fields`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'trial_id' in params:
            path_params['trialId'] = params['trial_id']  # noqa: E501

        query_params = []
        if 'follow' in params:
            query_params.append(('follow', params['follow']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/trials/{trialId}/logs/fields', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StreamResultOfV1TrialLogsFieldsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_unarchive_experiment(self, id, **kwargs):  # noqa: E501
        """Unarchive an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_unarchive_experiment(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1UnarchiveExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_unarchive_experiment_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_unarchive_experiment_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def determined_unarchive_experiment_with_http_info(self, id, **kwargs):  # noqa: E501
        """Unarchive an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_unarchive_experiment_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1UnarchiveExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_unarchive_experiment" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `determined_unarchive_experiment`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{id}/unarchive', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1UnarchiveExperimentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

# coding: utf-8

"""
    Determined API (Beta)

    Determined helps deep learning teams train models more quickly, easily share GPU resources, and effectively collaborate. Determined allows deep learning engineers to focus on building and training models at scale, without needing to worry about DevOps or writing custom code for common tasks like fault tolerance or experiment tracking.  You can think of Determined as a platform that bridges the gap between tools like TensorFlow and PyTorch --- which work great for a single researcher with a single GPU --- to the challenges that arise when doing deep learning at scale, as teams, clusters, and data sets all increase in size.  # noqa: E501

    OpenAPI spec version: 0.1
    Contact: <EMAIL>
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


from __future__ import absolute_import

import re  # noqa: F401

# python 2 and python 3 compatibility library
import six

from determined._swagger.client.api_client import ApiClient


class ExperimentsApi(object):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    Ref: https://github.com/swagger-api/swagger-codegen
    """

    def __init__(self, api_client=None):
        if api_client is None:
            api_client = ApiClient()
        self.api_client = api_client

    def determined_activate_experiment(self, id, **kwargs):  # noqa: E501
        """Activate an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_activate_experiment(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1ActivateExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_activate_experiment_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_activate_experiment_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def determined_activate_experiment_with_http_info(self, id, **kwargs):  # noqa: E501
        """Activate an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_activate_experiment_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1ActivateExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_activate_experiment" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `determined_activate_experiment`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{id}/activate', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1ActivateExperimentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_archive_experiment(self, id, **kwargs):  # noqa: E501
        """Archive an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_archive_experiment(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1ArchiveExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_archive_experiment_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_archive_experiment_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def determined_archive_experiment_with_http_info(self, id, **kwargs):  # noqa: E501
        """Archive an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_archive_experiment_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1ArchiveExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_archive_experiment" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `determined_archive_experiment`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{id}/archive', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1ArchiveExperimentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_cancel_experiment(self, id, **kwargs):  # noqa: E501
        """Cancel an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_cancel_experiment(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1CancelExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_cancel_experiment_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_cancel_experiment_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def determined_cancel_experiment_with_http_info(self, id, **kwargs):  # noqa: E501
        """Cancel an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_cancel_experiment_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1CancelExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_cancel_experiment" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `determined_cancel_experiment`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{id}/cancel', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1CancelExperimentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_delete_experiment(self, experiment_id, **kwargs):  # noqa: E501
        """Delete the requested experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_delete_experiment(experiment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: The ID of the experiment. (required)
        :return: V1DeleteExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_delete_experiment_with_http_info(experiment_id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_delete_experiment_with_http_info(experiment_id, **kwargs)  # noqa: E501
            return data

    def determined_delete_experiment_with_http_info(self, experiment_id, **kwargs):  # noqa: E501
        """Delete the requested experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_delete_experiment_with_http_info(experiment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: The ID of the experiment. (required)
        :return: V1DeleteExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['experiment_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_delete_experiment" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'experiment_id' is set
        if ('experiment_id' not in params or
                params['experiment_id'] is None):
            raise ValueError("Missing the required parameter `experiment_id` when calling `determined_delete_experiment`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'experiment_id' in params:
            path_params['experimentId'] = params['experiment_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{experimentId}', 'DELETE',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1DeleteExperimentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_get_experiment(self, experiment_id, **kwargs):  # noqa: E501
        """Get the requested experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment(experiment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: The id of the experiment. (required)
        :return: V1GetExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_get_experiment_with_http_info(experiment_id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_get_experiment_with_http_info(experiment_id, **kwargs)  # noqa: E501
            return data

    def determined_get_experiment_with_http_info(self, experiment_id, **kwargs):  # noqa: E501
        """Get the requested experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment_with_http_info(experiment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: The id of the experiment. (required)
        :return: V1GetExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['experiment_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_get_experiment" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'experiment_id' is set
        if ('experiment_id' not in params or
                params['experiment_id'] is None):
            raise ValueError("Missing the required parameter `experiment_id` when calling `determined_get_experiment`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'experiment_id' in params:
            path_params['experimentId'] = params['experiment_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{experimentId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetExperimentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_get_experiment_checkpoints(self, id, **kwargs):  # noqa: E501
        """Get a list of checkpoints for an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment_checkpoints(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :param str sort_by: Sort checkpoints by the given field.   - SORT_BY_UNSPECIFIED: Returns checkpoints in an unsorted list.  - SORT_BY_UUID: Returns checkpoints sorted by UUID.  - SORT_BY_TRIAL_ID: Returns checkpoints sorted by trial id.  - SORT_BY_BATCH_NUMBER: Returns checkpoints sorted by batch number.  - SORT_BY_START_TIME: Returns checkpoints sorted by start time.  - SORT_BY_END_TIME: Returns checkpoints sorted by end time.  - SORT_BY_VALIDATION_STATE: Returns checkpoints sorted by validation state.  - SORT_BY_STATE: Returns checkpoints sorted by state.  - SORT_BY_SEARCHER_METRIC: Returns checkpoints sorted by the experiment's `searcher.metric` configuration setting.
        :param str order_by: Order checkpoints in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :param int offset: Skip the number of checkpoints before returning results. Negative values denote number of checkpoints to skip from the end before returning results.
        :param int limit: Limit the number of checkpoints. A value of 0 denotes no limit.
        :param list[str] validation_states: Limit the checkpoints to those that match the validation states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.
        :param list[str] states: Limit the checkpoints to those that match the states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.
        :return: V1GetExperimentCheckpointsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_get_experiment_checkpoints_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_get_experiment_checkpoints_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def determined_get_experiment_checkpoints_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get a list of checkpoints for an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment_checkpoints_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :param str sort_by: Sort checkpoints by the given field.   - SORT_BY_UNSPECIFIED: Returns checkpoints in an unsorted list.  - SORT_BY_UUID: Returns checkpoints sorted by UUID.  - SORT_BY_TRIAL_ID: Returns checkpoints sorted by trial id.  - SORT_BY_BATCH_NUMBER: Returns checkpoints sorted by batch number.  - SORT_BY_START_TIME: Returns checkpoints sorted by start time.  - SORT_BY_END_TIME: Returns checkpoints sorted by end time.  - SORT_BY_VALIDATION_STATE: Returns checkpoints sorted by validation state.  - SORT_BY_STATE: Returns checkpoints sorted by state.  - SORT_BY_SEARCHER_METRIC: Returns checkpoints sorted by the experiment's `searcher.metric` configuration setting.
        :param str order_by: Order checkpoints in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :param int offset: Skip the number of checkpoints before returning results. Negative values denote number of checkpoints to skip from the end before returning results.
        :param int limit: Limit the number of checkpoints. A value of 0 denotes no limit.
        :param list[str] validation_states: Limit the checkpoints to those that match the validation states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.
        :param list[str] states: Limit the checkpoints to those that match the states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.
        :return: V1GetExperimentCheckpointsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'sort_by', 'order_by', 'offset', 'limit', 'validation_states', 'states']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_get_experiment_checkpoints" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `determined_get_experiment_checkpoints`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []
        if 'sort_by' in params:
            query_params.append(('sortBy', params['sort_by']))  # noqa: E501
        if 'order_by' in params:
            query_params.append(('orderBy', params['order_by']))  # noqa: E501
        if 'offset' in params:
            query_params.append(('offset', params['offset']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'validation_states' in params:
            query_params.append(('validationStates', params['validation_states']))  # noqa: E501
            collection_formats['validationStates'] = 'multi'  # noqa: E501
        if 'states' in params:
            query_params.append(('states', params['states']))  # noqa: E501
            collection_formats['states'] = 'multi'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{id}/checkpoints', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetExperimentCheckpointsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_get_experiment_labels(self, **kwargs):  # noqa: E501
        """Get a list of unique experiment labels (sorted by popularity).  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment_labels(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: V1GetExperimentLabelsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_get_experiment_labels_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.determined_get_experiment_labels_with_http_info(**kwargs)  # noqa: E501
            return data

    def determined_get_experiment_labels_with_http_info(self, **kwargs):  # noqa: E501
        """Get a list of unique experiment labels (sorted by popularity).  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment_labels_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :return: V1GetExperimentLabelsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = []  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_get_experiment_labels" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiment/labels', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetExperimentLabelsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_get_experiment_trials(self, experiment_id, **kwargs):  # noqa: E501
        """Get the list of trials for an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment_trials(experiment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: Limit trials to those that are owned by the specified experiments. (required)
        :param str sort_by: Sort trials by the given field.   - SORT_BY_UNSPECIFIED: Returns trials in an unsorted list.  - SORT_BY_ID: Returns trials sorted by id.  - SORT_BY_START_TIME: Return trials sorted by start time.  - SORT_BY_END_TIME: Return trials sorted by end time. Trials without end times are returned after trials that are.  - SORT_BY_STATE: Return trials sorted by state.  - SORT_BY_BEST_VALIDATION_METRIC: Return the trials sorted by the best metric so far, where the metric is specified by `searcher.metric` in the experiment configuration.  - SORT_BY_LATEST_VALIDATION_METRIC: Return the trials sorted by the latest metric so far, where the metric is specified by `searcher.metric` in the experiment configuration.  - SORT_BY_BATCHES_PROCESSED: Return the trials sorted by the number of batches completed.  - SORT_BY_DURATION: Return the trials sorted by the total duration.
        :param str order_by: Order trials in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :param int offset: Skip the number of trials before returning results. Negative values denote number of trials to skip from the end before returning results.
        :param int limit: Limit the number of trials. A value of 0 denotes no limit.
        :param list[str] states: Limit trials to those that match the provided state.   - STATE_UNSPECIFIED: The state of the experiment is unknown.  - STATE_ACTIVE: The experiment is in an active state.  - STATE_PAUSED: The experiment is in a paused state  - STATE_STOPPING_COMPLETED: The experiment is completed and is shutting down.  - STATE_STOPPING_CANCELED: The experiment is canceled and is shutting down.  - STATE_STOPPING_ERROR: The experiment is errored and is shutting down.  - STATE_COMPLETED: The experiment is completed and is shut down.  - STATE_CANCELED: The experiment is canceled and is shut down.  - STATE_ERROR: The experiment is errored and is shut down.  - STATE_DELETED: The experiment has been deleted.
        :return: V1GetExperimentTrialsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_get_experiment_trials_with_http_info(experiment_id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_get_experiment_trials_with_http_info(experiment_id, **kwargs)  # noqa: E501
            return data

    def determined_get_experiment_trials_with_http_info(self, experiment_id, **kwargs):  # noqa: E501
        """Get the list of trials for an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment_trials_with_http_info(experiment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: Limit trials to those that are owned by the specified experiments. (required)
        :param str sort_by: Sort trials by the given field.   - SORT_BY_UNSPECIFIED: Returns trials in an unsorted list.  - SORT_BY_ID: Returns trials sorted by id.  - SORT_BY_START_TIME: Return trials sorted by start time.  - SORT_BY_END_TIME: Return trials sorted by end time. Trials without end times are returned after trials that are.  - SORT_BY_STATE: Return trials sorted by state.  - SORT_BY_BEST_VALIDATION_METRIC: Return the trials sorted by the best metric so far, where the metric is specified by `searcher.metric` in the experiment configuration.  - SORT_BY_LATEST_VALIDATION_METRIC: Return the trials sorted by the latest metric so far, where the metric is specified by `searcher.metric` in the experiment configuration.  - SORT_BY_BATCHES_PROCESSED: Return the trials sorted by the number of batches completed.  - SORT_BY_DURATION: Return the trials sorted by the total duration.
        :param str order_by: Order trials in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :param int offset: Skip the number of trials before returning results. Negative values denote number of trials to skip from the end before returning results.
        :param int limit: Limit the number of trials. A value of 0 denotes no limit.
        :param list[str] states: Limit trials to those that match the provided state.   - STATE_UNSPECIFIED: The state of the experiment is unknown.  - STATE_ACTIVE: The experiment is in an active state.  - STATE_PAUSED: The experiment is in a paused state  - STATE_STOPPING_COMPLETED: The experiment is completed and is shutting down.  - STATE_STOPPING_CANCELED: The experiment is canceled and is shutting down.  - STATE_STOPPING_ERROR: The experiment is errored and is shutting down.  - STATE_COMPLETED: The experiment is completed and is shut down.  - STATE_CANCELED: The experiment is canceled and is shut down.  - STATE_ERROR: The experiment is errored and is shut down.  - STATE_DELETED: The experiment has been deleted.
        :return: V1GetExperimentTrialsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['experiment_id', 'sort_by', 'order_by', 'offset', 'limit', 'states']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_get_experiment_trials" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'experiment_id' is set
        if ('experiment_id' not in params or
                params['experiment_id'] is None):
            raise ValueError("Missing the required parameter `experiment_id` when calling `determined_get_experiment_trials`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'experiment_id' in params:
            path_params['experimentId'] = params['experiment_id']  # noqa: E501

        query_params = []
        if 'sort_by' in params:
            query_params.append(('sortBy', params['sort_by']))  # noqa: E501
        if 'order_by' in params:
            query_params.append(('orderBy', params['order_by']))  # noqa: E501
        if 'offset' in params:
            query_params.append(('offset', params['offset']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'states' in params:
            query_params.append(('states', params['states']))  # noqa: E501
            collection_formats['states'] = 'multi'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{experimentId}/trials', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetExperimentTrialsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_get_experiment_validation_history(self, experiment_id, **kwargs):  # noqa: E501
        """Get the validation history for an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment_validation_history(experiment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: The id of the experiment. (required)
        :return: V1GetExperimentValidationHistoryResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_get_experiment_validation_history_with_http_info(experiment_id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_get_experiment_validation_history_with_http_info(experiment_id, **kwargs)  # noqa: E501
            return data

    def determined_get_experiment_validation_history_with_http_info(self, experiment_id, **kwargs):  # noqa: E501
        """Get the validation history for an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiment_validation_history_with_http_info(experiment_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: The id of the experiment. (required)
        :return: V1GetExperimentValidationHistoryResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['experiment_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_get_experiment_validation_history" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'experiment_id' is set
        if ('experiment_id' not in params or
                params['experiment_id'] is None):
            raise ValueError("Missing the required parameter `experiment_id` when calling `determined_get_experiment_validation_history`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'experiment_id' in params:
            path_params['experimentId'] = params['experiment_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{experimentId}/validation-history', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetExperimentValidationHistoryResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_get_experiments(self, **kwargs):  # noqa: E501
        """Get a list of experiments.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiments(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str sort_by: Sort experiments by the given field.   - SORT_BY_UNSPECIFIED: Returns experiments in an unsorted list.  - SORT_BY_ID: Returns experiments sorted by id.  - SORT_BY_DESCRIPTION: Returns experiments sorted by description.  - SORT_BY_START_TIME: Return experiments sorted by start time.  - SORT_BY_END_TIME: Return experiments sorted by end time. Experiments without end_time are returned after the ones with end_time.  - SORT_BY_STATE: Return experiments sorted by state.  - SORT_BY_NUM_TRIALS: Return experiments sorted by number of trials.  - SORT_BY_PROGRESS: Return experiments sorted by progress.  - SORT_BY_USER: Return experiments sorted by user.
        :param str order_by: Order experiments in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :param int offset: Skip the number of experiments before returning results. Negative values denote number of experiments to skip from the end before returning results.
        :param int limit: Limit the number of experiments. 0 or Unspecified - returns a default of 100. -1               - returns everything. -2               - returns pagination info but no experiments.
        :param str description: Limit experiments to those that match the description.
        :param list[str] labels: Limit experiments to those that match the provided labels.
        :param bool archived: Limit experiments to those that are archived.
        :param list[str] states: Limit experiments to those that match the provided state.   - STATE_UNSPECIFIED: The state of the experiment is unknown.  - STATE_ACTIVE: The experiment is in an active state.  - STATE_PAUSED: The experiment is in a paused state  - STATE_STOPPING_COMPLETED: The experiment is completed and is shutting down.  - STATE_STOPPING_CANCELED: The experiment is canceled and is shutting down.  - STATE_STOPPING_ERROR: The experiment is errored and is shutting down.  - STATE_COMPLETED: The experiment is completed and is shut down.  - STATE_CANCELED: The experiment is canceled and is shut down.  - STATE_ERROR: The experiment is errored and is shut down.  - STATE_DELETED: The experiment has been deleted.
        :param list[str] users: Limit experiments to those that are owned by the specified users.
        :return: V1GetExperimentsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_get_experiments_with_http_info(**kwargs)  # noqa: E501
        else:
            (data) = self.determined_get_experiments_with_http_info(**kwargs)  # noqa: E501
            return data

    def determined_get_experiments_with_http_info(self, **kwargs):  # noqa: E501
        """Get a list of experiments.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_experiments_with_http_info(async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param str sort_by: Sort experiments by the given field.   - SORT_BY_UNSPECIFIED: Returns experiments in an unsorted list.  - SORT_BY_ID: Returns experiments sorted by id.  - SORT_BY_DESCRIPTION: Returns experiments sorted by description.  - SORT_BY_START_TIME: Return experiments sorted by start time.  - SORT_BY_END_TIME: Return experiments sorted by end time. Experiments without end_time are returned after the ones with end_time.  - SORT_BY_STATE: Return experiments sorted by state.  - SORT_BY_NUM_TRIALS: Return experiments sorted by number of trials.  - SORT_BY_PROGRESS: Return experiments sorted by progress.  - SORT_BY_USER: Return experiments sorted by user.
        :param str order_by: Order experiments in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :param int offset: Skip the number of experiments before returning results. Negative values denote number of experiments to skip from the end before returning results.
        :param int limit: Limit the number of experiments. 0 or Unspecified - returns a default of 100. -1               - returns everything. -2               - returns pagination info but no experiments.
        :param str description: Limit experiments to those that match the description.
        :param list[str] labels: Limit experiments to those that match the provided labels.
        :param bool archived: Limit experiments to those that are archived.
        :param list[str] states: Limit experiments to those that match the provided state.   - STATE_UNSPECIFIED: The state of the experiment is unknown.  - STATE_ACTIVE: The experiment is in an active state.  - STATE_PAUSED: The experiment is in a paused state  - STATE_STOPPING_COMPLETED: The experiment is completed and is shutting down.  - STATE_STOPPING_CANCELED: The experiment is canceled and is shutting down.  - STATE_STOPPING_ERROR: The experiment is errored and is shutting down.  - STATE_COMPLETED: The experiment is completed and is shut down.  - STATE_CANCELED: The experiment is canceled and is shut down.  - STATE_ERROR: The experiment is errored and is shut down.  - STATE_DELETED: The experiment has been deleted.
        :param list[str] users: Limit experiments to those that are owned by the specified users.
        :return: V1GetExperimentsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['sort_by', 'order_by', 'offset', 'limit', 'description', 'labels', 'archived', 'states', 'users']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_get_experiments" % key
                )
            params[key] = val
        del params['kwargs']

        collection_formats = {}

        path_params = {}

        query_params = []
        if 'sort_by' in params:
            query_params.append(('sortBy', params['sort_by']))  # noqa: E501
        if 'order_by' in params:
            query_params.append(('orderBy', params['order_by']))  # noqa: E501
        if 'offset' in params:
            query_params.append(('offset', params['offset']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'description' in params:
            query_params.append(('description', params['description']))  # noqa: E501
        if 'labels' in params:
            query_params.append(('labels', params['labels']))  # noqa: E501
            collection_formats['labels'] = 'multi'  # noqa: E501
        if 'archived' in params:
            query_params.append(('archived', params['archived']))  # noqa: E501
        if 'states' in params:
            query_params.append(('states', params['states']))  # noqa: E501
            collection_formats['states'] = 'multi'  # noqa: E501
        if 'users' in params:
            query_params.append(('users', params['users']))  # noqa: E501
            collection_formats['users'] = 'multi'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetExperimentsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_get_trial(self, trial_id, **kwargs):  # noqa: E501
        """Get a single trial.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_trial(trial_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int trial_id: The requested trial's id. (required)
        :return: V1GetTrialResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_get_trial_with_http_info(trial_id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_get_trial_with_http_info(trial_id, **kwargs)  # noqa: E501
            return data

    def determined_get_trial_with_http_info(self, trial_id, **kwargs):  # noqa: E501
        """Get a single trial.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_trial_with_http_info(trial_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int trial_id: The requested trial's id. (required)
        :return: V1GetTrialResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['trial_id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_get_trial" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'trial_id' is set
        if ('trial_id' not in params or
                params['trial_id'] is None):
            raise ValueError("Missing the required parameter `trial_id` when calling `determined_get_trial`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'trial_id' in params:
            path_params['trialId'] = params['trial_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/trials/{trialId}', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetTrialResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_get_trial_checkpoints(self, id, **kwargs):  # noqa: E501
        """Get a list of checkpoints for a trial.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_trial_checkpoints(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The trial id. (required)
        :param str sort_by: Sort checkpoints by the given field.   - SORT_BY_UNSPECIFIED: Returns checkpoints in an unsorted list.  - SORT_BY_UUID: Returns checkpoints sorted by UUID.  - SORT_BY_BATCH_NUMBER: Returns checkpoints sorted by batch number.  - SORT_BY_START_TIME: Returns checkpoints sorted by start time.  - SORT_BY_END_TIME: Returns checkpoints sorted by end time.  - SORT_BY_VALIDATION_STATE: Returns checkpoints sorted by validation state.  - SORT_BY_STATE: Returns checkpoints sorted by state.
        :param str order_by: Order checkpoints in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :param int offset: Skip the number of checkpoints before returning results. Negative values denote number of checkpoints to skip from the end before returning results.
        :param int limit: Limit the number of checkpoints. A value of 0 denotes no limit.
        :param list[str] validation_states: Limit the checkpoints to those that match the validation states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.
        :param list[str] states: Limit the checkpoints to those that match the states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.
        :return: V1GetTrialCheckpointsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_get_trial_checkpoints_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_get_trial_checkpoints_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def determined_get_trial_checkpoints_with_http_info(self, id, **kwargs):  # noqa: E501
        """Get a list of checkpoints for a trial.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_get_trial_checkpoints_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The trial id. (required)
        :param str sort_by: Sort checkpoints by the given field.   - SORT_BY_UNSPECIFIED: Returns checkpoints in an unsorted list.  - SORT_BY_UUID: Returns checkpoints sorted by UUID.  - SORT_BY_BATCH_NUMBER: Returns checkpoints sorted by batch number.  - SORT_BY_START_TIME: Returns checkpoints sorted by start time.  - SORT_BY_END_TIME: Returns checkpoints sorted by end time.  - SORT_BY_VALIDATION_STATE: Returns checkpoints sorted by validation state.  - SORT_BY_STATE: Returns checkpoints sorted by state.
        :param str order_by: Order checkpoints in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :param int offset: Skip the number of checkpoints before returning results. Negative values denote number of checkpoints to skip from the end before returning results.
        :param int limit: Limit the number of checkpoints. A value of 0 denotes no limit.
        :param list[str] validation_states: Limit the checkpoints to those that match the validation states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.
        :param list[str] states: Limit the checkpoints to those that match the states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.
        :return: V1GetTrialCheckpointsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id', 'sort_by', 'order_by', 'offset', 'limit', 'validation_states', 'states']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_get_trial_checkpoints" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `determined_get_trial_checkpoints`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []
        if 'sort_by' in params:
            query_params.append(('sortBy', params['sort_by']))  # noqa: E501
        if 'order_by' in params:
            query_params.append(('orderBy', params['order_by']))  # noqa: E501
        if 'offset' in params:
            query_params.append(('offset', params['offset']))  # noqa: E501
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'validation_states' in params:
            query_params.append(('validationStates', params['validation_states']))  # noqa: E501
            collection_formats['validationStates'] = 'multi'  # noqa: E501
        if 'states' in params:
            query_params.append(('states', params['states']))  # noqa: E501
            collection_formats['states'] = 'multi'  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/trials/{id}/checkpoints', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1GetTrialCheckpointsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_kill_experiment(self, id, **kwargs):  # noqa: E501
        """Kill an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_kill_experiment(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1KillExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_kill_experiment_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_kill_experiment_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def determined_kill_experiment_with_http_info(self, id, **kwargs):  # noqa: E501
        """Kill an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_kill_experiment_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1KillExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_kill_experiment" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `determined_kill_experiment`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{id}/kill', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1KillExperimentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_kill_trial(self, id, **kwargs):  # noqa: E501
        """Kill a trial.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_kill_trial(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The trial id (required)
        :return: V1KillTrialResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_kill_trial_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_kill_trial_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def determined_kill_trial_with_http_info(self, id, **kwargs):  # noqa: E501
        """Kill a trial.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_kill_trial_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The trial id (required)
        :return: V1KillTrialResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_kill_trial" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `determined_kill_trial`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/trials/{id}/kill', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1KillTrialResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_patch_experiment(self, experiment_id, body, **kwargs):  # noqa: E501
        """Patch an experiment's fields.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_patch_experiment(experiment_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: The id of the experiment. (required)
        :param V1Experiment body: Patched experiment attributes. (required)
        :return: V1PatchExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_patch_experiment_with_http_info(experiment_id, body, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_patch_experiment_with_http_info(experiment_id, body, **kwargs)  # noqa: E501
            return data

    def determined_patch_experiment_with_http_info(self, experiment_id, body, **kwargs):  # noqa: E501
        """Patch an experiment's fields.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_patch_experiment_with_http_info(experiment_id, body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int experiment_id: The id of the experiment. (required)
        :param V1Experiment body: Patched experiment attributes. (required)
        :return: V1PatchExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['experiment_id', 'body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_patch_experiment" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'experiment_id' is set
        if ('experiment_id' not in params or
                params['experiment_id'] is None):
            raise ValueError("Missing the required parameter `experiment_id` when calling `determined_patch_experiment`")  # noqa: E501
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `determined_patch_experiment`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'experiment_id' in params:
            path_params['experiment.id'] = params['experiment_id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{experiment.id}', 'PATCH',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1PatchExperimentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_pause_experiment(self, id, **kwargs):  # noqa: E501
        """Pause an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_pause_experiment(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1PauseExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_pause_experiment_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_pause_experiment_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def determined_pause_experiment_with_http_info(self, id, **kwargs):  # noqa: E501
        """Pause an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_pause_experiment_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1PauseExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_pause_experiment" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `determined_pause_experiment`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{id}/pause', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1PauseExperimentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_preview_hp_search(self, body, **kwargs):  # noqa: E501
        """Preview hyperparameter search.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_preview_hp_search(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1PreviewHPSearchRequest body: (required)
        :return: V1PreviewHPSearchResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_preview_hp_search_with_http_info(body, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_preview_hp_search_with_http_info(body, **kwargs)  # noqa: E501
            return data

    def determined_preview_hp_search_with_http_info(self, body, **kwargs):  # noqa: E501
        """Preview hyperparameter search.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_preview_hp_search_with_http_info(body, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param V1PreviewHPSearchRequest body: (required)
        :return: V1PreviewHPSearchResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['body']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_preview_hp_search" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'body' is set
        if ('body' not in params or
                params['body'] is None):
            raise ValueError("Missing the required parameter `body` when calling `determined_preview_hp_search`")  # noqa: E501

        collection_formats = {}

        path_params = {}

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        if 'body' in params:
            body_params = params['body']
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/preview-hp-search', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1PreviewHPSearchResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_trial_logs(self, trial_id, **kwargs):  # noqa: E501
        """Stream trial logs.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_trial_logs(trial_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int trial_id: The id of the trial. (required)
        :param int limit: Limit the number of trial logs. A value of 0 denotes no limit.
        :param bool follow: Continue following logs until the trial stops.
        :param list[str] agent_ids: Limit the trial logs to a subset of agents.
        :param list[str] container_ids: Limit the trial logs to a subset of containers.
        :param list[int] rank_ids: Limit the trial logs to a subset of ranks.
        :param list[str] levels: Limit the trial logs to a subset of agents.   - LOG_LEVEL_UNSPECIFIED: Unspecified log level.  - LOG_LEVEL_TRACE: A log level of TRACE.  - LOG_LEVEL_DEBUG: A log level of DEBUG.  - LOG_LEVEL_INFO: A log level of INFO.  - LOG_LEVEL_WARNING: A log level of WARNING.  - LOG_LEVEL_ERROR: A log level of ERROR.  - LOG_LEVEL_CRITICAL: A log level of CRITICAL.
        :param list[str] stdtypes: Limit the trial logs to a subset of output streams.
        :param list[str] sources: Limit the trial logs to a subset of sources.
        :param datetime timestamp_before: Limit the trial logs to ones with a timestamp before a given time.
        :param datetime timestamp_after: Limit the trial logs to ones with a timestamp after a given time.
        :param str order_by: Order logs in either ascending or descending order by timestamp.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :return: StreamResultOfV1TrialLogsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_trial_logs_with_http_info(trial_id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_trial_logs_with_http_info(trial_id, **kwargs)  # noqa: E501
            return data

    def determined_trial_logs_with_http_info(self, trial_id, **kwargs):  # noqa: E501
        """Stream trial logs.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_trial_logs_with_http_info(trial_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int trial_id: The id of the trial. (required)
        :param int limit: Limit the number of trial logs. A value of 0 denotes no limit.
        :param bool follow: Continue following logs until the trial stops.
        :param list[str] agent_ids: Limit the trial logs to a subset of agents.
        :param list[str] container_ids: Limit the trial logs to a subset of containers.
        :param list[int] rank_ids: Limit the trial logs to a subset of ranks.
        :param list[str] levels: Limit the trial logs to a subset of agents.   - LOG_LEVEL_UNSPECIFIED: Unspecified log level.  - LOG_LEVEL_TRACE: A log level of TRACE.  - LOG_LEVEL_DEBUG: A log level of DEBUG.  - LOG_LEVEL_INFO: A log level of INFO.  - LOG_LEVEL_WARNING: A log level of WARNING.  - LOG_LEVEL_ERROR: A log level of ERROR.  - LOG_LEVEL_CRITICAL: A log level of CRITICAL.
        :param list[str] stdtypes: Limit the trial logs to a subset of output streams.
        :param list[str] sources: Limit the trial logs to a subset of sources.
        :param datetime timestamp_before: Limit the trial logs to ones with a timestamp before a given time.
        :param datetime timestamp_after: Limit the trial logs to ones with a timestamp after a given time.
        :param str order_by: Order logs in either ascending or descending order by timestamp.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.
        :return: StreamResultOfV1TrialLogsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['trial_id', 'limit', 'follow', 'agent_ids', 'container_ids', 'rank_ids', 'levels', 'stdtypes', 'sources', 'timestamp_before', 'timestamp_after', 'order_by']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_trial_logs" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'trial_id' is set
        if ('trial_id' not in params or
                params['trial_id'] is None):
            raise ValueError("Missing the required parameter `trial_id` when calling `determined_trial_logs`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'trial_id' in params:
            path_params['trialId'] = params['trial_id']  # noqa: E501

        query_params = []
        if 'limit' in params:
            query_params.append(('limit', params['limit']))  # noqa: E501
        if 'follow' in params:
            query_params.append(('follow', params['follow']))  # noqa: E501
        if 'agent_ids' in params:
            query_params.append(('agentIds', params['agent_ids']))  # noqa: E501
            collection_formats['agentIds'] = 'multi'  # noqa: E501
        if 'container_ids' in params:
            query_params.append(('containerIds', params['container_ids']))  # noqa: E501
            collection_formats['containerIds'] = 'multi'  # noqa: E501
        if 'rank_ids' in params:
            query_params.append(('rankIds', params['rank_ids']))  # noqa: E501
            collection_formats['rankIds'] = 'multi'  # noqa: E501
        if 'levels' in params:
            query_params.append(('levels', params['levels']))  # noqa: E501
            collection_formats['levels'] = 'multi'  # noqa: E501
        if 'stdtypes' in params:
            query_params.append(('stdtypes', params['stdtypes']))  # noqa: E501
            collection_formats['stdtypes'] = 'multi'  # noqa: E501
        if 'sources' in params:
            query_params.append(('sources', params['sources']))  # noqa: E501
            collection_formats['sources'] = 'multi'  # noqa: E501
        if 'timestamp_before' in params:
            query_params.append(('timestampBefore', params['timestamp_before']))  # noqa: E501
        if 'timestamp_after' in params:
            query_params.append(('timestampAfter', params['timestamp_after']))  # noqa: E501
        if 'order_by' in params:
            query_params.append(('orderBy', params['order_by']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/trials/{trialId}/logs', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StreamResultOfV1TrialLogsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_trial_logs_fields(self, trial_id, **kwargs):  # noqa: E501
        """Stream trial log fields.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_trial_logs_fields(trial_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int trial_id: The ID of the trial. (required)
        :param bool follow: Continue following fields until the trial stops.
        :return: StreamResultOfV1TrialLogsFieldsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_trial_logs_fields_with_http_info(trial_id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_trial_logs_fields_with_http_info(trial_id, **kwargs)  # noqa: E501
            return data

    def determined_trial_logs_fields_with_http_info(self, trial_id, **kwargs):  # noqa: E501
        """Stream trial log fields.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_trial_logs_fields_with_http_info(trial_id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int trial_id: The ID of the trial. (required)
        :param bool follow: Continue following fields until the trial stops.
        :return: StreamResultOfV1TrialLogsFieldsResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['trial_id', 'follow']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_trial_logs_fields" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'trial_id' is set
        if ('trial_id' not in params or
                params['trial_id'] is None):
            raise ValueError("Missing the required parameter `trial_id` when calling `determined_trial_logs_fields`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'trial_id' in params:
            path_params['trialId'] = params['trial_id']  # noqa: E501

        query_params = []
        if 'follow' in params:
            query_params.append(('follow', params['follow']))  # noqa: E501

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/trials/{trialId}/logs/fields', 'GET',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='StreamResultOfV1TrialLogsFieldsResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

    def determined_unarchive_experiment(self, id, **kwargs):  # noqa: E501
        """Unarchive an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_unarchive_experiment(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1UnarchiveExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """
        kwargs['_return_http_data_only'] = True
        if kwargs.get('async_req'):
            return self.determined_unarchive_experiment_with_http_info(id, **kwargs)  # noqa: E501
        else:
            (data) = self.determined_unarchive_experiment_with_http_info(id, **kwargs)  # noqa: E501
            return data

    def determined_unarchive_experiment_with_http_info(self, id, **kwargs):  # noqa: E501
        """Unarchive an experiment.  # noqa: E501

        This method makes a synchronous HTTP request by default. To make an
        asynchronous HTTP request, please pass async_req=True
        >>> thread = api.determined_unarchive_experiment_with_http_info(id, async_req=True)
        >>> result = thread.get()

        :param async_req bool
        :param int id: The experiment id. (required)
        :return: V1UnarchiveExperimentResponse
                 If the method is called asynchronously,
                 returns the request thread.
        """

        all_params = ['id']  # noqa: E501
        all_params.append('async_req')
        all_params.append('_return_http_data_only')
        all_params.append('_preload_content')
        all_params.append('_request_timeout')

        params = locals()
        for key, val in six.iteritems(params['kwargs']):
            if key not in all_params:
                raise TypeError(
                    "Got an unexpected keyword argument '%s'"
                    " to method determined_unarchive_experiment" % key
                )
            params[key] = val
        del params['kwargs']
        # verify the required parameter 'id' is set
        if ('id' not in params or
                params['id'] is None):
            raise ValueError("Missing the required parameter `id` when calling `determined_unarchive_experiment`")  # noqa: E501

        collection_formats = {}

        path_params = {}
        if 'id' in params:
            path_params['id'] = params['id']  # noqa: E501

        query_params = []

        header_params = {}

        form_params = []
        local_var_files = {}

        body_params = None
        # HTTP header `Accept`
        header_params['Accept'] = self.api_client.select_header_accept(
            ['application/json'])  # noqa: E501

        # HTTP header `Content-Type`
        header_params['Content-Type'] = self.api_client.select_header_content_type(  # noqa: E501
            ['application/json'])  # noqa: E501

        # Authentication setting
        auth_settings = ['BearerToken']  # noqa: E501

        return self.api_client.call_api(
            '/api/v1/experiments/{id}/unarchive', 'POST',
            path_params,
            query_params,
            header_params,
            body=body_params,
            post_params=form_params,
            files=local_var_files,
            response_type='V1UnarchiveExperimentResponse',  # noqa: E501
            auth_settings=auth_settings,
            async_req=params.get('async_req'),
            _return_http_data_only=params.get('_return_http_data_only'),
            _preload_content=params.get('_preload_content', True),
            _request_timeout=params.get('_request_timeout'),
            collection_formats=collection_formats)

# coding: utf-8 Determined API (Beta)      Determined helps deep learning teams train models more quickly, easily share GPU resources, and effectively collaborate. Determined allows deep learning engineers to focus on building and training models at scale, without needing to worry about DevOps or writing custom code for common tasks like fault tolerance or experiment tracking.  You can think of Determined as a platform that bridges the gap between tools like TensorFlow and PyTorch --- which work great for a single researcher with a single GPU --- to the challenges that arise when doing deep learning at scale, as teams, clusters, and data sets all increase in size.  # noqa: E501      OpenAPI spec version: 0.1     Contact: <EMAIL>     Generated by: https://github.com/swagger-api/swagger-codegen.git # noqa: F401 # python 2 and python 3 compatibility library NOTE: This class is auto generated by the swagger code generator program.      Do not edit the class manually.     Ref: https://github.com/swagger-api/swagger-codegen # noqa: E501 Activate an experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_activate_experiment(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int id: The experiment id. (required)         :return: V1ActivateExperimentResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Activate an experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_activate_experiment_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int id: The experiment id. (required)         :return: V1ActivateExperimentResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Archive an experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_archive_experiment(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int id: The experiment id. (required)         :return: V1ArchiveExperimentResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Archive an experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_archive_experiment_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int id: The experiment id. (required)         :return: V1ArchiveExperimentResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Cancel an experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_cancel_experiment(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int id: The experiment id. (required)         :return: V1CancelExperimentResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Cancel an experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_cancel_experiment_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int id: The experiment id. (required)         :return: V1CancelExperimentResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Delete the requested experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_delete_experiment(experiment_id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int experiment_id: The ID of the experiment. (required)         :return: V1DeleteExperimentResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Delete the requested experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_delete_experiment_with_http_info(experiment_id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int experiment_id: The ID of the experiment. (required)         :return: V1DeleteExperimentResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'experiment_id' is set # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get the requested experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_get_experiment(experiment_id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int experiment_id: The id of the experiment. (required)         :return: V1GetExperimentResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get the requested experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_get_experiment_with_http_info(experiment_id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int experiment_id: The id of the experiment. (required)         :return: V1GetExperimentResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'experiment_id' is set # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get a list of checkpoints for an experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_get_experiment_checkpoints(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int id: The experiment id. (required)         :param str sort_by: Sort checkpoints by the given field.   - SORT_BY_UNSPECIFIED: Returns checkpoints in an unsorted list.  - SORT_BY_UUID: Returns checkpoints sorted by UUID.  - SORT_BY_TRIAL_ID: Returns checkpoints sorted by trial id.  - SORT_BY_BATCH_NUMBER: Returns checkpoints sorted by batch number.  - SORT_BY_START_TIME: Returns checkpoints sorted by start time.  - SORT_BY_END_TIME: Returns checkpoints sorted by end time.  - SORT_BY_VALIDATION_STATE: Returns checkpoints sorted by validation state.  - SORT_BY_STATE: Returns checkpoints sorted by state.  - SORT_BY_SEARCHER_METRIC: Returns checkpoints sorted by the experiment's `searcher.metric` configuration setting.         :param str order_by: Order checkpoints in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.         :param int offset: Skip the number of checkpoints before returning results. Negative values denote number of checkpoints to skip from the end before returning results.         :param int limit: Limit the number of checkpoints. A value of 0 denotes no limit.         :param list[str] validation_states: Limit the checkpoints to those that match the validation states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.         :param list[str] states: Limit the checkpoints to those that match the states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.         :return: V1GetExperimentCheckpointsResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get a list of checkpoints for an experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_get_experiment_checkpoints_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int id: The experiment id. (required)         :param str sort_by: Sort checkpoints by the given field.   - SORT_BY_UNSPECIFIED: Returns checkpoints in an unsorted list.  - SORT_BY_UUID: Returns checkpoints sorted by UUID.  - SORT_BY_TRIAL_ID: Returns checkpoints sorted by trial id.  - SORT_BY_BATCH_NUMBER: Returns checkpoints sorted by batch number.  - SORT_BY_START_TIME: Returns checkpoints sorted by start time.  - SORT_BY_END_TIME: Returns checkpoints sorted by end time.  - SORT_BY_VALIDATION_STATE: Returns checkpoints sorted by validation state.  - SORT_BY_STATE: Returns checkpoints sorted by state.  - SORT_BY_SEARCHER_METRIC: Returns checkpoints sorted by the experiment's `searcher.metric` configuration setting.         :param str order_by: Order checkpoints in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.         :param int offset: Skip the number of checkpoints before returning results. Negative values denote number of checkpoints to skip from the end before returning results.         :param int limit: Limit the number of checkpoints. A value of 0 denotes no limit.         :param list[str] validation_states: Limit the checkpoints to those that match the validation states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.         :param list[str] states: Limit the checkpoints to those that match the states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.         :return: V1GetExperimentCheckpointsResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get a list of unique experiment labels (sorted by popularity).  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_get_experiment_labels(async_req=True)         >>> result = thread.get()          :param async_req bool         :return: V1GetExperimentLabelsResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get a list of unique experiment labels (sorted by popularity).  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_get_experiment_labels_with_http_info(async_req=True)         >>> result = thread.get()          :param async_req bool         :return: V1GetExperimentLabelsResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get the list of trials for an experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_get_experiment_trials(experiment_id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int experiment_id: Limit trials to those that are owned by the specified experiments. (required)         :param str sort_by: Sort trials by the given field.   - SORT_BY_UNSPECIFIED: Returns trials in an unsorted list.  - SORT_BY_ID: Returns trials sorted by id.  - SORT_BY_START_TIME: Return trials sorted by start time.  - SORT_BY_END_TIME: Return trials sorted by end time. Trials without end times are returned after trials that are.  - SORT_BY_STATE: Return trials sorted by state.  - SORT_BY_BEST_VALIDATION_METRIC: Return the trials sorted by the best metric so far, where the metric is specified by `searcher.metric` in the experiment configuration.  - SORT_BY_LATEST_VALIDATION_METRIC: Return the trials sorted by the latest metric so far, where the metric is specified by `searcher.metric` in the experiment configuration.  - SORT_BY_BATCHES_PROCESSED: Return the trials sorted by the number of batches completed.  - SORT_BY_DURATION: Return the trials sorted by the total duration.         :param str order_by: Order trials in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.         :param int offset: Skip the number of trials before returning results. Negative values denote number of trials to skip from the end before returning results.         :param int limit: Limit the number of trials. A value of 0 denotes no limit.         :param list[str] states: Limit trials to those that match the provided state.   - STATE_UNSPECIFIED: The state of the experiment is unknown.  - STATE_ACTIVE: The experiment is in an active state.  - STATE_PAUSED: The experiment is in a paused state  - STATE_STOPPING_COMPLETED: The experiment is completed and is shutting down.  - STATE_STOPPING_CANCELED: The experiment is canceled and is shutting down.  - STATE_STOPPING_ERROR: The experiment is errored and is shutting down.  - STATE_COMPLETED: The experiment is completed and is shut down.  - STATE_CANCELED: The experiment is canceled and is shut down.  - STATE_ERROR: The experiment is errored and is shut down.  - STATE_DELETED: The experiment has been deleted.         :return: V1GetExperimentTrialsResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get the list of trials for an experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_get_experiment_trials_with_http_info(experiment_id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int experiment_id: Limit trials to those that are owned by the specified experiments. (required)         :param str sort_by: Sort trials by the given field.   - SORT_BY_UNSPECIFIED: Returns trials in an unsorted list.  - SORT_BY_ID: Returns trials sorted by id.  - SORT_BY_START_TIME: Return trials sorted by start time.  - SORT_BY_END_TIME: Return trials sorted by end time. Trials without end times are returned after trials that are.  - SORT_BY_STATE: Return trials sorted by state.  - SORT_BY_BEST_VALIDATION_METRIC: Return the trials sorted by the best metric so far, where the metric is specified by `searcher.metric` in the experiment configuration.  - SORT_BY_LATEST_VALIDATION_METRIC: Return the trials sorted by the latest metric so far, where the metric is specified by `searcher.metric` in the experiment configuration.  - SORT_BY_BATCHES_PROCESSED: Return the trials sorted by the number of batches completed.  - SORT_BY_DURATION: Return the trials sorted by the total duration.         :param str order_by: Order trials in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.         :param int offset: Skip the number of trials before returning results. Negative values denote number of trials to skip from the end before returning results.         :param int limit: Limit the number of trials. A value of 0 denotes no limit.         :param list[str] states: Limit trials to those that match the provided state.   - STATE_UNSPECIFIED: The state of the experiment is unknown.  - STATE_ACTIVE: The experiment is in an active state.  - STATE_PAUSED: The experiment is in a paused state  - STATE_STOPPING_COMPLETED: The experiment is completed and is shutting down.  - STATE_STOPPING_CANCELED: The experiment is canceled and is shutting down.  - STATE_STOPPING_ERROR: The experiment is errored and is shutting down.  - STATE_COMPLETED: The experiment is completed and is shut down.  - STATE_CANCELED: The experiment is canceled and is shut down.  - STATE_ERROR: The experiment is errored and is shut down.  - STATE_DELETED: The experiment has been deleted.         :return: V1GetExperimentTrialsResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'experiment_id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get the validation history for an experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_get_experiment_validation_history(experiment_id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int experiment_id: The id of the experiment. (required)         :return: V1GetExperimentValidationHistoryResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get the validation history for an experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_get_experiment_validation_history_with_http_info(experiment_id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int experiment_id: The id of the experiment. (required)         :return: V1GetExperimentValidationHistoryResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'experiment_id' is set # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get a list of experiments.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_get_experiments(async_req=True)         >>> result = thread.get()          :param async_req bool         :param str sort_by: Sort experiments by the given field.   - SORT_BY_UNSPECIFIED: Returns experiments in an unsorted list.  - SORT_BY_ID: Returns experiments sorted by id.  - SORT_BY_DESCRIPTION: Returns experiments sorted by description.  - SORT_BY_START_TIME: Return experiments sorted by start time.  - SORT_BY_END_TIME: Return experiments sorted by end time. Experiments without end_time are returned after the ones with end_time.  - SORT_BY_STATE: Return experiments sorted by state.  - SORT_BY_NUM_TRIALS: Return experiments sorted by number of trials.  - SORT_BY_PROGRESS: Return experiments sorted by progress.  - SORT_BY_USER: Return experiments sorted by user.         :param str order_by: Order experiments in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.         :param int offset: Skip the number of experiments before returning results. Negative values denote number of experiments to skip from the end before returning results.         :param int limit: Limit the number of experiments. 0 or Unspecified - returns a default of 100. -1               - returns everything. -2               - returns pagination info but no experiments.         :param str description: Limit experiments to those that match the description.         :param list[str] labels: Limit experiments to those that match the provided labels.         :param bool archived: Limit experiments to those that are archived.         :param list[str] states: Limit experiments to those that match the provided state.   - STATE_UNSPECIFIED: The state of the experiment is unknown.  - STATE_ACTIVE: The experiment is in an active state.  - STATE_PAUSED: The experiment is in a paused state  - STATE_STOPPING_COMPLETED: The experiment is completed and is shutting down.  - STATE_STOPPING_CANCELED: The experiment is canceled and is shutting down.  - STATE_STOPPING_ERROR: The experiment is errored and is shutting down.  - STATE_COMPLETED: The experiment is completed and is shut down.  - STATE_CANCELED: The experiment is canceled and is shut down.  - STATE_ERROR: The experiment is errored and is shut down.  - STATE_DELETED: The experiment has been deleted.         :param list[str] users: Limit experiments to those that are owned by the specified users.         :return: V1GetExperimentsResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get a list of experiments.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_get_experiments_with_http_info(async_req=True)         >>> result = thread.get()          :param async_req bool         :param str sort_by: Sort experiments by the given field.   - SORT_BY_UNSPECIFIED: Returns experiments in an unsorted list.  - SORT_BY_ID: Returns experiments sorted by id.  - SORT_BY_DESCRIPTION: Returns experiments sorted by description.  - SORT_BY_START_TIME: Return experiments sorted by start time.  - SORT_BY_END_TIME: Return experiments sorted by end time. Experiments without end_time are returned after the ones with end_time.  - SORT_BY_STATE: Return experiments sorted by state.  - SORT_BY_NUM_TRIALS: Return experiments sorted by number of trials.  - SORT_BY_PROGRESS: Return experiments sorted by progress.  - SORT_BY_USER: Return experiments sorted by user.         :param str order_by: Order experiments in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.         :param int offset: Skip the number of experiments before returning results. Negative values denote number of experiments to skip from the end before returning results.         :param int limit: Limit the number of experiments. 0 or Unspecified - returns a default of 100. -1               - returns everything. -2               - returns pagination info but no experiments.         :param str description: Limit experiments to those that match the description.         :param list[str] labels: Limit experiments to those that match the provided labels.         :param bool archived: Limit experiments to those that are archived.         :param list[str] states: Limit experiments to those that match the provided state.   - STATE_UNSPECIFIED: The state of the experiment is unknown.  - STATE_ACTIVE: The experiment is in an active state.  - STATE_PAUSED: The experiment is in a paused state  - STATE_STOPPING_COMPLETED: The experiment is completed and is shutting down.  - STATE_STOPPING_CANCELED: The experiment is canceled and is shutting down.  - STATE_STOPPING_ERROR: The experiment is errored and is shutting down.  - STATE_COMPLETED: The experiment is completed and is shut down.  - STATE_CANCELED: The experiment is canceled and is shut down.  - STATE_ERROR: The experiment is errored and is shut down.  - STATE_DELETED: The experiment has been deleted.         :param list[str] users: Limit experiments to those that are owned by the specified users.         :return: V1GetExperimentsResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get a single trial.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_get_trial(trial_id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int trial_id: The requested trial's id. (required)         :return: V1GetTrialResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get a single trial.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_get_trial_with_http_info(trial_id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int trial_id: The requested trial's id. (required)         :return: V1GetTrialResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'trial_id' is set # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Get a list of checkpoints for a trial.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_get_trial_checkpoints(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int id: The trial id. (required)         :param str sort_by: Sort checkpoints by the given field.   - SORT_BY_UNSPECIFIED: Returns checkpoints in an unsorted list.  - SORT_BY_UUID: Returns checkpoints sorted by UUID.  - SORT_BY_BATCH_NUMBER: Returns checkpoints sorted by batch number.  - SORT_BY_START_TIME: Returns checkpoints sorted by start time.  - SORT_BY_END_TIME: Returns checkpoints sorted by end time.  - SORT_BY_VALIDATION_STATE: Returns checkpoints sorted by validation state.  - SORT_BY_STATE: Returns checkpoints sorted by state.         :param str order_by: Order checkpoints in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.         :param int offset: Skip the number of checkpoints before returning results. Negative values denote number of checkpoints to skip from the end before returning results.         :param int limit: Limit the number of checkpoints. A value of 0 denotes no limit.         :param list[str] validation_states: Limit the checkpoints to those that match the validation states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.         :param list[str] states: Limit the checkpoints to those that match the states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.         :return: V1GetTrialCheckpointsResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Get a list of checkpoints for a trial.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_get_trial_checkpoints_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int id: The trial id. (required)         :param str sort_by: Sort checkpoints by the given field.   - SORT_BY_UNSPECIFIED: Returns checkpoints in an unsorted list.  - SORT_BY_UUID: Returns checkpoints sorted by UUID.  - SORT_BY_BATCH_NUMBER: Returns checkpoints sorted by batch number.  - SORT_BY_START_TIME: Returns checkpoints sorted by start time.  - SORT_BY_END_TIME: Returns checkpoints sorted by end time.  - SORT_BY_VALIDATION_STATE: Returns checkpoints sorted by validation state.  - SORT_BY_STATE: Returns checkpoints sorted by state.         :param str order_by: Order checkpoints in either ascending or descending order.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.         :param int offset: Skip the number of checkpoints before returning results. Negative values denote number of checkpoints to skip from the end before returning results.         :param int limit: Limit the number of checkpoints. A value of 0 denotes no limit.         :param list[str] validation_states: Limit the checkpoints to those that match the validation states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.         :param list[str] states: Limit the checkpoints to those that match the states.   - STATE_UNSPECIFIED: The state of the checkpoint is unknown.  - STATE_ACTIVE: The checkpoint is in an active state.  - STATE_COMPLETED: The checkpoint is persisted to checkpoint storage.  - STATE_ERROR: The checkpoint errored.  - STATE_DELETED: The checkpoint has been deleted.         :return: V1GetTrialCheckpointsResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Kill an experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_kill_experiment(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int id: The experiment id. (required)         :return: V1KillExperimentResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Kill an experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_kill_experiment_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int id: The experiment id. (required)         :return: V1KillExperimentResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Kill a trial.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_kill_trial(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int id: The trial id (required)         :return: V1KillTrialResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Kill a trial.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_kill_trial_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int id: The trial id (required)         :return: V1KillTrialResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Patch an experiment's fields.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_patch_experiment(experiment_id, body, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int experiment_id: The id of the experiment. (required)         :param V1Experiment body: Patched experiment attributes. (required)         :return: V1PatchExperimentResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Patch an experiment's fields.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_patch_experiment_with_http_info(experiment_id, body, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int experiment_id: The id of the experiment. (required)         :param V1Experiment body: Patched experiment attributes. (required)         :return: V1PatchExperimentResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'experiment_id' is set # noqa: E501 # verify the required parameter 'body' is set # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Pause an experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_pause_experiment(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int id: The experiment id. (required)         :return: V1PauseExperimentResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Pause an experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_pause_experiment_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int id: The experiment id. (required)         :return: V1PauseExperimentResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Preview hyperparameter search.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_preview_hp_search(body, async_req=True)         >>> result = thread.get()          :param async_req bool         :param V1PreviewHPSearchRequest body: (required)         :return: V1PreviewHPSearchResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Preview hyperparameter search.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_preview_hp_search_with_http_info(body, async_req=True)         >>> result = thread.get()          :param async_req bool         :param V1PreviewHPSearchRequest body: (required)         :return: V1PreviewHPSearchResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'body' is set # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Stream trial logs.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_trial_logs(trial_id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int trial_id: The id of the trial. (required)         :param int limit: Limit the number of trial logs. A value of 0 denotes no limit.         :param bool follow: Continue following logs until the trial stops.         :param list[str] agent_ids: Limit the trial logs to a subset of agents.         :param list[str] container_ids: Limit the trial logs to a subset of containers.         :param list[int] rank_ids: Limit the trial logs to a subset of ranks.         :param list[str] levels: Limit the trial logs to a subset of agents.   - LOG_LEVEL_UNSPECIFIED: Unspecified log level.  - LOG_LEVEL_TRACE: A log level of TRACE.  - LOG_LEVEL_DEBUG: A log level of DEBUG.  - LOG_LEVEL_INFO: A log level of INFO.  - LOG_LEVEL_WARNING: A log level of WARNING.  - LOG_LEVEL_ERROR: A log level of ERROR.  - LOG_LEVEL_CRITICAL: A log level of CRITICAL.         :param list[str] stdtypes: Limit the trial logs to a subset of output streams.         :param list[str] sources: Limit the trial logs to a subset of sources.         :param datetime timestamp_before: Limit the trial logs to ones with a timestamp before a given time.         :param datetime timestamp_after: Limit the trial logs to ones with a timestamp after a given time.         :param str order_by: Order logs in either ascending or descending order by timestamp.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.         :return: StreamResultOfV1TrialLogsResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Stream trial logs.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_trial_logs_with_http_info(trial_id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int trial_id: The id of the trial. (required)         :param int limit: Limit the number of trial logs. A value of 0 denotes no limit.         :param bool follow: Continue following logs until the trial stops.         :param list[str] agent_ids: Limit the trial logs to a subset of agents.         :param list[str] container_ids: Limit the trial logs to a subset of containers.         :param list[int] rank_ids: Limit the trial logs to a subset of ranks.         :param list[str] levels: Limit the trial logs to a subset of agents.   - LOG_LEVEL_UNSPECIFIED: Unspecified log level.  - LOG_LEVEL_TRACE: A log level of TRACE.  - LOG_LEVEL_DEBUG: A log level of DEBUG.  - LOG_LEVEL_INFO: A log level of INFO.  - LOG_LEVEL_WARNING: A log level of WARNING.  - LOG_LEVEL_ERROR: A log level of ERROR.  - LOG_LEVEL_CRITICAL: A log level of CRITICAL.         :param list[str] stdtypes: Limit the trial logs to a subset of output streams.         :param list[str] sources: Limit the trial logs to a subset of sources.         :param datetime timestamp_before: Limit the trial logs to ones with a timestamp before a given time.         :param datetime timestamp_after: Limit the trial logs to ones with a timestamp after a given time.         :param str order_by: Order logs in either ascending or descending order by timestamp.   - ORDER_BY_UNSPECIFIED: Returns records in no specific order.  - ORDER_BY_ASC: Returns records in ascending order.  - ORDER_BY_DESC: Returns records in descending order.         :return: StreamResultOfV1TrialLogsResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'trial_id' is set # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Stream trial log fields.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_trial_logs_fields(trial_id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int trial_id: The ID of the trial. (required)         :param bool follow: Continue following fields until the trial stops.         :return: StreamResultOfV1TrialLogsFieldsResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Stream trial log fields.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_trial_logs_fields_with_http_info(trial_id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int trial_id: The ID of the trial. (required)         :param bool follow: Continue following fields until the trial stops.         :return: StreamResultOfV1TrialLogsFieldsResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'trial_id' is set # noqa: E501 # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501 # noqa: E501 Unarchive an experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_unarchive_experiment(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int id: The experiment id. (required)         :return: V1UnarchiveExperimentResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # noqa: E501 # noqa: E501 Unarchive an experiment.  # noqa: E501          This method makes a synchronous HTTP request by default. To make an         asynchronous HTTP request, please pass async_req=True         >>> thread = api.determined_unarchive_experiment_with_http_info(id, async_req=True)         >>> result = thread.get()          :param async_req bool         :param int id: The experiment id. (required)         :return: V1UnarchiveExperimentResponse                  If the method is called asynchronously,                  returns the request thread. # noqa: E501 # verify the required parameter 'id' is set # noqa: E501 # noqa: E501 # HTTP header `Accept` # noqa: E501 # HTTP header `Content-Type` # noqa: E501 # noqa: E501 # Authentication setting # noqa: E501 # noqa: E501