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

fix(12787): high page size for model versions and artifacts #3224

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
4 changes: 2 additions & 2 deletions frontend/src/api/modelRegistry/__tests__/custom.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ describe('getModelVersionsByRegisteredModel', () => {
expect(proxyGETMock).toHaveBeenCalledTimes(1);
expect(proxyGETMock).toHaveBeenCalledWith(
'hostPath',
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/registered_models/1/versions`,
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/registered_models/1/versions?pageSize=99999`,
{},
K8sAPIOptionsMock,
);
Expand All @@ -339,7 +339,7 @@ describe('getModelArtifactsByModelVersion', () => {
expect(proxyGETMock).toHaveBeenCalledTimes(1);
expect(proxyGETMock).toHaveBeenCalledWith(
'hostPath',
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/model_versions/1/artifacts`,
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/model_versions/1/artifacts?pageSize=99999`,
{},
K8sAPIOptionsMock,
);
Expand Down
6 changes: 4 additions & 2 deletions frontend/src/api/modelRegistry/custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,25 +161,27 @@ export const getListRegisteredModels =
),
);

// TODO: the pageSize value here is temporary until we implement filter/sort on serverside, https://issues.redhat.com/browse/RHOAIENG-12800
export const getModelVersionsByRegisteredModel =
(hostpath: string) =>
(opts: K8sAPIOptions, registeredmodelId: string): Promise<ModelVersionList> =>
handleModelRegistryFailures(
proxyGET(
hostpath,
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/registered_models/${registeredmodelId}/versions`,
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/registered_models/${registeredmodelId}/versions?pageSize=99999`,
{},
opts,
),
);

// TODO: the pageSize value here is temporary until we implement filter/sort on serverside, https://issues.redhat.com/browse/RHOAIENG-12800
export const getModelArtifactsByModelVersion =
(hostpath: string) =>
(opts: K8sAPIOptions, modelVersionId: string): Promise<ModelArtifactList> =>
handleModelRegistryFailures(
proxyGET(
hostpath,
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/model_versions/${modelVersionId}/artifacts`,
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/model_versions/${modelVersionId}/artifacts?pageSize=99999`,
{},
opts,
),
Expand Down
Loading