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

Update __init__.py #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,17 +90,17 @@ def setup_extras_pre(self) -> Extras:
# setup dataset & dataloader, return a dict contained dataser, dataloader and/or iterator
@abstractmethod
def setup_data(self, extras: Extras) -> Data:
raise NotImplementedError("This method needs to be overriden")
raise NotImplementedError("This method needs to be overridden")

# return a dict with all models that are going to be used in the training
@abstractmethod
def setup_models(self, extras: Extras) -> Models:
raise NotImplementedError("This method needs to be overriden")
raise NotImplementedError("This method needs to be overridden")

# return a dict with all optimizers that are going to be used in the training
@abstractmethod
def setup_optimizers(self, extras: Extras, models: Models) -> Optimizers:
raise NotImplementedError("This method needs to be overriden")
raise NotImplementedError("This method needs to be overridden")

# [optionally] return a dict with all schedulers that are going to be used in the training
def setup_schedulers(self, extras: Extras, models: Models, optimizers: Optimizers) -> Schedulers:
Expand All @@ -113,7 +113,7 @@ def setup_extras_post(self, extras: Extras, models: Models, optimizers: Optimize
# perform the training here
@abstractmethod
def train(self, data: Data, extras: Extras, models: Models, optimizers: Optimizers, schedulers: Schedulers):
raise NotImplementedError("This method needs to be overriden")
raise NotImplementedError("This method needs to be overridden")
# ------------

def setup_info(self, full_path=None) -> Info:
Expand Down Expand Up @@ -278,7 +278,7 @@ def save_optimizer(self, optim, optim_id=None, full_path=None, fsdp_model=None):
# -----

def __init__(self, config_file_path=None, config_dict=None, device="cpu", training=True):
# Temporary setup, will be overriden by setup_ddp if required
# Temporary setup, will be overridden by setup_ddp if required
self.device = device
self.process_id = 0
self.is_main_node = True
Expand Down