Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MisconfigurationException use cases #20553

Open
moghadas76 opened this issue Jan 20, 2025 · 0 comments
Open

MisconfigurationException use cases #20553

moghadas76 opened this issue Jan 20, 2025 · 0 comments
Labels
needs triage Waiting to be triaged by maintainers refactor

Comments

@moghadas76
Copy link
Contributor

moghadas76 commented Jan 20, 2025

Outline & Motivation

if (
            self.trainer.max_epochs != -1
            and self.trainer.max_epochs is not None
            and self.trainer.current_epoch > self.trainer.max_epochs
        ):
            raise MisconfigurationException(
                f"You restored a checkpoint with current_epoch={self.trainer.current_epoch},"
                f" but you have set Trainer(max_epochs={self.trainer.max_epochs})."
            )```

### Pitch

if (
self.trainer.max_epochs != -1
and self.trainer.max_epochs is not None
and self.trainer.current_epoch > self.trainer.max_epochs
):
return None


### Additional context

_No response_

cc @lantiga @justusschock
@moghadas76 moghadas76 added needs triage Waiting to be triaged by maintainers refactor labels Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Waiting to be triaged by maintainers refactor
Projects
None yet
Development

No branches or pull requests

1 participant