tbp.monty.frameworks.loggers#

tbp.monty.frameworks.loggers.exp_logger#

class BaseMontyLogger(handlers)[source]#

Bases: object

Basic logger that logs or saves information when logging is called.

close(logger_args, output_dir, model)[source]#
flush()[source]#
post_episode(logger_args, output_dir, model)[source]#
post_epoch(logger_args, output_dir, model)[source]#
post_eval(logger_args, output_dir, model)[source]#
post_step(logger_args, output_dir, model)[source]#
post_train(logger_args, output_dir, model)[source]#
pre_episode(logger_args, output_dir, model)[source]#
pre_epoch(logger_args, output_dir, model)[source]#
pre_eval(logger_args, output_dir, model)[source]#
pre_step(logger_args, output_dir, model)[source]#
pre_train(logger_args, output_dir, model)[source]#
class LoggingCallbackHandler(loggers, model, output_dir)[source]#

Bases: object

Calls a list of loggers on an event (eg post_train).

Each logger receives: logger_args: dict with time stamps (steps, epochs, etc.) and

dataloader.primary_target which contains object id and pose

output_dir: Full path of the directory to store log files

Note

This logger handler is intended primarily for logging

call_event(event, logger_args)[source]#
close(logger_args)[source]#
post_episode(logger_args)[source]#
post_epoch(logger_args)[source]#
post_eval(logger_args)[source]#
post_step(logger_args)[source]#
post_train(logger_args)[source]#
pre_episode(logger_args)[source]#
pre_epoch(logger_args)[source]#
pre_eval(logger_args)[source]#
pre_step(logger_args)[source]#
pre_train(logger_args)[source]#
property logger_list#
class TestLogger(handlers)[source]#

Bases: BaseMontyLogger

close(logger_args, output_dir, model)[source]#
post_episode(logger_args, output_dir, model)[source]#
post_epoch(logger_args, output_dir, model)[source]#
post_eval(logger_args, output_dir, model)[source]#
post_train(logger_args, output_dir, model)[source]#
pre_episode(logger_args, output_dir, model)[source]#
pre_epoch(logger_args, output_dir, model)[source]#
pre_eval(logger_args, output_dir, model)[source]#
pre_train(logger_args, output_dir, model)[source]#

tbp.monty.frameworks.loggers.graph_matching_loggers#

class BasicGraphMatchingLogger(handlers)[source]#

Bases: BaseMontyLogger

Basic logger that logs or saves information when logging is called.

flush()[source]#
get_formatted_overall_stats(mode, episode)[source]#
log_episode(logger_args, output_dir, model)[source]#
maybe_log(logger_args, output_dir, model)[source]#

Left here in case we go back to size based logging.

Remove if not used after code has stabilized.

post_episode(logger_args, output_dir, model)[source]#
update_episode_data(logger_args, output_dir, model)[source]#

Run get_stats_per_lm and add to overall stats.

Store stats ~
1 (episode)
lm_0 (which lm)

stats

update_overall_stats(mode, episode, episode_steps, monty_matching_steps)[source]#

Update overall run stats for mode.

class DetailedGraphMatchingLogger(handlers)[source]#

Bases: BasicGraphMatchingLogger

Log detailed stats as .json file by saving data for each LM and SM.

log_episode(logger_args, output_dir, model)[source]#
post_episode(logger_args, output_dir, model)[source]#
update_episode_data(logger_args, output_dir, model)[source]#

Add episode data to overall buffer_data dict.

Store stats ~
1 (episode)
lm_0 (which lm)

stats

class SelectiveEvidenceLogger(handlers)[source]#

Bases: BasicGraphMatchingLogger

Log evidences as .json file by saving data for each LM and SM.

This is slimmed down to only log data needed for object similarity analysis. Data logged:

  • evidences for each object and pose at the end of an episode

  • first frame of the view finder

log_episode(logger_args, output_dir, model)[source]#
post_episode(logger_args, output_dir, model)[source]#
update_episode_data(logger_args, output_dir, model)[source]#

Add episode data to overall buffer_data dict.

tbp.monty.frameworks.loggers.monty_handlers#

class BasicCSVStatsHandler[source]#

Bases: MontyHandler

Grab any logs at the BASIC level and append to train or eval CSV files.

close()[source]#
classmethod log_level()[source]#

Handlers filter information from the data they receive.

This class method specifies the level they filter at.

move_columns_to_front(df, columns)[source]#
report_episode(data, output_dir, episode, mode='train', **kwargs)[source]#
class DetailedJSONHandler[source]#

Bases: MontyHandler

Grab any logs at the DETAILED level and append to a json file.

close()[source]#
classmethod log_level()[source]#

Handlers filter information from the data they receive.

This class method specifies the level they filter at.

report_episode(data, output_dir, episode, mode='train', **kwargs)[source]#

Report episode data.

Changed name to report episode since we are currently running with reporting and flushing exactly once per episode.

class MontyHandler[source]#

Bases: object

abstract close()[source]#
abstract classmethod log_level()[source]#

Handlers filter information from the data they receive.

This class method specifies the level they filter at.

abstract report_episode(**kwargs)[source]#
class ReproduceEpisodeHandler[source]#

Bases: MontyHandler

close()[source]#
classmethod log_level()[source]#

Handlers filter information from the data they receive.

This class method specifies the level they filter at.

report_episode(data, output_dir, episode, mode='train', **kwargs)[source]#

tbp.monty.frameworks.loggers.wandb_handlers#