Module neuralops.results_saver.config
SaveConfig – dataclass that controls all aspects of result persistence.
Classes
class SaveConfig (save_model: bool = True,
save_checkpoints: bool = True,
save_optimizer: bool = False,
save_logs: bool = True,
save_plots: bool = True,
save_artifacts: bool = True,
create_model_version: bool = True,
auto_save_if_better_than: float | None = None,
plot_options: dict[str, typing.Any] = <factory>,
storage_backends: list[str] = <factory>,
git_options: dict[str, typing.Any] = <factory>,
dvc_options: dict[str, typing.Any] = <factory>,
experiment_trackers: list[str] = <factory>,
model_export_formats: list[str] = <factory>,
model_registries: list[str] = <factory>,
metadata_store: str | None = None,
docker_options: dict[str, typing.Any] = <factory>,
release_options: dict[str, typing.Any] = <factory>,
notification: dict[str, typing.Any] = <factory>,
cloud_options: dict[str, typing.Any] = <factory>)-
Expand source code
@dataclass class SaveConfig: """User‑facing configuration for result persistence.""" # ── Core switches ────────────────────────────────────────── save_model: bool = True save_checkpoints: bool = True save_optimizer: bool = False save_logs: bool = True save_plots: bool = True save_artifacts: bool = True create_model_version: bool = True # ── Auto‑save threshold ──────────────────────────────────── auto_save_if_better_than: float | None = None # ── Plot options (passed to framework.analysis.plotting) ── plot_options: dict[str, Any] = field( default_factory=lambda: { "loss_curve": True, "accuracy_curve": True, "confusion_matrix": False, "attention_heatmap": False, "gradient_flow": False, "lr_schedule": True, "gpu_memory": False, "training_time": True, "parameter_count": False, "rank_allocation": False, "pareto_front": False, "radar_chart": False, "loss_smooth": 0.6, "figsize": [10, 6], "dpi": 150, "class_names": None, } ) # ── Storage backends (local, s3, gcp, azure, hf_hub, etc.) ─ storage_backends: list[str] = field(default_factory=lambda: ["local"]) # ── Git / DVC ────────────────────────────────────────────── git_options: dict[str, Any] = field(default_factory=dict) dvc_options: dict[str, Any] = field(default_factory=dict) # ── Experiment trackers (wandb, mlflow, neptune, etc.) ───── experiment_trackers: list[str] = field(default_factory=list) # ── Model export formats (onnx, torchscript, tflite, ...) ─ model_export_formats: list[str] = field(default_factory=list) # ── Model registries (hf_hub, oci, ...) ──────────────────── model_registries: list[str] = field(default_factory=list) # ── Metadata store (openmetadata, etc.) ──────────────────── metadata_store: str | None = None # ── Docker / OCI options ─────────────────────────────────── docker_options: dict[str, Any] = field(default_factory=dict) # ── GitHub Release options ───────────────────────────────── release_options: dict[str, Any] = field(default_factory=dict) # ── Notifications (slack, email, etc.) ──────────────────── notification: dict[str, Any] = field(default_factory=dict) # ── Cloud credentials / endpoints (for S3, GCP, etc.) ───── cloud_options: dict[str, Any] = field(default_factory=dict) @classmethod def from_dict(cls, d: Any) -> "SaveConfig": """Build SaveConfig from dict or return if already SaveConfig.""" if isinstance(d, cls): return d if not isinstance(d, dict): return cls() valid = {k for k in d if k in cls.__dataclass_fields__} return cls(**{k: d[k] for k in valid})User‑facing configuration for result persistence.
Static methods
def from_dict(d: Any) ‑> SaveConfig-
Build SaveConfig from dict or return if already SaveConfig.
Instance variables
var auto_save_if_better_than : float | None-
The type of the None singleton.
var cloud_options : dict[str, typing.Any]-
The type of the None singleton.
var create_model_version : bool-
The type of the None singleton.
var docker_options : dict[str, typing.Any]-
The type of the None singleton.
var dvc_options : dict[str, typing.Any]-
The type of the None singleton.
var experiment_trackers : list[str]-
The type of the None singleton.
var git_options : dict[str, typing.Any]-
The type of the None singleton.
var metadata_store : str | None-
The type of the None singleton.
var model_export_formats : list[str]-
The type of the None singleton.
var model_registries : list[str]-
The type of the None singleton.
var notification : dict[str, typing.Any]-
The type of the None singleton.
var plot_options : dict[str, typing.Any]-
The type of the None singleton.
var release_options : dict[str, typing.Any]-
The type of the None singleton.
var save_artifacts : bool-
The type of the None singleton.
var save_checkpoints : bool-
The type of the None singleton.
var save_logs : bool-
The type of the None singleton.
var save_model : bool-
The type of the None singleton.
var save_optimizer : bool-
The type of the None singleton.
var save_plots : bool-
The type of the None singleton.
var storage_backends : list[str]-
The type of the None singleton.