Skip to content

Commit 9ac8082

Browse files
committed
Create link from tests/integration to recipes/minimal_examples
1 parent 5511b56 commit 9ac8082

8 files changed

Lines changed: 16 additions & 16 deletions

File tree

.github/workflows/pythonapp.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,4 @@ jobs:
5959
pytest --doctest-modules speechbrain
6060
- name: Integration tests with pytest
6161
run: |
62-
pytest recipes/minimal_examples
62+
pytest tests/integration

.pre-push-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ repos:
5252
hooks:
5353
- id: integration
5454
name: integration
55-
entry: pytest recipes/minimal_examples
55+
entry: pytest tests/integration
5656
language: python
5757
pass_filenames: False
5858
always_run: True

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,9 @@ pytest --doctest-modules speechbrain
4646
The current version of Speechbrain has the following folder/file organization:
4747
- **speechbrain**: The core library
4848
- **recipes**: Experiment scripts and configurations
49-
- **exp**: Top directory under which to save experiment output (by convention)
5049
- **samples**: Some toy data for debugging and testing
5150
- **tools**: Additional, runnable utility script
52-
- **tests**: Unittests
51+
- **tests**: Unittests and integration tests
5352

5453
## How to run an experiment
5554
In SpeechBrain experiments can be run from anywhere, but the experimental `results/`

recipes/minimal_examples/neural_networks/ASR_CTC/example_asr_ctc_experiment.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010

1111
# Note, the manual seed does not ensure repeatability with CTC
1212
torch.manual_seed(1234)
13-
experiment_dir = os.path.dirname(os.path.abspath(__file__))
13+
experiment_dir = os.path.dirname(os.path.realpath(__file__))
1414
params_file = os.path.join(experiment_dir, "params.yaml")
15-
data_folder = "../../../../../samples/audio_samples/nn_training_samples"
16-
data_folder = os.path.abspath(experiment_dir + data_folder)
15+
data_folder = "../../../../samples/audio_samples/nn_training_samples"
16+
data_folder = os.path.realpath(os.path.join(experiment_dir, data_folder))
1717
with open(params_file) as fin:
1818
params = sb.yaml.load_extended_yaml(fin, {"data_folder": data_folder})
1919

recipes/minimal_examples/neural_networks/ASR_DNN_HMM/example_asr_dnn_hmm_experiment.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
from speechbrain.utils.train_logger import summarize_average
66

77
torch.manual_seed(1234)
8-
experiment_dir = os.path.dirname(os.path.abspath(__file__))
8+
experiment_dir = os.path.dirname(os.path.realpath(__file__))
99
params_file = os.path.join(experiment_dir, "params.yaml")
10-
data_folder = "../../../../../samples/audio_samples/nn_training_samples"
11-
data_folder = os.path.abspath(experiment_dir + data_folder)
10+
data_folder = "../../../../samples/audio_samples/nn_training_samples"
11+
data_folder = os.path.realpath(os.path.join(experiment_dir, data_folder))
1212
with open(params_file) as fin:
1313
params = sb.yaml.load_extended_yaml(fin, {"data_folder": data_folder})
1414

recipes/minimal_examples/neural_networks/autoencoder/example_auto_experiment.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
from speechbrain.utils.train_logger import summarize_average
66

77
torch.manual_seed(1234)
8-
experiment_dir = os.path.dirname(os.path.abspath(__file__))
8+
experiment_dir = os.path.dirname(os.path.realpath(__file__))
99
params_file = os.path.join(experiment_dir, "params.yaml")
10-
data_folder = "../../../../../samples/audio_samples/nn_training_samples"
11-
data_folder = os.path.abspath(experiment_dir + data_folder)
10+
data_folder = "../../../../samples/audio_samples/nn_training_samples"
11+
data_folder = os.path.realpath(os.path.join(experiment_dir, data_folder))
1212
with open(params_file) as fin:
1313
params = sb.yaml.load_extended_yaml(fin, {"data_folder": data_folder})
1414

recipes/minimal_examples/neural_networks/speaker_identification/example_spkid_experiment.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
from speechbrain.utils.train_logger import summarize_average
66

77
torch.manual_seed(1234)
8-
experiment_dir = os.path.dirname(os.path.abspath(__file__))
8+
experiment_dir = os.path.dirname(os.path.realpath(__file__))
99
params_file = os.path.join(experiment_dir, "params.yaml")
10-
data_folder = "../../../../../samples/audio_samples/nn_training_samples"
11-
data_folder = os.path.abspath(experiment_dir + data_folder)
10+
data_folder = "../../../../samples/audio_samples/nn_training_samples"
11+
data_folder = os.path.realpath(os.path.join(experiment_dir, data_folder))
1212
with open(params_file) as fin:
1313
params = sb.yaml.load_extended_yaml(fin, {"data_folder": data_folder})
1414

tests/integration

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../recipes/minimal_examples/

0 commit comments

Comments
 (0)