Skip to content

Commit fc91ae0

Browse files
authored
test fixes (#598)
* Updates to data generation, tensor shape updates, tensor layers(now only symbolic tensors can be used) * updated serializatio and model saving * added python 3.11 and distributed pytest execution * Encoder and decoder serialization with test cases * Delete output_1.txt * activation and tensor generator fixes * pytorch dataloader to tensorflow dataset conversion * droplayer merge serialization and argument to disable or enable parent sort * drop merge layer added * upgraded to tf2.19 and docker updates along with test fixes for tf2.19 * clean up * Updates to segmentation training * Update model_factory.py for named_outputs * Update arguments.py for true and false correctly for named_outputs * test fixes for lists which are now dict
1 parent 4743498 commit fc91ae0

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

ml4h/recipes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -773,7 +773,7 @@ def infer_multimodal_multitask(args):
773773
elif len(otm.shape) == 1 and otm.is_categorical():
774774
for k, i in otm.channel_map.items():
775775
try:
776-
csv_row.append(str(y[0][otm.channel_map[k]]))
776+
csv_row.append(str(y[ot][0][otm.channel_map[k]]))
777777
actual = output_data[otm.output_name()][0][i]
778778
csv_row.append("NA" if np.isnan(actual) else str(actual))
779779
except IndexError:
@@ -1080,7 +1080,7 @@ def _predict_scalars_and_evaluate_from_generator(
10801080
if not isinstance(y_predictions, list): # When models have a single output model.predict returns a ndarray otherwise it returns a list
10811081
y = y_predictions
10821082
if tm_output_name in scalar_predictions:
1083-
scalar_predictions[tm_output_name].extend(np.copy(y))
1083+
scalar_predictions[tm_output_name].extend(np.copy(y[tm_output_name]))
10841084

10851085
if i % 100 == 0:
10861086
logging.info(f'Processed {i} batches, {len(test_paths)} tensors.')

0 commit comments

Comments
 (0)