Skip to content

Commit

Permalink
fix(12787): fix 20 qty limit on registered models
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 12, 2024
1 parent 4fabe0c commit eaac4c3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions frontend/src/api/modelRegistry/__tests__/custom.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ describe('getListRegisteredModels', () => {
expect(proxyGETMock).toHaveBeenCalledTimes(1);
expect(proxyGETMock).toHaveBeenCalledWith(
'hostPath',
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/registered_models`,
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/registered_models?pageSize=99999`,
{},
K8sAPIOptionsMock,
);
Expand All @@ -294,7 +294,7 @@ describe('getListModelArtifacts', () => {
expect(proxyGETMock).toHaveBeenCalledTimes(1);
expect(proxyGETMock).toHaveBeenCalledWith(
'hostPath',
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/model_artifacts`,
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/model_artifacts?pageSize=99999`,
{},
K8sAPIOptionsMock,
);
Expand All @@ -309,7 +309,7 @@ describe('getListModelVersions', () => {
expect(proxyGETMock).toHaveBeenCalledTimes(1);
expect(proxyGETMock).toHaveBeenCalledWith(
'hostPath',
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/model_versions`,
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/model_versions?pageSize=99999`,
{},
K8sAPIOptionsMock,
);
Expand Down
9 changes: 6 additions & 3 deletions frontend/src/api/modelRegistry/custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,37 +122,40 @@ export const getModelArtifact =
),
);

// TODO: the pageSize value here is temporary until we implement filter/sort on serverside, https://issues.redhat.com/browse/RHOAIENG-12800
export const getListModelArtifacts =
(hostpath: string) =>
(opts: K8sAPIOptions): Promise<ModelArtifactList> =>
handleModelRegistryFailures(
proxyGET(
hostpath,
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/model_artifacts`,
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/model_artifacts?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 getListModelVersions =
(hostpath: string) =>
(opts: K8sAPIOptions): Promise<ModelVersionList> =>
handleModelRegistryFailures(
proxyGET(
hostpath,
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/model_versions`,
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/model_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 getListRegisteredModels =
(hostpath: string) =>
(opts: K8sAPIOptions): Promise<RegisteredModelList> =>
handleModelRegistryFailures(
proxyGET(
hostpath,
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/registered_models`,
`/api/model_registry/${MODEL_REGISTRY_API_VERSION}/registered_models?pageSize=99999`,
{},
opts,
),
Expand Down

0 comments on commit eaac4c3

Please sign in to comment.