Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
574 changes: 574 additions & 0 deletions kaggle_object_tests.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion kagglesdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "0.1.23"
__version__ = "0.1.24"

from kagglesdk.kaggle_client import KaggleClient
from kagglesdk.kaggle_creds import KaggleCredentials
Expand Down
37 changes: 36 additions & 1 deletion kagglesdk/benchmarks/services/benchmark_tasks_api_service.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from kagglesdk.benchmarks.types.benchmark_tasks_api_service import ApiBatchScheduleBenchmarkTaskRunsRequest, ApiBatchScheduleBenchmarkTaskRunsResponse, ApiBenchmarkTask, ApiCreateBenchmarkTaskRequest, ApiDownloadBenchmarkTaskRunOutputRequest, ApiGetBenchmarkTaskQuotaRequest, ApiGetBenchmarkTaskQuotaResponse, ApiGetBenchmarkTaskRequest, ApiListBenchmarkTaskRunsRequest, ApiListBenchmarkTaskRunsResponse, ApiListBenchmarkTasksRequest, ApiListBenchmarkTasksResponse
from kagglesdk.benchmarks.types.benchmark_tasks_api_service import ApiBatchScheduleBenchmarkTaskRunsRequest, ApiBatchScheduleBenchmarkTaskRunsResponse, ApiBenchmarkTask, ApiCreateBenchmarkTaskRequest, ApiDownloadBenchmarkTaskRunOutputRequest, ApiGetBenchmarkTaskQuotaRequest, ApiGetBenchmarkTaskQuotaResponse, ApiGetBenchmarkTaskRequest, ApiGetBenchmarkTaskRunLogsRequest, ApiListBenchmarkTaskRunsRequest, ApiListBenchmarkTaskRunsResponse, ApiListBenchmarkTasksRequest, ApiListBenchmarkTasksResponse, ApiPublishBenchmarkTaskRequest
from kagglesdk.common.types.file_download import FileDownload
from kagglesdk.kaggle_http_client import KaggleHttpClient

Expand Down Expand Up @@ -93,6 +93,26 @@ def download_benchmark_task_run_output(self, request: ApiDownloadBenchmarkTaskRu

return self._client.call("benchmarks.BenchmarkTasksApiService", "DownloadBenchmarkTaskRunOutput", request, FileDownload)

def get_benchmark_task_run_logs(self, request: ApiGetBenchmarkTaskRunLogsRequest = None) -> FileDownload:
r"""
Get execution logs for a task run.

While the underlying notebook session is still running, the response is
a Server-Sent Events stream (Content-Type: text/event-stream). Once the
session has terminated, the persisted log file is returned as written by
the worker (Content-Type: application/json). Callers (e.g. the Kaggle
CLI) should branch on the response Content-Type.

Args:
request (ApiGetBenchmarkTaskRunLogsRequest):
The request object; initialized to empty instance if not specified.
"""

if request is None:
request = ApiGetBenchmarkTaskRunLogsRequest()

return self._client.call("benchmarks.BenchmarkTasksApiService", "GetBenchmarkTaskRunLogs", request, FileDownload)

def get_benchmark_task_quota(self, request: ApiGetBenchmarkTaskQuotaRequest = None) -> ApiGetBenchmarkTaskQuotaResponse:
r"""
Return the current user's model proxy quota.
Expand All @@ -106,3 +126,18 @@ def get_benchmark_task_quota(self, request: ApiGetBenchmarkTaskQuotaRequest = No
request = ApiGetBenchmarkTaskQuotaRequest()

return self._client.call("benchmarks.BenchmarkTasksApiService", "GetBenchmarkTaskQuota", request, ApiGetBenchmarkTaskQuotaResponse)

def publish_benchmark_task(self, request: ApiPublishBenchmarkTaskRequest = None) -> ApiBenchmarkTask:
r"""
Publish a particular task for a user. Optionally publishes the backing
notebook (`source_kernel_id`) in the same request.

Args:
request (ApiPublishBenchmarkTaskRequest):
The request object; initialized to empty instance if not specified.
"""

if request is None:
request = ApiPublishBenchmarkTaskRequest()

return self._client.call("benchmarks.BenchmarkTasksApiService", "PublishBenchmarkTask", request, ApiBenchmarkTask)
Loading