anyscale 0.24.88__py3-none-any.whl → 0.25.5__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. anyscale/__init__.py +56 -0
  2. anyscale/_private/anyscale_client/anyscale_client.py +179 -28
  3. anyscale/_private/anyscale_client/common.py +109 -2
  4. anyscale/_private/anyscale_client/fake_anyscale_client.py +239 -1
  5. anyscale/_private/docgen/README.md +1 -1
  6. anyscale/_private/docgen/__main__.py +71 -21
  7. anyscale/_private/docgen/api.md +13 -20
  8. anyscale/_private/docgen/generator.py +3 -2
  9. anyscale/_private/docgen/models.md +4 -49
  10. anyscale/_private/workload/workload_config.py +21 -7
  11. anyscale/aggregated_instance_usage/__init__.py +1 -1
  12. anyscale/aggregated_instance_usage/commands.py +2 -4
  13. anyscale/aggregated_instance_usage/models.py +8 -8
  14. anyscale/client/README.md +25 -22
  15. anyscale/client/openapi_client/__init__.py +16 -14
  16. anyscale/client/openapi_client/api/default_api.py +1139 -959
  17. anyscale/client/openapi_client/models/__init__.py +16 -14
  18. anyscale/client/openapi_client/models/baseimagesenum.py +43 -1
  19. anyscale/client/openapi_client/models/{session_event_types.py → cloud_deployment_config.py} +35 -24
  20. anyscale/client/openapi_client/models/{platformfinetuningjob_response.py → clouddeploymentconfig_response.py} +11 -11
  21. anyscale/client/openapi_client/models/{log_level_types.py → cluster_event_source.py} +12 -7
  22. anyscale/client/openapi_client/models/{company_size.py → cluster_size.py} +10 -10
  23. anyscale/client/openapi_client/models/cluster_status_details.py +2 -1
  24. anyscale/client/openapi_client/models/{sessionevent_list_response.py → clusterevent_list_response.py} +15 -15
  25. anyscale/client/openapi_client/models/create_experimental_workspace.py +29 -1
  26. anyscale/client/openapi_client/models/create_notification_channel_record.py +29 -3
  27. anyscale/client/openapi_client/models/decorated_interactive_session.py +1 -57
  28. anyscale/client/openapi_client/models/decorated_job.py +1 -57
  29. anyscale/client/openapi_client/models/decorated_job_submission.py +1 -29
  30. anyscale/client/openapi_client/models/decorated_production_job.py +1 -29
  31. anyscale/client/openapi_client/models/decorated_session.py +1 -57
  32. anyscale/client/openapi_client/models/decorated_unified_job.py +1 -30
  33. anyscale/client/openapi_client/models/{resubmit_ft_job_request.py → describe_machine_pool_request.py} +21 -20
  34. anyscale/client/openapi_client/models/describe_machine_pool_response.py +123 -0
  35. anyscale/client/openapi_client/models/describemachinepoolresponse_response.py +121 -0
  36. anyscale/client/openapi_client/models/ha_jobs_sort_field.py +1 -2
  37. anyscale/client/openapi_client/models/internal_production_job.py +1 -29
  38. anyscale/client/openapi_client/models/jobs_sort_field.py +1 -2
  39. anyscale/client/openapi_client/models/machine_allocation_state.py +3 -1
  40. anyscale/client/openapi_client/models/machine_state_info.py +326 -0
  41. anyscale/client/openapi_client/models/{fine_tuning_job_status.py → notification_channel_slack_config.py} +34 -16
  42. anyscale/client/openapi_client/models/organization_marketing_questions.py +80 -54
  43. anyscale/client/openapi_client/models/request_state_info.py +210 -0
  44. anyscale/client/openapi_client/models/{platformfinetuningjob_list_response.py → scheduler_info.py} +43 -38
  45. anyscale/client/openapi_client/models/serve_deployment_fast_api_docs_status.py +123 -0
  46. anyscale/client/openapi_client/models/serve_deployment_state.py +2 -1
  47. anyscale/client/openapi_client/models/servedeploymentfastapidocsstatus_response.py +121 -0
  48. anyscale/client/openapi_client/models/sessions_sort_field.py +1 -2
  49. anyscale/client/openapi_client/models/supportedbaseimagesenum.py +43 -1
  50. anyscale/client/openapi_client/models/unified_job_sort_field.py +1 -2
  51. anyscale/client/openapi_client/models/update_cloud_collaborator.py +121 -0
  52. anyscale/client/openapi_client/models/usage_by_cluster.py +28 -1
  53. anyscale/client/openapi_client/models/usage_by_user.py +30 -3
  54. anyscale/client/openapi_client/models/workload_info.py +210 -0
  55. anyscale/cloud/__init__.py +83 -0
  56. anyscale/cloud/_private/cloud_sdk.py +25 -0
  57. anyscale/cloud/commands.py +45 -0
  58. anyscale/cloud/models.py +91 -0
  59. anyscale/cluster_compute.py +1 -1
  60. anyscale/commands/aggregated_instance_usage_commands.py +4 -4
  61. anyscale/commands/cloud_commands.py +87 -14
  62. anyscale/commands/command_examples.py +65 -0
  63. anyscale/commands/job_commands.py +15 -3
  64. anyscale/commands/machine_pool_commands.py +113 -1
  65. anyscale/commands/organization_invitation_commands.py +98 -0
  66. anyscale/commands/project_commands.py +52 -2
  67. anyscale/commands/resource_quota_commands.py +98 -11
  68. anyscale/commands/service_account_commands.py +65 -8
  69. anyscale/commands/service_commands.py +61 -1
  70. anyscale/commands/session_commands_hidden.py +5 -1
  71. anyscale/commands/user_commands.py +1 -1
  72. anyscale/commands/util.py +2 -2
  73. anyscale/commands/workspace_commands.py +1 -1
  74. anyscale/connect.py +1 -1
  75. anyscale/connect_utils/project.py +7 -4
  76. anyscale/controllers/cloud_controller.py +63 -30
  77. anyscale/controllers/cloud_functional_verification_controller.py +1 -1
  78. anyscale/controllers/cluster_controller.py +3 -11
  79. anyscale/controllers/compute_config_controller.py +1 -1
  80. anyscale/controllers/experimental_integrations_controller.py +1 -1
  81. anyscale/controllers/job_controller.py +8 -6
  82. anyscale/controllers/list_controller.py +2 -2
  83. anyscale/controllers/machine_pool_controller.py +12 -1
  84. anyscale/controllers/project_controller.py +4 -3
  85. anyscale/controllers/schedule_controller.py +1 -1
  86. anyscale/controllers/service_controller.py +1 -1
  87. anyscale/controllers/workspace_controller.py +1 -1
  88. anyscale/models/job_model.py +1 -1
  89. anyscale/organization_invitation/__init__.py +61 -0
  90. anyscale/organization_invitation/_private/organization_invitation_sdk.py +24 -0
  91. anyscale/organization_invitation/commands.py +84 -0
  92. anyscale/organization_invitation/models.py +45 -0
  93. anyscale/project/__init__.py +35 -0
  94. anyscale/project/_private/project_sdk.py +27 -0
  95. anyscale/project/commands.py +56 -0
  96. anyscale/project/models.py +91 -0
  97. anyscale/{project.py → project_utils.py} +3 -4
  98. anyscale/resource_quota/__init__.py +99 -0
  99. anyscale/resource_quota/_private/resource_quota_sdk.py +120 -0
  100. anyscale/resource_quota/commands.py +150 -0
  101. anyscale/resource_quota/models.py +303 -0
  102. anyscale/scripts.py +4 -0
  103. anyscale/sdk/anyscale_client/__init__.py +0 -5
  104. anyscale/sdk/anyscale_client/api/default_api.py +119 -150
  105. anyscale/sdk/anyscale_client/models/__init__.py +0 -5
  106. anyscale/sdk/anyscale_client/models/baseimagesenum.py +43 -1
  107. anyscale/sdk/anyscale_client/models/cluster_status_details.py +2 -1
  108. anyscale/sdk/anyscale_client/models/jobs_sort_field.py +1 -2
  109. anyscale/sdk/anyscale_client/models/supportedbaseimagesenum.py +43 -1
  110. anyscale/sdk/anyscale_client/sdk.py +1 -1
  111. anyscale/service/__init__.py +21 -0
  112. anyscale/service/_private/service_sdk.py +13 -0
  113. anyscale/service/commands.py +35 -0
  114. anyscale/service_account/__init__.py +88 -0
  115. anyscale/service_account/_private/service_account_sdk.py +101 -0
  116. anyscale/service_account/commands.py +147 -0
  117. anyscale/service_account/models.py +66 -0
  118. anyscale/shared_anyscale_utils/latest_ray_version.py +1 -1
  119. anyscale/shared_anyscale_utils/utils/id_gen.py +2 -0
  120. anyscale/user/__init__.py +1 -1
  121. anyscale/user/commands.py +1 -1
  122. anyscale/user/models.py +25 -15
  123. anyscale/util.py +23 -0
  124. anyscale/utils/cloud_utils.py +1 -1
  125. anyscale/version.py +1 -1
  126. anyscale/workspace_utils.py +1 -1
  127. {anyscale-0.24.88.dist-info → anyscale-0.25.5.dist-info}/METADATA +1 -5
  128. {anyscale-0.24.88.dist-info → anyscale-0.25.5.dist-info}/RECORD +134 -119
  129. anyscale/client/openapi_client/models/create_fine_tuning_hyperparameters.py +0 -156
  130. anyscale/client/openapi_client/models/create_fine_tuning_job_product_request.py +0 -353
  131. anyscale/client/openapi_client/models/finish_ft_job_request.py +0 -204
  132. anyscale/client/openapi_client/models/platform_fine_tuning_job.py +0 -577
  133. anyscale/client/openapi_client/models/session_event.py +0 -267
  134. anyscale/client/openapi_client/models/session_event_cause.py +0 -150
  135. anyscale/controllers/resource_quota_controller.py +0 -183
  136. anyscale/controllers/service_account_controller.py +0 -168
  137. anyscale/sdk/anyscale_client/models/log_level_types.py +0 -100
  138. anyscale/sdk/anyscale_client/models/session_event.py +0 -267
  139. anyscale/sdk/anyscale_client/models/session_event_cause.py +0 -150
  140. anyscale/sdk/anyscale_client/models/session_event_types.py +0 -111
  141. anyscale/sdk/anyscale_client/models/sessionevent_list_response.py +0 -147
  142. anyscale/utils/imports/azure.py +0 -14
  143. /anyscale/{cloud.py → cloud_utils.py} +0 -0
  144. {anyscale-0.24.88.dist-info → anyscale-0.25.5.dist-info}/LICENSE +0 -0
  145. {anyscale-0.24.88.dist-info → anyscale-0.25.5.dist-info}/NOTICE +0 -0
  146. {anyscale-0.24.88.dist-info → anyscale-0.25.5.dist-info}/WHEEL +0 -0
  147. {anyscale-0.24.88.dist-info → anyscale-0.25.5.dist-info}/entry_points.txt +0 -0
  148. {anyscale-0.24.88.dist-info → anyscale-0.25.5.dist-info}/top_level.txt +0 -0
@@ -1,156 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Managed Ray API
5
-
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
-
8
- The version of the OpenAPI document: 0.1.0
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
12
-
13
- import pprint
14
- import re # noqa: F401
15
-
16
- import six
17
-
18
- from openapi_client.configuration import Configuration
19
-
20
-
21
- class CreateFineTuningHyperparameters(object):
22
- """NOTE: This class is auto generated by OpenAPI Generator.
23
- Ref: https://openapi-generator.tech
24
-
25
- Do not edit the class manually.
26
- """
27
-
28
- """
29
- Attributes:
30
- openapi_types (dict): The key is attribute name
31
- and the value is attribute type.
32
- attribute_map (dict): The key is attribute name
33
- and the value is json key in definition.
34
- """
35
- openapi_types = {
36
- 'n_epochs': 'int',
37
- 'context_length': 'int'
38
- }
39
-
40
- attribute_map = {
41
- 'n_epochs': 'n_epochs',
42
- 'context_length': 'context_length'
43
- }
44
-
45
- def __init__(self, n_epochs=None, context_length=None, local_vars_configuration=None): # noqa: E501
46
- """CreateFineTuningHyperparameters - a model defined in OpenAPI""" # noqa: E501
47
- if local_vars_configuration is None:
48
- local_vars_configuration = Configuration()
49
- self.local_vars_configuration = local_vars_configuration
50
-
51
- self._n_epochs = None
52
- self._context_length = None
53
- self.discriminator = None
54
-
55
- if n_epochs is not None:
56
- self.n_epochs = n_epochs
57
- if context_length is not None:
58
- self.context_length = context_length
59
-
60
- @property
61
- def n_epochs(self):
62
- """Gets the n_epochs of this CreateFineTuningHyperparameters. # noqa: E501
63
-
64
- Number of epochs to train for. Auto-calculated based on the training file size if not specified # noqa: E501
65
-
66
- :return: The n_epochs of this CreateFineTuningHyperparameters. # noqa: E501
67
- :rtype: int
68
- """
69
- return self._n_epochs
70
-
71
- @n_epochs.setter
72
- def n_epochs(self, n_epochs):
73
- """Sets the n_epochs of this CreateFineTuningHyperparameters.
74
-
75
- Number of epochs to train for. Auto-calculated based on the training file size if not specified # noqa: E501
76
-
77
- :param n_epochs: The n_epochs of this CreateFineTuningHyperparameters. # noqa: E501
78
- :type: int
79
- """
80
-
81
- self._n_epochs = n_epochs
82
-
83
- @property
84
- def context_length(self):
85
- """Gets the context_length of this CreateFineTuningHyperparameters. # noqa: E501
86
-
87
- Maximum number of tokens to be considered for each training example. Auto-calculated based on the P95 sequence length of all training examples if not specified # noqa: E501
88
-
89
- :return: The context_length of this CreateFineTuningHyperparameters. # noqa: E501
90
- :rtype: int
91
- """
92
- return self._context_length
93
-
94
- @context_length.setter
95
- def context_length(self, context_length):
96
- """Sets the context_length of this CreateFineTuningHyperparameters.
97
-
98
- Maximum number of tokens to be considered for each training example. Auto-calculated based on the P95 sequence length of all training examples if not specified # noqa: E501
99
-
100
- :param context_length: The context_length of this CreateFineTuningHyperparameters. # noqa: E501
101
- :type: int
102
- """
103
- allowed_values = [512, 1024, 2048, 4096, 8192, 16384] # noqa: E501
104
- if self.local_vars_configuration.client_side_validation and context_length not in allowed_values: # noqa: E501
105
- raise ValueError(
106
- "Invalid value for `context_length` ({0}), must be one of {1}" # noqa: E501
107
- .format(context_length, allowed_values)
108
- )
109
-
110
- self._context_length = context_length
111
-
112
- def to_dict(self):
113
- """Returns the model properties as a dict"""
114
- result = {}
115
-
116
- for attr, _ in six.iteritems(self.openapi_types):
117
- value = getattr(self, attr)
118
- if isinstance(value, list):
119
- result[attr] = list(map(
120
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
121
- value
122
- ))
123
- elif hasattr(value, "to_dict"):
124
- result[attr] = value.to_dict()
125
- elif isinstance(value, dict):
126
- result[attr] = dict(map(
127
- lambda item: (item[0], item[1].to_dict())
128
- if hasattr(item[1], "to_dict") else item,
129
- value.items()
130
- ))
131
- else:
132
- result[attr] = value
133
-
134
- return result
135
-
136
- def to_str(self):
137
- """Returns the string representation of the model"""
138
- return pprint.pformat(self.to_dict())
139
-
140
- def __repr__(self):
141
- """For `print` and `pprint`"""
142
- return self.to_str()
143
-
144
- def __eq__(self, other):
145
- """Returns true if both objects are equal"""
146
- if not isinstance(other, CreateFineTuningHyperparameters):
147
- return False
148
-
149
- return self.to_dict() == other.to_dict()
150
-
151
- def __ne__(self, other):
152
- """Returns true if both objects are not equal"""
153
- if not isinstance(other, CreateFineTuningHyperparameters):
154
- return True
155
-
156
- return self.to_dict() != other.to_dict()
@@ -1,353 +0,0 @@
1
- # coding: utf-8
2
-
3
- """
4
- Managed Ray API
5
-
6
- No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
7
-
8
- The version of the OpenAPI document: 0.1.0
9
- Generated by: https://openapi-generator.tech
10
- """
11
-
12
-
13
- import pprint
14
- import re # noqa: F401
15
-
16
- import six
17
-
18
- from openapi_client.configuration import Configuration
19
-
20
-
21
- class CreateFineTuningJobProductRequest(object):
22
- """NOTE: This class is auto generated by OpenAPI Generator.
23
- Ref: https://openapi-generator.tech
24
-
25
- Do not edit the class manually.
26
- """
27
-
28
- """
29
- Attributes:
30
- openapi_types (dict): The key is attribute name
31
- and the value is attribute type.
32
- attribute_map (dict): The key is attribute name
33
- and the value is json key in definition.
34
- """
35
- openapi_types = {
36
- 'training_file': 'str',
37
- 'validation_file': 'str',
38
- 'hyperparameters': 'CreateFineTuningHyperparameters',
39
- 'model': 'str',
40
- 'suffix': 'str',
41
- 'cloud_id': 'str',
42
- 'version': 'str',
43
- 'instance_type': 'str',
44
- 'batch_size_per_device': 'int'
45
- }
46
-
47
- attribute_map = {
48
- 'training_file': 'training_file',
49
- 'validation_file': 'validation_file',
50
- 'hyperparameters': 'hyperparameters',
51
- 'model': 'model',
52
- 'suffix': 'suffix',
53
- 'cloud_id': 'cloud_id',
54
- 'version': 'version',
55
- 'instance_type': 'instance_type',
56
- 'batch_size_per_device': 'batch_size_per_device'
57
- }
58
-
59
- def __init__(self, training_file=None, validation_file=None, hyperparameters=None, model=None, suffix=None, cloud_id=None, version=None, instance_type=None, batch_size_per_device=None, local_vars_configuration=None): # noqa: E501
60
- """CreateFineTuningJobProductRequest - a model defined in OpenAPI""" # noqa: E501
61
- if local_vars_configuration is None:
62
- local_vars_configuration = Configuration()
63
- self.local_vars_configuration = local_vars_configuration
64
-
65
- self._training_file = None
66
- self._validation_file = None
67
- self._hyperparameters = None
68
- self._model = None
69
- self._suffix = None
70
- self._cloud_id = None
71
- self._version = None
72
- self._instance_type = None
73
- self._batch_size_per_device = None
74
- self.discriminator = None
75
-
76
- self.training_file = training_file
77
- if validation_file is not None:
78
- self.validation_file = validation_file
79
- if hyperparameters is not None:
80
- self.hyperparameters = hyperparameters
81
- self.model = model
82
- if suffix is not None:
83
- self.suffix = suffix
84
- self.cloud_id = cloud_id
85
- if version is not None:
86
- self.version = version
87
- if instance_type is not None:
88
- self.instance_type = instance_type
89
- if batch_size_per_device is not None:
90
- self.batch_size_per_device = batch_size_per_device
91
-
92
- @property
93
- def training_file(self):
94
- """Gets the training_file of this CreateFineTuningJobProductRequest. # noqa: E501
95
-
96
- ID of the .jsonl file used for training # noqa: E501
97
-
98
- :return: The training_file of this CreateFineTuningJobProductRequest. # noqa: E501
99
- :rtype: str
100
- """
101
- return self._training_file
102
-
103
- @training_file.setter
104
- def training_file(self, training_file):
105
- """Sets the training_file of this CreateFineTuningJobProductRequest.
106
-
107
- ID of the .jsonl file used for training # noqa: E501
108
-
109
- :param training_file: The training_file of this CreateFineTuningJobProductRequest. # noqa: E501
110
- :type: str
111
- """
112
- if self.local_vars_configuration.client_side_validation and training_file is None: # noqa: E501
113
- raise ValueError("Invalid value for `training_file`, must not be `None`") # noqa: E501
114
-
115
- self._training_file = training_file
116
-
117
- @property
118
- def validation_file(self):
119
- """Gets the validation_file of this CreateFineTuningJobProductRequest. # noqa: E501
120
-
121
- ID of the .jsonl file used for validation. Optional # noqa: E501
122
-
123
- :return: The validation_file of this CreateFineTuningJobProductRequest. # noqa: E501
124
- :rtype: str
125
- """
126
- return self._validation_file
127
-
128
- @validation_file.setter
129
- def validation_file(self, validation_file):
130
- """Sets the validation_file of this CreateFineTuningJobProductRequest.
131
-
132
- ID of the .jsonl file used for validation. Optional # noqa: E501
133
-
134
- :param validation_file: The validation_file of this CreateFineTuningJobProductRequest. # noqa: E501
135
- :type: str
136
- """
137
-
138
- self._validation_file = validation_file
139
-
140
- @property
141
- def hyperparameters(self):
142
- """Gets the hyperparameters of this CreateFineTuningJobProductRequest. # noqa: E501
143
-
144
- Hyperparameters used for fine-tuning. # noqa: E501
145
-
146
- :return: The hyperparameters of this CreateFineTuningJobProductRequest. # noqa: E501
147
- :rtype: CreateFineTuningHyperparameters
148
- """
149
- return self._hyperparameters
150
-
151
- @hyperparameters.setter
152
- def hyperparameters(self, hyperparameters):
153
- """Sets the hyperparameters of this CreateFineTuningJobProductRequest.
154
-
155
- Hyperparameters used for fine-tuning. # noqa: E501
156
-
157
- :param hyperparameters: The hyperparameters of this CreateFineTuningJobProductRequest. # noqa: E501
158
- :type: CreateFineTuningHyperparameters
159
- """
160
-
161
- self._hyperparameters = hyperparameters
162
-
163
- @property
164
- def model(self):
165
- """Gets the model of this CreateFineTuningJobProductRequest. # noqa: E501
166
-
167
- A supported model used as a base for fine-tuning # noqa: E501
168
-
169
- :return: The model of this CreateFineTuningJobProductRequest. # noqa: E501
170
- :rtype: str
171
- """
172
- return self._model
173
-
174
- @model.setter
175
- def model(self, model):
176
- """Sets the model of this CreateFineTuningJobProductRequest.
177
-
178
- A supported model used as a base for fine-tuning # noqa: E501
179
-
180
- :param model: The model of this CreateFineTuningJobProductRequest. # noqa: E501
181
- :type: str
182
- """
183
- if self.local_vars_configuration.client_side_validation and model is None: # noqa: E501
184
- raise ValueError("Invalid value for `model`, must not be `None`") # noqa: E501
185
-
186
- self._model = model
187
-
188
- @property
189
- def suffix(self):
190
- """Gets the suffix of this CreateFineTuningJobProductRequest. # noqa: E501
191
-
192
- A suffix (along with a hash) that will be appended to the model to create `fine_tuned_model`. Optional. # noqa: E501
193
-
194
- :return: The suffix of this CreateFineTuningJobProductRequest. # noqa: E501
195
- :rtype: str
196
- """
197
- return self._suffix
198
-
199
- @suffix.setter
200
- def suffix(self, suffix):
201
- """Sets the suffix of this CreateFineTuningJobProductRequest.
202
-
203
- A suffix (along with a hash) that will be appended to the model to create `fine_tuned_model`. Optional. # noqa: E501
204
-
205
- :param suffix: The suffix of this CreateFineTuningJobProductRequest. # noqa: E501
206
- :type: str
207
- """
208
-
209
- self._suffix = suffix
210
-
211
- @property
212
- def cloud_id(self):
213
- """Gets the cloud_id of this CreateFineTuningJobProductRequest. # noqa: E501
214
-
215
-
216
- :return: The cloud_id of this CreateFineTuningJobProductRequest. # noqa: E501
217
- :rtype: str
218
- """
219
- return self._cloud_id
220
-
221
- @cloud_id.setter
222
- def cloud_id(self, cloud_id):
223
- """Sets the cloud_id of this CreateFineTuningJobProductRequest.
224
-
225
-
226
- :param cloud_id: The cloud_id of this CreateFineTuningJobProductRequest. # noqa: E501
227
- :type: str
228
- """
229
- if self.local_vars_configuration.client_side_validation and cloud_id is None: # noqa: E501
230
- raise ValueError("Invalid value for `cloud_id`, must not be `None`") # noqa: E501
231
-
232
- self._cloud_id = cloud_id
233
-
234
- @property
235
- def version(self):
236
- """Gets the version of this CreateFineTuningJobProductRequest. # noqa: E501
237
-
238
- The version of llmforge to use. If not specified, the latest version will be used. This version dictates the minimum Endpoint version needed to serve the produced fine-tuned model. # noqa: E501
239
-
240
- :return: The version of this CreateFineTuningJobProductRequest. # noqa: E501
241
- :rtype: str
242
- """
243
- return self._version
244
-
245
- @version.setter
246
- def version(self, version):
247
- """Sets the version of this CreateFineTuningJobProductRequest.
248
-
249
- The version of llmforge to use. If not specified, the latest version will be used. This version dictates the minimum Endpoint version needed to serve the produced fine-tuned model. # noqa: E501
250
-
251
- :param version: The version of this CreateFineTuningJobProductRequest. # noqa: E501
252
- :type: str
253
- """
254
-
255
- self._version = version
256
-
257
- @property
258
- def instance_type(self):
259
- """Gets the instance_type of this CreateFineTuningJobProductRequest. # noqa: E501
260
-
261
- The instance type to use for the fine-tuning job. # noqa: E501
262
-
263
- :return: The instance_type of this CreateFineTuningJobProductRequest. # noqa: E501
264
- :rtype: str
265
- """
266
- return self._instance_type
267
-
268
- @instance_type.setter
269
- def instance_type(self, instance_type):
270
- """Sets the instance_type of this CreateFineTuningJobProductRequest.
271
-
272
- The instance type to use for the fine-tuning job. # noqa: E501
273
-
274
- :param instance_type: The instance_type of this CreateFineTuningJobProductRequest. # noqa: E501
275
- :type: str
276
- """
277
- allowed_values = ["p4de.24xlarge", "p4d.24xlarge", "g5.12xlarge", "g5.4xlarge"] # noqa: E501
278
- if self.local_vars_configuration.client_side_validation and instance_type not in allowed_values: # noqa: E501
279
- raise ValueError(
280
- "Invalid value for `instance_type` ({0}), must be one of {1}" # noqa: E501
281
- .format(instance_type, allowed_values)
282
- )
283
-
284
- self._instance_type = instance_type
285
-
286
- @property
287
- def batch_size_per_device(self):
288
- """Gets the batch_size_per_device of this CreateFineTuningJobProductRequest. # noqa: E501
289
-
290
- The number of samples that are processed by the model in a single iteration in training and evaluation. # noqa: E501
291
-
292
- :return: The batch_size_per_device of this CreateFineTuningJobProductRequest. # noqa: E501
293
- :rtype: int
294
- """
295
- return self._batch_size_per_device
296
-
297
- @batch_size_per_device.setter
298
- def batch_size_per_device(self, batch_size_per_device):
299
- """Sets the batch_size_per_device of this CreateFineTuningJobProductRequest.
300
-
301
- The number of samples that are processed by the model in a single iteration in training and evaluation. # noqa: E501
302
-
303
- :param batch_size_per_device: The batch_size_per_device of this CreateFineTuningJobProductRequest. # noqa: E501
304
- :type: int
305
- """
306
-
307
- self._batch_size_per_device = batch_size_per_device
308
-
309
- def to_dict(self):
310
- """Returns the model properties as a dict"""
311
- result = {}
312
-
313
- for attr, _ in six.iteritems(self.openapi_types):
314
- value = getattr(self, attr)
315
- if isinstance(value, list):
316
- result[attr] = list(map(
317
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
318
- value
319
- ))
320
- elif hasattr(value, "to_dict"):
321
- result[attr] = value.to_dict()
322
- elif isinstance(value, dict):
323
- result[attr] = dict(map(
324
- lambda item: (item[0], item[1].to_dict())
325
- if hasattr(item[1], "to_dict") else item,
326
- value.items()
327
- ))
328
- else:
329
- result[attr] = value
330
-
331
- return result
332
-
333
- def to_str(self):
334
- """Returns the string representation of the model"""
335
- return pprint.pformat(self.to_dict())
336
-
337
- def __repr__(self):
338
- """For `print` and `pprint`"""
339
- return self.to_str()
340
-
341
- def __eq__(self, other):
342
- """Returns true if both objects are equal"""
343
- if not isinstance(other, CreateFineTuningJobProductRequest):
344
- return False
345
-
346
- return self.to_dict() == other.to_dict()
347
-
348
- def __ne__(self, other):
349
- """Returns true if both objects are not equal"""
350
- if not isinstance(other, CreateFineTuningJobProductRequest):
351
- return True
352
-
353
- return self.to_dict() != other.to_dict()