Skip to content
This repository was archived by the owner on Aug 27, 2024. It is now read-only.

Commit b1bff1b

Browse files
authored
Fix duplicate fx (#74)
* patch duplicate function * missing method Co-authored-by: Sam <sam.vanhoutte@marchitec.be>
1 parent ae3da06 commit b1bff1b

File tree

1 file changed

+1
-23
lines changed

1 file changed

+1
-23
lines changed

arcus/azureml/experimenting/aml_trainer.py

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -360,33 +360,11 @@ def save_image_outputs(self, X_test: np.array, y_test: np.array, y_pred: np.arra
360360
total_images = min(len(y_pred), samples_to_save)
361361

362362
for i in random.sample(range(len(y_pred)), total_images):
363-
newimg = self.concat_images([X_test[i], y_test[i], y_pred[i]])
363+
newimg = self.__concat_images([X_test[i], y_test[i], y_pred[i]])
364364
imgplot = explorer.show_image(newimg, silent_mode=True)
365365
self.__current_run.log_image(f'Image combo sample {i}', plot=imgplot)
366366
imgplot.close()
367367

368-
# def save_image_outputs(self, X_test: np.array, y_test: np.array, y_pred: np.array, samples_to_save: int = 1) -> np.array:
369-
370-
# '''
371-
# Will save image outputs to the run
372-
# Args:
373-
# X_test (np.array): The input images for the model
374-
# y_test (np.array): The actual expected output images of the model
375-
# y_pred (np.array): The predicted or calculated output images of the model
376-
# samples_to_save (int): If greather than 0, this amount of input, output and generated image combinations will be tracked to the Run
377-
# '''
378-
379-
# if samples_to_save > 0:
380-
# # Take incorrect classified images and save
381-
# import random
382-
# total_images = min(len(y_pred), samples_to_save)
383-
384-
# for i in random.sample(range(len(y_pred)), total_images):
385-
# groupplot = explorer.visualize({'Charts': [X_test[i]], 'Actuals': [y_test[i]], 'Calculated': [y_pred[i]]}, 1, grid_size=(6, 6), silent_mode=True)
386-
# image = X_test[i].reshape(X_test.shape[1], X_test.shape[2])
387-
# imgplot = explorer.show_image(image, silent_mode=True)
388-
# self.__current_run.log_image(f'Sample {i:02d} / {total_images:02d}', plot=groupplot)
389-
390368
def setup_training(self, training_name: str, overwrite: bool = False):
391369
'''
392370
Will initialize a new directory (using the given training_name) and add a training script and requirements file to run training

0 commit comments

Comments
 (0)