-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
CI: split tests-examples #990
Merged
williamFalcon
merged 38 commits into
Lightning-AI:master
from
Borda:split-test-examples
Mar 25, 2020
Merged
Changes from all commits
Commits
Show all changes
38 commits
Select commit
Hold shift + click to select a range
77872f8
CI: split tests-examples
Borda 482699c
tests without template
Borda be6001b
comment depends
Borda 06a43aa
CircleCI typo
Borda 888cb3f
add doctest
Borda 92841a1
update test req.
Borda 756ad4c
CI tests
Borda a7b5aef
setup macOS
Borda 7cc3775
longer train
Borda 2800e28
lover pred acc
Borda e6b54e7
fix model
Borda 58d435e
rename default model
Borda 1eb63b4
lower tests acc
Borda 6e19ed8
typo
Borda ae11861
imports
Borda 0e355be
fix test optimizer
Borda 72abd2e
update calls
Borda 66e4710
fix Win
Borda faecdd5
lower Drone image
Borda c281d3c
fix call
Borda ce0c699
pytorch image
Borda a5def6b
fix test
Borda 7d0e28c
add dev image
Borda da8aa35
add dev image
Borda 8520263
update image
Borda d846049
drone volume
Borda d940ce4
lint
Borda 181f591
update test notes
Borda 044191c
rename tests/models >> tests/base
Borda bc6fa27
group models
Borda fe315f0
conftest
Borda 3ff54d0
optim imports
Borda 4707e80
typos
Borda 45e51c8
fix import
Borda 21b6e31
fix tests
Borda 16d9b4b
install AMP
Borda 860aa4e
tests
Borda a2303d7
fix import
Borda File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# the default package dependencies | ||
|
||
tqdm>=4.41.0 | ||
numpy>=1.16.4 | ||
torch>=1.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
ARG TORCH_VERSION=1.4 | ||
ARG CUDA_VERSION=10.1 | ||
|
||
FROM pytorch/pytorch:${TORCH_VERSION}-cuda${CUDA_VERSION}-cudnn7-runtime | ||
|
||
# Install AMP | ||
RUN bash ./tests/install_AMP.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
"""Models for testing.""" | ||
|
||
import torch | ||
|
||
from tests.base.models import TestModelBase, DictHparamsModel | ||
from tests.base.mixins import ( | ||
LightEmptyTestStep, | ||
LightValidationStepMixin, | ||
LightValidationMixin, | ||
LightValidationStepMultipleDataloadersMixin, | ||
LightValidationMultipleDataloadersMixin, | ||
LightTestStepMixin, | ||
LightTestMixin, | ||
LightTestStepMultipleDataloadersMixin, | ||
LightTestMultipleDataloadersMixin, | ||
LightTestFitSingleTestDataloadersMixin, | ||
LightTestFitMultipleTestDataloadersMixin, | ||
LightValStepFitSingleDataloaderMixin, | ||
LightValStepFitMultipleDataloadersMixin, | ||
LightTrainDataloader, | ||
LightTestDataloader, | ||
LightInfTrainDataloader, | ||
LightInfValDataloader, | ||
LightInfTestDataloader, | ||
LightTestOptimizerWithSchedulingMixin, | ||
LightTestMultipleOptimizersWithSchedulingMixin, | ||
LightTestOptimizersWithMixedSchedulingMixin, | ||
LightTestReduceLROnPlateauMixin | ||
) | ||
|
||
|
||
class LightningTestModel(LightTrainDataloader, | ||
LightValidationMixin, | ||
LightTestMixin, | ||
TestModelBase): | ||
"""Most common test case. Validation and test dataloaders.""" | ||
|
||
def on_training_metrics(self, logs): | ||
logs['some_tensor_to_test'] = torch.rand(1) | ||
|
||
|
||
class LightningTestModelWithoutHyperparametersArg(LightningTestModel): | ||
""" without hparams argument in constructor """ | ||
|
||
def __init__(self): | ||
import tests.base.utils as tutils | ||
|
||
# the user loads the hparams in some other way | ||
hparams = tutils.get_default_hparams() | ||
super().__init__(hparams) | ||
|
||
|
||
class LightningTestModelWithUnusedHyperparametersArg(LightningTestModelWithoutHyperparametersArg): | ||
""" has hparams argument in constructor but is not used """ | ||
|
||
def __init__(self, hparams): | ||
super().__init__() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
you can just pass in a dict now... no need to cast as Namespace
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.
here it is used in init to get some values to do here has to be Namespace
so I will prepare follow-up pr with this change to have
hparams
setter/getter to accept