kaggle 1.7.4.2__py3-none-any.whl → 1.8.0__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 (114) hide show
  1. kaggle/__init__.py +10 -6
  2. kaggle/api/kaggle_api.py +574 -585
  3. kaggle/api/kaggle_api_extended.py +5251 -4738
  4. kaggle/cli.py +1335 -1585
  5. kaggle/models/api_blob_type.py +3 -3
  6. kaggle/models/dataset_column.py +129 -129
  7. kaggle/models/dataset_new_request.py +130 -72
  8. kaggle/models/dataset_new_version_request.py +88 -56
  9. kaggle/models/dataset_update_settings_request.py +93 -59
  10. kaggle/models/kaggle_models_extended.py +169 -172
  11. kaggle/models/kernel_push_request.py +152 -100
  12. kaggle/models/model_instance_new_version_request.py +30 -30
  13. kaggle/models/model_instance_update_request.py +171 -71
  14. kaggle/models/model_new_instance_request.py +223 -88
  15. kaggle/models/model_new_request.py +61 -46
  16. kaggle/models/model_update_request.py +66 -48
  17. kaggle/models/start_blob_upload_request.py +146 -138
  18. kaggle/models/start_blob_upload_response.py +83 -78
  19. kaggle/models/upload_file.py +92 -96
  20. kaggle/test/test_authenticate.py +23 -23
  21. {kaggle-1.7.4.2.dist-info → kaggle-1.8.0.dist-info}/METADATA +11 -15
  22. kaggle-1.8.0.dist-info/RECORD +148 -0
  23. kagglesdk/__init__.py +5 -1
  24. kagglesdk/benchmarks/services/__init__.py +0 -0
  25. kagglesdk/benchmarks/services/benchmarks_api_service.py +19 -0
  26. kagglesdk/benchmarks/types/__init__.py +0 -0
  27. kagglesdk/benchmarks/types/benchmark_types.py +307 -0
  28. kagglesdk/benchmarks/types/benchmarks_api_service.py +243 -0
  29. kagglesdk/blobs/services/blob_api_service.py +1 -1
  30. kagglesdk/blobs/types/blob_api_service.py +2 -2
  31. kagglesdk/common/services/__init__.py +0 -0
  32. kagglesdk/common/services/operations_service.py +46 -0
  33. kagglesdk/common/types/file_download.py +1 -1
  34. kagglesdk/common/types/http_redirect.py +1 -1
  35. kagglesdk/common/types/operations.py +194 -0
  36. kagglesdk/common/types/operations_service.py +48 -0
  37. kagglesdk/community/__init__.py +0 -0
  38. kagglesdk/community/types/__init__.py +0 -0
  39. kagglesdk/community/types/content_enums.py +44 -0
  40. kagglesdk/community/types/organization.py +410 -0
  41. kagglesdk/competitions/services/competition_api_service.py +49 -12
  42. kagglesdk/competitions/types/competition.py +14 -0
  43. kagglesdk/competitions/types/competition_api_service.py +1639 -1275
  44. kagglesdk/competitions/types/search_competitions.py +28 -0
  45. kagglesdk/datasets/databundles/__init__.py +0 -0
  46. kagglesdk/datasets/databundles/types/__init__.py +0 -0
  47. kagglesdk/datasets/databundles/types/databundle_api_types.py +540 -0
  48. kagglesdk/datasets/services/dataset_api_service.py +39 -14
  49. kagglesdk/datasets/types/dataset_api_service.py +567 -297
  50. kagglesdk/datasets/types/dataset_enums.py +21 -0
  51. kagglesdk/datasets/types/dataset_service.py +145 -0
  52. kagglesdk/datasets/types/dataset_types.py +74 -74
  53. kagglesdk/datasets/types/search_datasets.py +6 -0
  54. kagglesdk/discussions/__init__.py +0 -0
  55. kagglesdk/discussions/types/__init__.py +0 -0
  56. kagglesdk/discussions/types/search_discussions.py +43 -0
  57. kagglesdk/discussions/types/writeup_enums.py +11 -0
  58. kagglesdk/education/services/education_api_service.py +1 -1
  59. kagglesdk/education/types/education_api_service.py +1 -1
  60. kagglesdk/kaggle_client.py +55 -20
  61. kagglesdk/kaggle_creds.py +148 -0
  62. kagglesdk/kaggle_env.py +89 -27
  63. kagglesdk/kaggle_http_client.py +235 -290
  64. kagglesdk/kaggle_oauth.py +200 -0
  65. kagglesdk/kaggle_object.py +298 -250
  66. kagglesdk/kernels/services/kernels_api_service.py +46 -9
  67. kagglesdk/kernels/types/kernels_api_service.py +658 -158
  68. kagglesdk/kernels/types/kernels_enums.py +6 -0
  69. kagglesdk/kernels/types/search_kernels.py +6 -0
  70. kagglesdk/licenses/__init__.py +0 -0
  71. kagglesdk/licenses/types/__init__.py +0 -0
  72. kagglesdk/licenses/types/licenses_types.py +182 -0
  73. kagglesdk/models/services/model_api_service.py +46 -21
  74. kagglesdk/models/types/model_api_service.py +1018 -652
  75. kagglesdk/models/types/model_enums.py +8 -0
  76. kagglesdk/models/types/model_service.py +71 -71
  77. kagglesdk/models/types/model_types.py +1057 -5
  78. kagglesdk/models/types/search_models.py +8 -0
  79. kagglesdk/search/__init__.py +0 -0
  80. kagglesdk/search/services/__init__.py +0 -0
  81. kagglesdk/search/services/search_api_service.py +19 -0
  82. kagglesdk/search/types/__init__.py +0 -0
  83. kagglesdk/search/types/search_api_service.py +2435 -0
  84. kagglesdk/search/types/search_content_shared.py +50 -0
  85. kagglesdk/search/types/search_enums.py +45 -0
  86. kagglesdk/search/types/search_service.py +303 -0
  87. kagglesdk/security/__init__.py +0 -0
  88. kagglesdk/security/services/__init__.py +0 -0
  89. kagglesdk/security/services/iam_service.py +31 -0
  90. kagglesdk/security/services/oauth_service.py +58 -0
  91. kagglesdk/security/types/__init__.py +0 -0
  92. kagglesdk/security/types/authentication.py +171 -0
  93. kagglesdk/security/types/iam_service.py +496 -0
  94. kagglesdk/security/types/oauth_service.py +1181 -0
  95. kagglesdk/security/types/roles.py +8 -0
  96. kagglesdk/security/types/security_types.py +159 -0
  97. kagglesdk/test/__init__.py +0 -0
  98. kagglesdk/test/test_client.py +20 -24
  99. kagglesdk/users/services/__init__.py +0 -0
  100. kagglesdk/users/services/account_service.py +31 -0
  101. kagglesdk/users/services/group_api_service.py +31 -0
  102. kagglesdk/users/types/account_service.py +345 -0
  103. kagglesdk/users/types/group_api_service.py +315 -0
  104. kagglesdk/users/types/group_types.py +165 -0
  105. kagglesdk/users/types/groups_enum.py +8 -0
  106. kagglesdk/users/types/progression_service.py +9 -0
  107. kagglesdk/users/types/search_users.py +23 -0
  108. kagglesdk/users/types/user_avatar.py +226 -0
  109. kaggle/configuration.py +0 -206
  110. kaggle-1.7.4.2.dist-info/RECORD +0 -89
  111. {kaggle-1.7.4.2.dist-info → kaggle-1.8.0.dist-info}/WHEEL +0 -0
  112. {kaggle-1.7.4.2.dist-info → kaggle-1.8.0.dist-info}/entry_points.txt +0 -0
  113. {kaggle-1.7.4.2.dist-info → kaggle-1.8.0.dist-info}/licenses/LICENSE.txt +0 -0
  114. {kaggle/test → kagglesdk/benchmarks}/__init__.py +0 -0
@@ -32,35 +32,49 @@ class ModelNewInstanceRequest(object):
32
32
  attribute_map (dict): The key is attribute name
33
33
  and the value is json key in definition.
34
34
  """
35
+
35
36
  project_types = {
36
- 'instance_slug': 'str',
37
- 'framework': 'str',
38
- 'overview': 'str',
39
- 'usage': 'str',
40
- 'license_name': 'str',
41
- 'fine_tunable': 'bool',
42
- 'training_data': 'list[str]',
43
- 'model_instance_type': 'str',
44
- 'base_model_instance': 'str',
45
- 'external_base_model_url': 'int',
46
- 'files': 'list[UploadFile]'
37
+ "instance_slug": "str",
38
+ "framework": "str",
39
+ "overview": "str",
40
+ "usage": "str",
41
+ "license_name": "str",
42
+ "fine_tunable": "bool",
43
+ "training_data": "list[str]",
44
+ "model_instance_type": "str",
45
+ "base_model_instance": "str",
46
+ "external_base_model_url": "int",
47
+ "files": "list[UploadFile]",
47
48
  }
48
49
 
49
50
  attribute_map = {
50
- 'instance_slug': 'instanceSlug',
51
- 'framework': 'framework',
52
- 'overview': 'overview',
53
- 'usage': 'usage',
54
- 'license_name': 'licenseName',
55
- 'fine_tunable': 'fineTunable',
56
- 'training_data': 'trainingData',
57
- 'model_instance_type': 'modelInstanceType',
58
- 'base_model_instance': 'baseModelInstance',
59
- 'external_base_model_url': 'externalBaseModelUrl',
60
- 'files': 'files'
51
+ "instance_slug": "instanceSlug",
52
+ "framework": "framework",
53
+ "overview": "overview",
54
+ "usage": "usage",
55
+ "license_name": "licenseName",
56
+ "fine_tunable": "fineTunable",
57
+ "training_data": "trainingData",
58
+ "model_instance_type": "modelInstanceType",
59
+ "base_model_instance": "baseModelInstance",
60
+ "external_base_model_url": "externalBaseModelUrl",
61
+ "files": "files",
61
62
  }
62
63
 
63
- def __init__(self, instance_slug=None, framework=None, overview=None, usage=None, license_name='Apache 2.0', fine_tunable=True, training_data=None, model_instance_type=None, base_model_instance=None, external_base_model_url=None, files=None): # noqa: E501
64
+ def __init__(
65
+ self,
66
+ instance_slug=None,
67
+ framework=None,
68
+ overview=None,
69
+ usage=None,
70
+ license_name="Apache 2.0",
71
+ fine_tunable=True,
72
+ training_data=None,
73
+ model_instance_type=None,
74
+ base_model_instance=None,
75
+ external_base_model_url=None,
76
+ files=None,
77
+ ): # noqa: E501
64
78
 
65
79
  self._instance_slug = None
66
80
  self._framework = None
@@ -97,11 +111,14 @@ class ModelNewInstanceRequest(object):
97
111
 
98
112
  @property
99
113
  def instance_slug(self):
100
- """Gets the instance_slug of this ModelNewInstanceRequest. # noqa: E501
114
+ """Gets the instance_slug of this ModelNewInstanceRequest. # noqa:
115
+ E501.
101
116
 
102
- The slug that the model instance should be created with # noqa: E501
117
+ The slug that the model instance should be created with # noqa:
118
+ E501
103
119
 
104
- :return: The instance_slug of this ModelNewInstanceRequest. # noqa: E501
120
+ :return: The instance_slug of this ModelNewInstanceRequest. #
121
+ noqa: E501
105
122
  :rtype: str
106
123
  """
107
124
  return self._instance_slug
@@ -110,9 +127,11 @@ class ModelNewInstanceRequest(object):
110
127
  def instance_slug(self, instance_slug):
111
128
  """Sets the instance_slug of this ModelNewInstanceRequest.
112
129
 
113
- The slug that the model instance should be created with # noqa: E501
130
+ The slug that the model instance should be created with # noqa:
131
+ E501
114
132
 
115
- :param instance_slug: The instance_slug of this ModelNewInstanceRequest. # noqa: E501
133
+ :param instance_slug: The instance_slug of this
134
+ ModelNewInstanceRequest. # noqa: E501
116
135
  :type: str
117
136
  """
118
137
  if instance_slug is None:
@@ -122,11 +141,12 @@ class ModelNewInstanceRequest(object):
122
141
 
123
142
  @property
124
143
  def framework(self):
125
- """Gets the framework of this ModelNewInstanceRequest. # noqa: E501
144
+ """Gets the framework of this ModelNewInstanceRequest. # noqa: E501.
126
145
 
127
146
  The framework of the model instance # noqa: E501
128
147
 
129
- :return: The framework of this ModelNewInstanceRequest. # noqa: E501
148
+ :return: The framework of this ModelNewInstanceRequest. # noqa:
149
+ E501
130
150
  :rtype: str
131
151
  """
132
152
  return self._framework
@@ -137,27 +157,55 @@ class ModelNewInstanceRequest(object):
137
157
 
138
158
  The framework of the model instance # noqa: E501
139
159
 
140
- :param framework: The framework of this ModelNewInstanceRequest. # noqa: E501
160
+ :param framework: The framework of this ModelNewInstanceRequest.
161
+ # noqa: E501
141
162
  :type: str
142
163
  """
143
164
  if framework is None:
144
165
  raise ValueError("Invalid value for `framework`, must not be `None`") # noqa: E501
145
- allowed_values = ["tensorFlow1", "tensorFlow2", "tfLite", "tfJs", "pyTorch", "jax", "flax", "pax", "maxText", "gemmaCpp", "tensorRtLlm", "ggml", "gguf", "coral", "scikitLearn", "mxnet", "onnx", "keras", "transformers", "triton", "api", "triton", "tensorRtLlm","other"] # noqa: E501
166
+ allowed_values = [
167
+ "tensorFlow1",
168
+ "tensorFlow2",
169
+ "tfLite",
170
+ "tfJs",
171
+ "pyTorch",
172
+ "jax",
173
+ "flax",
174
+ "pax",
175
+ "maxText",
176
+ "gemmaCpp",
177
+ "tensorRtLlm",
178
+ "ggml",
179
+ "gguf",
180
+ "coral",
181
+ "scikitLearn",
182
+ "mxnet",
183
+ "onnx",
184
+ "keras",
185
+ "transformers",
186
+ "triton",
187
+ "api",
188
+ "triton",
189
+ "tensorRtLlm",
190
+ "other",
191
+ ] # noqa: E501
146
192
  if framework not in allowed_values:
147
193
  raise ValueError(
148
- "Invalid value for `framework` ({0}), must be one of {1}" # noqa: E501
149
- .format(framework, allowed_values)
194
+ "Invalid value for `framework` ({0}), must be one of {1}".format( # noqa: E501
195
+ framework, allowed_values
196
+ )
150
197
  )
151
198
 
152
199
  self._framework = framework
153
200
 
154
201
  @property
155
202
  def overview(self):
156
- """Gets the overview of this ModelNewInstanceRequest. # noqa: E501
203
+ """Gets the overview of this ModelNewInstanceRequest. # noqa: E501.
157
204
 
158
205
  The overview of the model instance (markdown) # noqa: E501
159
206
 
160
- :return: The overview of this ModelNewInstanceRequest. # noqa: E501
207
+ :return: The overview of this ModelNewInstanceRequest. # noqa:
208
+ E501
161
209
  :rtype: str
162
210
  """
163
211
  return self._overview
@@ -168,7 +216,8 @@ class ModelNewInstanceRequest(object):
168
216
 
169
217
  The overview of the model instance (markdown) # noqa: E501
170
218
 
171
- :param overview: The overview of this ModelNewInstanceRequest. # noqa: E501
219
+ :param overview: The overview of this ModelNewInstanceRequest. #
220
+ noqa: E501
172
221
  :type: str
173
222
  """
174
223
 
@@ -176,11 +225,13 @@ class ModelNewInstanceRequest(object):
176
225
 
177
226
  @property
178
227
  def usage(self):
179
- """Gets the usage of this ModelNewInstanceRequest. # noqa: E501
228
+ """Gets the usage of this ModelNewInstanceRequest. # noqa: E501.
180
229
 
181
- The description of how to use the model instance (markdown) # noqa: E501
230
+ The description of how to use the model instance (markdown) #
231
+ noqa: E501
182
232
 
183
- :return: The usage of this ModelNewInstanceRequest. # noqa: E501
233
+ :return: The usage of this ModelNewInstanceRequest. # noqa:
234
+ E501
184
235
  :rtype: str
185
236
  """
186
237
  return self._usage
@@ -189,9 +240,11 @@ class ModelNewInstanceRequest(object):
189
240
  def usage(self, usage):
190
241
  """Sets the usage of this ModelNewInstanceRequest.
191
242
 
192
- The description of how to use the model instance (markdown) # noqa: E501
243
+ The description of how to use the model instance (markdown) #
244
+ noqa: E501
193
245
 
194
- :param usage: The usage of this ModelNewInstanceRequest. # noqa: E501
246
+ :param usage: The usage of this ModelNewInstanceRequest. #
247
+ noqa: E501
195
248
  :type: str
196
249
  """
197
250
 
@@ -199,11 +252,14 @@ class ModelNewInstanceRequest(object):
199
252
 
200
253
  @property
201
254
  def license_name(self):
202
- """Gets the license_name of this ModelNewInstanceRequest. # noqa: E501
255
+ """Gets the license_name of this ModelNewInstanceRequest. # noqa:
256
+ E501.
203
257
 
204
- The license that should be associated with the model instance # noqa: E501
258
+ The license that should be associated with the model instance #
259
+ noqa: E501
205
260
 
206
- :return: The license_name of this ModelNewInstanceRequest. # noqa: E501
261
+ :return: The license_name of this ModelNewInstanceRequest. #
262
+ noqa: E501
207
263
  :rtype: str
208
264
  """
209
265
  return self._license_name
@@ -212,29 +268,92 @@ class ModelNewInstanceRequest(object):
212
268
  def license_name(self, license_name):
213
269
  """Sets the license_name of this ModelNewInstanceRequest.
214
270
 
215
- The license that should be associated with the model instance # noqa: E501
271
+ The license that should be associated with the model instance #
272
+ noqa: E501
216
273
 
217
- :param license_name: The license_name of this ModelNewInstanceRequest. # noqa: E501
274
+ :param license_name: The license_name of this
275
+ ModelNewInstanceRequest. # noqa: E501
218
276
  :type: str
219
277
  """
220
278
  if license_name is None:
221
279
  raise ValueError("Invalid value for `license_name`, must not be `None`") # noqa: E501
222
- allowed_values = ["CC0 1.0", "CC BY-NC-SA 4.0", "Unknown", "CC BY-SA 4.0", "GPL 2", "CC BY-SA 3.0", "Other", "Other (specified in description)", "CC BY 4.0", "Attribution 4.0 International (CC BY 4.0)", "CC BY-NC 4.0", "Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)", "PDDL", "ODC Public Domain Dedication and Licence (PDDL)", "CC BY 3.0", "Attribution 3.0 Unported (CC BY 3.0)", "CC BY 3.0 IGO", "Attribution 3.0 IGO (CC BY 3.0 IGO)", "CC BY-NC-SA 3.0 IGO", "Attribution-NonCommercial-ShareAlike 3.0 IGO (CC BY-NC-SA 3.0 IGO)", "CDLA Permissive 1.0", "Community Data License Agreement - Permissive - Version 1.0", "CDLA Sharing 1.0", "Community Data License Agreement - Sharing - Version 1.0", "CC BY-ND 4.0", "Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)", "CC BY-NC-ND 4.0", "Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)", "ODC-BY 1.0", "ODC Attribution License (ODC-By)", "LGPL 3.0", "GNU Lesser General Public License 3.0", "AGPL 3.0", "GNU Affero General Public License 3.0", "FDL 1.3", "GNU Free Documentation License 1.3", "apache-2.0", "Apache 2.0", "mit", "MIT", "bsd-3-clause", "BSD-3-Clause", "Llama 2", "Llama 2 Community License", "Gemma", "gpl-3", "GPL 3", "RAIL-M", "AI Pubs Open RAIL-M License", "AIPubs Research-Use RAIL-M", "AI Pubs Research-Use RAIL-M License", "BigScience OpenRAIL-M", "BigScience Open RAIL-M License", "RAIL", "RAIL (specified in description)", "Llama 3", "Llama 3 Community License"] # noqa: E501
280
+ allowed_values = [
281
+ "CC0 1.0",
282
+ "CC BY-NC-SA 4.0",
283
+ "Unknown",
284
+ "CC BY-SA 4.0",
285
+ "GPL 2",
286
+ "CC BY-SA 3.0",
287
+ "Other",
288
+ "Other (specified in description)",
289
+ "CC BY 4.0",
290
+ "Attribution 4.0 International (CC BY 4.0)",
291
+ "CC BY-NC 4.0",
292
+ "Attribution-NonCommercial 4.0 International (CC BY-NC 4.0)",
293
+ "PDDL",
294
+ "ODC Public Domain Dedication and Licence (PDDL)",
295
+ "CC BY 3.0",
296
+ "Attribution 3.0 Unported (CC BY 3.0)",
297
+ "CC BY 3.0 IGO",
298
+ "Attribution 3.0 IGO (CC BY 3.0 IGO)",
299
+ "CC BY-NC-SA 3.0 IGO",
300
+ "Attribution-NonCommercial-ShareAlike 3.0 IGO (CC BY-NC-SA 3.0 IGO)",
301
+ "CDLA Permissive 1.0",
302
+ "Community Data License Agreement - Permissive - Version 1.0",
303
+ "CDLA Sharing 1.0",
304
+ "Community Data License Agreement - Sharing - Version 1.0",
305
+ "CC BY-ND 4.0",
306
+ "Attribution-NoDerivatives 4.0 International (CC BY-ND 4.0)",
307
+ "CC BY-NC-ND 4.0",
308
+ "Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)",
309
+ "ODC-BY 1.0",
310
+ "ODC Attribution License (ODC-By)",
311
+ "LGPL 3.0",
312
+ "GNU Lesser General Public License 3.0",
313
+ "AGPL 3.0",
314
+ "GNU Affero General Public License 3.0",
315
+ "FDL 1.3",
316
+ "GNU Free Documentation License 1.3",
317
+ "apache-2.0",
318
+ "Apache 2.0",
319
+ "mit",
320
+ "MIT",
321
+ "bsd-3-clause",
322
+ "BSD-3-Clause",
323
+ "Llama 2",
324
+ "Llama 2 Community License",
325
+ "Gemma",
326
+ "gpl-3",
327
+ "GPL 3",
328
+ "RAIL-M",
329
+ "AI Pubs Open RAIL-M License",
330
+ "AIPubs Research-Use RAIL-M",
331
+ "AI Pubs Research-Use RAIL-M License",
332
+ "BigScience OpenRAIL-M",
333
+ "BigScience Open RAIL-M License",
334
+ "RAIL",
335
+ "RAIL (specified in description)",
336
+ "Llama 3",
337
+ "Llama 3 Community License",
338
+ ] # noqa: E501
223
339
  if license_name not in allowed_values:
224
340
  raise ValueError(
225
- "Invalid value for `license_name` ({0}), must be one of {1}" # noqa: E501
226
- .format(license_name, allowed_values)
341
+ "Invalid value for `license_name` ({0}), must be one of {1}".format( # noqa: E501
342
+ license_name, allowed_values
343
+ )
227
344
  )
228
345
 
229
346
  self._license_name = license_name
230
347
 
231
348
  @property
232
349
  def fine_tunable(self):
233
- """Gets the fine_tunable of this ModelNewInstanceRequest. # noqa: E501
350
+ """Gets the fine_tunable of this ModelNewInstanceRequest. # noqa:
351
+ E501.
234
352
 
235
353
  Whether the model instance is fine tunable # noqa: E501
236
354
 
237
- :return: The fine_tunable of this ModelNewInstanceRequest. # noqa: E501
355
+ :return: The fine_tunable of this ModelNewInstanceRequest. #
356
+ noqa: E501
238
357
  :rtype: bool
239
358
  """
240
359
  return self._fine_tunable
@@ -245,7 +364,8 @@ class ModelNewInstanceRequest(object):
245
364
 
246
365
  Whether the model instance is fine tunable # noqa: E501
247
366
 
248
- :param fine_tunable: The fine_tunable of this ModelNewInstanceRequest. # noqa: E501
367
+ :param fine_tunable: The fine_tunable of this
368
+ ModelNewInstanceRequest. # noqa: E501
249
369
  :type: bool
250
370
  """
251
371
 
@@ -253,11 +373,13 @@ class ModelNewInstanceRequest(object):
253
373
 
254
374
  @property
255
375
  def training_data(self):
256
- """Gets the training_data of this ModelNewInstanceRequest. # noqa: E501
376
+ """Gets the training_data of this ModelNewInstanceRequest. # noqa:
377
+ E501.
257
378
 
258
379
  A list of training data (urls or names) # noqa: E501
259
380
 
260
- :return: The training_data of this ModelNewInstanceRequest. # noqa: E501
381
+ :return: The training_data of this ModelNewInstanceRequest. #
382
+ noqa: E501
261
383
  :rtype: list[str]
262
384
  """
263
385
  return self._training_data
@@ -268,7 +390,8 @@ class ModelNewInstanceRequest(object):
268
390
 
269
391
  A list of training data (urls or names) # noqa: E501
270
392
 
271
- :param training_data: The training_data of this ModelNewInstanceRequest. # noqa: E501
393
+ :param training_data: The training_data of this
394
+ ModelNewInstanceRequest. # noqa: E501
272
395
  :type: list[str]
273
396
  """
274
397
 
@@ -276,11 +399,14 @@ class ModelNewInstanceRequest(object):
276
399
 
277
400
  @property
278
401
  def model_instance_type(self):
279
- """Gets the model_instance_type of this ModelNewInstanceRequest. # noqa: E501
402
+ """Gets the model_instance_type of this ModelNewInstanceRequest. #
403
+ noqa: E501.
280
404
 
281
- Whether the model instance is a base model, external variant, internal variant, or unspecified # noqa: E501
405
+ Whether the model instance is a base model, external variant,
406
+ internal variant, or unspecified # noqa: E501
282
407
 
283
- :return: The model_instance_type of this ModelNewInstanceRequest. # noqa: E501
408
+ :return: The model_instance_type of this
409
+ ModelNewInstanceRequest. # noqa: E501
284
410
  :rtype: str
285
411
  """
286
412
  return self._model_instance_type
@@ -289,23 +415,27 @@ class ModelNewInstanceRequest(object):
289
415
  def model_instance_type(self, model_instance_type):
290
416
  """Sets the model_instance_type of this ModelNewInstanceRequest.
291
417
 
292
- Whether the model instance is a base model, external variant, internal variant, or unspecified # noqa: E501
418
+ Whether the model instance is a base model, external variant,
419
+ internal variant, or unspecified # noqa: E501
293
420
 
294
- :param model_instance_type: The model_instance_type of this ModelNewInstanceRequest. # noqa: E501
421
+ :param model_instance_type: The model_instance_type of this
422
+ ModelNewInstanceRequest. # noqa: E501
295
423
  :type: str
296
424
  """
297
425
  allowed_values = ["Unspecified", "BaseModel", "KaggleVariant", "ExternalVariant"] # noqa: E501
298
426
  if model_instance_type not in allowed_values:
299
427
  raise ValueError(
300
- "Invalid value for `model_instance_type` ({0}), must be one of {1}" # noqa: E501
301
- .format(model_instance_type, allowed_values)
428
+ "Invalid value for `model_instance_type` ({0}), must be one of {1}".format( # noqa: E501
429
+ model_instance_type, allowed_values
430
+ )
302
431
  )
303
432
 
304
433
  self._model_instance_type = model_instance_type
305
434
 
306
435
  @property
307
436
  def base_model_instance(self):
308
- """Gets the base_model_instance of this ModelNewInstanceRequest. # noqa: E501
437
+ """Gets the base_model_instance of this ModelNewInstanceRequest. #
438
+ noqa: E501.
309
439
 
310
440
  If this is an internal variant, the `{owner-slug}/{model-slug}/{framework}/{instance-slug}` of the base model instance # noqa: E501
311
441
 
@@ -328,11 +458,14 @@ class ModelNewInstanceRequest(object):
328
458
 
329
459
  @property
330
460
  def external_base_model_url(self):
331
- """Gets the external_base_model_url of this ModelNewInstanceRequest. # noqa: E501
461
+ """Gets the external_base_model_url of this ModelNewInstanceRequest. #
462
+ noqa: E501.
332
463
 
333
- If this is an external variant, a URL to the base model # noqa: E501
464
+ If this is an external variant, a URL to the base model # noqa:
465
+ E501
334
466
 
335
- :return: The external_base_model_url of this ModelNewInstanceRequest. # noqa: E501
467
+ :return: The external_base_model_url of this
468
+ ModelNewInstanceRequest. # noqa: E501
336
469
  :rtype: int
337
470
  """
338
471
  return self._external_base_model_url
@@ -341,9 +474,11 @@ class ModelNewInstanceRequest(object):
341
474
  def external_base_model_url(self, external_base_model_url):
342
475
  """Sets the external_base_model_url of this ModelNewInstanceRequest.
343
476
 
344
- If this is an external variant, a URL to the base model # noqa: E501
477
+ If this is an external variant, a URL to the base model # noqa:
478
+ E501
345
479
 
346
- :param external_base_model_url: The external_base_model_url of this ModelNewInstanceRequest. # noqa: E501
480
+ :param external_base_model_url: The external_base_model_url of
481
+ this ModelNewInstanceRequest. # noqa: E501
347
482
  :type: int
348
483
  """
349
484
 
@@ -351,11 +486,12 @@ class ModelNewInstanceRequest(object):
351
486
 
352
487
  @property
353
488
  def files(self):
354
- """Gets the files of this ModelNewInstanceRequest. # noqa: E501
489
+ """Gets the files of this ModelNewInstanceRequest. # noqa: E501.
355
490
 
356
- A list of files that should be associated with the model instance version # noqa: E501
491
+ A list of files that should be associated with the model
492
+ instance version # noqa: E501
357
493
 
358
- :return: The files of this ModelNewInstanceRequest. # noqa: E501
494
+ :return: The files of this ModelNewInstanceRequest. # noqa: E501
359
495
  :rtype: list[UploadFile]
360
496
  """
361
497
  return self._files
@@ -364,40 +500,40 @@ class ModelNewInstanceRequest(object):
364
500
  def files(self, files):
365
501
  """Sets the files of this ModelNewInstanceRequest.
366
502
 
367
- A list of files that should be associated with the model instance version # noqa: E501
503
+ A list of files that should be associated with the model
504
+ instance version # noqa: E501
368
505
 
369
- :param files: The files of this ModelNewInstanceRequest. # noqa: E501
506
+ :param files: The files of this ModelNewInstanceRequest. #
507
+ noqa: E501
370
508
  :type: list[UploadFile]
371
509
  """
372
510
 
373
511
  self._files = files
374
512
 
375
513
  def to_dict(self):
376
- """Returns the model properties as a dict"""
514
+ """Returns the model properties as a dict."""
377
515
  result = {}
378
516
 
379
517
  for attr, _ in six.iteritems(self.project_types):
380
518
  value = getattr(self, attr)
381
519
  if isinstance(value, list):
382
- result[attr] = list(map(
383
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
384
- value
385
- ))
520
+ result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
386
521
  elif hasattr(value, "to_dict"):
387
522
  result[attr] = value.to_dict()
388
523
  elif isinstance(value, dict):
389
- result[attr] = dict(map(
390
- lambda item: (item[0], item[1].to_dict())
391
- if hasattr(item[1], "to_dict") else item,
392
- value.items()
393
- ))
524
+ result[attr] = dict(
525
+ map(
526
+ lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
527
+ value.items(),
528
+ )
529
+ )
394
530
  else:
395
531
  result[attr] = value
396
532
 
397
533
  return result
398
534
 
399
535
  def to_str(self):
400
- """Returns the string representation of the model"""
536
+ """Returns the string representation of the model."""
401
537
  return pprint.pformat(self.to_dict())
402
538
 
403
539
  def __repr__(self):
@@ -405,13 +541,12 @@ class ModelNewInstanceRequest(object):
405
541
  return self.to_str()
406
542
 
407
543
  def __eq__(self, other):
408
- """Returns true if both objects are equal"""
544
+ """Returns true if both objects are equal."""
409
545
  if not isinstance(other, ModelNewInstanceRequest):
410
546
  return False
411
547
 
412
548
  return self.__dict__ == other.__dict__
413
549
 
414
550
  def __ne__(self, other):
415
- """Returns true if both objects are not equal"""
551
+ """Returns true if both objects are not equal."""
416
552
  return not self == other
417
-