finetuner.tuner.summary module


The type of numerics including numpy data type

alias of Union[int, float, complex, numpy.number]

class finetuner.tuner.summary.ScalarSequence(name)[source]

Bases: object

Create a record for storing a list of scalar values e.g. losses/metrics


name (str) – the name of that record


Return all numbers as a list of Python native float

Return type

List[Union[int, float, complex, number]]

class finetuner.tuner.summary.Summary(*records)[source]

Bases: object

Create a collection of summaries.


Store all summary into a JSON file


Return all summaries as a Dictionary, where key is the name and value is the record

Return type

Dict[str, List[Union[int, float, complex, number]]]

plot(output=None, max_plot_points=None, **kwargs)[source]

Plot all records in the summary into one plot.


This function requires matplotlib to be installed.

  • output (Optional[str]) – Optional path to store the visualization. If not given, show in UI

  • max_plot_points (Optional[int]) – the maximum number of points to plot. When the actual number of plots is larger than given number, then a linspace sampling is conducted first to get the actual number of points for plotting.

  • kwargs – extra kwargs pass to matplotlib.plot