Skip to content

Commit d3d341b

Browse files
committed
add license
1 parent 376dac5 commit d3d341b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ml4h/recipes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,7 @@ def infer_multimodal_multitask(args):
714714
inference_tsv = inference_file_name(args.output_folder, args.id)
715715
tsv_style_is_genetics = 'genetics' in args.tsv_style
716716

717-
model = legacy_multimodal_multitask_model(**args.__dict__)
717+
model, _, _, _ = make_multimodal_multitask_model(**args.__dict__)
718718
no_fail_tmaps_out = [_make_tmap_nan_on_fail(tmap) for tmap in args.tensor_maps_out]
719719
tensor_paths = _tensor_paths_from_sample_csv(args.tensors, args.sample_csv)
720720
# hard code batch size to 1 so we can iterate over file names and generated tensors together in the tensor_paths for loop
@@ -778,8 +778,8 @@ def infer_multimodal_multitask(args):
778778
csv_row.append(str(y[0][otm.channel_map[k]]))
779779
actual = output_data[otm.output_name()][0][i]
780780
csv_row.append("NA" if np.isnan(actual) else str(actual))
781-
except IndexError:
782-
logging.debug(f'index error at {otm.name} item {i} key {k} with cm: {otm.channel_map} y is {y.shape} y is {y}')
781+
except (IndexError, KeyError):
782+
logging.warning(f'Error in infer at {otm.name} item {i} key {k} with cm: {otm.channel_map} y is {y.shape} y is {y}')
783783
elif otm.is_survival_curve():
784784
intervals = otm.shape[-1] // 2
785785
days_per_bin = 1 + otm.days_window // intervals

0 commit comments

Comments
 (0)