Lightning-AI / Lightning-AI/pytorch-lightning

Email Callback on training done

Open
#20,133 6 comments 0 reactions 0 assignees View on GitHub
discussion feature
Dominant language
Python
Stars
31.4k
Forks
3.8k
Avg merge
6d 7h
Merged PRs (30d)
6

Description

### Description & Motivation

A simple callback that accepts a user's email and an app account password to notify the user that their training is complete by email. Inspired by [wandb](https://wandb.ai/site)

The call back will use the user's email as both sender and receiver so no need for an external SMTP.

```python
email = johndoe@gmail.com
password = os.getenv("EMAIL_PASSWORD")
email_callback = EmailCallback(email, password)

trainer = Trainer(
...
callbacks=[email_callback],
)
```

![Screenshot 2024-07-28 124011](https://github.com/user-attachments/assets/4bdb9608-fdfe-40e1-91b2-2d43f4948080)

Could also add details on how the training went, like test or validation measures. We could also add graphs and make it an entire report. It can get as detailed as we want. It's also possible to notify the used of any potential crashes.

Would love to work on this if approved!

### Pitch

A lot of the time, training takes up a number of hours and users keep checking up on their models manually. An automatic notification on a user's phone where they can't miss it will speed up the development process.

### Alternatives

Users manually create the callback.

### Additional context

_No response_

cc @borda

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the existing callback API and how training completion and crashes are exposed. Clarify the email provider, credential handling, notification contents, and report scope before identifying implementation files and tests. Done should include a defined callback interface, secure authentication behavior, documented setup, and coverage for completion and failure notifications.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.