Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Early Stopping Hook #386

@miguelvr

Description

@miguelvr

❓ Questions and Help

I'm trying to implement an early stopping hook that interacts with other custom hooks that I have implemented, but I'm having trouble of getting a sensible way of sending a stop signal to the ClassyTrainer.

The only way I managed to get it working was this:

    def on_loss_and_meter(
        self, task: "tasks.ClassyTask", local_variables: Dict[str, Any]
    ) -> None:
        # FIXME: Ugly hack
        task.done_training = lambda: True
        logging.info("early stopping")

Is there a cleaner way of achieving this in the current state of the project?

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions