README
liblaf.cherries.plugins
¶
Modules:
Classes:
-
Comet–Send run metadata, parameters, and metrics to Comet.
-
Git–Record Git metadata and optionally commit dirty experiment outputs.
-
Local–Copy the entrypoint, logs, and artifacts into
.cherries/runs/. -
Logging–Initialize Python logging and mirror metrics to the run log.
Comet
¶
Bases: Plugin, PluginProtocol
flowchart TD
liblaf.cherries.plugins.Comet[Comet]
liblaf.cherries.core.plugin._plugin.Plugin[Plugin]
liblaf.cherries.core._protocol.PluginProtocol[PluginProtocol]
liblaf.cherries.core.assets._protocol.AssetPluginProtocol[AssetPluginProtocol]
liblaf.cherries.core.metrics._protocol.MetricPluginProtocol[MetricPluginProtocol]
liblaf.cherries.core.others._protocol.OtherPluginProtocol[OtherPluginProtocol]
liblaf.cherries.core.params._protocol.ParamPluginProtocol[ParamPluginProtocol]
liblaf.cherries.core.plugin._plugin.Plugin --> liblaf.cherries.plugins.Comet
liblaf.cherries.core._protocol.PluginProtocol --> liblaf.cherries.plugins.Comet
liblaf.cherries.core.assets._protocol.AssetPluginProtocol --> liblaf.cherries.core._protocol.PluginProtocol
liblaf.cherries.core.metrics._protocol.MetricPluginProtocol --> liblaf.cherries.core._protocol.PluginProtocol
liblaf.cherries.core.others._protocol.OtherPluginProtocol --> liblaf.cherries.core._protocol.PluginProtocol
liblaf.cherries.core.params._protocol.ParamPluginProtocol --> liblaf.cherries.core._protocol.PluginProtocol
click liblaf.cherries.plugins.Comet href "" "liblaf.cherries.plugins.Comet"
click liblaf.cherries.core.plugin._plugin.Plugin href "" "liblaf.cherries.core.plugin._plugin.Plugin"
click liblaf.cherries.core._protocol.PluginProtocol href "" "liblaf.cherries.core._protocol.PluginProtocol"
click liblaf.cherries.core.assets._protocol.AssetPluginProtocol href "" "liblaf.cherries.core.assets._protocol.AssetPluginProtocol"
click liblaf.cherries.core.metrics._protocol.MetricPluginProtocol href "" "liblaf.cherries.core.metrics._protocol.MetricPluginProtocol"
click liblaf.cherries.core.others._protocol.OtherPluginProtocol href "" "liblaf.cherries.core.others._protocol.OtherPluginProtocol"
click liblaf.cherries.core.params._protocol.ParamPluginProtocol href "" "liblaf.cherries.core.params._protocol.ParamPluginProtocol"
Send run metadata, parameters, and metrics to Comet.
Attributes:
Parameters:
Methods:
-
end–End the active Comet experiment after Git finalization.
-
log_asset–Reserve the asset hook for future Comet artifact support.
-
log_metric–Log one metric to Comet.
-
log_metrics–Log multiple metrics to Comet.
-
log_other–Log one metadata value to Comet.
-
log_others–Log multiple metadata values to Comet.
-
log_param–Log one parameter to Comet.
-
log_params–Log multiple parameters to Comet.
-
start–Start a Comet experiment for the owning run.
experiment
property
¶
Currently running Comet experiment, or a mock fallback.
name
class-attribute
instance-attribute
¶
name: PluginName = field(
default=Factory(_default_name, takes_self=True),
kw_only=True,
)
end
¶
end(exc: BaseException | None = None) -> None
log_asset
¶
Reserve the asset hook for future Comet artifact support.
log_metric
¶
log_metrics
¶
Log multiple metrics to Comet.
log_other
¶
log_others
¶
log_param
¶
log_params
¶
start
¶
Start a Comet experiment for the owning run.
Source code in src/liblaf/cherries/plugins/comet.py
Git
¶
Bases: Plugin, PluginProtocol
flowchart TD
liblaf.cherries.plugins.Git[Git]
liblaf.cherries.core.plugin._plugin.Plugin[Plugin]
liblaf.cherries.core._protocol.PluginProtocol[PluginProtocol]
liblaf.cherries.core.assets._protocol.AssetPluginProtocol[AssetPluginProtocol]
liblaf.cherries.core.metrics._protocol.MetricPluginProtocol[MetricPluginProtocol]
liblaf.cherries.core.others._protocol.OtherPluginProtocol[OtherPluginProtocol]
liblaf.cherries.core.params._protocol.ParamPluginProtocol[ParamPluginProtocol]
liblaf.cherries.core.plugin._plugin.Plugin --> liblaf.cherries.plugins.Git
liblaf.cherries.core._protocol.PluginProtocol --> liblaf.cherries.plugins.Git
liblaf.cherries.core.assets._protocol.AssetPluginProtocol --> liblaf.cherries.core._protocol.PluginProtocol
liblaf.cherries.core.metrics._protocol.MetricPluginProtocol --> liblaf.cherries.core._protocol.PluginProtocol
liblaf.cherries.core.others._protocol.OtherPluginProtocol --> liblaf.cherries.core._protocol.PluginProtocol
liblaf.cherries.core.params._protocol.ParamPluginProtocol --> liblaf.cherries.core._protocol.PluginProtocol
click liblaf.cherries.plugins.Git href "" "liblaf.cherries.plugins.Git"
click liblaf.cherries.core.plugin._plugin.Plugin href "" "liblaf.cherries.core.plugin._plugin.Plugin"
click liblaf.cherries.core._protocol.PluginProtocol href "" "liblaf.cherries.core._protocol.PluginProtocol"
click liblaf.cherries.core.assets._protocol.AssetPluginProtocol href "" "liblaf.cherries.core.assets._protocol.AssetPluginProtocol"
click liblaf.cherries.core.metrics._protocol.MetricPluginProtocol href "" "liblaf.cherries.core.metrics._protocol.MetricPluginProtocol"
click liblaf.cherries.core.others._protocol.OtherPluginProtocol href "" "liblaf.cherries.core.others._protocol.OtherPluginProtocol"
click liblaf.cherries.core.params._protocol.ParamPluginProtocol href "" "liblaf.cherries.core.params._protocol.ParamPluginProtocol"
Record Git metadata and optionally commit dirty experiment outputs.
Attributes:
Parameters:
-
name(PluginName, default:<dynamic>) – -
run(Run) – -
commit(bool, default:False) – -
verify(bool, default:False) –
Methods:
-
end–Commit dirty changes if configured and log the final Git SHA.
-
log_asset–Record an existing artifact path.
-
log_metric–Record one metric sample.
-
log_metrics–Record a batch of already-flattened metric samples.
-
log_other–Record one flattened metadata value.
-
log_others–Record multiple already-flattened metadata values.
-
log_param–Record one flattened parameter value.
-
log_params–Record multiple already-flattened parameter values.
-
start–Start a run.
name
class-attribute
instance-attribute
¶
name: PluginName = field(
default=Factory(_default_name, takes_self=True),
kw_only=True,
)
end
¶
end(exc: BaseException | None = None) -> None
Commit dirty changes if configured and log the final Git SHA.
Source code in src/liblaf/cherries/plugins/git.py
log_asset
¶
Record an existing artifact path.
Parameters:
-
path(Path) –Existing file or directory to record.
-
metadata(Mapping[str, Any] | None, default:None) –Optional artifact metadata, usually including
type. -
report(bool, default:True) –Whether the path is the primary user-facing artifact. Companion files are logged with
report=False.
Source code in src/liblaf/cherries/core/assets/_protocol.py
log_metric
¶
log_metrics
¶
log_other
¶
log_others
¶
log_param
¶
log_params
¶
Local
¶
Bases: Plugin, PluginProtocol
flowchart TD
liblaf.cherries.plugins.Local[Local]
liblaf.cherries.core.plugin._plugin.Plugin[Plugin]
liblaf.cherries.core._protocol.PluginProtocol[PluginProtocol]
liblaf.cherries.core.assets._protocol.AssetPluginProtocol[AssetPluginProtocol]
liblaf.cherries.core.metrics._protocol.MetricPluginProtocol[MetricPluginProtocol]
liblaf.cherries.core.others._protocol.OtherPluginProtocol[OtherPluginProtocol]
liblaf.cherries.core.params._protocol.ParamPluginProtocol[ParamPluginProtocol]
liblaf.cherries.core.plugin._plugin.Plugin --> liblaf.cherries.plugins.Local
liblaf.cherries.core._protocol.PluginProtocol --> liblaf.cherries.plugins.Local
liblaf.cherries.core.assets._protocol.AssetPluginProtocol --> liblaf.cherries.core._protocol.PluginProtocol
liblaf.cherries.core.metrics._protocol.MetricPluginProtocol --> liblaf.cherries.core._protocol.PluginProtocol
liblaf.cherries.core.others._protocol.OtherPluginProtocol --> liblaf.cherries.core._protocol.PluginProtocol
liblaf.cherries.core.params._protocol.ParamPluginProtocol --> liblaf.cherries.core._protocol.PluginProtocol
click liblaf.cherries.plugins.Local href "" "liblaf.cherries.plugins.Local"
click liblaf.cherries.core.plugin._plugin.Plugin href "" "liblaf.cherries.core.plugin._plugin.Plugin"
click liblaf.cherries.core._protocol.PluginProtocol href "" "liblaf.cherries.core._protocol.PluginProtocol"
click liblaf.cherries.core.assets._protocol.AssetPluginProtocol href "" "liblaf.cherries.core.assets._protocol.AssetPluginProtocol"
click liblaf.cherries.core.metrics._protocol.MetricPluginProtocol href "" "liblaf.cherries.core.metrics._protocol.MetricPluginProtocol"
click liblaf.cherries.core.others._protocol.OtherPluginProtocol href "" "liblaf.cherries.core.others._protocol.OtherPluginProtocol"
click liblaf.cherries.core.params._protocol.ParamPluginProtocol href "" "liblaf.cherries.core.params._protocol.ParamPluginProtocol"
Copy the entrypoint, logs, and artifacts into .cherries/runs/.
Attributes:
Parameters:
-
name(PluginName, default:<dynamic>) – -
run(Run) –
Methods:
-
end–End a run.
-
log_asset–Copy
pathunder the snapshot'sassets/directory. -
log_metric–Record one metric sample.
-
log_metrics–Record a batch of already-flattened metric samples.
-
log_other–Record one flattened metadata value.
-
log_others–Record multiple already-flattened metadata values.
-
log_param–Record one flattened parameter value.
-
log_params–Record multiple already-flattened parameter values.
-
start–Configure local logging and copy the entrypoint.
name
class-attribute
instance-attribute
¶
name: PluginName = field(
default=Factory(_default_name, takes_self=True),
kw_only=True,
)
end
¶
end(exc: BaseException | None = None) -> None
End a run.
Parameters:
-
exc(BaseException | None, default:None) –Exception raised by the experiment, if any.
log_asset
¶
Copy path under the snapshot's assets/ directory.
Source code in src/liblaf/cherries/plugins/local.py
log_metric
¶
log_metrics
¶
log_other
¶
log_others
¶
log_param
¶
log_params
¶
start
¶
Configure local logging and copy the entrypoint.
Logging
¶
Bases: Plugin, PluginProtocol
flowchart TD
liblaf.cherries.plugins.Logging[Logging]
liblaf.cherries.core.plugin._plugin.Plugin[Plugin]
liblaf.cherries.core._protocol.PluginProtocol[PluginProtocol]
liblaf.cherries.core.assets._protocol.AssetPluginProtocol[AssetPluginProtocol]
liblaf.cherries.core.metrics._protocol.MetricPluginProtocol[MetricPluginProtocol]
liblaf.cherries.core.others._protocol.OtherPluginProtocol[OtherPluginProtocol]
liblaf.cherries.core.params._protocol.ParamPluginProtocol[ParamPluginProtocol]
liblaf.cherries.core.plugin._plugin.Plugin --> liblaf.cherries.plugins.Logging
liblaf.cherries.core._protocol.PluginProtocol --> liblaf.cherries.plugins.Logging
liblaf.cherries.core.assets._protocol.AssetPluginProtocol --> liblaf.cherries.core._protocol.PluginProtocol
liblaf.cherries.core.metrics._protocol.MetricPluginProtocol --> liblaf.cherries.core._protocol.PluginProtocol
liblaf.cherries.core.others._protocol.OtherPluginProtocol --> liblaf.cherries.core._protocol.PluginProtocol
liblaf.cherries.core.params._protocol.ParamPluginProtocol --> liblaf.cherries.core._protocol.PluginProtocol
click liblaf.cherries.plugins.Logging href "" "liblaf.cherries.plugins.Logging"
click liblaf.cherries.core.plugin._plugin.Plugin href "" "liblaf.cherries.core.plugin._plugin.Plugin"
click liblaf.cherries.core._protocol.PluginProtocol href "" "liblaf.cherries.core._protocol.PluginProtocol"
click liblaf.cherries.core.assets._protocol.AssetPluginProtocol href "" "liblaf.cherries.core.assets._protocol.AssetPluginProtocol"
click liblaf.cherries.core.metrics._protocol.MetricPluginProtocol href "" "liblaf.cherries.core.metrics._protocol.MetricPluginProtocol"
click liblaf.cherries.core.others._protocol.OtherPluginProtocol href "" "liblaf.cherries.core.others._protocol.OtherPluginProtocol"
click liblaf.cherries.core.params._protocol.ParamPluginProtocol href "" "liblaf.cherries.core.params._protocol.ParamPluginProtocol"
Initialize Python logging and mirror metrics to the run log.
Attributes:
Parameters:
-
name(PluginName, default:<dynamic>) – -
run(Run) –
Methods:
-
end–End a run.
-
log_asset–Record an existing artifact path.
-
log_metric–Write one metric to the Python logger.
-
log_metrics–Write multiple metrics to the Python logger.
-
log_other–Record one flattened metadata value.
-
log_others–Record multiple already-flattened metadata values.
-
log_param–Record one flattened parameter value.
-
log_params–Record multiple already-flattened parameter values.
-
start–Initialize
liblaf.loggingfor the run log file.
name
class-attribute
instance-attribute
¶
name: PluginName = field(
default=Factory(_default_name, takes_self=True),
kw_only=True,
)
end
¶
end(exc: BaseException | None = None) -> None
End a run.
Parameters:
-
exc(BaseException | None, default:None) –Exception raised by the experiment, if any.
log_asset
¶
Record an existing artifact path.
Parameters:
-
path(Path) –Existing file or directory to record.
-
metadata(Mapping[str, Any] | None, default:None) –Optional artifact metadata, usually including
type. -
report(bool, default:True) –Whether the path is the primary user-facing artifact. Companion files are logged with
report=False.
Source code in src/liblaf/cherries/core/assets/_protocol.py
log_metric
¶
Write one metric to the Python logger.
log_metrics
¶
Write multiple metrics to the Python logger.