Accessing training metrics

This seems like a stupid question, so apologies if this is somewhere in the docs already (I couldn’t find it).

How do I access the training metrics across epochs, i.e those that are displayed in Jupyter Notebook when using learn.fit_one_cycle, as a dictionary or pandas dataframe or something else?

They are stored in the recorder: learn.recorder.metrics

my learn.recorder.metrics is empty and has length 0, any suggestion?

Use learn.validate()

Thanks for your answer @Archaeologist, learn.validate() returns the last value of valid_loss, how can I fetch the entire loss data frame?

You mean for each epoch? If so, train for one epoch only, then call learn.validate(). Put this into a loop

yes, for each epoch, I would ideally like to fetch the entire training dataframe (see below):

Look into the Recorder callback and its valid.metrics attribute.