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
flowchart TD
liblaf.cherries.plugins.Comet[Comet]
liblaf.cherries.core.plugin._plugin.Plugin[Plugin]
liblaf.cherries.core.plugin._plugin.Plugin --> liblaf.cherries.plugins.Comet
click liblaf.cherries.plugins.Comet href "" "liblaf.cherries.plugins.Comet"
click liblaf.cherries.core.plugin._plugin.Plugin href "" "liblaf.cherries.core.plugin._plugin.Plugin"
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 = attrs.field(
default=attrs.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
flowchart TD
liblaf.cherries.plugins.Git[Git]
liblaf.cherries.core.plugin._plugin.Plugin[Plugin]
liblaf.cherries.core.plugin._plugin.Plugin --> liblaf.cherries.plugins.Git
click liblaf.cherries.plugins.Git href "" "liblaf.cherries.plugins.Git"
click liblaf.cherries.core.plugin._plugin.Plugin href "" "liblaf.cherries.core.plugin._plugin.Plugin"
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.
name
class-attribute
instance-attribute
¶
name: PluginName = attrs.field(
default=attrs.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
Local
¶
Bases: Plugin
flowchart TD
liblaf.cherries.plugins.Local[Local]
liblaf.cherries.core.plugin._plugin.Plugin[Plugin]
liblaf.cherries.core.plugin._plugin.Plugin --> liblaf.cherries.plugins.Local
click liblaf.cherries.plugins.Local href "" "liblaf.cherries.plugins.Local"
click liblaf.cherries.core.plugin._plugin.Plugin href "" "liblaf.cherries.core.plugin._plugin.Plugin"
Copy the entrypoint, logs, and artifacts into .cherries/runs/.
Attributes:
Parameters:
-
name(PluginName, default:<dynamic>) – -
run(Run) –
Methods:
-
log_asset–Copy
pathunder the snapshot'sassets/directory. -
start–Configure local logging and copy the entrypoint.
name
class-attribute
instance-attribute
¶
name: PluginName = attrs.field(
default=attrs.Factory(_default_name, takes_self=True),
kw_only=True,
)
log_asset
¶
Copy path under the snapshot's assets/ directory.
Source code in src/liblaf/cherries/plugins/local.py
start
¶
Configure local logging and copy the entrypoint.
Logging
¶
Bases: Plugin
flowchart TD
liblaf.cherries.plugins.Logging[Logging]
liblaf.cherries.core.plugin._plugin.Plugin[Plugin]
liblaf.cherries.core.plugin._plugin.Plugin --> liblaf.cherries.plugins.Logging
click liblaf.cherries.plugins.Logging href "" "liblaf.cherries.plugins.Logging"
click liblaf.cherries.core.plugin._plugin.Plugin href "" "liblaf.cherries.core.plugin._plugin.Plugin"
Initialize Python logging and mirror metrics to the run log.
Attributes:
Parameters:
-
name(PluginName, default:<dynamic>) – -
run(Run) –
Methods:
-
log_metric–Write one metric to the Python logger.
-
log_metrics–Write multiple metrics to the Python logger.
-
start–Initialize
liblaf.loggingfor the run log file.
name
class-attribute
instance-attribute
¶
name: PluginName = attrs.field(
default=attrs.Factory(_default_name, takes_self=True),
kw_only=True,
)
log_metric
¶
Write one metric to the Python logger.
log_metrics
¶
Write multiple metrics to the Python logger.
start
¶
Initialize liblaf.logging for the run log file.