pommes.tests.test_solver_progress

The common report of a solve, read from the log file of the solver.

Attributes

LOGS

HIGHS_LOG

RECORDED_LOGS

COLUMN_ENDS

Functions

log(caplog)

events(log)

summaries(log, event)

read_log(name, solver)

test_a_recorded_log_gives_the_common_fields(name)

test_the_primal_phase_one_of_highs_gives_its_infeasibility()

test_gurobi_keeps_its_optimum_to_itself_until_crossover_ends()

test_a_dual_solved_by_mosek_counts_no_rows()

test_a_dualized_presolve_says_so(tmp_path, log)

test_a_presolve_that_grows_shows_a_plus(tmp_path, log)

test_barrier_iterations_of_a_recorded_log_carry_their_gap()

test_every_recorded_log_is_checked()

test_a_log_that_says_nothing_comes_down_to_the_time(...)

test_a_solver_without_parser_is_reported_too(tmp_path, log)

test_a_report_for_every_interval_even_without_any_log(...)

test_a_stalled_clock_does_not_pile_up_reports(...)

test_earlier_solves_in_the_file_are_skipped(tmp_path)

test_a_log_emptied_by_its_solver_is_read_from_the_start(...)

test_an_emptied_log_drops_the_line_it_was_waiting_for(...)

test_silence_counts_from_the_last_line_for_a_lazy_report_too(...)

test_a_line_being_written_waits_for_its_end(tmp_path)

test_an_eager_report_names_the_solver_after_its_choice(...)

test_without_the_size_of_the_model_the_presolve_says_what_is_left(...)

test_a_short_lazy_solve_leaves_no_trace(tmp_path, log)

test_a_long_lazy_solve_tells_everything_at_its_first_report(...)

test_a_failing_parser_does_not_stop_the_report(...)

test_follow_solve_is_off_without_interval_or_file(...)

test_follow_solve_says_a_solve_stopped(tmp_path, log)

test_solve_model_reports_and_keeps_the_console_clear(...)

test_solve_model_appends_nothing_to_a_run_without_report(...)

test_no_thread_left_costs_the_report_only(tmp_path, ...)

small_model()

test_a_full_temporary_disk_costs_the_report_only(...)

test_a_cleanup_that_fails_keeps_the_result(tmp_path, ...)

test_a_hanging_handler_does_not_hold_the_solve(...)

test_solve_model_starts_from_a_new_log(tmp_path, log)

A long earlier log, emptied by linopy at a moment of its own.

rendered(log)

What the console of pommes shows of the records, line by line.

progress_record([stage, details])

assert_in_columns(row)

test_the_header_of_the_table_sets_its_columns()

test_every_recorded_log_makes_rows_in_columns(...)

test_a_row_stays_in_its_columns_whatever_it_holds(...)

test_a_row_shows_a_dash_for_what_the_log_did_not_give()

test_a_silent_row_says_so_after_its_columns()

stage_record(event)

test_the_table_repeats_its_header()

test_the_table_starts_over_after_a_line_across_it(event)

test_the_iterations_get_their_header_back_after_a_long_master()

test_a_handler_of_the_application_keeps_the_labels(...)

test_a_null_interval_is_refused(value)

Module Contents

pommes.tests.test_solver_progress.LOGS
pommes.tests.test_solver_progress.HIGHS_LOG
pommes.tests.test_solver_progress.log(caplog)
pommes.tests.test_solver_progress.events(log)
pommes.tests.test_solver_progress.summaries(log, event)
pommes.tests.test_solver_progress.read_log(name, solver)
pommes.tests.test_solver_progress.RECORDED_LOGS
pommes.tests.test_solver_progress.test_a_recorded_log_gives_the_common_fields(name)
pommes.tests.test_solver_progress.test_the_primal_phase_one_of_highs_gives_its_infeasibility()
pommes.tests.test_solver_progress.test_gurobi_keeps_its_optimum_to_itself_until_crossover_ends()
pommes.tests.test_solver_progress.test_a_dual_solved_by_mosek_counts_no_rows()
pommes.tests.test_solver_progress.test_a_dualized_presolve_says_so(tmp_path, log)
pommes.tests.test_solver_progress.test_a_presolve_that_grows_shows_a_plus(tmp_path, log)
pommes.tests.test_solver_progress.test_barrier_iterations_of_a_recorded_log_carry_their_gap()
pommes.tests.test_solver_progress.test_every_recorded_log_is_checked()
pommes.tests.test_solver_progress.test_a_log_that_says_nothing_comes_down_to_the_time(tmp_path, log, content)
pommes.tests.test_solver_progress.test_a_solver_without_parser_is_reported_too(tmp_path, log)
pommes.tests.test_solver_progress.test_a_report_for_every_interval_even_without_any_log(tmp_path, log)
pommes.tests.test_solver_progress.test_a_stalled_clock_does_not_pile_up_reports(tmp_path, log)
pommes.tests.test_solver_progress.test_earlier_solves_in_the_file_are_skipped(tmp_path)
pommes.tests.test_solver_progress.test_a_log_emptied_by_its_solver_is_read_from_the_start(tmp_path)
pommes.tests.test_solver_progress.test_an_emptied_log_drops_the_line_it_was_waiting_for(tmp_path)
pommes.tests.test_solver_progress.test_silence_counts_from_the_last_line_for_a_lazy_report_too(tmp_path, log)
pommes.tests.test_solver_progress.test_a_line_being_written_waits_for_its_end(tmp_path)
pommes.tests.test_solver_progress.test_an_eager_report_names_the_solver_after_its_choice(tmp_path, log)
pommes.tests.test_solver_progress.test_without_the_size_of_the_model_the_presolve_says_what_is_left(tmp_path, log)
pommes.tests.test_solver_progress.test_a_short_lazy_solve_leaves_no_trace(tmp_path, log)
pommes.tests.test_solver_progress.test_a_long_lazy_solve_tells_everything_at_its_first_report(tmp_path, log)
pommes.tests.test_solver_progress.test_a_failing_parser_does_not_stop_the_report(tmp_path, log, monkeypatch)
pommes.tests.test_solver_progress.test_follow_solve_is_off_without_interval_or_file(tmp_path, log)
pommes.tests.test_solver_progress.test_follow_solve_says_a_solve_stopped(tmp_path, log)
pommes.tests.test_solver_progress.test_solve_model_reports_and_keeps_the_console_clear(tmp_path, log, capfd)
pommes.tests.test_solver_progress.test_solve_model_appends_nothing_to_a_run_without_report(log, capfd)
pommes.tests.test_solver_progress.test_no_thread_left_costs_the_report_only(tmp_path, monkeypatch)
pommes.tests.test_solver_progress.small_model()
pommes.tests.test_solver_progress.test_a_full_temporary_disk_costs_the_report_only(monkeypatch)
pommes.tests.test_solver_progress.test_a_cleanup_that_fails_keeps_the_result(tmp_path, monkeypatch)
pommes.tests.test_solver_progress.test_a_hanging_handler_does_not_hold_the_solve(tmp_path, monkeypatch)
pommes.tests.test_solver_progress.test_solve_model_starts_from_a_new_log(tmp_path, log)

A long earlier log, emptied by linopy at a moment of its own.

pommes.tests.test_solver_progress.rendered(log)

What the console of pommes shows of the records, line by line.

pommes.tests.test_solver_progress.progress_record(stage='2:03', details=(), **fields)
pommes.tests.test_solver_progress.COLUMN_ENDS = [9, 40, 51, 62, 73, 84]
pommes.tests.test_solver_progress.assert_in_columns(row)
pommes.tests.test_solver_progress.test_the_header_of_the_table_sets_its_columns()
pommes.tests.test_solver_progress.test_every_recorded_log_makes_rows_in_columns(tmp_path, log, name)
pommes.tests.test_solver_progress.test_a_row_stays_in_its_columns_whatever_it_holds(stage, fields)
pommes.tests.test_solver_progress.test_a_row_shows_a_dash_for_what_the_log_did_not_give()
pommes.tests.test_solver_progress.test_a_silent_row_says_so_after_its_columns()
pommes.tests.test_solver_progress.stage_record(event)
pommes.tests.test_solver_progress.test_the_table_repeats_its_header()
pommes.tests.test_solver_progress.test_the_table_starts_over_after_a_line_across_it(event)
pommes.tests.test_solver_progress.test_the_iterations_get_their_header_back_after_a_long_master()
pommes.tests.test_solver_progress.test_a_handler_of_the_application_keeps_the_labels(tmp_path, log)
pommes.tests.test_solver_progress.test_a_null_interval_is_refused(value)