if args.log_wandb: runner_config["wandb_run"] = run total_dims = reader.get_dimensionality() runner = Runner(runner_config) selected_results = runner.main_loop(max_iter=args.max_iter) # Draw graphs graphs = runner.draw_graphs(selected_results) mi_fig = graphs["mi"] normalized_mi_fig = graphs["normalized_mi"] accuracy_fig = graphs["accuracy"] scatter_fig = runner.plot_dims( selected_results[0]["candidate_dim"], selected_results[1]["candidate_dim"], test_data=True, log_prob_dim_pool=list(selected_results[-1]["candidate_dim_pool"])) # You can uncomment these lines to output scatter plots for any pair of dimensions you need. # # scatter_fig = runner.plot_dims(477, 179, test_data=True) # scatter_fig.write_image(f"images/scatter_{args.embedding}_{args.language}_{args.attribute}.pdf") # scatter_fig.write_html(f"images/scatter_{args.embedding}_{args.language}_{args.attribute}.pdf") if args.show_charts: mi_fig.show() normalized_mi_fig.show() accuracy_fig.show() scatter_fig.show()