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
[wip] simplified runner proposal #984
Conversation
|
||
def _init(self, **kwargs): | ||
self.experiment: Experiment = None | ||
def __init__( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
D107 Missing docstring in init
catalyst/core/runner.py
Outdated
@@ -1,13 +1,14 @@ | |||
from typing import Any, Callable, Dict, Mapping, Optional, Tuple, Union | |||
from typing import Any, Callable, Dict, Mapping, Optional, Tuple, Union, List |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
F401 'typing.Tuple' imported but unused
catalyst/core/runner.py
Outdated
@@ -1,13 +1,14 @@ | |||
from typing import Any, Callable, Dict, Mapping, Optional, Tuple, Union | |||
from typing import Any, Callable, Dict, Mapping, Optional, Tuple, Union, List |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
I001 isort found an import in the wrong position
) -> Tuple[Model, Criterion, Optimizer, Scheduler, Device]: | ||
""" | ||
Inner method for `Experiment` components preparation. | ||
def on_experiment_start(self, runner: "IRunner"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
D102 Missing docstring in public method
|
||
Check available torch device, takes model from the experiment | ||
and creates stage-specified criterion, optimizer, scheduler for it. | ||
def on_stage_start(self, runner: "IRunner"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
D102 Missing docstring in public method
def _prepare_for_epoch(self, stage: str, epoch: int) -> None: | ||
""" | ||
Inner method to prepare `Runner` for the specified stage and epoch. | ||
def on_epoch_end(self, runner: "IRunner"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
D102 Missing docstring in public method
like "pretrain" / "train" / "finetune" / etc | ||
epoch: epoch index | ||
""" | ||
def on_stage_end(self, runner: "IRunner"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
D102 Missing docstring in public method
pass | ||
|
||
def on_experiment_end(self, runner: "IRunner"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
D102 Missing docstring in public method
def on_experiment_end(self, runner: "IRunner"): | ||
pass | ||
|
||
def on_exception(self, runner: "IRunner"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
D102 Missing docstring in public method
|
||
# example 3 | ||
runner.get_attr("scheduler", "adam") | ||
# is equivalent to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
DAR101 Missing parameter(s) in Docstring: - obj
catalyst/core/runner.py
Outdated
@@ -1,13 +1,14 @@ | |||
from typing import Any, Callable, Dict, Mapping, Optional, Tuple, Union | |||
from typing import Any, Callable, Dict, List, Mapping, Optional, Tuple, Union |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
F401 'typing.List' imported but unused
catalyst/core/runner.py
Outdated
Prepares callbacks with `self._get_experiment_callbacks`. | ||
Prepares inner state with `self._prepare_inner_state` | ||
Additionally sets `Experiment` datasources for specified stage. | ||
def on_stage_start(self, runner: "IRunner"): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[pep8] reported by reviewdog 🐶
D102 Missing docstring in public method
This pull request is now in conflicts. @Scitator, could you fix it? 🙏 |
Before submitting
catalyst-make-codestyle && catalyst-check-codestyle
(pip install -U catalyst-codestyle
).make check-docs
?pytest .
?Description
Related Issue
Type of Change
PR review
Anyone in the community is free to review the PR once the tests have passed.
If we didn't discuss your PR in Github issues there's a high chance it will not be merged.
PS