Skip to content

Commit

Permalink
fix: add source vfolder name when cloning
Browse files Browse the repository at this point in the history
  • Loading branch information
lizable committed Jan 22, 2025
1 parent 77d1a5c commit d1f3928
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions react/src/components/ModelCardModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ const ModelCardModal: React.FC<ModelCardModalProps> = ({
>
<ModelTryContent
modelStorageHost={model_card?.vfolder?.host as string}
modelStoreName={model_card?.vfolder?.name as string}
modelName={model_card?.name as string}
minAIAcclResource={(() => {
const minResource = _.toNumber(
Expand Down
6 changes: 4 additions & 2 deletions react/src/components/ModelTryContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import { useTranslation } from 'react-i18next';

interface ModelTryContentProps {
modelStorageHost?: string;
modelStoreName?: string;
modelName?: string;
minAIAcclResource: number;
title?: string;
Expand All @@ -36,6 +37,7 @@ interface ModelTryContentProps {
const ModelTryContent: React.FC<ModelTryContentProps> = ({
modelName,
modelStorageHost,
modelStoreName,
minAIAcclResource,
title,
...props
Expand Down Expand Up @@ -310,10 +312,10 @@ const ModelTryContent: React.FC<ModelTryContentProps> = ({
cloneable: true,
permission: 'wd', // write-delete permission
target_host: modelStorageHost, // lowestUsageHost, // clone to accessible and lowest usage storage host
target_name: `${modelName === 'Talkativot UI' ? 'talkativot-standalone-1' : modelName}`,
target_name: `${modelName === 'Talkativot UI' ? 'talkativot-standalone-1' : modelName + '-1'}`,
usage_mode: 'model',
},
name: `${modelName === 'Talkativot UI' ? 'talkativot-standalone' : modelName}`,
name: `${modelName === 'Talkativot UI' ? 'talkativot-standalone' : modelStoreName}`,
},
{
onSuccess: (data) => {
Expand Down

0 comments on commit d1f3928

Please sign in to comment.