Skip to content

Commit

Permalink
Set up model registry context and apiHooks
Browse files Browse the repository at this point in the history
  • Loading branch information
lucferbux committed Sep 9, 2024
1 parent 12f6cb9 commit 75118d0
Show file tree
Hide file tree
Showing 23 changed files with 678 additions and 250 deletions.
34 changes: 34 additions & 0 deletions clients/ui/frontend/src/__mocks__/mockModelArtifact.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { ModelArtifact, ModelArtifactState } from '~/app/types';

type MockModelArtifact = {
id?: string;
name?: string;
uri?: string;
state?: ModelArtifactState;
author?: string;
};

export const mockModelArtifact = ({
id = '1',
name = 'test',
uri = 'test',
state = ModelArtifactState.LIVE,
author = 'Author 1',
}: MockModelArtifact): ModelArtifact => ({
id,
name,
externalID: '1234132asdfasdf',
description: '',
createTimeSinceEpoch: '1710404288975',
lastUpdateTimeSinceEpoch: '1710404288975',
customProperties: {},
uri,
state,
author,
modelFormatName: 'test',
storageKey: 'test',
storagePath: 'test',
modelFormatVersion: 'test',
serviceAccountName: 'test',
artifactType: 'test',
});
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { NotReadyError } from '~/utilities/useFetchState';
import { APIError } from '~/types';
import { APIError } from '~/app/api/types';
import { handleRestFailures } from '~/app/api/errorUtils';
import { mockRegisteredModel } from '~/__mocks__/mockRegisteredModel';

Expand Down
Loading

0 comments on commit 75118d0

Please sign in to comment.