kaggle 1.8.2__py3-none-any.whl → 1.8.4__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 +1 -1
- kaggle/api/kaggle_api_extended.py +206 -75
- kaggle/cli.py +36 -28
- kaggle/models/upload_file.py +4 -4
- {kaggle-1.8.2.dist-info → kaggle-1.8.4.dist-info}/METADATA +66 -75
- kaggle-1.8.4.dist-info/RECORD +15 -0
- {kaggle-1.8.2.dist-info → kaggle-1.8.4.dist-info}/WHEEL +1 -1
- kaggle/models/api_blob_type.py +0 -4
- kaggle/models/dataset_column.py +0 -228
- kaggle/models/dataset_new_request.py +0 -443
- kaggle/models/dataset_new_version_request.py +0 -319
- kaggle/models/dataset_update_settings_request.py +0 -344
- kaggle/models/kernel_push_request.py +0 -608
- kaggle/models/model_instance_new_version_request.py +0 -145
- kaggle/models/model_instance_update_request.py +0 -451
- kaggle/models/model_new_instance_request.py +0 -552
- kaggle/models/model_new_request.py +0 -329
- kaggle/models/model_update_request.py +0 -300
- kaggle/models/start_blob_upload_request.py +0 -240
- kaggle/models/start_blob_upload_response.py +0 -142
- kaggle-1.8.2.dist-info/RECORD +0 -148
- kagglesdk/LICENSE +0 -201
- kagglesdk/__init__.py +0 -6
- kagglesdk/admin/__init__.py +0 -0
- kagglesdk/admin/services/__init__.py +0 -0
- kagglesdk/admin/services/inbox_file_service.py +0 -22
- kagglesdk/admin/types/__init__.py +0 -0
- kagglesdk/admin/types/inbox_file_service.py +0 -74
- kagglesdk/benchmarks/__init__.py +0 -0
- kagglesdk/benchmarks/services/__init__.py +0 -0
- kagglesdk/benchmarks/services/benchmarks_api_service.py +0 -19
- kagglesdk/benchmarks/types/__init__.py +0 -0
- kagglesdk/benchmarks/types/benchmark_types.py +0 -307
- kagglesdk/benchmarks/types/benchmarks_api_service.py +0 -243
- kagglesdk/blobs/__init__.py +0 -0
- kagglesdk/blobs/services/__init__.py +0 -0
- kagglesdk/blobs/services/blob_api_service.py +0 -25
- kagglesdk/blobs/types/__init__.py +0 -0
- kagglesdk/blobs/types/blob_api_service.py +0 -177
- kagglesdk/common/__init__.py +0 -0
- kagglesdk/common/services/__init__.py +0 -0
- kagglesdk/common/services/operations_service.py +0 -46
- kagglesdk/common/types/__init__.py +0 -0
- kagglesdk/common/types/file_download.py +0 -102
- kagglesdk/common/types/http_redirect.py +0 -105
- kagglesdk/common/types/operations.py +0 -194
- kagglesdk/common/types/operations_service.py +0 -48
- kagglesdk/community/__init__.py +0 -0
- kagglesdk/community/types/__init__.py +0 -0
- kagglesdk/community/types/content_enums.py +0 -44
- kagglesdk/community/types/organization.py +0 -410
- kagglesdk/competitions/__init__.py +0 -0
- kagglesdk/competitions/services/__init__.py +0 -0
- kagglesdk/competitions/services/competition_api_service.py +0 -178
- kagglesdk/competitions/types/__init__.py +0 -0
- kagglesdk/competitions/types/competition.py +0 -14
- kagglesdk/competitions/types/competition_api_service.py +0 -2393
- kagglesdk/competitions/types/competition_enums.py +0 -53
- kagglesdk/competitions/types/search_competitions.py +0 -28
- kagglesdk/competitions/types/submission_status.py +0 -9
- kagglesdk/datasets/__init__.py +0 -0
- kagglesdk/datasets/databundles/__init__.py +0 -0
- kagglesdk/datasets/databundles/types/__init__.py +0 -0
- kagglesdk/datasets/databundles/types/databundle_api_types.py +0 -540
- kagglesdk/datasets/services/__init__.py +0 -0
- kagglesdk/datasets/services/dataset_api_service.py +0 -195
- kagglesdk/datasets/types/__init__.py +0 -0
- kagglesdk/datasets/types/dataset_api_service.py +0 -3047
- kagglesdk/datasets/types/dataset_enums.py +0 -103
- kagglesdk/datasets/types/dataset_service.py +0 -145
- kagglesdk/datasets/types/dataset_types.py +0 -646
- kagglesdk/datasets/types/search_datasets.py +0 -6
- kagglesdk/discussions/__init__.py +0 -0
- kagglesdk/discussions/types/__init__.py +0 -0
- kagglesdk/discussions/types/search_discussions.py +0 -43
- kagglesdk/discussions/types/writeup_enums.py +0 -11
- kagglesdk/education/__init__.py +0 -0
- kagglesdk/education/services/__init__.py +0 -0
- kagglesdk/education/services/education_api_service.py +0 -19
- kagglesdk/education/types/__init__.py +0 -0
- kagglesdk/education/types/education_api_service.py +0 -248
- kagglesdk/education/types/education_service.py +0 -139
- kagglesdk/kaggle_client.py +0 -101
- kagglesdk/kaggle_creds.py +0 -148
- kagglesdk/kaggle_env.py +0 -104
- kagglesdk/kaggle_http_client.py +0 -269
- kagglesdk/kaggle_oauth.py +0 -200
- kagglesdk/kaggle_object.py +0 -344
- kagglesdk/kernels/__init__.py +0 -0
- kagglesdk/kernels/services/__init__.py +0 -0
- kagglesdk/kernels/services/kernels_api_service.py +0 -146
- kagglesdk/kernels/types/__init__.py +0 -0
- kagglesdk/kernels/types/kernels_api_service.py +0 -2451
- kagglesdk/kernels/types/kernels_enums.py +0 -39
- kagglesdk/kernels/types/search_kernels.py +0 -6
- kagglesdk/licenses/__init__.py +0 -0
- kagglesdk/licenses/types/__init__.py +0 -0
- kagglesdk/licenses/types/licenses_types.py +0 -182
- kagglesdk/models/__init__.py +0 -0
- kagglesdk/models/services/__init__.py +0 -0
- kagglesdk/models/services/model_api_service.py +0 -280
- kagglesdk/models/services/model_service.py +0 -19
- kagglesdk/models/types/__init__.py +0 -0
- kagglesdk/models/types/model_api_service.py +0 -4069
- kagglesdk/models/types/model_enums.py +0 -68
- kagglesdk/models/types/model_service.py +0 -275
- kagglesdk/models/types/model_types.py +0 -1338
- kagglesdk/models/types/search_models.py +0 -8
- kagglesdk/search/__init__.py +0 -0
- kagglesdk/search/services/__init__.py +0 -0
- kagglesdk/search/services/search_api_service.py +0 -19
- kagglesdk/search/types/__init__.py +0 -0
- kagglesdk/search/types/search_api_service.py +0 -2435
- kagglesdk/search/types/search_content_shared.py +0 -50
- kagglesdk/search/types/search_enums.py +0 -45
- kagglesdk/search/types/search_service.py +0 -303
- kagglesdk/security/__init__.py +0 -0
- kagglesdk/security/services/__init__.py +0 -0
- kagglesdk/security/services/iam_service.py +0 -31
- kagglesdk/security/services/oauth_service.py +0 -58
- kagglesdk/security/types/__init__.py +0 -0
- kagglesdk/security/types/authentication.py +0 -171
- kagglesdk/security/types/iam_service.py +0 -496
- kagglesdk/security/types/oauth_service.py +0 -1181
- kagglesdk/security/types/roles.py +0 -8
- kagglesdk/security/types/security_types.py +0 -159
- kagglesdk/test/__init__.py +0 -0
- kagglesdk/test/test_client.py +0 -41
- kagglesdk/users/__init__.py +0 -0
- kagglesdk/users/services/__init__.py +0 -0
- kagglesdk/users/services/account_service.py +0 -31
- kagglesdk/users/services/group_api_service.py +0 -31
- kagglesdk/users/types/__init__.py +0 -0
- kagglesdk/users/types/account_service.py +0 -345
- kagglesdk/users/types/group_api_service.py +0 -315
- kagglesdk/users/types/group_types.py +0 -165
- kagglesdk/users/types/groups_enum.py +0 -8
- kagglesdk/users/types/progression_service.py +0 -9
- kagglesdk/users/types/search_users.py +0 -23
- kagglesdk/users/types/user_avatar.py +0 -226
- kagglesdk/users/types/users_enums.py +0 -22
- {kaggle-1.8.2.dist-info → kaggle-1.8.4.dist-info}/entry_points.txt +0 -0
- {kaggle-1.8.2.dist-info → kaggle-1.8.4.dist-info}/licenses/LICENSE.txt +0 -0
kagglesdk/LICENSE
DELETED
|
@@ -1,201 +0,0 @@
|
|
|
1
|
-
Apache License
|
|
2
|
-
Version 2.0, January 2004
|
|
3
|
-
http://www.apache.org/licenses/
|
|
4
|
-
|
|
5
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
-
|
|
7
|
-
1. Definitions.
|
|
8
|
-
|
|
9
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
-
|
|
12
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
-
the copyright owner that is granting the License.
|
|
14
|
-
|
|
15
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
-
other entities that control, are controlled by, or are under common
|
|
17
|
-
control with that entity. For the purposes of this definition,
|
|
18
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
-
direction or management of such entity, whether by contract or
|
|
20
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
-
|
|
23
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
-
exercising permissions granted by this License.
|
|
25
|
-
|
|
26
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
-
including but not limited to software source code, documentation
|
|
28
|
-
source, and configuration files.
|
|
29
|
-
|
|
30
|
-
"Object" form shall mean any form resulting from mechanical
|
|
31
|
-
transformation or translation of a Source form, including but
|
|
32
|
-
not limited to compiled object code, generated documentation,
|
|
33
|
-
and conversions to other media types.
|
|
34
|
-
|
|
35
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
-
Object form, made available under the License, as indicated by a
|
|
37
|
-
copyright notice that is included in or attached to the work
|
|
38
|
-
(an example is provided in the Appendix below).
|
|
39
|
-
|
|
40
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
-
form, that is based on (or derived from) the Work and for which the
|
|
42
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
-
of this License, Derivative Works shall not include works that remain
|
|
45
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
-
the Work and Derivative Works thereof.
|
|
47
|
-
|
|
48
|
-
"Contribution" shall mean any work of authorship, including
|
|
49
|
-
the original version of the Work and any modifications or additions
|
|
50
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
-
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
-
means any form of electronic, verbal, or written communication sent
|
|
55
|
-
to the Licensor or its representatives, including but not limited to
|
|
56
|
-
communication on electronic mailing lists, source code control systems,
|
|
57
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
-
excluding communication that is conspicuously marked or otherwise
|
|
60
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
-
|
|
62
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
-
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
-
subsequently incorporated within the Work.
|
|
65
|
-
|
|
66
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
-
Work and such Derivative Works in Source or Object form.
|
|
72
|
-
|
|
73
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
-
(except as stated in this section) patent license to make, have made,
|
|
77
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
-
where such license applies only to those patent claims licensable
|
|
79
|
-
by such Contributor that are necessarily infringed by their
|
|
80
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
-
institute patent litigation against any entity (including a
|
|
83
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
-
or contributory patent infringement, then any patent licenses
|
|
86
|
-
granted to You under this License for that Work shall terminate
|
|
87
|
-
as of the date such litigation is filed.
|
|
88
|
-
|
|
89
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
-
modifications, and in Source or Object form, provided that You
|
|
92
|
-
meet the following conditions:
|
|
93
|
-
|
|
94
|
-
(a) You must give any other recipients of the Work or
|
|
95
|
-
Derivative Works a copy of this License; and
|
|
96
|
-
|
|
97
|
-
(b) You must cause any modified files to carry prominent notices
|
|
98
|
-
stating that You changed the files; and
|
|
99
|
-
|
|
100
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
-
that You distribute, all copyright, patent, trademark, and
|
|
102
|
-
attribution notices from the Source form of the Work,
|
|
103
|
-
excluding those notices that do not pertain to any part of
|
|
104
|
-
the Derivative Works; and
|
|
105
|
-
|
|
106
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
-
distribution, then any Derivative Works that You distribute must
|
|
108
|
-
include a readable copy of the attribution notices contained
|
|
109
|
-
within such NOTICE file, excluding those notices that do not
|
|
110
|
-
pertain to any part of the Derivative Works, in at least one
|
|
111
|
-
of the following places: within a NOTICE text file distributed
|
|
112
|
-
as part of the Derivative Works; within the Source form or
|
|
113
|
-
documentation, if provided along with the Derivative Works; or,
|
|
114
|
-
within a display generated by the Derivative Works, if and
|
|
115
|
-
wherever such third-party notices normally appear. The contents
|
|
116
|
-
of the NOTICE file are for informational purposes only and
|
|
117
|
-
do not modify the License. You may add Your own attribution
|
|
118
|
-
notices within Derivative Works that You distribute, alongside
|
|
119
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
-
that such additional attribution notices cannot be construed
|
|
121
|
-
as modifying the License.
|
|
122
|
-
|
|
123
|
-
You may add Your own copyright statement to Your modifications and
|
|
124
|
-
may provide additional or different license terms and conditions
|
|
125
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
-
the conditions stated in this License.
|
|
129
|
-
|
|
130
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
-
this License, without any additional terms or conditions.
|
|
134
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
-
the terms of any separate license agreement you may have executed
|
|
136
|
-
with Licensor regarding such Contributions.
|
|
137
|
-
|
|
138
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
-
except as required for reasonable and customary use in describing the
|
|
141
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
-
|
|
143
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
-
implied, including, without limitation, any warranties or conditions
|
|
148
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
-
appropriateness of using or redistributing the Work and assume any
|
|
151
|
-
risks associated with Your exercise of permissions under this License.
|
|
152
|
-
|
|
153
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
-
unless required by applicable law (such as deliberate and grossly
|
|
156
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
-
liable to You for damages, including any direct, indirect, special,
|
|
158
|
-
incidental, or consequential damages of any character arising as a
|
|
159
|
-
result of this License or out of the use or inability to use the
|
|
160
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
-
other commercial damages or losses), even if such Contributor
|
|
163
|
-
has been advised of the possibility of such damages.
|
|
164
|
-
|
|
165
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
-
or other liability obligations and/or rights consistent with this
|
|
169
|
-
License. However, in accepting such obligations, You may act only
|
|
170
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
-
defend, and hold each Contributor harmless for any liability
|
|
173
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
-
of your accepting any such warranty or additional liability.
|
|
175
|
-
|
|
176
|
-
END OF TERMS AND CONDITIONS
|
|
177
|
-
|
|
178
|
-
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
-
|
|
180
|
-
To apply the Apache License to your work, attach the following
|
|
181
|
-
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
-
replaced with your own identifying information. (Don't include
|
|
183
|
-
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
-
comment syntax for the file format. We also recommend that a
|
|
185
|
-
file or class name and description of purpose be included on the
|
|
186
|
-
same "printed page" as the copyright notice for easier
|
|
187
|
-
identification within third-party archives.
|
|
188
|
-
|
|
189
|
-
Copyright 2018 Kaggle Inc
|
|
190
|
-
|
|
191
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
-
you may not use this file except in compliance with the License.
|
|
193
|
-
You may obtain a copy of the License at
|
|
194
|
-
|
|
195
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
-
|
|
197
|
-
Unless required by applicable law or agreed to in writing, software
|
|
198
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
-
See the License for the specific language governing permissions and
|
|
201
|
-
limitations under the License.
|
kagglesdk/__init__.py
DELETED
kagglesdk/admin/__init__.py
DELETED
|
File without changes
|
|
File without changes
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
from kagglesdk.admin.types.inbox_file_service import CreateInboxFileRequest, CreateInboxFileResponse
|
|
2
|
-
from kagglesdk.kaggle_http_client import KaggleHttpClient
|
|
3
|
-
|
|
4
|
-
class InboxFileClient(object):
|
|
5
|
-
"""File drop/pickup functionality."""
|
|
6
|
-
|
|
7
|
-
def __init__(self, client: KaggleHttpClient):
|
|
8
|
-
self._client = client
|
|
9
|
-
|
|
10
|
-
def create_inbox_file(self, request: CreateInboxFileRequest = None) -> CreateInboxFileResponse:
|
|
11
|
-
r"""
|
|
12
|
-
Creates (aka 'drops') a new file into the inbox.
|
|
13
|
-
|
|
14
|
-
Args:
|
|
15
|
-
request (CreateInboxFileRequest):
|
|
16
|
-
The request object; initialized to empty instance if not specified.
|
|
17
|
-
"""
|
|
18
|
-
|
|
19
|
-
if request is None:
|
|
20
|
-
request = CreateInboxFileRequest()
|
|
21
|
-
|
|
22
|
-
return self._client.call("admin.InboxFileService", "CreateInboxFile", request, CreateInboxFileResponse)
|
|
File without changes
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
from kagglesdk.kaggle_object import *
|
|
2
|
-
|
|
3
|
-
class CreateInboxFileRequest(KaggleObject):
|
|
4
|
-
r"""
|
|
5
|
-
Attributes:
|
|
6
|
-
virtual_directory (str)
|
|
7
|
-
Directory name used for tagging the uploaded file.
|
|
8
|
-
blob_file_token (str)
|
|
9
|
-
Token representing the uploaded file.
|
|
10
|
-
"""
|
|
11
|
-
|
|
12
|
-
def __init__(self):
|
|
13
|
-
self._virtual_directory = ""
|
|
14
|
-
self._blob_file_token = ""
|
|
15
|
-
self._freeze()
|
|
16
|
-
|
|
17
|
-
@property
|
|
18
|
-
def virtual_directory(self) -> str:
|
|
19
|
-
"""Directory name used for tagging the uploaded file."""
|
|
20
|
-
return self._virtual_directory
|
|
21
|
-
|
|
22
|
-
@virtual_directory.setter
|
|
23
|
-
def virtual_directory(self, virtual_directory: str):
|
|
24
|
-
if virtual_directory is None:
|
|
25
|
-
del self.virtual_directory
|
|
26
|
-
return
|
|
27
|
-
if not isinstance(virtual_directory, str):
|
|
28
|
-
raise TypeError('virtual_directory must be of type str')
|
|
29
|
-
self._virtual_directory = virtual_directory
|
|
30
|
-
|
|
31
|
-
@property
|
|
32
|
-
def blob_file_token(self) -> str:
|
|
33
|
-
"""Token representing the uploaded file."""
|
|
34
|
-
return self._blob_file_token
|
|
35
|
-
|
|
36
|
-
@blob_file_token.setter
|
|
37
|
-
def blob_file_token(self, blob_file_token: str):
|
|
38
|
-
if blob_file_token is None:
|
|
39
|
-
del self.blob_file_token
|
|
40
|
-
return
|
|
41
|
-
if not isinstance(blob_file_token, str):
|
|
42
|
-
raise TypeError('blob_file_token must be of type str')
|
|
43
|
-
self._blob_file_token = blob_file_token
|
|
44
|
-
|
|
45
|
-
def endpoint(self):
|
|
46
|
-
path = '/api/v1/inbox/files/create'
|
|
47
|
-
return path.format_map(self.to_field_map(self))
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
@staticmethod
|
|
51
|
-
def method():
|
|
52
|
-
return 'POST'
|
|
53
|
-
|
|
54
|
-
@staticmethod
|
|
55
|
-
def body_fields():
|
|
56
|
-
return '*'
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
class CreateInboxFileResponse(KaggleObject):
|
|
60
|
-
r"""
|
|
61
|
-
NOTE: This is sent to non-admins, so we're intentionally *NOT* sending back
|
|
62
|
-
the full InboxFile (with its URL for a direct download).
|
|
63
|
-
|
|
64
|
-
"""
|
|
65
|
-
|
|
66
|
-
pass
|
|
67
|
-
|
|
68
|
-
CreateInboxFileRequest._fields = [
|
|
69
|
-
FieldMetadata("virtualDirectory", "virtual_directory", "_virtual_directory", str, "", PredefinedSerializer()),
|
|
70
|
-
FieldMetadata("blobFileToken", "blob_file_token", "_blob_file_token", str, "", PredefinedSerializer()),
|
|
71
|
-
]
|
|
72
|
-
|
|
73
|
-
CreateInboxFileResponse._fields = []
|
|
74
|
-
|
kagglesdk/benchmarks/__init__.py
DELETED
|
File without changes
|
|
File without changes
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
from kagglesdk.benchmarks.types.benchmarks_api_service import ApiBenchmarkLeaderboard, ApiGetBenchmarkLeaderboardRequest
|
|
2
|
-
from kagglesdk.kaggle_http_client import KaggleHttpClient
|
|
3
|
-
|
|
4
|
-
class BenchmarksApiClient(object):
|
|
5
|
-
|
|
6
|
-
def __init__(self, client: KaggleHttpClient):
|
|
7
|
-
self._client = client
|
|
8
|
-
|
|
9
|
-
def get_benchmark_leaderboard(self, request: ApiGetBenchmarkLeaderboardRequest = None) -> ApiBenchmarkLeaderboard:
|
|
10
|
-
r"""
|
|
11
|
-
Args:
|
|
12
|
-
request (ApiGetBenchmarkLeaderboardRequest):
|
|
13
|
-
The request object; initialized to empty instance if not specified.
|
|
14
|
-
"""
|
|
15
|
-
|
|
16
|
-
if request is None:
|
|
17
|
-
request = ApiGetBenchmarkLeaderboardRequest()
|
|
18
|
-
|
|
19
|
-
return self._client.call("benchmarks.BenchmarksApiService", "GetBenchmarkLeaderboard", request, ApiBenchmarkLeaderboard)
|
|
File without changes
|
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
from datetime import datetime
|
|
2
|
-
from kagglesdk.kaggle_object import *
|
|
3
|
-
from typing import Optional, List
|
|
4
|
-
|
|
5
|
-
class BenchmarkResult(KaggleObject):
|
|
6
|
-
r"""
|
|
7
|
-
TODO(bml): Integrate this proto with personal benchmarks trials.
|
|
8
|
-
Represents the outcome of a benchmark run. All fields are immutable.
|
|
9
|
-
|
|
10
|
-
Attributes:
|
|
11
|
-
numeric_result (NumericResult)
|
|
12
|
-
boolean_result (bool)
|
|
13
|
-
custom_additional_results (CustomResult)
|
|
14
|
-
Generic additional results. These are rendered generically on the frontend:
|
|
15
|
-
numeric_result_private (NumericResult)
|
|
16
|
-
Numeric result on the private set of the benchmark version.
|
|
17
|
-
numeric_result_public (NumericResult)
|
|
18
|
-
Numeric result on the public set of the benchmark version.
|
|
19
|
-
evaluation_date (datetime)
|
|
20
|
-
The date on which evaluation was performed.
|
|
21
|
-
task_version_id (int)
|
|
22
|
-
Convenience fields for this result (for the frontend):
|
|
23
|
-
"""
|
|
24
|
-
|
|
25
|
-
def __init__(self):
|
|
26
|
-
self._numeric_result = None
|
|
27
|
-
self._boolean_result = None
|
|
28
|
-
self._custom_additional_results = []
|
|
29
|
-
self._numeric_result_private = None
|
|
30
|
-
self._numeric_result_public = None
|
|
31
|
-
self._evaluation_date = None
|
|
32
|
-
self._task_version_id = None
|
|
33
|
-
self._freeze()
|
|
34
|
-
|
|
35
|
-
@property
|
|
36
|
-
def task_version_id(self) -> int:
|
|
37
|
-
"""Convenience fields for this result (for the frontend):"""
|
|
38
|
-
return self._task_version_id or 0
|
|
39
|
-
|
|
40
|
-
@task_version_id.setter
|
|
41
|
-
def task_version_id(self, task_version_id: Optional[int]):
|
|
42
|
-
if task_version_id is None:
|
|
43
|
-
del self.task_version_id
|
|
44
|
-
return
|
|
45
|
-
if not isinstance(task_version_id, int):
|
|
46
|
-
raise TypeError('task_version_id must be of type int')
|
|
47
|
-
self._task_version_id = task_version_id
|
|
48
|
-
|
|
49
|
-
@property
|
|
50
|
-
def numeric_result(self) -> Optional['NumericResult']:
|
|
51
|
-
return self._numeric_result or None
|
|
52
|
-
|
|
53
|
-
@numeric_result.setter
|
|
54
|
-
def numeric_result(self, numeric_result: Optional['NumericResult']):
|
|
55
|
-
if numeric_result is None:
|
|
56
|
-
del self.numeric_result
|
|
57
|
-
return
|
|
58
|
-
if not isinstance(numeric_result, NumericResult):
|
|
59
|
-
raise TypeError('numeric_result must be of type NumericResult')
|
|
60
|
-
del self.boolean_result
|
|
61
|
-
self._numeric_result = numeric_result
|
|
62
|
-
|
|
63
|
-
@property
|
|
64
|
-
def boolean_result(self) -> bool:
|
|
65
|
-
return self._boolean_result or False
|
|
66
|
-
|
|
67
|
-
@boolean_result.setter
|
|
68
|
-
def boolean_result(self, boolean_result: bool):
|
|
69
|
-
if boolean_result is None:
|
|
70
|
-
del self.boolean_result
|
|
71
|
-
return
|
|
72
|
-
if not isinstance(boolean_result, bool):
|
|
73
|
-
raise TypeError('boolean_result must be of type bool')
|
|
74
|
-
del self.numeric_result
|
|
75
|
-
self._boolean_result = boolean_result
|
|
76
|
-
|
|
77
|
-
@property
|
|
78
|
-
def custom_additional_results(self) -> Optional[List[Optional['CustomResult']]]:
|
|
79
|
-
"""Generic additional results. These are rendered generically on the frontend:"""
|
|
80
|
-
return self._custom_additional_results
|
|
81
|
-
|
|
82
|
-
@custom_additional_results.setter
|
|
83
|
-
def custom_additional_results(self, custom_additional_results: Optional[List[Optional['CustomResult']]]):
|
|
84
|
-
if custom_additional_results is None:
|
|
85
|
-
del self.custom_additional_results
|
|
86
|
-
return
|
|
87
|
-
if not isinstance(custom_additional_results, list):
|
|
88
|
-
raise TypeError('custom_additional_results must be of type list')
|
|
89
|
-
if not all([isinstance(t, CustomResult) for t in custom_additional_results]):
|
|
90
|
-
raise TypeError('custom_additional_results must contain only items of type CustomResult')
|
|
91
|
-
self._custom_additional_results = custom_additional_results
|
|
92
|
-
|
|
93
|
-
@property
|
|
94
|
-
def numeric_result_private(self) -> Optional['NumericResult']:
|
|
95
|
-
"""Numeric result on the private set of the benchmark version."""
|
|
96
|
-
return self._numeric_result_private or None
|
|
97
|
-
|
|
98
|
-
@numeric_result_private.setter
|
|
99
|
-
def numeric_result_private(self, numeric_result_private: Optional[Optional['NumericResult']]):
|
|
100
|
-
if numeric_result_private is None:
|
|
101
|
-
del self.numeric_result_private
|
|
102
|
-
return
|
|
103
|
-
if not isinstance(numeric_result_private, NumericResult):
|
|
104
|
-
raise TypeError('numeric_result_private must be of type NumericResult')
|
|
105
|
-
self._numeric_result_private = numeric_result_private
|
|
106
|
-
|
|
107
|
-
@property
|
|
108
|
-
def numeric_result_public(self) -> Optional['NumericResult']:
|
|
109
|
-
"""Numeric result on the public set of the benchmark version."""
|
|
110
|
-
return self._numeric_result_public or None
|
|
111
|
-
|
|
112
|
-
@numeric_result_public.setter
|
|
113
|
-
def numeric_result_public(self, numeric_result_public: Optional[Optional['NumericResult']]):
|
|
114
|
-
if numeric_result_public is None:
|
|
115
|
-
del self.numeric_result_public
|
|
116
|
-
return
|
|
117
|
-
if not isinstance(numeric_result_public, NumericResult):
|
|
118
|
-
raise TypeError('numeric_result_public must be of type NumericResult')
|
|
119
|
-
self._numeric_result_public = numeric_result_public
|
|
120
|
-
|
|
121
|
-
@property
|
|
122
|
-
def evaluation_date(self) -> datetime:
|
|
123
|
-
"""The date on which evaluation was performed."""
|
|
124
|
-
return self._evaluation_date or None
|
|
125
|
-
|
|
126
|
-
@evaluation_date.setter
|
|
127
|
-
def evaluation_date(self, evaluation_date: Optional[datetime]):
|
|
128
|
-
if evaluation_date is None:
|
|
129
|
-
del self.evaluation_date
|
|
130
|
-
return
|
|
131
|
-
if not isinstance(evaluation_date, datetime):
|
|
132
|
-
raise TypeError('evaluation_date must be of type datetime')
|
|
133
|
-
self._evaluation_date = evaluation_date
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
class CustomResult(KaggleObject):
|
|
137
|
-
r"""
|
|
138
|
-
Attributes:
|
|
139
|
-
key (str)
|
|
140
|
-
value (str)
|
|
141
|
-
"""
|
|
142
|
-
|
|
143
|
-
def __init__(self):
|
|
144
|
-
self._key = ""
|
|
145
|
-
self._value = ""
|
|
146
|
-
self._freeze()
|
|
147
|
-
|
|
148
|
-
@property
|
|
149
|
-
def key(self) -> str:
|
|
150
|
-
return self._key
|
|
151
|
-
|
|
152
|
-
@key.setter
|
|
153
|
-
def key(self, key: str):
|
|
154
|
-
if key is None:
|
|
155
|
-
del self.key
|
|
156
|
-
return
|
|
157
|
-
if not isinstance(key, str):
|
|
158
|
-
raise TypeError('key must be of type str')
|
|
159
|
-
self._key = key
|
|
160
|
-
|
|
161
|
-
@property
|
|
162
|
-
def value(self) -> str:
|
|
163
|
-
return self._value
|
|
164
|
-
|
|
165
|
-
@value.setter
|
|
166
|
-
def value(self, value: str):
|
|
167
|
-
if value is None:
|
|
168
|
-
del self.value
|
|
169
|
-
return
|
|
170
|
-
if not isinstance(value, str):
|
|
171
|
-
raise TypeError('value must be of type str')
|
|
172
|
-
self._value = value
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
class NumericResult(KaggleObject):
|
|
176
|
-
r"""
|
|
177
|
-
Attributes:
|
|
178
|
-
value (float)
|
|
179
|
-
confidence_interval (float)
|
|
180
|
-
Note, while we call this the 'confidence interval' - the value we store
|
|
181
|
-
here is actually the 'confidence radius', it should always be displayed
|
|
182
|
-
as a +- value.
|
|
183
|
-
uneven_confidence_interval (UnevenConfidenceInterval)
|
|
184
|
-
For asymmetric confidence intervals in which the +/- values differ
|
|
185
|
-
If set, prioritized over confidence_interval
|
|
186
|
-
"""
|
|
187
|
-
|
|
188
|
-
def __init__(self):
|
|
189
|
-
self._value = 0.0
|
|
190
|
-
self._confidence_interval = None
|
|
191
|
-
self._uneven_confidence_interval = None
|
|
192
|
-
self._freeze()
|
|
193
|
-
|
|
194
|
-
@property
|
|
195
|
-
def value(self) -> float:
|
|
196
|
-
return self._value
|
|
197
|
-
|
|
198
|
-
@value.setter
|
|
199
|
-
def value(self, value: float):
|
|
200
|
-
if value is None:
|
|
201
|
-
del self.value
|
|
202
|
-
return
|
|
203
|
-
if not isinstance(value, float):
|
|
204
|
-
raise TypeError('value must be of type float')
|
|
205
|
-
self._value = value
|
|
206
|
-
|
|
207
|
-
@property
|
|
208
|
-
def confidence_interval(self) -> float:
|
|
209
|
-
r"""
|
|
210
|
-
Note, while we call this the 'confidence interval' - the value we store
|
|
211
|
-
here is actually the 'confidence radius', it should always be displayed
|
|
212
|
-
as a +- value.
|
|
213
|
-
"""
|
|
214
|
-
return self._confidence_interval or 0.0
|
|
215
|
-
|
|
216
|
-
@confidence_interval.setter
|
|
217
|
-
def confidence_interval(self, confidence_interval: Optional[float]):
|
|
218
|
-
if confidence_interval is None:
|
|
219
|
-
del self.confidence_interval
|
|
220
|
-
return
|
|
221
|
-
if not isinstance(confidence_interval, float):
|
|
222
|
-
raise TypeError('confidence_interval must be of type float')
|
|
223
|
-
self._confidence_interval = confidence_interval
|
|
224
|
-
|
|
225
|
-
@property
|
|
226
|
-
def uneven_confidence_interval(self) -> Optional['UnevenConfidenceInterval']:
|
|
227
|
-
r"""
|
|
228
|
-
For asymmetric confidence intervals in which the +/- values differ
|
|
229
|
-
If set, prioritized over confidence_interval
|
|
230
|
-
"""
|
|
231
|
-
return self._uneven_confidence_interval or None
|
|
232
|
-
|
|
233
|
-
@uneven_confidence_interval.setter
|
|
234
|
-
def uneven_confidence_interval(self, uneven_confidence_interval: Optional[Optional['UnevenConfidenceInterval']]):
|
|
235
|
-
if uneven_confidence_interval is None:
|
|
236
|
-
del self.uneven_confidence_interval
|
|
237
|
-
return
|
|
238
|
-
if not isinstance(uneven_confidence_interval, UnevenConfidenceInterval):
|
|
239
|
-
raise TypeError('uneven_confidence_interval must be of type UnevenConfidenceInterval')
|
|
240
|
-
self._uneven_confidence_interval = uneven_confidence_interval
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
class UnevenConfidenceInterval(KaggleObject):
|
|
244
|
-
r"""
|
|
245
|
-
Attributes:
|
|
246
|
-
plus (float)
|
|
247
|
-
minus (float)
|
|
248
|
-
"""
|
|
249
|
-
|
|
250
|
-
def __init__(self):
|
|
251
|
-
self._plus = 0.0
|
|
252
|
-
self._minus = 0.0
|
|
253
|
-
self._freeze()
|
|
254
|
-
|
|
255
|
-
@property
|
|
256
|
-
def plus(self) -> float:
|
|
257
|
-
return self._plus
|
|
258
|
-
|
|
259
|
-
@plus.setter
|
|
260
|
-
def plus(self, plus: float):
|
|
261
|
-
if plus is None:
|
|
262
|
-
del self.plus
|
|
263
|
-
return
|
|
264
|
-
if not isinstance(plus, float):
|
|
265
|
-
raise TypeError('plus must be of type float')
|
|
266
|
-
self._plus = plus
|
|
267
|
-
|
|
268
|
-
@property
|
|
269
|
-
def minus(self) -> float:
|
|
270
|
-
return self._minus
|
|
271
|
-
|
|
272
|
-
@minus.setter
|
|
273
|
-
def minus(self, minus: float):
|
|
274
|
-
if minus is None:
|
|
275
|
-
del self.minus
|
|
276
|
-
return
|
|
277
|
-
if not isinstance(minus, float):
|
|
278
|
-
raise TypeError('minus must be of type float')
|
|
279
|
-
self._minus = minus
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
BenchmarkResult._fields = [
|
|
283
|
-
FieldMetadata("numericResult", "numeric_result", "_numeric_result", NumericResult, None, KaggleObjectSerializer(), optional=True),
|
|
284
|
-
FieldMetadata("booleanResult", "boolean_result", "_boolean_result", bool, None, PredefinedSerializer(), optional=True),
|
|
285
|
-
FieldMetadata("customAdditionalResults", "custom_additional_results", "_custom_additional_results", CustomResult, [], ListSerializer(KaggleObjectSerializer())),
|
|
286
|
-
FieldMetadata("numericResultPrivate", "numeric_result_private", "_numeric_result_private", NumericResult, None, KaggleObjectSerializer(), optional=True),
|
|
287
|
-
FieldMetadata("numericResultPublic", "numeric_result_public", "_numeric_result_public", NumericResult, None, KaggleObjectSerializer(), optional=True),
|
|
288
|
-
FieldMetadata("evaluationDate", "evaluation_date", "_evaluation_date", datetime, None, DateTimeSerializer(), optional=True),
|
|
289
|
-
FieldMetadata("taskVersionId", "task_version_id", "_task_version_id", int, None, PredefinedSerializer(), optional=True),
|
|
290
|
-
]
|
|
291
|
-
|
|
292
|
-
CustomResult._fields = [
|
|
293
|
-
FieldMetadata("key", "key", "_key", str, "", PredefinedSerializer()),
|
|
294
|
-
FieldMetadata("value", "value", "_value", str, "", PredefinedSerializer()),
|
|
295
|
-
]
|
|
296
|
-
|
|
297
|
-
NumericResult._fields = [
|
|
298
|
-
FieldMetadata("value", "value", "_value", float, 0.0, PredefinedSerializer()),
|
|
299
|
-
FieldMetadata("confidenceInterval", "confidence_interval", "_confidence_interval", float, None, PredefinedSerializer(), optional=True),
|
|
300
|
-
FieldMetadata("unevenConfidenceInterval", "uneven_confidence_interval", "_uneven_confidence_interval", UnevenConfidenceInterval, None, KaggleObjectSerializer(), optional=True),
|
|
301
|
-
]
|
|
302
|
-
|
|
303
|
-
UnevenConfidenceInterval._fields = [
|
|
304
|
-
FieldMetadata("plus", "plus", "_plus", float, 0.0, PredefinedSerializer()),
|
|
305
|
-
FieldMetadata("minus", "minus", "_minus", float, 0.0, PredefinedSerializer()),
|
|
306
|
-
]
|
|
307
|
-
|