Closed mratanusarkar closed 1 year ago
Check out this pull request on
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Thanks for contributing to wandb/examples
!
We appreciate your efforts in opening a PR for the examples repository. Our goal is to ensure a smooth and enjoyable experience for you 😎.
The examples repo is regularly tested against the ever-evolving ML stack. To facilitate our work, please adhere to the following guidelines:
Notebook naming: You can use a combination of snakecase and CamelCase for your notebook name. Avoid using spaces (replace them with `) and special characters (
&%$?`). For example:
Cool_Keras_integration_example_with_weights_and_biases.ipynb
is acceptable, but
Cool Keras Example with W&B.ipynb
is not. Avoid spaces and the &
character. To refer to W&B, you can use: weights_and_biases
or just wandb
(it's our library, after all!)
Managing dependencies within the notebook: You may need to set up dependencies to ensure that your code works. Please avoid the following practices:
Dockerfile
to the wandb/examples/examples
folder (where non-Colab examples reside).pip install
as the primary method to install packages. When calling pip
in a cell, avoid performing other tasks. We automatically filter these types of cells, and executing other actions might break the automatic testing of the notebooks. For example,
pip install -qU wandb transformers gpt4
is acceptable, but
pip install -qU wandb
import wandb
is not.
GitHub
, did you know that you can install them like this:!pip install -q git+https://github.com/huggingface/transformers
You don't need to clone, then
cd
into the repo and install it in editable mode.
/content
directory where everything resides. Avoid explicitly referencing this directory because we test our notebooks with pure Jupyter (without Colab). Instead, use relative paths to make the notebook reproducible.The Jupyter notebook file .ipynb
is nothing more than a JSON file with primarily two types of cells: markdown and code. There is also a bunch of other metadata specific to Google Colab. We have a set of tools to ensure proper notebook formatting. These tools can be found at wandb/nb_helpers.
Before merging, wait for a maintainer to
clean
and format the notebooks you're adding. You can tag @tcapelle.
The following colabs were changed -colabs/audiocraft/AudioCraft_MusicGen.ipynb
@mratanusarkar Thanks for the PR. Can you please change the
'
s to"
?
@soumik12345 let me know if any more changes are required.
Also FYI,
The png image size and quality can be improved from matplotlib
side with:
fig, ax = plt.subplots(figsize=(10, 6)) # Adjust the numbers to your preference
...
plt.savefig(output_file, format='png', dpi=300, bbox_inches='tight', pad_inches=0) # add increased dpi
but I didn't include them to save image file size, and the current images look good enough in the wandb tables. users can change them if needed, for offline download of spectrogram images.
The png image size and quality can be improved from
matplotlib
side with:
@mratanusarkar Can you please add a config for that?
The png image size and quality can be improved from
matplotlib
side with:@mratanusarkar Can you please add a config for that?
Almost all the variables & parameters (15+) in get_spectrogram()
could be added as config.
But I feel that's unnecessary provided by the fact that it's a column data eventually.
The variable names are clear and as per DSP or Audio Engineering terms, and anyone interested in it can play around with the function.
Adding configs will make it more complex for most of the common use cases. But still, let me know your views.
Thanks again for you contribution!
Description:
Enhancing our spectrogram to better capture the spectral signature of generated audio, enabling easier identification of anomalies and a deeper understanding of the model's auditory output.
Having a good spectrogram tweaked to human auditory perception helps to correctly understand the sound signature in human reference, and in turn, understand the model outputs.
Changes:
Impact:
Provides a clearer, more intuitive view of audio content, benefiting audio enthusiasts and general viewers.
To demonstrate, consider the following examples:
Future Scope:
If @wandb implements issue#6224, it would be cool to replace these spectrogram images with an "WandB Interactive Spectrograms"