env_reporter
orchard.core.logger.env_reporter
¶
Environment Reporter.
Provides formatted logging for experiment initialization and environment configuration. Transforms complex configuration states and hardware objects into structured, human-readable log output.
The Reporter is invoked by RootOrchestrator during initialization to produce a comprehensive baseline status report covering hardware, dataset, strategy, hyperparameters, and filesystem configuration.
ReporterProtocol
¶
Bases: Protocol
Protocol for environment reporting, allowing mocking in tests.
log_initial_status(logger_instance, cfg, paths, device, applied_threads, num_workers)
¶
Logs the initial status of the environment.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
logger_instance
|
Logger
|
The logger instance used to log the status. |
required |
cfg
|
'Config'
|
The configuration object containing environment settings. |
required |
paths
|
'RunPaths'
|
The paths object with directories for the run. |
required |
device
|
device
|
The device (e.g., CPU or GPU) to be used for processing. |
required |
applied_threads
|
int
|
The number of threads allocated for processing. |
required |
num_workers
|
int
|
The number of worker processes to use. |
required |
Source code in orchard/core/logger/env_reporter.py
Reporter
¶
Bases: BaseModel
Centralized logging and reporting utility for experiment lifecycle events.
Transforms complex configuration states and hardware objects into human-readable logs. Called by Orchestrator during initialization.
log_phase_header(log, title, style=None)
staticmethod
¶
Log a centered phase header with separator lines.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
log
|
Logger
|
Logger instance to write to. |
required |
title
|
str
|
Header text (will be uppercased and centered). |
required |
style
|
str | None
|
Separator string (defaults to |
None
|
Source code in orchard/core/logger/env_reporter.py
log_initial_status(logger_instance, cfg, paths, device, applied_threads, num_workers)
¶
Logs verified baseline environment configuration upon initialization.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
logger_instance
|
Logger
|
Active experiment logger |
required |
cfg
|
'Config'
|
Validated global configuration manifest |
required |
paths
|
'RunPaths'
|
Dynamic path orchestrator for current session |
required |
device
|
'torch.device'
|
Resolved PyTorch compute device |
required |
applied_threads
|
int
|
Number of intra-op threads assigned |
required |
num_workers
|
int
|
Number of DataLoader workers |
required |