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

Use WaveSurfer instead of audio tag. #716

Merged
merged 3 commits into from
Dec 13, 2023

Conversation

toshihikoyanase
Copy link
Member

Contributor License Agreement

This repository (optuna-dashboard) and Goptuna share common code.
This pull request may therefore be ported to Goptuna.
Make sure that you understand the consequences concerning licenses and check the box below if you accept the term before creating this pull request.

  • I agree this patch may be ported to Goptuna by other Goptuna contributors.

Reference Issues/PRs

A possible follow-up for #629.

What does this implement/fix? Explain your changes.

  • Install WaveSurfer to play audio artifacts.
  • Add WaveSurferArtifactViewer based on the official example
  • Use the WaveSurferArtifactViewer instead of audio tag in the ArtifactCardMedia.tsx

Copy link

codecov bot commented Nov 29, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d31ab9a) 65.76% compared to head (afe0299) 67.20%.
Report is 33 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #716      +/-   ##
==========================================
+ Coverage   65.76%   67.20%   +1.44%     
==========================================
  Files          35       35              
  Lines        2284     2293       +9     
==========================================
+ Hits         1502     1541      +39     
+ Misses        782      752      -30     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@c-bata c-bata self-assigned this Nov 30, 2023
@toshihikoyanase toshihikoyanase marked this pull request as ready for review November 30, 2023 02:43
@c-bata
Copy link
Member

c-bata commented Nov 30, 2023

@contramundum53 Could you review this PR?

@c-bata c-bata assigned keisuke-umezawa and unassigned c-bata Nov 30, 2023
@c-bata
Copy link
Member

c-bata commented Nov 30, 2023

@keisuke-umezawa Could you review this PR?

@contramundum53
Copy link
Member

There seems to be a problem that the audio is stopped when automatic update runs.

@toshihikoyanase
Copy link
Member Author

You're right. The WaveSurferArtifactViewer gets recreated unexpectedly every time the automatic update runs.
I'll investigate what triggers the recreation. Thanks.

@toshihikoyanase
Copy link
Member Author

I found that we did not need to observe the options of wavesurfer, such as URL of the audio file, since the Optuna artifacts including audio files are not designed to be updated in-place. They are usually removed and re-uploaded instead.

I guess we can keep playing the audio now, so please take another look.

Copy link
Member

@keisuke-umezawa keisuke-umezawa left a comment

Choose a reason for hiding this comment

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

@toshihikoyanase
LGTM! After the purpose of this PR is clear, I will merge it.

@keisuke-umezawa keisuke-umezawa merged commit d627bce into optuna:main Dec 13, 2023
@toshihikoyanase toshihikoyanase deleted the add-wavesurfer branch December 14, 2023 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants