AnalyticsΒΆ
-
labml.analytics.
runs
(*uuids: str)[source]ΒΆ This is used to analyze runs. It fetches all the log indicators.
- Parameters
uuids (str) β UUIDs of the runs. You can get this from dashboard
Example
>>> from labml import analytics >>> indicators = analytics.runs('1d3f855874d811eabb9359457a24edc8')
-
labml.analytics.
distribution
(*args: any, names: Optional[List[str]] = None, levels: int = 5, alpha: int = 0.6, height: int = 400, width: int = 800, height_minimap: int = 100)[source]ΒΆ Creates a distribution plot distribution with Altair
This has multiple overloads
-
labml.analytics.
distribution
(indicators: IndicatorCollection, *, names: Optional[List[str]] = None, levels: int = 5, alpha: int = 0.6, height: int = 400, width: int = 800, height_minimap: int = 100)[source]
-
labml.analytics.
distribution
(series: Union[np.ndarray, torch.Tensor], *, names: Optional[List[str]] = None, levels: int = 5, alpha: int = 0.6, height: int = 400, width: int = 800, height_minimap: int = 100)[source]
-
labml.analytics.
distribution
(series: List[Union[np.ndarray, torch.Tensor]], *, names: Optional[List[str]] = None, levels: int = 5, alpha: int = 0.6, height: int = 400, width: int = 800, height_minimap: int = 100)[source]
-
labml.analytics.
distribution
(series: List[Union[np.ndarray, torch.Tensor]], step: np.ndarray, *, names: Optional[List[str]] = None, levels: int = 5, alpha: int = 0.6, height: int = 400, width: int = 800, height_minimap: int = 100)[source]
- Parameters
indicators (IndicatorCollection) β Set of indicators to be plotted
series (List[np.ndarray]) β List of series of data
step (np.ndarray) β Steps
- Keyword Arguments
names (List[str]) β List of names of series
levels β how many levels of the distribution to be plotted
alpha β opacity of the distribution
height β height of the visualization
width β width of the visualization
height_minimap β height of the view finder
- Returns
The Altair visualization
Example
>>> from labml import analytics >>> indicators = analytics.runs('1d3f855874d811eabb9359457a24edc8') >>> analytics.distribution(indicators)
-
-
labml.analytics.
scatter
(*args: any, names: Optional[List[str]] = None, x_name: Optional[str] = None, noise: Optional[Tuple[float, float]] = None, circle_size: int = 20, height: int = 400, width: int = 800, height_minimap: int = 100)[source]ΒΆ Creates a scatter plot with Altair
This has multiple overloads
-
labml.analytics.
scatter
(indicators: IndicatorCollection, x_indicators: IndicatorCollection, *, names: Optional[List[str]] = None, x_name: Optional[str] = None, noise: Optional[Tuple[float, float]] = None, circle_size: int = 20, height: int = 400, width: int = 800, height_minimap: int = 100)[source]
-
labml.analytics.
scatter
(series: List[np.ndarray], x_series: np.ndarray, *, names: Optional[List[str]] = None, x_name: Optional[str] = None, noise: Optional[Tuple[float, float]] = None, circle_size: int = 20, height: int = 400, width: int = 800, height_minimap: int = 100)[source]
- Parameters
indicators (IndicatorCollection) β Set of indicators to be plotted
x_indicators (IndicatorCollection) β Indicator for x-axis
series (List[np.ndarray]) β List of series of data
x_series (np.ndarray) β X series of data
- Keyword Arguments
names (List[str]) β List of names of series
name (str) β Name of X series
noise β Noise to be added to spread out the scatter plot
circle_size β size of circles in the plot
height β height of the visualization
width β width of the visualization
height_minimap β height of the view finder
- Returns
The Altair visualization
- Example
>>> from labml import analytics >>> indicators = analytics.runs('1d3f855874d811eabb9359457a24edc8') >>> analytics.scatter(indicators.validation_loss, indicators.train_loss)
-
-
labml.analytics.
binned_heatmap
(*args: any, names: Optional[List[str]] = None, x_name: Optional[str] = None, height: int = 400, width: int = 800, height_minimap: int = 100)[source]ΒΆ Creates a scatter plot with Altair
This has multiple overloads
-
labml.analytics.
binned_heatmap
(indicators: IndicatorCollection, x_indicators: IndicatorCollection, *, names: Optional[List[str]] = None, x_name: Optional[str] = None, height: int = 400, width: int = 800, height_minimap: int = 100)[source]
-
labml.analytics.
binned_heatmap
(series: List[np.ndarray], x_series: np.ndarray, *, names: Optional[List[str]] = None, x_name: Optional[str] = None, height: int = 400, width: int = 800, height_minimap: int = 100)[source]
- Parameters
indicators (IndicatorCollection) β Set of indicators to be plotted
x_indicators (IndicatorCollection) β Indicator for x-axis
series (List[np.ndarray]) β List of series of data
x_series (np.ndarray) β X series of data
- Keyword Arguments
names (List[str]) β List of names of series
name (str) β Name of X series
noise β Noise to be added to spread out the scatter plot
circle_size β size of circles in the plot
height β height of the visualization
width β width of the visualization
height_minimap β height of the view finder
- Returns
The Altair visualization
Example
>>> from labml import analytics >>> indicators = analytics.runs('1d3f855874d811eabb9359457a24edc8') >>> analytics.scatter(indicators.validation_loss, indicators.train_loss)
-
-
labml.analytics.
histogram
(series: Union[numpy.ndarray, torch.Tensor], *, low: Optional[float] = None, high: Optional[float] = None, height: int = 400, width: int = 800, height_minimap: int = 100)[source]ΒΆ Creates a histogram with Altair
- Parameters
series (Union[np.ndarray, torch.Tensor]) β Data
- Keyword Arguments
low β values less than this are ignored
high β values greater than this are ignored
height β height of the visualization
width β width of the visualization
height_minimap β height of the view finder
- Returns
The Altair visualization
-
labml.analytics.
indicator_data
(indicators: labml.analytics.IndicatorCollection) → Tuple[List[numpy.ndarray], List[List[str]]][source]ΒΆ Returns a tuple of a list of series and a list of names of series. Each series, S is a timeseries of histograms of shape [T, 10], where T is the number of timesteps. S[:, 0] is the global_step. S[:, 1:10] represents the distribution at basis points 0, 6.68, 15.87, 30.85, 50.00, 69.15, 84.13, 93.32, 100.00.
Example
>>> from labml import analytics >>> indicators = analytics.runs('1d3f855874d811eabb9359457a24edc8') >>> analytics.indicator_data(indicators)
-
labml.analytics.
artifact_data
(indicators: labml.analytics.IndicatorCollection) → Tuple[List[any], List[str]][source]ΒΆ Returns a tuple of a list of series and a list of names of series. Each series,
S
is a timeseries of histograms of shape[T, 10]
, whereT
is the number of timesteps.S[:, 0]
is the global_step.S[:, 1:10]
represents the distribution at basis points:0, 6.68, 15.87, 30.85, 50.00, 69.15, 84.13, 93.32, 100.00
.Example
>>> from labml import analytics >>> indicators = analytics.runs('1d3f855874d811eabb9359457a24edc8') >>> analytics.artifact_data(indicators)
-
class
labml.analytics.
IndicatorCollection
(indicators: List[labml.internal.analytics.indicators.Indicator])[source]ΒΆ You can get a indicator collection with
runs()
.>>> from labml import analytics >>> indicators = analytics.runs('1d3f855874d811eabb9359457a24edc8')
You can reference individual indicators as attributes.
>>> train_loss = indicators.train_loss
You can add multiple indicator collections
>>> losses = indicators.train_loss + indicators.validation_loss