finetuner.tuner.summary module

finetuner.tuner.summary.NumericType

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

Parameters

name (str) – the name of that record

floats()[source]

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.

save(filepath)[source]

Store all summary into a JSON file

dict()[source]

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.

Note

This function requires matplotlib to be installed.

Parameters
  • 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