File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,14 +120,15 @@ export class ModelService {
120120 return ;
121121 }
122122 // mode 是 once 时候,判断是否已经下载过
123+ const destination = storage === 'nas' ? `file://${ nasMountPoints [ 0 ] . mountDir } ` : `file://${ ossMountPoints [ 0 ] . mountDir } ` ;
123124 if ( modelConfig . mode === 'once' ) {
124125 const ListFileManagerTasksRequest = new $Dev20230714 . ListFileManagerTasksRequest ( {
125126 name
126127 } )
127128 const res = await devClient . listFileManagerTasks ( ListFileManagerTasksRequest )
128129 logger . debug ( 'listFileManagerTasks' , JSON . stringify ( res , null , 2 ) )
129130 const tasks = res . body . data . tasks
130- const needDownload = ! tasks . some ( task => task . finished && task . success && task . progress . currentBytes === task . progress . totalBytes && task . parameters . source === source ) ;
131+ const needDownload = ! tasks . some ( task => task . finished && task . success && task . progress . currentBytes === task . progress . totalBytes && task . parameters . source === source && task . parameters . destination === destination ) ;
131132 if ( ! needDownload ) {
132133 logger . info ( '[Download-model] Download model finished.' )
133134 return ;
@@ -144,7 +145,7 @@ export class ModelService {
144145 vpcConfig
145146 } ) ,
146147 source,
147- destination : storage === 'nas' ? `file:// ${ nasMountPoints [ 0 ] . mountDir } ` : `file:// ${ ossMountPoints [ 0 ] . mountDir } ` ,
148+ destination,
148149 conflictHandling : process . env . MODEL_CONFLIC_HANDLING || modelConfig . conflictResolution
149150 } )
150151 logger . debug ( JSON . stringify ( fileManagerRsyncRequest , null , 2 ) )
You can’t perform that action at this time.
0 commit comments