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.
- kaggle/__init__.py +10 -6
- kaggle/api/kaggle_api.py +574 -585
- kaggle/api/kaggle_api_extended.py +5251 -4738
- kaggle/cli.py +1335 -1585
- kaggle/models/api_blob_type.py +3 -3
- kaggle/models/dataset_column.py +129 -129
- kaggle/models/dataset_new_request.py +130 -72
- kaggle/models/dataset_new_version_request.py +88 -56
- kaggle/models/dataset_update_settings_request.py +93 -59
- kaggle/models/kaggle_models_extended.py +169 -172
- kaggle/models/kernel_push_request.py +152 -100
- kaggle/models/model_instance_new_version_request.py +30 -30
- kaggle/models/model_instance_update_request.py +171 -71
- kaggle/models/model_new_instance_request.py +223 -88
- kaggle/models/model_new_request.py +61 -46
- kaggle/models/model_update_request.py +66 -48
- kaggle/models/start_blob_upload_request.py +146 -138
- kaggle/models/start_blob_upload_response.py +83 -78
- kaggle/models/upload_file.py +92 -96
- kaggle/test/test_authenticate.py +23 -23
- {kaggle-1.7.4.2.dist-info → kaggle-1.8.0.dist-info}/METADATA +11 -15
- kaggle-1.8.0.dist-info/RECORD +148 -0
- kagglesdk/__init__.py +5 -1
- kagglesdk/benchmarks/services/__init__.py +0 -0
- kagglesdk/benchmarks/services/benchmarks_api_service.py +19 -0
- kagglesdk/benchmarks/types/__init__.py +0 -0
- kagglesdk/benchmarks/types/benchmark_types.py +307 -0
- kagglesdk/benchmarks/types/benchmarks_api_service.py +243 -0
- kagglesdk/blobs/services/blob_api_service.py +1 -1
- kagglesdk/blobs/types/blob_api_service.py +2 -2
- kagglesdk/common/services/__init__.py +0 -0
- kagglesdk/common/services/operations_service.py +46 -0
- kagglesdk/common/types/file_download.py +1 -1
- kagglesdk/common/types/http_redirect.py +1 -1
- kagglesdk/common/types/operations.py +194 -0
- kagglesdk/common/types/operations_service.py +48 -0
- kagglesdk/community/__init__.py +0 -0
- kagglesdk/community/types/__init__.py +0 -0
- kagglesdk/community/types/content_enums.py +44 -0
- kagglesdk/community/types/organization.py +410 -0
- kagglesdk/competitions/services/competition_api_service.py +49 -12
- kagglesdk/competitions/types/competition.py +14 -0
- kagglesdk/competitions/types/competition_api_service.py +1639 -1275
- kagglesdk/competitions/types/search_competitions.py +28 -0
- kagglesdk/datasets/databundles/__init__.py +0 -0
- kagglesdk/datasets/databundles/types/__init__.py +0 -0
- kagglesdk/datasets/databundles/types/databundle_api_types.py +540 -0
- kagglesdk/datasets/services/dataset_api_service.py +39 -14
- kagglesdk/datasets/types/dataset_api_service.py +567 -297
- kagglesdk/datasets/types/dataset_enums.py +21 -0
- kagglesdk/datasets/types/dataset_service.py +145 -0
- kagglesdk/datasets/types/dataset_types.py +74 -74
- kagglesdk/datasets/types/search_datasets.py +6 -0
- kagglesdk/discussions/__init__.py +0 -0
- kagglesdk/discussions/types/__init__.py +0 -0
- kagglesdk/discussions/types/search_discussions.py +43 -0
- kagglesdk/discussions/types/writeup_enums.py +11 -0
- kagglesdk/education/services/education_api_service.py +1 -1
- kagglesdk/education/types/education_api_service.py +1 -1
- kagglesdk/kaggle_client.py +55 -20
- kagglesdk/kaggle_creds.py +148 -0
- kagglesdk/kaggle_env.py +89 -27
- kagglesdk/kaggle_http_client.py +235 -290
- kagglesdk/kaggle_oauth.py +200 -0
- kagglesdk/kaggle_object.py +298 -250
- kagglesdk/kernels/services/kernels_api_service.py +46 -9
- kagglesdk/kernels/types/kernels_api_service.py +658 -158
- kagglesdk/kernels/types/kernels_enums.py +6 -0
- kagglesdk/kernels/types/search_kernels.py +6 -0
- kagglesdk/licenses/__init__.py +0 -0
- kagglesdk/licenses/types/__init__.py +0 -0
- kagglesdk/licenses/types/licenses_types.py +182 -0
- kagglesdk/models/services/model_api_service.py +46 -21
- kagglesdk/models/types/model_api_service.py +1018 -652
- kagglesdk/models/types/model_enums.py +8 -0
- kagglesdk/models/types/model_service.py +71 -71
- kagglesdk/models/types/model_types.py +1057 -5
- kagglesdk/models/types/search_models.py +8 -0
- kagglesdk/search/__init__.py +0 -0
- kagglesdk/search/services/__init__.py +0 -0
- kagglesdk/search/services/search_api_service.py +19 -0
- kagglesdk/search/types/__init__.py +0 -0
- kagglesdk/search/types/search_api_service.py +2435 -0
- kagglesdk/search/types/search_content_shared.py +50 -0
- kagglesdk/search/types/search_enums.py +45 -0
- kagglesdk/search/types/search_service.py +303 -0
- kagglesdk/security/__init__.py +0 -0
- kagglesdk/security/services/__init__.py +0 -0
- kagglesdk/security/services/iam_service.py +31 -0
- kagglesdk/security/services/oauth_service.py +58 -0
- kagglesdk/security/types/__init__.py +0 -0
- kagglesdk/security/types/authentication.py +171 -0
- kagglesdk/security/types/iam_service.py +496 -0
- kagglesdk/security/types/oauth_service.py +1181 -0
- kagglesdk/security/types/roles.py +8 -0
- kagglesdk/security/types/security_types.py +159 -0
- kagglesdk/test/__init__.py +0 -0
- kagglesdk/test/test_client.py +20 -24
- kagglesdk/users/services/__init__.py +0 -0
- kagglesdk/users/services/account_service.py +31 -0
- kagglesdk/users/services/group_api_service.py +31 -0
- kagglesdk/users/types/account_service.py +345 -0
- kagglesdk/users/types/group_api_service.py +315 -0
- kagglesdk/users/types/group_types.py +165 -0
- kagglesdk/users/types/groups_enum.py +8 -0
- kagglesdk/users/types/progression_service.py +9 -0
- kagglesdk/users/types/search_users.py +23 -0
- kagglesdk/users/types/user_avatar.py +226 -0
- kaggle/configuration.py +0 -206
- kaggle-1.7.4.2.dist-info/RECORD +0 -89
- {kaggle-1.7.4.2.dist-info → kaggle-1.8.0.dist-info}/WHEEL +0 -0
- {kaggle-1.7.4.2.dist-info → kaggle-1.8.0.dist-info}/entry_points.txt +0 -0
- {kaggle-1.7.4.2.dist-info → kaggle-1.8.0.dist-info}/licenses/LICENSE.txt +0 -0
- {kaggle/test → kagglesdk/benchmarks}/__init__.py +0 -0
|
@@ -31,45 +31,64 @@ class KernelPushRequest(object):
|
|
|
31
31
|
attribute_map (dict): The key is attribute name
|
|
32
32
|
and the value is json key in definition.
|
|
33
33
|
"""
|
|
34
|
+
|
|
34
35
|
project_types = {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
36
|
+
"id": "int",
|
|
37
|
+
"slug": "str",
|
|
38
|
+
"new_title": "str",
|
|
39
|
+
"text": "str",
|
|
40
|
+
"language": "str",
|
|
41
|
+
"kernel_type": "str",
|
|
42
|
+
"is_private": "bool",
|
|
43
|
+
"enable_gpu": "bool",
|
|
44
|
+
"enable_tpu": "bool",
|
|
45
|
+
"enable_internet": "bool",
|
|
46
|
+
"dataset_data_sources": "list[str]",
|
|
47
|
+
"competition_data_sources": "list[str]",
|
|
48
|
+
"kernel_data_sources": "list[str]",
|
|
49
|
+
"model_data_sources": "list[str]",
|
|
50
|
+
"category_ids": "list[str]",
|
|
51
|
+
"docker_image_pinning_type": "str",
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
attribute_map = {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
55
|
+
"id": "id",
|
|
56
|
+
"slug": "slug",
|
|
57
|
+
"new_title": "newTitle",
|
|
58
|
+
"text": "text",
|
|
59
|
+
"language": "language",
|
|
60
|
+
"kernel_type": "kernelType",
|
|
61
|
+
"is_private": "isPrivate",
|
|
62
|
+
"enable_gpu": "enableGpu",
|
|
63
|
+
"enable_tpu": "enableTpu",
|
|
64
|
+
"enable_internet": "enableInternet",
|
|
65
|
+
"dataset_data_sources": "datasetDataSources",
|
|
66
|
+
"competition_data_sources": "competitionDataSources",
|
|
67
|
+
"kernel_data_sources": "kernelDataSources",
|
|
68
|
+
"model_data_sources": "modelDataSources",
|
|
69
|
+
"category_ids": "categoryIds",
|
|
70
|
+
"docker_image_pinning_type": "dockerImagePinningType",
|
|
70
71
|
}
|
|
71
72
|
|
|
72
|
-
def __init__(
|
|
73
|
+
def __init__(
|
|
74
|
+
self,
|
|
75
|
+
id=None,
|
|
76
|
+
slug=None,
|
|
77
|
+
new_title=None,
|
|
78
|
+
text=None,
|
|
79
|
+
language=None,
|
|
80
|
+
kernel_type=None,
|
|
81
|
+
is_private=None,
|
|
82
|
+
enable_gpu=None,
|
|
83
|
+
enable_tpu=None,
|
|
84
|
+
enable_internet=None,
|
|
85
|
+
dataset_data_sources=None,
|
|
86
|
+
competition_data_sources=None,
|
|
87
|
+
kernel_data_sources=None,
|
|
88
|
+
model_data_sources=None,
|
|
89
|
+
category_ids=None,
|
|
90
|
+
docker_image_pinning_type=None,
|
|
91
|
+
): # noqa: E501
|
|
73
92
|
|
|
74
93
|
self._id = None
|
|
75
94
|
self._slug = None
|
|
@@ -121,7 +140,7 @@ class KernelPushRequest(object):
|
|
|
121
140
|
|
|
122
141
|
@property
|
|
123
142
|
def id(self):
|
|
124
|
-
"""Gets the id of this KernelPushRequest. # noqa: E501
|
|
143
|
+
"""Gets the id of this KernelPushRequest. # noqa: E501.
|
|
125
144
|
|
|
126
145
|
The kernel's ID number. One of `id` and `slug` are required. If both are specified, `id` will be preferred # noqa: E501
|
|
127
146
|
|
|
@@ -144,7 +163,7 @@ class KernelPushRequest(object):
|
|
|
144
163
|
|
|
145
164
|
@property
|
|
146
165
|
def slug(self):
|
|
147
|
-
"""Gets the slug of this KernelPushRequest. # noqa: E501
|
|
166
|
+
"""Gets the slug of this KernelPushRequest. # noqa: E501.
|
|
148
167
|
|
|
149
168
|
The full slug of the kernel to push to, in the format `USERNAME/KERNEL-SLUG`. The kernel slug must be the title lowercased with dashes (`-`) replacing spaces. One of `id` and `slug` are required. If both are specified, `id` will be preferred # noqa: E501
|
|
150
169
|
|
|
@@ -167,7 +186,7 @@ class KernelPushRequest(object):
|
|
|
167
186
|
|
|
168
187
|
@property
|
|
169
188
|
def new_title(self):
|
|
170
|
-
"""Gets the new_title of this KernelPushRequest. # noqa: E501
|
|
189
|
+
"""Gets the new_title of this KernelPushRequest. # noqa: E501.
|
|
171
190
|
|
|
172
191
|
The title to be set on the kernel # noqa: E501
|
|
173
192
|
|
|
@@ -182,7 +201,8 @@ class KernelPushRequest(object):
|
|
|
182
201
|
|
|
183
202
|
The title to be set on the kernel # noqa: E501
|
|
184
203
|
|
|
185
|
-
:param new_title: The new_title of this KernelPushRequest.
|
|
204
|
+
:param new_title: The new_title of this KernelPushRequest. #
|
|
205
|
+
noqa: E501
|
|
186
206
|
:type: str
|
|
187
207
|
"""
|
|
188
208
|
|
|
@@ -190,7 +210,7 @@ class KernelPushRequest(object):
|
|
|
190
210
|
|
|
191
211
|
@property
|
|
192
212
|
def text(self):
|
|
193
|
-
"""Gets the text of this KernelPushRequest. # noqa: E501
|
|
213
|
+
"""Gets the text of this KernelPushRequest. # noqa: E501.
|
|
194
214
|
|
|
195
215
|
The kernel's source code # noqa: E501
|
|
196
216
|
|
|
@@ -215,7 +235,7 @@ class KernelPushRequest(object):
|
|
|
215
235
|
|
|
216
236
|
@property
|
|
217
237
|
def language(self):
|
|
218
|
-
"""Gets the language of this KernelPushRequest. # noqa: E501
|
|
238
|
+
"""Gets the language of this KernelPushRequest. # noqa: E501.
|
|
219
239
|
|
|
220
240
|
The language that the kernel is written in # noqa: E501
|
|
221
241
|
|
|
@@ -230,7 +250,8 @@ class KernelPushRequest(object):
|
|
|
230
250
|
|
|
231
251
|
The language that the kernel is written in # noqa: E501
|
|
232
252
|
|
|
233
|
-
:param language: The language of this KernelPushRequest.
|
|
253
|
+
:param language: The language of this KernelPushRequest. #
|
|
254
|
+
noqa: E501
|
|
234
255
|
:type: str
|
|
235
256
|
"""
|
|
236
257
|
if language is None:
|
|
@@ -238,19 +259,19 @@ class KernelPushRequest(object):
|
|
|
238
259
|
allowed_values = ["python", "r", "rmarkdown"] # noqa: E501
|
|
239
260
|
if language not in allowed_values:
|
|
240
261
|
raise ValueError(
|
|
241
|
-
"Invalid value for `language` ({0}), must be one of {1}" # noqa: E501
|
|
242
|
-
.format(language, allowed_values)
|
|
262
|
+
"Invalid value for `language` ({0}), must be one of {1}".format(language, allowed_values) # noqa: E501
|
|
243
263
|
)
|
|
244
264
|
|
|
245
265
|
self._language = language
|
|
246
266
|
|
|
247
267
|
@property
|
|
248
268
|
def kernel_type(self):
|
|
249
|
-
"""Gets the kernel_type of this KernelPushRequest. # noqa: E501
|
|
269
|
+
"""Gets the kernel_type of this KernelPushRequest. # noqa: E501.
|
|
250
270
|
|
|
251
|
-
The type of kernel. Cannot be changed once the kernel has been
|
|
271
|
+
The type of kernel. Cannot be changed once the kernel has been
|
|
272
|
+
created # noqa: E501
|
|
252
273
|
|
|
253
|
-
:return: The kernel_type of this KernelPushRequest.
|
|
274
|
+
:return: The kernel_type of this KernelPushRequest. # noqa: E501
|
|
254
275
|
:rtype: str
|
|
255
276
|
"""
|
|
256
277
|
return self._kernel_type
|
|
@@ -259,9 +280,11 @@ class KernelPushRequest(object):
|
|
|
259
280
|
def kernel_type(self, kernel_type):
|
|
260
281
|
"""Sets the kernel_type of this KernelPushRequest.
|
|
261
282
|
|
|
262
|
-
The type of kernel. Cannot be changed once the kernel has been
|
|
283
|
+
The type of kernel. Cannot be changed once the kernel has been
|
|
284
|
+
created # noqa: E501
|
|
263
285
|
|
|
264
|
-
:param kernel_type: The kernel_type of this KernelPushRequest.
|
|
286
|
+
:param kernel_type: The kernel_type of this KernelPushRequest. #
|
|
287
|
+
noqa: E501
|
|
265
288
|
:type: str
|
|
266
289
|
"""
|
|
267
290
|
if kernel_type is None:
|
|
@@ -269,15 +292,16 @@ class KernelPushRequest(object):
|
|
|
269
292
|
allowed_values = ["script", "notebook"] # noqa: E501
|
|
270
293
|
if kernel_type not in allowed_values:
|
|
271
294
|
raise ValueError(
|
|
272
|
-
"Invalid value for `kernel_type` ({0}), must be one of {1}" # noqa: E501
|
|
273
|
-
|
|
295
|
+
"Invalid value for `kernel_type` ({0}), must be one of {1}".format( # noqa: E501
|
|
296
|
+
kernel_type, allowed_values
|
|
297
|
+
)
|
|
274
298
|
)
|
|
275
299
|
|
|
276
300
|
self._kernel_type = kernel_type
|
|
277
301
|
|
|
278
302
|
@property
|
|
279
303
|
def is_private(self):
|
|
280
|
-
"""Gets the is_private of this KernelPushRequest. # noqa: E501
|
|
304
|
+
"""Gets the is_private of this KernelPushRequest. # noqa: E501.
|
|
281
305
|
|
|
282
306
|
Whether or not the kernel should be private # noqa: E501
|
|
283
307
|
|
|
@@ -292,7 +316,8 @@ class KernelPushRequest(object):
|
|
|
292
316
|
|
|
293
317
|
Whether or not the kernel should be private # noqa: E501
|
|
294
318
|
|
|
295
|
-
:param is_private: The is_private of this KernelPushRequest.
|
|
319
|
+
:param is_private: The is_private of this KernelPushRequest. #
|
|
320
|
+
noqa: E501
|
|
296
321
|
:type: bool
|
|
297
322
|
"""
|
|
298
323
|
|
|
@@ -300,7 +325,7 @@ class KernelPushRequest(object):
|
|
|
300
325
|
|
|
301
326
|
@property
|
|
302
327
|
def enable_gpu(self):
|
|
303
|
-
"""Gets the enable_gpu of this KernelPushRequest. # noqa: E501
|
|
328
|
+
"""Gets the enable_gpu of this KernelPushRequest. # noqa: E501.
|
|
304
329
|
|
|
305
330
|
Whether or not the kernel should run on a GPU # noqa: E501
|
|
306
331
|
|
|
@@ -315,7 +340,8 @@ class KernelPushRequest(object):
|
|
|
315
340
|
|
|
316
341
|
Whether or not the kernel should run on a GPU # noqa: E501
|
|
317
342
|
|
|
318
|
-
:param enable_gpu: The enable_gpu of this KernelPushRequest.
|
|
343
|
+
:param enable_gpu: The enable_gpu of this KernelPushRequest. #
|
|
344
|
+
noqa: E501
|
|
319
345
|
:type: bool
|
|
320
346
|
"""
|
|
321
347
|
|
|
@@ -323,7 +349,7 @@ class KernelPushRequest(object):
|
|
|
323
349
|
|
|
324
350
|
@property
|
|
325
351
|
def enable_tpu(self):
|
|
326
|
-
"""Gets the enable_tpu of this KernelPushRequest. # noqa: E501
|
|
352
|
+
"""Gets the enable_tpu of this KernelPushRequest. # noqa: E501.
|
|
327
353
|
|
|
328
354
|
Whether or not the kernel should run on a TPU # noqa: E501
|
|
329
355
|
|
|
@@ -338,7 +364,8 @@ class KernelPushRequest(object):
|
|
|
338
364
|
|
|
339
365
|
Whether or not the kernel should run on a TPU # noqa: E501
|
|
340
366
|
|
|
341
|
-
:param enable_tpu: The enable_tpu of this KernelPushRequest.
|
|
367
|
+
:param enable_tpu: The enable_tpu of this KernelPushRequest. #
|
|
368
|
+
noqa: E501
|
|
342
369
|
:type: bool
|
|
343
370
|
"""
|
|
344
371
|
|
|
@@ -346,11 +373,13 @@ class KernelPushRequest(object):
|
|
|
346
373
|
|
|
347
374
|
@property
|
|
348
375
|
def enable_internet(self):
|
|
349
|
-
"""Gets the enable_internet of this KernelPushRequest. # noqa: E501
|
|
376
|
+
"""Gets the enable_internet of this KernelPushRequest. # noqa: E501.
|
|
350
377
|
|
|
351
|
-
Whether or not the kernel should be able to access the internet
|
|
378
|
+
Whether or not the kernel should be able to access the internet
|
|
379
|
+
# noqa: E501
|
|
352
380
|
|
|
353
|
-
:return: The enable_internet of this KernelPushRequest.
|
|
381
|
+
:return: The enable_internet of this KernelPushRequest. # noqa:
|
|
382
|
+
E501
|
|
354
383
|
:rtype: bool
|
|
355
384
|
"""
|
|
356
385
|
return self._enable_internet
|
|
@@ -359,9 +388,11 @@ class KernelPushRequest(object):
|
|
|
359
388
|
def enable_internet(self, enable_internet):
|
|
360
389
|
"""Sets the enable_internet of this KernelPushRequest.
|
|
361
390
|
|
|
362
|
-
Whether or not the kernel should be able to access the internet
|
|
391
|
+
Whether or not the kernel should be able to access the internet
|
|
392
|
+
# noqa: E501
|
|
363
393
|
|
|
364
|
-
:param enable_internet: The enable_internet of this
|
|
394
|
+
:param enable_internet: The enable_internet of this
|
|
395
|
+
KernelPushRequest. # noqa: E501
|
|
365
396
|
:type: bool
|
|
366
397
|
"""
|
|
367
398
|
|
|
@@ -369,11 +400,14 @@ class KernelPushRequest(object):
|
|
|
369
400
|
|
|
370
401
|
@property
|
|
371
402
|
def dataset_data_sources(self):
|
|
372
|
-
"""Gets the dataset_data_sources of this KernelPushRequest. # noqa:
|
|
403
|
+
"""Gets the dataset_data_sources of this KernelPushRequest. # noqa:
|
|
404
|
+
E501.
|
|
373
405
|
|
|
374
|
-
A list of dataset data sources that the kernel should use. Each
|
|
406
|
+
A list of dataset data sources that the kernel should use. Each
|
|
407
|
+
dataset is specified as `USERNAME/DATASET-SLUG` # noqa: E501
|
|
375
408
|
|
|
376
|
-
:return: The dataset_data_sources of this KernelPushRequest.
|
|
409
|
+
:return: The dataset_data_sources of this KernelPushRequest. #
|
|
410
|
+
noqa: E501
|
|
377
411
|
:rtype: list[str]
|
|
378
412
|
"""
|
|
379
413
|
return self._dataset_data_sources
|
|
@@ -382,9 +416,11 @@ class KernelPushRequest(object):
|
|
|
382
416
|
def dataset_data_sources(self, dataset_data_sources):
|
|
383
417
|
"""Sets the dataset_data_sources of this KernelPushRequest.
|
|
384
418
|
|
|
385
|
-
A list of dataset data sources that the kernel should use. Each
|
|
419
|
+
A list of dataset data sources that the kernel should use. Each
|
|
420
|
+
dataset is specified as `USERNAME/DATASET-SLUG` # noqa: E501
|
|
386
421
|
|
|
387
|
-
:param dataset_data_sources: The dataset_data_sources of this
|
|
422
|
+
:param dataset_data_sources: The dataset_data_sources of this
|
|
423
|
+
KernelPushRequest. # noqa: E501
|
|
388
424
|
:type: list[str]
|
|
389
425
|
"""
|
|
390
426
|
|
|
@@ -392,11 +428,14 @@ class KernelPushRequest(object):
|
|
|
392
428
|
|
|
393
429
|
@property
|
|
394
430
|
def competition_data_sources(self):
|
|
395
|
-
"""Gets the competition_data_sources of this KernelPushRequest. #
|
|
431
|
+
"""Gets the competition_data_sources of this KernelPushRequest. #
|
|
432
|
+
noqa: E501.
|
|
396
433
|
|
|
397
|
-
A list of competition data sources that the kernel should use #
|
|
434
|
+
A list of competition data sources that the kernel should use #
|
|
435
|
+
noqa: E501
|
|
398
436
|
|
|
399
|
-
:return: The competition_data_sources of this KernelPushRequest.
|
|
437
|
+
:return: The competition_data_sources of this KernelPushRequest.
|
|
438
|
+
# noqa: E501
|
|
400
439
|
:rtype: list[str]
|
|
401
440
|
"""
|
|
402
441
|
return self._competition_data_sources
|
|
@@ -405,9 +444,11 @@ class KernelPushRequest(object):
|
|
|
405
444
|
def competition_data_sources(self, competition_data_sources):
|
|
406
445
|
"""Sets the competition_data_sources of this KernelPushRequest.
|
|
407
446
|
|
|
408
|
-
A list of competition data sources that the kernel should use #
|
|
447
|
+
A list of competition data sources that the kernel should use #
|
|
448
|
+
noqa: E501
|
|
409
449
|
|
|
410
|
-
:param competition_data_sources: The competition_data_sources of
|
|
450
|
+
:param competition_data_sources: The competition_data_sources of
|
|
451
|
+
this KernelPushRequest. # noqa: E501
|
|
411
452
|
:type: list[str]
|
|
412
453
|
"""
|
|
413
454
|
|
|
@@ -415,11 +456,14 @@ class KernelPushRequest(object):
|
|
|
415
456
|
|
|
416
457
|
@property
|
|
417
458
|
def kernel_data_sources(self):
|
|
418
|
-
"""Gets the kernel_data_sources of this KernelPushRequest. # noqa:
|
|
459
|
+
"""Gets the kernel_data_sources of this KernelPushRequest. # noqa:
|
|
460
|
+
E501.
|
|
419
461
|
|
|
420
|
-
A list of kernel data sources that the kernel should use. Each
|
|
462
|
+
A list of kernel data sources that the kernel should use. Each
|
|
463
|
+
dataset is specified as `USERNAME/KERNEL-SLUG` # noqa: E501
|
|
421
464
|
|
|
422
|
-
:return: The kernel_data_sources of this KernelPushRequest.
|
|
465
|
+
:return: The kernel_data_sources of this KernelPushRequest. #
|
|
466
|
+
noqa: E501
|
|
423
467
|
:rtype: list[str]
|
|
424
468
|
"""
|
|
425
469
|
return self._kernel_data_sources
|
|
@@ -428,9 +472,11 @@ class KernelPushRequest(object):
|
|
|
428
472
|
def kernel_data_sources(self, kernel_data_sources):
|
|
429
473
|
"""Sets the kernel_data_sources of this KernelPushRequest.
|
|
430
474
|
|
|
431
|
-
A list of kernel data sources that the kernel should use. Each
|
|
475
|
+
A list of kernel data sources that the kernel should use. Each
|
|
476
|
+
dataset is specified as `USERNAME/KERNEL-SLUG` # noqa: E501
|
|
432
477
|
|
|
433
|
-
:param kernel_data_sources: The kernel_data_sources of this
|
|
478
|
+
:param kernel_data_sources: The kernel_data_sources of this
|
|
479
|
+
KernelPushRequest. # noqa: E501
|
|
434
480
|
:type: list[str]
|
|
435
481
|
"""
|
|
436
482
|
|
|
@@ -438,7 +484,8 @@ class KernelPushRequest(object):
|
|
|
438
484
|
|
|
439
485
|
@property
|
|
440
486
|
def model_data_sources(self):
|
|
441
|
-
"""Gets the model_data_sources of this KernelPushRequest. # noqa:
|
|
487
|
+
"""Gets the model_data_sources of this KernelPushRequest. # noqa:
|
|
488
|
+
E501.
|
|
442
489
|
|
|
443
490
|
A list of model data sources that the kernel should use. Each model is specified as `USERNAME/MODEL-SLUG/FRAMEWORK/VARIATION-SLUG/VERSION-NUMBER` # noqa: E501
|
|
444
491
|
|
|
@@ -461,11 +508,12 @@ class KernelPushRequest(object):
|
|
|
461
508
|
|
|
462
509
|
@property
|
|
463
510
|
def category_ids(self):
|
|
464
|
-
"""Gets the category_ids of this KernelPushRequest. # noqa: E501
|
|
511
|
+
"""Gets the category_ids of this KernelPushRequest. # noqa: E501.
|
|
465
512
|
|
|
466
513
|
A list of tag IDs to associated with the kernel # noqa: E501
|
|
467
514
|
|
|
468
|
-
:return: The category_ids of this KernelPushRequest.
|
|
515
|
+
:return: The category_ids of this KernelPushRequest. # noqa:
|
|
516
|
+
E501
|
|
469
517
|
:rtype: list[str]
|
|
470
518
|
"""
|
|
471
519
|
return self._category_ids
|
|
@@ -476,7 +524,8 @@ class KernelPushRequest(object):
|
|
|
476
524
|
|
|
477
525
|
A list of tag IDs to associated with the kernel # noqa: E501
|
|
478
526
|
|
|
479
|
-
:param category_ids: The category_ids of this KernelPushRequest.
|
|
527
|
+
:param category_ids: The category_ids of this KernelPushRequest.
|
|
528
|
+
# noqa: E501
|
|
480
529
|
:type: list[str]
|
|
481
530
|
"""
|
|
482
531
|
|
|
@@ -484,11 +533,14 @@ class KernelPushRequest(object):
|
|
|
484
533
|
|
|
485
534
|
@property
|
|
486
535
|
def docker_image_pinning_type(self):
|
|
487
|
-
"""Gets the docker_image_pinning_type of this KernelPushRequest. #
|
|
536
|
+
"""Gets the docker_image_pinning_type of this KernelPushRequest. #
|
|
537
|
+
noqa: E501.
|
|
488
538
|
|
|
489
|
-
Which docker image to use for executing new versions going
|
|
539
|
+
Which docker image to use for executing new versions going
|
|
540
|
+
forward. # noqa: E501
|
|
490
541
|
|
|
491
|
-
:return: The docker_image_pinning_type of this
|
|
542
|
+
:return: The docker_image_pinning_type of this
|
|
543
|
+
KernelPushRequest. # noqa: E501
|
|
492
544
|
:rtype: str
|
|
493
545
|
"""
|
|
494
546
|
return self._docker_image_pinning_type
|
|
@@ -497,46 +549,47 @@ class KernelPushRequest(object):
|
|
|
497
549
|
def docker_image_pinning_type(self, docker_image_pinning_type):
|
|
498
550
|
"""Sets the docker_image_pinning_type of this KernelPushRequest.
|
|
499
551
|
|
|
500
|
-
Which docker image to use for executing new versions going
|
|
552
|
+
Which docker image to use for executing new versions going
|
|
553
|
+
forward. # noqa: E501
|
|
501
554
|
|
|
502
|
-
:param docker_image_pinning_type: The docker_image_pinning_type
|
|
555
|
+
:param docker_image_pinning_type: The docker_image_pinning_type
|
|
556
|
+
of this KernelPushRequest. # noqa: E501
|
|
503
557
|
:type: str
|
|
504
558
|
"""
|
|
505
559
|
allowed_values = ["original", "latest"] # noqa: E501
|
|
506
560
|
if docker_image_pinning_type not in allowed_values:
|
|
507
561
|
raise ValueError(
|
|
508
|
-
"Invalid value for `docker_image_pinning_type` ({0}), must be one of {1}" # noqa: E501
|
|
509
|
-
|
|
562
|
+
"Invalid value for `docker_image_pinning_type` ({0}), must be one of {1}".format( # noqa: E501
|
|
563
|
+
docker_image_pinning_type, allowed_values
|
|
564
|
+
)
|
|
510
565
|
)
|
|
511
566
|
|
|
512
567
|
self._docker_image_pinning_type = docker_image_pinning_type
|
|
513
568
|
|
|
514
569
|
def to_dict(self):
|
|
515
|
-
"""Returns the model properties as a dict"""
|
|
570
|
+
"""Returns the model properties as a dict."""
|
|
516
571
|
result = {}
|
|
517
572
|
|
|
518
573
|
for attr, _ in six.iteritems(self.project_types):
|
|
519
574
|
value = getattr(self, attr)
|
|
520
575
|
if isinstance(value, list):
|
|
521
|
-
result[attr] = list(map(
|
|
522
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
523
|
-
value
|
|
524
|
-
))
|
|
576
|
+
result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
|
|
525
577
|
elif hasattr(value, "to_dict"):
|
|
526
578
|
result[attr] = value.to_dict()
|
|
527
579
|
elif isinstance(value, dict):
|
|
528
|
-
result[attr] = dict(
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
580
|
+
result[attr] = dict(
|
|
581
|
+
map(
|
|
582
|
+
lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
|
|
583
|
+
value.items(),
|
|
584
|
+
)
|
|
585
|
+
)
|
|
533
586
|
else:
|
|
534
587
|
result[attr] = value
|
|
535
588
|
|
|
536
589
|
return result
|
|
537
590
|
|
|
538
591
|
def to_str(self):
|
|
539
|
-
"""Returns the string representation of the model"""
|
|
592
|
+
"""Returns the string representation of the model."""
|
|
540
593
|
return pprint.pformat(self.to_dict())
|
|
541
594
|
|
|
542
595
|
def __repr__(self):
|
|
@@ -544,13 +597,12 @@ class KernelPushRequest(object):
|
|
|
544
597
|
return self.to_str()
|
|
545
598
|
|
|
546
599
|
def __eq__(self, other):
|
|
547
|
-
"""Returns true if both objects are equal"""
|
|
600
|
+
"""Returns true if both objects are equal."""
|
|
548
601
|
if not isinstance(other, KernelPushRequest):
|
|
549
602
|
return False
|
|
550
603
|
|
|
551
604
|
return self.__dict__ == other.__dict__
|
|
552
605
|
|
|
553
606
|
def __ne__(self, other):
|
|
554
|
-
"""Returns true if both objects are not equal"""
|
|
607
|
+
"""Returns true if both objects are not equal."""
|
|
555
608
|
return not self == other
|
|
556
|
-
|
|
@@ -32,15 +32,10 @@ class ModelInstanceNewVersionRequest(object):
|
|
|
32
32
|
attribute_map (dict): The key is attribute name
|
|
33
33
|
and the value is json key in definition.
|
|
34
34
|
"""
|
|
35
|
-
project_types = {
|
|
36
|
-
'version_notes': 'str',
|
|
37
|
-
'files': 'list[UploadFile]'
|
|
38
|
-
}
|
|
39
35
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
}
|
|
36
|
+
project_types = {"version_notes": "str", "files": "list[UploadFile]"}
|
|
37
|
+
|
|
38
|
+
attribute_map = {"version_notes": "versionNotes", "files": "files"}
|
|
44
39
|
|
|
45
40
|
def __init__(self, version_notes=None, files=None): # noqa: E501
|
|
46
41
|
|
|
@@ -54,11 +49,13 @@ class ModelInstanceNewVersionRequest(object):
|
|
|
54
49
|
|
|
55
50
|
@property
|
|
56
51
|
def version_notes(self):
|
|
57
|
-
"""Gets the version_notes of this ModelInstanceNewVersionRequest. #
|
|
52
|
+
"""Gets the version_notes of this ModelInstanceNewVersionRequest. #
|
|
53
|
+
noqa: E501.
|
|
58
54
|
|
|
59
55
|
The version notes for the model instance version # noqa: E501
|
|
60
56
|
|
|
61
|
-
:return: The version_notes of this
|
|
57
|
+
:return: The version_notes of this
|
|
58
|
+
ModelInstanceNewVersionRequest. # noqa: E501
|
|
62
59
|
:rtype: str
|
|
63
60
|
"""
|
|
64
61
|
return self._version_notes
|
|
@@ -69,7 +66,8 @@ class ModelInstanceNewVersionRequest(object):
|
|
|
69
66
|
|
|
70
67
|
The version notes for the model instance version # noqa: E501
|
|
71
68
|
|
|
72
|
-
:param version_notes: The version_notes of this
|
|
69
|
+
:param version_notes: The version_notes of this
|
|
70
|
+
ModelInstanceNewVersionRequest. # noqa: E501
|
|
73
71
|
:type: str
|
|
74
72
|
"""
|
|
75
73
|
|
|
@@ -77,11 +75,14 @@ class ModelInstanceNewVersionRequest(object):
|
|
|
77
75
|
|
|
78
76
|
@property
|
|
79
77
|
def files(self):
|
|
80
|
-
"""Gets the files of this ModelInstanceNewVersionRequest. # noqa:
|
|
78
|
+
"""Gets the files of this ModelInstanceNewVersionRequest. # noqa:
|
|
79
|
+
E501.
|
|
81
80
|
|
|
82
|
-
A list of files that should be associated with the model
|
|
81
|
+
A list of files that should be associated with the model
|
|
82
|
+
instance version # noqa: E501
|
|
83
83
|
|
|
84
|
-
:return: The files of this ModelInstanceNewVersionRequest.
|
|
84
|
+
:return: The files of this ModelInstanceNewVersionRequest. #
|
|
85
|
+
noqa: E501
|
|
85
86
|
:rtype: list[UploadFile]
|
|
86
87
|
"""
|
|
87
88
|
return self._files
|
|
@@ -90,9 +91,11 @@ class ModelInstanceNewVersionRequest(object):
|
|
|
90
91
|
def files(self, files):
|
|
91
92
|
"""Sets the files of this ModelInstanceNewVersionRequest.
|
|
92
93
|
|
|
93
|
-
A list of files that should be associated with the model
|
|
94
|
+
A list of files that should be associated with the model
|
|
95
|
+
instance version # noqa: E501
|
|
94
96
|
|
|
95
|
-
:param files: The files of this ModelInstanceNewVersionRequest.
|
|
97
|
+
:param files: The files of this ModelInstanceNewVersionRequest.
|
|
98
|
+
# noqa: E501
|
|
96
99
|
:type: list[UploadFile]
|
|
97
100
|
"""
|
|
98
101
|
if files is None:
|
|
@@ -101,31 +104,29 @@ class ModelInstanceNewVersionRequest(object):
|
|
|
101
104
|
self._files = files
|
|
102
105
|
|
|
103
106
|
def to_dict(self):
|
|
104
|
-
"""Returns the model properties as a dict"""
|
|
107
|
+
"""Returns the model properties as a dict."""
|
|
105
108
|
result = {}
|
|
106
109
|
|
|
107
110
|
for attr, _ in six.iteritems(self.project_types):
|
|
108
111
|
value = getattr(self, attr)
|
|
109
112
|
if isinstance(value, list):
|
|
110
|
-
result[attr] = list(map(
|
|
111
|
-
lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
|
|
112
|
-
value
|
|
113
|
-
))
|
|
113
|
+
result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
|
|
114
114
|
elif hasattr(value, "to_dict"):
|
|
115
115
|
result[attr] = value.to_dict()
|
|
116
116
|
elif isinstance(value, dict):
|
|
117
|
-
result[attr] = dict(
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
117
|
+
result[attr] = dict(
|
|
118
|
+
map(
|
|
119
|
+
lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
|
|
120
|
+
value.items(),
|
|
121
|
+
)
|
|
122
|
+
)
|
|
122
123
|
else:
|
|
123
124
|
result[attr] = value
|
|
124
125
|
|
|
125
126
|
return result
|
|
126
127
|
|
|
127
128
|
def to_str(self):
|
|
128
|
-
"""Returns the string representation of the model"""
|
|
129
|
+
"""Returns the string representation of the model."""
|
|
129
130
|
return pprint.pformat(self.to_dict())
|
|
130
131
|
|
|
131
132
|
def __repr__(self):
|
|
@@ -133,13 +134,12 @@ class ModelInstanceNewVersionRequest(object):
|
|
|
133
134
|
return self.to_str()
|
|
134
135
|
|
|
135
136
|
def __eq__(self, other):
|
|
136
|
-
"""Returns true if both objects are equal"""
|
|
137
|
+
"""Returns true if both objects are equal."""
|
|
137
138
|
if not isinstance(other, ModelInstanceNewVersionRequest):
|
|
138
139
|
return False
|
|
139
140
|
|
|
140
141
|
return self.__dict__ == other.__dict__
|
|
141
142
|
|
|
142
143
|
def __ne__(self, other):
|
|
143
|
-
"""Returns true if both objects are not equal"""
|
|
144
|
+
"""Returns true if both objects are not equal."""
|
|
144
145
|
return not self == other
|
|
145
|
-
|