-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
82811e1
commit 5420644
Showing
22 changed files
with
90 additions
and
164 deletions.
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
2 changes: 1 addition & 1 deletion
2
...onsistency_generate_hnet_training_data.py → ...onsistency_generate_hnet_training_data.py
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
1 change: 1 addition & 0 deletions
1
tests/consistency_tests/lightning_datamodules/tests_consistency_hungarian_datamodule.py
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 @@ | ||
# tests/consistency_tests/lightning_datamodules/tests_consistency_hungarian_datamodule.py |
3 changes: 3 additions & 0 deletions
3
tests/consistency_tests/lightning_modules/tests_consistency_hnet_gru_lightning.py
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,3 @@ | ||
# tests/consistency_tests/lightning_modules/tests_consistency_hnet_gru_lightning.py | ||
|
||
import pytest |
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,3 @@ | ||
# tests/consistency_tests/run/tests_consistency_run.py | ||
|
||
|
1 change: 1 addition & 0 deletions
1
tests/consistency_tests/torch_modules/tests_consistency_attention_layer.py
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 @@ | ||
# tests/consistency_tests/torch_modules/tests_consistency_attention_layer.py |
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
2 changes: 1 addition & 1 deletion
2
...regression_generate_hnet_training_data.py → ...regression_generate_hnet_training_data.py
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
1 change: 1 addition & 0 deletions
1
tests/nonregression_tests/lightning_datamodules/tests_nonregression_hungarian_datamodule.py
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 @@ | ||
# tests/nonregression_tests/lightning_datamodules/tests_nonregression_hungarian_datamodule.py |
3 changes: 3 additions & 0 deletions
3
tests/nonregression_tests/lightning_modules/tests_nonregression_hnet_gru_lightning.py
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,3 @@ | ||
# tests/nonregression_tests/lightning_modules/tests_nonregression_hnet_gru_lightning.py | ||
|
||
import pytest |
120 changes: 0 additions & 120 deletions
120
tests/nonregression_tests/model/test_nonregression_train_hnet.py
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# tests/nonregression_tests/run/tests_nonregression_run.py | ||
|
||
import os | ||
|
||
import pytest | ||
import torch | ||
from pytest_mock import mocker | ||
|
||
from hungarian_net.torch_modules.hnet_gru import HNetGRU | ||
from run import main as train_main | ||
from run import set_seed | ||
|
||
# TODO: Performing a non-regression test by directly comparing a newly trained model with a reference model is ineffective due to inherent numerical computation errors that can cause discrepancies. | ||
# TODO: In future iterations, it would be more effective to assess regression by evaluating the model's individual components (e.g., functions, classes, methods) to ensure each part operates as expected without being affected by numerical inaccuracies. | ||
|
||
|
||
@pytest.mark.nonregression | ||
def test_non_regression_train_hnet(mocker): | ||
|
||
set_seed() |
1 change: 1 addition & 0 deletions
1
tests/nonregression_tests/torch_modules/tests_nonregression_attention_layer.py
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 @@ | ||
# tests/nonregression_tests/torch_modules/tests_nonregression_attention_layer.py |
1 change: 1 addition & 0 deletions
1
tests/nonregression_tests/torch_modules/tests_nonregression_hnet_gru.py
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 @@ | ||
# tests/nonregression_tests/torch_modules/tests_nonregression_hnet_gru.py |
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
2 changes: 1 addition & 1 deletion
2
..._scenarios_generate_hnet_training_data.py → ..._scenarios_generate_hnet_training_data.py
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
1 change: 1 addition & 0 deletions
1
tests/scenarios_tests/lightning_datamodules/tests_scenarios_hungarian_datamodule.py
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 @@ | ||
# tests/scenarios_tests/lightning_datamodules/tests_scenarios_hungarian_datamodule.py |
3 changes: 3 additions & 0 deletions
3
tests/scenarios_tests/lightning_modules/tests_scenarios_hnet_gru_lightning.py
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,3 @@ | ||
# tests/scenarios_tests/lightning_modules/tests_scenarios_hnet_gru_lightning.py | ||
|
||
import pytest |
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
22 changes: 22 additions & 0 deletions
22
tests/scenarios_tests/torch_modules/tests_scenarios_attention_layer.py
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,22 @@ | ||
# tests/scenarios_tests/torch_modules/tests_scenarios_attention_layer.py | ||
|
||
import pytest | ||
|
||
from hungarian_net.torch_modules.attention_layer import AttentionLayer | ||
|
||
|
||
@pytest.mark.consistency | ||
def test_AttentionLayer_init(attentionLayer) -> None: | ||
"""Test the initialization of the AttentionLayer. | ||
Args: | ||
attentionLayer (AttentionLayer): The AttentionLayer instance provided by the fixture. | ||
Returns: | ||
None | ||
""" | ||
assert isinstance( | ||
attentionLayer, AttentionLayer | ||
), f"AttentionLayer is not an instance of AttentionLayer class, got {attentionLayer.__repr__()}" | ||
|
||
|
1 change: 1 addition & 0 deletions
1
tests/scenarios_tests/torch_modules/tests_scenarios_hnet_gru.py
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 @@ | ||
# tests/scenarios_tests/torch_modules/tests_scenarios_hnet_gru.py |