diff --git a/dwi_ml/viz/logs_plots.py b/dwi_ml/viz/logs_plots.py index 68c291c7..1474bff0 100644 --- a/dwi_ml/viz/logs_plots.py +++ b/dwi_ml/viz/logs_plots.py @@ -120,6 +120,12 @@ def visualize_logs(logs_data: Dict[str, Dict[str, np.ndarray]], c_norm = colors.Normalize(vmin=0, vmax=len(exp_names)) scalar_map = cmx.ScalarMappable(norm=c_norm, cmap=jet) + logging.info("Figures will be plotted for epochs 0 - {}.\n" + "Experiments' number of epochs:".format(xlim)) + any_graph = graphs_logs[0][0] + for i, n in enumerate(exp_names): + logging.info("- {}: {}".format(n, len(logs_data[n][any_graph]))) + # Separating graphs in figures: nb_plots_left = len(graphs_logs) current_fig = -1 @@ -128,6 +134,8 @@ def visualize_logs(logs_data: Dict[str, Dict[str, np.ndarray]], # Prepare figure and axes fig_title = "" next_nb_plots = min(nb_plots_left, nb_rows) + + logging.info("New figure:") fig, axs = plt.subplots(nrows=next_nb_plots) if fig_size is not None: fig.set_figheight(fig_size[0]) @@ -138,6 +146,7 @@ def visualize_logs(logs_data: Dict[str, Dict[str, np.ndarray]], # For each subplot in this figure for ax in range(next_nb_plots): + logging.info(" - New plot: {}".format(graphs_titles[i])) i += 1 fig_title += "_{}".format( graphs_titles[i].replace(" ", "").replace("'", "")) diff --git a/scripts_python/dwiml_visualize_logs.py b/scripts_python/dwiml_visualize_logs.py index 8fdcc100..f218e4a0 100644 --- a/scripts_python/dwiml_visualize_logs.py +++ b/scripts_python/dwiml_visualize_logs.py @@ -176,6 +176,7 @@ def _load_all_logs(parser, args, logs_path, previous_graphs): logging.debug("Loading all logs for that experiment.") files_to_load = list(logs_path.glob('*.npy')) _graphs = [f.stem for f in files_to_load] + _graphs = np.sort(_graphs) if previous_graphs is None: # Using the first experiment to set the list of expected logs.