Skip to content

Passing trainer engine to tb_logger attach of evaluator engine. #2031

Answered by vfdev-5
aksg87 asked this question in Q&A
Discussion options

You must be logged in to vote

@aksg87 thanks for the question and the feedback about the library !

Unfortunately, in the current state of the library, we can not propagate args/kwargs to the handler but I could be easy to add as a new feature.

Currently, instead of using tb_logger.attach you can write it like that:

with TensorboardLogger(log_dir="quick-start-segmentation") as tb_logger:

    e = Events.EPOCH_COMPLETED 
    evaluator.add_event_handler(
        e, predictions_gt_images_handler, tb_logger, e, trainer=trainer
    )

PS: by the way, in case if you haven't seen previously our message about a survey:

we would love to hear user's feedback on our documentation! The survey will only take around 1-2 minutes to c…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by aksg87
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants