File: tensor_flow_settings.py

package info (click to toggle)
python-azure 20181112%2Bgit-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 407,300 kB
  • sloc: python: 717,190; makefile: 201; sh: 76
file content (70 lines) | stat: -rw-r--r-- 3,615 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class TensorFlowSettings(Model):
    """Specifies the settings for TensorFlow job.

    All required parameters must be populated in order to send to Azure.

    :param python_script_file_path: Required. The path and file name of the
     python script to execute the job.
    :type python_script_file_path: str
    :param python_interpreter_path: The path to python interpreter.
    :type python_interpreter_path: str
    :param master_command_line_args: Specifies the command line arguments for
     the master task.
    :type master_command_line_args: str
    :param worker_command_line_args: Specifies the command line arguments for
     the worker task. This property is optional for single machine training.
    :type worker_command_line_args: str
    :param parameter_server_command_line_args: Specifies the command line
     arguments for the parameter server task. This property is optional for
     single machine training.
    :type parameter_server_command_line_args: str
    :param worker_count: The number of worker tasks. If specified, the value
     must be less than or equal to (nodeCount * numberOfGPUs per VM). If not
     specified, the default value is equal to nodeCount. This property can be
     specified only for distributed TensorFlow training
    :type worker_count: int
    :param parameter_server_count: The number of parmeter server tasks. If
     specified, the value must be less than or equal to nodeCount. If not
     specified, the default value is equal to 1 for distributed TensorFlow
     training (This property is not applicable for single machine training).
     This property can be specified only for distributed TensorFlow training.
    :type parameter_server_count: int
    """

    _validation = {
        'python_script_file_path': {'required': True},
    }

    _attribute_map = {
        'python_script_file_path': {'key': 'pythonScriptFilePath', 'type': 'str'},
        'python_interpreter_path': {'key': 'pythonInterpreterPath', 'type': 'str'},
        'master_command_line_args': {'key': 'masterCommandLineArgs', 'type': 'str'},
        'worker_command_line_args': {'key': 'workerCommandLineArgs', 'type': 'str'},
        'parameter_server_command_line_args': {'key': 'parameterServerCommandLineArgs', 'type': 'str'},
        'worker_count': {'key': 'workerCount', 'type': 'int'},
        'parameter_server_count': {'key': 'parameterServerCount', 'type': 'int'},
    }

    def __init__(self, **kwargs):
        super(TensorFlowSettings, self).__init__(**kwargs)
        self.python_script_file_path = kwargs.get('python_script_file_path', None)
        self.python_interpreter_path = kwargs.get('python_interpreter_path', None)
        self.master_command_line_args = kwargs.get('master_command_line_args', None)
        self.worker_command_line_args = kwargs.get('worker_command_line_args', None)
        self.parameter_server_command_line_args = kwargs.get('parameter_server_command_line_args', None)
        self.worker_count = kwargs.get('worker_count', None)
        self.parameter_server_count = kwargs.get('parameter_server_count', None)