Skip to content

Upload lightning_config.yaml to W&B online run logs for better traceability #121

Description

@aditya0by0

Description:
Currently, there’s a filename clash between the config files generated by Weights & Biases (W&B) and PyTorch Lightning CLI:

  • W&B automatically generates a file named config.yaml to store hyperparameters and run settings passed for a given run.
  • LightningCLI also generates a file named config.yaml (by default) containing the CLI/Lightning configuration for reproducibility.

Since both have similar default names, we changed LightningCLI’s config file name to avoid conflicts:

ChebaiCLI(
    save_config_kwargs={"config_filename": "lightning_config.yaml"},
    parser_kwargs={"parser_mode": "omegaconf"},
)

This prevents overwriting and allows both files to coexist.
However, while lightning_config.yaml is saved locally (inside the W&B run’s files directory), it is not uploaded to the W&B online run logs.

Why this matters:
The lightning_config.yaml contains much more detailed information than W&B’s config.yml — including:

  • The classes and subclasses instantiated
  • Detailed CLI arguments and defaults
  • Model architecture instantiation details
  • Extra metadata useful for experiment reproducibility

Having this file in the online W&B run logs would greatly improve:

  • Traceability of runs
  • Experiment reproducibility
  • Collaboration across teams, where others can reconstruct the exact CLI command and configuration
  • Also helpful when for debugging and reverse engineering to find certain inconsistencies across runs

Proposed solution:

  • Ensure that lightning_config.yaml (or the filename set via save_config_kwargs) is automatically uploaded to W&B run logs, just like artifacts and logs.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

documentationImprovements or additions to documentationenhancementNew feature or requestpriority: lowIssue with low priority

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions