Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pagination and partial name search to List Jobs APIs #581

Merged
merged 16 commits into from
May 21, 2024
Prev Previous commit
Next Next commit
Mark non-paginated jobs endpoint as deprecated
  • Loading branch information
Krithika Sundararajan committed May 15, 2024
commit 84fb87a7fd3841474c350b58e7f6e8dd1a5128a6
10 changes: 8 additions & 2 deletions api/client/api_prediction_jobs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 12 additions & 6 deletions python/sdk/client/api/prediction_jobs_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ def models_model_id_versions_version_id_jobs_get(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> List[PredictionJob]:
"""List all prediction jobs of a model version
"""(Deprecated) List all prediction jobs of a model version. This endpoint is deprecated. Please use the corresponding /jobs-by-page endpoint instead.


:param model_id: (required)
Expand Down Expand Up @@ -408,6 +408,7 @@ def models_model_id_versions_version_id_jobs_get(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
warnings.warn("GET /models/{model_id}/versions/{version_id}/jobs is deprecated.", DeprecationWarning)

_param = self._models_model_id_versions_version_id_jobs_get_serialize(
model_id=model_id,
Expand Down Expand Up @@ -452,7 +453,7 @@ def models_model_id_versions_version_id_jobs_get_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[List[PredictionJob]]:
"""List all prediction jobs of a model version
"""(Deprecated) List all prediction jobs of a model version. This endpoint is deprecated. Please use the corresponding /jobs-by-page endpoint instead.


:param model_id: (required)
Expand Down Expand Up @@ -480,6 +481,7 @@ def models_model_id_versions_version_id_jobs_get_with_http_info(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
warnings.warn("GET /models/{model_id}/versions/{version_id}/jobs is deprecated.", DeprecationWarning)

_param = self._models_model_id_versions_version_id_jobs_get_serialize(
model_id=model_id,
Expand Down Expand Up @@ -524,7 +526,7 @@ def models_model_id_versions_version_id_jobs_get_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""List all prediction jobs of a model version
"""(Deprecated) List all prediction jobs of a model version. This endpoint is deprecated. Please use the corresponding /jobs-by-page endpoint instead.


:param model_id: (required)
Expand Down Expand Up @@ -552,6 +554,7 @@ def models_model_id_versions_version_id_jobs_get_without_preload_content(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
warnings.warn("GET /models/{model_id}/versions/{version_id}/jobs is deprecated.", DeprecationWarning)

_param = self._models_model_id_versions_version_id_jobs_get_serialize(
model_id=model_id,
Expand Down Expand Up @@ -2234,7 +2237,7 @@ def projects_project_id_jobs_get(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> List[PredictionJob]:
"""List all prediction jobs created using the model
"""(Deprecated) List all prediction jobs created using the model. This endpoint is deprecated. Please use the corresponding /jobs-by-page endpoint instead.


:param project_id: (required)
Expand Down Expand Up @@ -2274,6 +2277,7 @@ def projects_project_id_jobs_get(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
warnings.warn("GET /projects/{project_id}/jobs is deprecated.", DeprecationWarning)

_param = self._projects_project_id_jobs_get_serialize(
project_id=project_id,
Expand Down Expand Up @@ -2330,7 +2334,7 @@ def projects_project_id_jobs_get_with_http_info(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> ApiResponse[List[PredictionJob]]:
"""List all prediction jobs created using the model
"""(Deprecated) List all prediction jobs created using the model. This endpoint is deprecated. Please use the corresponding /jobs-by-page endpoint instead.


:param project_id: (required)
Expand Down Expand Up @@ -2370,6 +2374,7 @@ def projects_project_id_jobs_get_with_http_info(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
warnings.warn("GET /projects/{project_id}/jobs is deprecated.", DeprecationWarning)

_param = self._projects_project_id_jobs_get_serialize(
project_id=project_id,
Expand Down Expand Up @@ -2426,7 +2431,7 @@ def projects_project_id_jobs_get_without_preload_content(
_headers: Optional[Dict[StrictStr, Any]] = None,
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
) -> RESTResponseType:
"""List all prediction jobs created using the model
"""(Deprecated) List all prediction jobs created using the model. This endpoint is deprecated. Please use the corresponding /jobs-by-page endpoint instead.


:param project_id: (required)
Expand Down Expand Up @@ -2466,6 +2471,7 @@ def projects_project_id_jobs_get_without_preload_content(
:type _host_index: int, optional
:return: Returns the result object.
""" # noqa: E501
warnings.warn("GET /projects/{project_id}/jobs is deprecated.", DeprecationWarning)

_param = self._projects_project_id_jobs_get_serialize(
project_id=project_id,
Expand Down
4 changes: 2 additions & 2 deletions python/sdk/client_README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,13 +105,13 @@ Class | Method | HTTP request | Description
*ModelsApi* | [**projects_project_id_models_model_id_get**](client/docs/ModelsApi.md#projects_project_id_models_model_id_get) | **GET** /projects/{project_id}/models/{model_id} | Get model
*ModelsApi* | [**projects_project_id_models_post**](client/docs/ModelsApi.md#projects_project_id_models_post) | **POST** /projects/{project_id}/models | Register a new models
*PredictionJobsApi* | [**models_model_id_versions_version_id_jobs_by_page_get**](client/docs/PredictionJobsApi.md#models_model_id_versions_version_id_jobs_by_page_get) | **GET** /models/{model_id}/versions/{version_id}/jobs-by-page | List all prediction jobs of a model version with pagination
*PredictionJobsApi* | [**models_model_id_versions_version_id_jobs_get**](client/docs/PredictionJobsApi.md#models_model_id_versions_version_id_jobs_get) | **GET** /models/{model_id}/versions/{version_id}/jobs | List all prediction jobs of a model version
*PredictionJobsApi* | [**models_model_id_versions_version_id_jobs_get**](client/docs/PredictionJobsApi.md#models_model_id_versions_version_id_jobs_get) | **GET** /models/{model_id}/versions/{version_id}/jobs | List all prediction jobs of a model version. This endpoint is deprecated. Please use the corresponding /jobs-by-page endpoint instead.
*PredictionJobsApi* | [**models_model_id_versions_version_id_jobs_job_id_containers_get**](client/docs/PredictionJobsApi.md#models_model_id_versions_version_id_jobs_job_id_containers_get) | **GET** /models/{model_id}/versions/{version_id}/jobs/{job_id}/containers | Get all container belong to a prediction job
*PredictionJobsApi* | [**models_model_id_versions_version_id_jobs_job_id_get**](client/docs/PredictionJobsApi.md#models_model_id_versions_version_id_jobs_job_id_get) | **GET** /models/{model_id}/versions/{version_id}/jobs/{job_id} | Get prediction jobs with given id
*PredictionJobsApi* | [**models_model_id_versions_version_id_jobs_job_id_stop_put**](client/docs/PredictionJobsApi.md#models_model_id_versions_version_id_jobs_job_id_stop_put) | **PUT** /models/{model_id}/versions/{version_id}/jobs/{job_id}/stop | Stop prediction jobs with given id
*PredictionJobsApi* | [**models_model_id_versions_version_id_jobs_post**](client/docs/PredictionJobsApi.md#models_model_id_versions_version_id_jobs_post) | **POST** /models/{model_id}/versions/{version_id}/jobs | Create a prediction job from the given model version
*PredictionJobsApi* | [**projects_project_id_jobs_by_page_get**](client/docs/PredictionJobsApi.md#projects_project_id_jobs_by_page_get) | **GET** /projects/{project_id}/jobs-by-page | List all prediction jobs created using the model with pagination
*PredictionJobsApi* | [**projects_project_id_jobs_get**](client/docs/PredictionJobsApi.md#projects_project_id_jobs_get) | **GET** /projects/{project_id}/jobs | List all prediction jobs created using the model
*PredictionJobsApi* | [**projects_project_id_jobs_get**](client/docs/PredictionJobsApi.md#projects_project_id_jobs_get) | **GET** /projects/{project_id}/jobs | List all prediction jobs created using the model. This endpoint is deprecated. Please use the corresponding /jobs-by-page endpoint instead.
*ProjectApi* | [**projects_get**](client/docs/ProjectApi.md#projects_get) | **GET** /projects | List existing projects
*ProjectApi* | [**projects_post**](client/docs/ProjectApi.md#projects_post) | **POST** /projects | Create new project
*ProjectApi* | [**projects_project_id_get**](client/docs/ProjectApi.md#projects_project_id_get) | **GET** /projects/{project_id} | Get project
Expand Down
6 changes: 4 additions & 2 deletions swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -290,9 +290,10 @@ paths:
x-codegen-request-body-name: body
"/projects/{project_id}/jobs":
get:
deprecated: true
tags:
- prediction_jobs
summary: List all prediction jobs created using the model
summary: List all prediction jobs created using the model. This endpoint is deprecated. Please use the corresponding /jobs-by-page endpoint instead.
parameters:
- name: project_id
in: path
Expand Down Expand Up @@ -1250,9 +1251,10 @@ paths:
x-codegen-request-body-name: body
"/models/{model_id}/versions/{version_id}/jobs":
get:
deprecated: true
tags:
- prediction_jobs
summary: List all prediction jobs of a model version
summary: List all prediction jobs of a model version. This endpoint is deprecated. Please use the corresponding /jobs-by-page endpoint instead.
parameters:
- name: model_id
in: path
Expand Down
Loading