@@ -135,26 +135,14 @@ export function setTrainingOutputPath(configObj, outputPath) {
135135 }
136136 const checkpointsPath = joinPath ( outputPath , "checkpoints" ) ;
137137 if ( hasPath ( configObj , [ "train" , "monitor" , "checkpoint" , "dirpath" ] ) ) {
138- setPathValue (
139- configObj ,
140- [ "train" , "monitor" , "checkpoint" , "dirpath" ] ,
141- checkpointsPath ,
142- ) ;
138+ setPathValue ( configObj , [ "train" , "monitor" , "checkpoint" , "dirpath" ] , checkpointsPath ) ;
143139 return ;
144140 }
145141 if ( hasPath ( configObj , [ "monitor" , "checkpoint" , "dirpath" ] ) ) {
146- setPathValue (
147- configObj ,
148- [ "monitor" , "checkpoint" , "dirpath" ] ,
149- checkpointsPath ,
150- ) ;
142+ setPathValue ( configObj , [ "monitor" , "checkpoint" , "dirpath" ] , checkpointsPath ) ;
151143 return ;
152144 }
153- setPathValue (
154- configObj ,
155- [ "monitor" , "checkpoint" , "dirpath" ] ,
156- checkpointsPath ,
157- ) ;
145+ setPathValue ( configObj , [ "monitor" , "checkpoint" , "dirpath" ] , checkpointsPath ) ;
158146}
159147
160148export function setInferenceOutputPath ( configObj , outputPath ) {
@@ -164,11 +152,7 @@ export function setInferenceOutputPath(configObj, outputPath) {
164152 setPathValue ( configObj , [ "INFERENCE" , "OUTPUT_PATH" ] , outputPath ) ;
165153 return ;
166154 }
167- setPathValue (
168- configObj ,
169- [ "inference" , "save_prediction" , "output_path" ] ,
170- outputPath ,
171- ) ;
155+ setPathValue ( configObj , [ "inference" , "save_prediction" , "output_path" ] , outputPath ) ;
172156}
173157
174158export function setInferenceExecutionDefaults ( configObj ) {
@@ -228,14 +212,16 @@ export function applyInputPaths(
228212 }
229213
230214 if ( mode === "training" ) {
231- const imagePath = pickFirstExistingPath ( configObj , [
232- [ "train" , "data" , "train" , "image" ] ,
233- [ "data" , "train" , "image" ] ,
234- ] ) || [ "train" , "data" , "train" , "image" ] ;
235- const labelPath = pickFirstExistingPath ( configObj , [
236- [ "train" , "data" , "train" , "label" ] ,
237- [ "data" , "train" , "label" ] ,
238- ] ) || [ "train" , "data" , "train" , "label" ] ;
215+ const imagePath =
216+ pickFirstExistingPath ( configObj , [
217+ [ "train" , "data" , "train" , "image" ] ,
218+ [ "data" , "train" , "image" ] ,
219+ ] ) || [ "train" , "data" , "train" , "image" ] ;
220+ const labelPath =
221+ pickFirstExistingPath ( configObj , [
222+ [ "train" , "data" , "train" , "label" ] ,
223+ [ "data" , "train" , "label" ] ,
224+ ] ) || [ "train" , "data" , "train" , "label" ] ;
239225 setPathValue ( configObj , imagePath , inputImagePath ) ;
240226 setPathValue ( configObj , labelPath , inputLabelPath ) ;
241227 if ( outputPath ) {
@@ -244,14 +230,16 @@ export function applyInputPaths(
244230 return ;
245231 }
246232
247- const imagePath = pickFirstExistingPath ( configObj , [
248- [ "test" , "data" , "test" , "image" ] ,
249- [ "data" , "test" , "image" ] ,
250- ] ) || [ "test" , "data" , "test" , "image" ] ;
251- const labelPath = pickFirstExistingPath ( configObj , [
252- [ "test" , "data" , "test" , "label" ] ,
253- [ "data" , "test" , "label" ] ,
254- ] ) || [ "test" , "data" , "test" , "label" ] ;
233+ const imagePath =
234+ pickFirstExistingPath ( configObj , [
235+ [ "test" , "data" , "test" , "image" ] ,
236+ [ "data" , "test" , "image" ] ,
237+ ] ) || [ "test" , "data" , "test" , "image" ] ;
238+ const labelPath =
239+ pickFirstExistingPath ( configObj , [
240+ [ "test" , "data" , "test" , "label" ] ,
241+ [ "data" , "test" , "label" ] ,
242+ ] ) || [ "test" , "data" , "test" , "label" ] ;
255243 setPathValue ( configObj , imagePath , inputImagePath ) ;
256244 if ( hasLabelPath ) {
257245 setPathValue ( configObj , labelPath , inputLabelPath ) ;
0 commit comments