Lightning-AI / Lightning-AI/pytorch-lightning

Wandb 1.x step handling

Open
#20,368 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature logger: wandb
Dominant language
Python
Stars
31.4k
Forks
3.8k
Avg merge
6d 7h
Merged PRs (30d)
6

Description

### Description & Motivation

I recently just upgraded from lightning 1.x to 2.x. During the change, it seems that lightning has changed the way that steps are handled when logging to wandb. In particular, instead of using wandb's `step` argument, as was done in 1.x, lightning 2.x's step is logged as `trainer/global_step`. The trouble for me is that this makes comparing runs between 1.x and 2.x very difficult, because the steps are not on the same scale.

### Pitch

I would like an option to `WandbLogger` that allows me to optionally configure the 1.x step behavior.

### Alternatives

_No response_

### Additional context

![image](https://github.com/user-attachments/assets/2423f8bd-19ee-42d2-915b-52a99eabd028)
![image](https://github.com/user-attachments/assets/8cd322ec-cd27-4515-b534-aa3548f1636a)

cc @lantiga @borda @morganmcg1 @borisdayma @scottire @parambharat

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating WandbLogger and examining how logging steps are passed to Weights & Biases in the current version, then compare that behavior with the 1.x behavior described in the issue. Done means an optional configuration restores compatible 1.x step handling without changing the default behavior, with coverage for both modes.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.