Skip to content
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

ESPnet-Spk part 3 - inference every epoch using EER #5314

Merged
merged 41 commits into from Jul 22, 2023

Conversation

Jungjee
Copy link
Contributor

@Jungjee Jungjee commented Jul 20, 2023

This PR is a follow-up PR on #5258.
We only had training available, whereas through this PR, we finish the ESPnet-SPK basic pipeline.
Now, EER is calculated every epoch.

@mergify mergify bot added ESPnet2 README CI Travis, Circle CI, etc Installation labels Jul 20, 2023
@codecov
Copy link

codecov bot commented Jul 20, 2023

Codecov Report

Merging #5314 (249bf6e) into master (353c01f) will decrease coverage by 0.09%.
The diff coverage is 58.58%.

@@            Coverage Diff             @@
##           master    #5314      +/-   ##
==========================================
- Coverage   76.21%   76.13%   -0.09%     
==========================================
  Files         669      672       +3     
  Lines       59566    59859     +293     
==========================================
+ Hits        45396    45571     +175     
- Misses      14170    14288     +118     
Flag Coverage Δ
test_integration_espnet1 65.93% <ø> (ø)
test_integration_espnet2 48.02% <47.54%> (-0.01%) ⬇️
test_python 66.40% <33.12%> (-0.17%) ⬇️
test_utils 23.00% <ø> (-0.18%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
espnet2/schedulers/cosine_anneal_warmup_restart.py 17.30% <17.30%> (ø)
espnet2/iterators/sequence_iter_factory.py 85.39% <27.27%> (-8.20%) ⬇️
espnet2/train/preprocessor.py 44.83% <47.22%> (+0.75%) ⬆️
espnet2/train/spk_trainer.py 75.51% <75.51%> (ø)
espnet2/utils/eer.py 93.33% <93.33%> (ø)
espnet2/spk/espnet_model.py 89.06% <100.00%> (-2.75%) ⬇️
espnet2/spk/loss/aamsoftmax.py 100.00% <100.00%> (ø)
espnet2/spk/loss/abs_loss.py 100.00% <100.00%> (ø)
espnet2/tasks/abs_task.py 76.89% <100.00%> (+0.22%) ⬆️
espnet2/tasks/spk.py 92.85% <100.00%> (+0.06%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

egs2/mini_an4/spk1/local/make_trial.py Outdated Show resolved Hide resolved
lines = f.readlines()

joint_key = lines[0].strip().split(" ")[0] + "*" + lines[1].strip().split(" ")[0]
with open(os.path.join(sys.argv[2], "trial.scp"), "w") as f:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe it's better to rename trial.scp to trial1.scp to make them more consistent.

@sw005320 sw005320 self-requested a review July 21, 2023 00:35
@Jungjee
Copy link
Contributor Author

Jungjee commented Jul 21, 2023

Great! current version passes all CI.
@Emrys365, @sw005320, let's aim for merging this pr as well within today.

I will also add another one PR (will be small compared to this) to add some metric learning objective function (thinking of SimCLR style contrastive at the moment).

@sw005320
Copy link
Contributor

Can you fix the conflicts due to the merge of your previous PRs?

@mergify
Copy link
Contributor

mergify bot commented Jul 21, 2023

This pull request is now in conflict :(

@mergify mergify bot added the conflicts label Jul 21, 2023
@mergify mergify bot removed the conflicts label Jul 21, 2023
@Jungjee
Copy link
Contributor Author

Jungjee commented Jul 21, 2023

Just resolved all conflicts! Now same to my local branch which passes CI tests

Copy link
Collaborator

@ftshijt ftshijt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great effort! some minor comments.

egs2/TEMPLATE/spk1/spk.sh Outdated Show resolved Hide resolved
egs2/voxceleb/spk1/conf/tuning/train_RawNet3_sgdr.yaml Outdated Show resolved Hide resolved
@kan-bayashi
Copy link
Member

Hi @Jungjee, Could you minimize the parameters for mini_an4 as possible as you can ?
You can refer #5324

@Jungjee
Copy link
Contributor Author

Jungjee commented Jul 22, 2023

@kan-bayashi , the number of parameter of ESPnet-SPK's ci model was 0.1M and I further reduced it to 0.01M. Hope this is small enough. Let me know if you need further alterations.

@sw005320 sw005320 marked this pull request as draft July 22, 2023 00:53
@Jungjee Jungjee marked this pull request as ready for review July 22, 2023 01:01
@Jungjee Jungjee closed this Jul 22, 2023
@Jungjee Jungjee reopened this Jul 22, 2023
Jungjee and others added 3 commits July 21, 2023 21:45
Co-authored-by: Wangyou Zhang <C0me_On@163.com>
Co-authored-by: Wangyou Zhang <C0me_On@163.com>
Copy link
Contributor

@sw005320 sw005320 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more for a question.
Is there a way to keep the same random seed even in the multiple worker environment, so that we could reproduce the same augmented data?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this extension is a very good example and I really appreciate both @Jungjee and @Emrys365’s efforts!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is more for a question. Is there a way to keep the same random seed even in the multiple worker environment, so that we could reproduce the same augmented data?

I think it is handled for the sequence iterator by the worker_init_fn:
https://github.com/espnet/espnet/blob/master/espnet2/iterators/sequence_iter_factory.py#L13-L17

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, thx!

@sw005320 sw005320 added the auto-merge Enable auto-merge label Jul 22, 2023
@sw005320 sw005320 added this to the v.202307 milestone Jul 22, 2023
@mergify mergify bot merged commit 8c264ff into espnet:master Jul 22, 2023
24 of 25 checks passed
@Jungjee Jungjee deleted the speaker2 branch August 3, 2023 18:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-merge Enable auto-merge CI Travis, Circle CI, etc ESPnet2 Installation README
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants