Lightning-AI / Lightning-AI/pytorch-lightning

Add support for Comet experiment data flush after saving checkpoint into CometLogger

Open
#20,681 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

### Description & Motivation

Periodic flushing of Comet experiment data by `CometLogger` is sometimes necessary to ensure all metrics and data remain up to date in the Comet UI and aligned with saved model checkpoints. Some users accomplish this by creating custom Callbacks, though this approach can be rather cumbersome.

### Pitch

It is proposed to enhance the `CometLogger` implementation to support flushing collected data to Comet after each checkpoint is saved. This would be configurable via the `flush_every` parameter of the `CometLogger`.

This improvement allows users to manage Comet experiment flushing using the standard PyTorch Lightning approach by registering appropriate `ModelCheckpoint` callbacks with the `Trainer`.

### Alternatives

_No response_

### Additional context

_No response_

cc @lantiga @borda

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 the CometLogger implementation and its flush_every configuration, then inspect how Trainer and ModelCheckpoint callbacks signal that a checkpoint was saved. Confirm the expected Comet flush behavior and how existing logger tests cover checkpoint events. Done means a configurable flush occurs after each saved checkpoint without requiring a custom Callback.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning, observability
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.