Пример #1
0
 def __init__(self, host):
     """
     Submarine experiment client constructor
     :param host: An HTTP URI like http://submarine-server:8080.
     """
     # TODO(pingsutw): support authentication for talking to the submarine server
     self.host = host
     configuration = Configuration()
     configuration.host = host + '/api'
     api_client = ApiClient(configuration=configuration)
     self.experiment_api = ExperimentApi(api_client=api_client)
Пример #2
0
    def __init__(self,
                 meta=None,
                 environment=None,
                 spec=None,
                 code=None,
                 local_vars_configuration=None):  # noqa: E501
        """ExperimentSpec - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._meta = None
        self._environment = None
        self._spec = None
        self._code = None
        self.discriminator = None

        if meta is not None:
            self.meta = meta
        if environment is not None:
            self.environment = environment
        if spec is not None:
            self.spec = spec
        if code is not None:
            self.code = code
Пример #3
0
    def __init__(self,
                 name=None,
                 namespace=None,
                 framework=None,
                 cmd=None,
                 env_vars=None,
                 local_vars_configuration=None):  # noqa: E501
        """ExperimentMeta - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._name = None
        self._namespace = None
        self._framework = None
        self._cmd = None
        self._env_vars = None
        self.discriminator = None

        if name is not None:
            self.name = name
        if namespace is not None:
            self.namespace = namespace
        if framework is not None:
            self.framework = framework
        if cmd is not None:
            self.cmd = cmd
        if env_vars is not None:
            self.env_vars = env_vars
Пример #4
0
    def __init__(self,
                 name=None,
                 docker_image=None,
                 kernel_spec=None,
                 description=None,
                 image=None,
                 local_vars_configuration=None):  # noqa: E501
        """EnvironmentSpec - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._name = None
        self._docker_image = None
        self._kernel_spec = None
        self._description = None
        self._image = None
        self.discriminator = None

        if name is not None:
            self.name = name
        if docker_image is not None:
            self.docker_image = docker_image
        if kernel_spec is not None:
            self.kernel_spec = kernel_spec
        if description is not None:
            self.description = description
        if image is not None:
            self.image = image
Пример #5
0
    def __init__(self,
                 code=None,
                 success=None,
                 result=None,
                 attributes=None,
                 local_vars_configuration=None):  # noqa: E501
        """JsonResponse - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._code = None
        self._success = None
        self._result = None
        self._attributes = None
        self.discriminator = None

        if code is not None:
            self.code = code
        if success is not None:
            self.success = success
        if result is not None:
            self.result = result
        if attributes is not None:
            self.attributes = attributes
Пример #6
0
    def __init__(self, replicas=None, resources=None, name=None, image=None, cmd=None, env_vars=None, cpu=None, gpu=None, memory=None, local_vars_configuration=None):  # noqa: E501
        """ExperimentTaskSpec - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._replicas = None
        self._resources = None
        self._name = None
        self._image = None
        self._cmd = None
        self._env_vars = None
        self._cpu = None
        self._gpu = None
        self._memory = None
        self.discriminator = None

        if replicas is not None:
            self.replicas = replicas
        if resources is not None:
            self.resources = resources
        if name is not None:
            self.name = name
        if image is not None:
            self.image = image
        if cmd is not None:
            self.cmd = cmd
        if env_vars is not None:
            self.env_vars = env_vars
        if cpu is not None:
            self.cpu = cpu
        if gpu is not None:
            self.gpu = gpu
        if memory is not None:
            self.memory = memory
Пример #7
0
    def __init__(self,
                 image=None,
                 local_vars_configuration=None):  # noqa: E501
        """Environment - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._image = None
        self.discriminator = None

        if image is not None:
            self.image = image
Пример #8
0
    def __init__(self,
                 sync_mode=None,
                 url=None,
                 local_vars_configuration=None):  # noqa: E501
        """CodeSpec - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._sync_mode = None
        self._url = None
        self.discriminator = None

        if sync_mode is not None:
            self.sync_mode = sync_mode
        if url is not None:
            self.url = url
Пример #9
0
    def __init__(self,
                 configuration=None,
                 header_name=None,
                 header_value=None,
                 cookie=None,
                 pool_threads=1):
        if configuration is None:
            configuration = Configuration.get_default_copy()
        self.configuration = configuration
        self.pool_threads = pool_threads

        self.rest_client = rest.RESTClientObject(configuration)
        self.default_headers = {}
        if header_name is not None:
            self.default_headers[header_name] = header_value
        self.cookie = cookie
        # Set default User-Agent.
        self.user_agent = 'OpenAPI-Generator/0.5.0-SNAPSHOT/python'
        self.client_side_validation = configuration.client_side_validation
Пример #10
0
    def __init__(self,
                 name=None,
                 channels=None,
                 dependencies=None,
                 local_vars_configuration=None):  # noqa: E501
        """KernelSpec - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._name = None
        self._channels = None
        self._dependencies = None
        self.discriminator = None

        if name is not None:
            self.name = name
        if channels is not None:
            self.channels = channels
        if dependencies is not None:
            self.dependencies = dependencies