Skip to content

Commit

Permalink
fix(12787): high page size for model versions and artifacts
Browse files Browse the repository at this point in the history
Signed-off-by: gitdallas <5322142+gitdallas@users.noreply.github.com>
  • Loading branch information
gitdallas committed Sep 18, 2024
1 parent da0aa67 commit 4b7cef9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
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

0 comments on commit 4b7cef9

Please sign in to comment.