Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
declearn2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Magnet
DecLearn
declearn2
Commits
878057da
Verified
Commit
878057da
authored
1 year ago
by
ANDREY Paul
Browse files
Options
Downloads
Patches
Plain Diff
Update unit tests to use optimizer plug-in listing utils.
parent
b5121d0f
No related branches found
No related tags found
1 merge request
!57
Improve tests coverage and fix test-digged bugs
Pipeline
#850344
canceled
1 year ago
Stage: clean
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
test/optimizer/test_modules.py
+3
-2
3 additions, 2 deletions
test/optimizer/test_modules.py
test/optimizer/test_regularizers.py
+2
-2
2 additions, 2 deletions
test/optimizer/test_regularizers.py
with
5 additions
and
4 deletions
test/optimizer/test_modules.py
+
3
−
2
View file @
878057da
...
...
@@ -38,6 +38,7 @@ import os
from
typing
import
Type
import
pytest
from
declearn.optimizer
import
list_optim_modules
from
declearn.optimizer.modules
import
NoiseModule
,
OptiModule
from
declearn.test_utils
import
(
FrameworkType
,
...
...
@@ -46,7 +47,7 @@ from declearn.test_utils import (
assert_json_serializable_dict
,
make_importable
,
)
from
declearn.utils
import
access_types_mapping
,
set_device_policy
from
declearn.utils
import
set_device_policy
# relative imports from `optim_testing.py`
with
make_importable
(
os
.
path
.
dirname
(
__file__
)):
...
...
@@ -54,7 +55,7 @@ with make_importable(os.path.dirname(__file__)):
# Access the list of modules to test; remove some that have dedicated tests.
OPTIMODULE_SUBCLASSES
=
access_types_mapping
(
group
=
"
OptiM
odule
"
)
OPTIMODULE_SUBCLASSES
=
list_optim_m
odule
s
(
)
OPTIMODULE_SUBCLASSES
.
pop
(
"
tensorflow-optim
"
,
None
)
OPTIMODULE_SUBCLASSES
.
pop
(
"
torch-optim
"
,
None
)
...
...
This diff is collapsed.
Click to expand it.
test/optimizer/test_regularizers.py
+
2
−
2
View file @
878057da
...
...
@@ -38,16 +38,16 @@ from typing import Type
import
pytest
from
declearn.optimizer
import
list_optim_regularizers
from
declearn.optimizer.regularizers
import
Regularizer
from
declearn.test_utils
import
make_importable
from
declearn.utils
import
access_types_mapping
# relative imports from `optim_testing.py`
with
make_importable
(
os
.
path
.
dirname
(
__file__
)):
from
optim_testing
import
PluginTestBase
REGULARIZER_SUBCLASSES
=
access_types_mapping
(
group
=
"
R
egularizer
"
)
REGULARIZER_SUBCLASSES
=
list_optim_r
egularizer
s
(
)
@pytest.mark.parametrize
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment