Collect fit_one_cycle output

I am trying to collect the metrics outputted by fit_one_cycle in order to make a while loop that runs until the valid_loss and train_loss hits a certain value. Is there a way to do this?

Iā€™d recommend looking at the source code for EarlyStoppingCallback and adjust it to search for your specified value probably.

https://docs.fast.ai/callbacks.tracker.html#Tracking-Callbacks

2 Likes

In case someone runs across this question, this has been implemented with TrackerCallback and get_monitor_value()

https://docs.fast.ai/callbacks.tracker.html#TrackerCallback

Fastai2 callbacks can be found here: