From 72f543dbc14ae56aad9efac36eeca470d0133a0b Mon Sep 17 00:00:00 2001 From: Ethan Manilow Date: Mon, 17 Jun 2024 09:47:39 -0700 Subject: [PATCH] Fixing division issue in get_framed_lengths. Fixing linting errors. PiperOrigin-RevId: 644041313 --- ddsp/__init__.py | 2 +- ddsp/colab/__init__.py | 2 +- ddsp/colab/colab_utils.py | 2 +- ddsp/core.py | 2 +- ddsp/core_test.py | 2 +- ddsp/dags.py | 2 +- ddsp/dags_test.py | 2 +- ddsp/effects.py | 2 +- ddsp/effects_test.py | 2 +- ddsp/losses.py | 2 +- ddsp/losses_test.py | 2 +- ddsp/processors.py | 2 +- ddsp/processors_test.py | 2 +- ddsp/spectral_ops.py | 4 ++-- ddsp/spectral_ops_test.py | 2 +- ddsp/synths.py | 2 +- ddsp/synths_test.py | 2 +- ddsp/test_util.py | 2 +- ddsp/training/__init__.py | 2 +- ddsp/training/cloud.py | 2 +- ddsp/training/cloud_test.py | 2 +- ddsp/training/data.py | 2 +- ddsp/training/data_preparation/__init__.py | 2 +- .../ddsp_generate_synthetic_dataset.py | 2 +- .../training/data_preparation/ddsp_prepare_tfrecord.py | 2 +- ddsp/training/data_preparation/prepare_tfrecord_lib.py | 2 +- .../data_preparation/prepare_tfrecord_lib_test.py | 2 +- ddsp/training/data_preparation/synthetic_data.py | 2 +- ddsp/training/ddsp_export.py | 2 +- ddsp/training/ddsp_run.py | 2 +- ddsp/training/decoders.py | 2 +- ddsp/training/decoders_test.py | 2 +- ddsp/training/docker/__init__.py | 2 +- ddsp/training/docker/ddsp_ai_platform.py | 2 +- ddsp/training/docker/task.py | 2 +- ddsp/training/docker/task_test.py | 2 +- ddsp/training/encoders.py | 2 +- ddsp/training/eval_util.py | 2 +- ddsp/training/evaluators.py | 2 +- ddsp/training/gin/__init__.py | 2 +- ddsp/training/gin/datasets/__init__.py | 2 +- ddsp/training/gin/eval/__init__.py | 2 +- ddsp/training/gin/models/__init__.py | 2 +- ddsp/training/gin/models/vst/__init__.py | 2 +- ddsp/training/gin/optimization/__init__.py | 2 +- ddsp/training/gin/papers/__init__.py | 2 +- ddsp/training/gin/papers/iclr2020/__init__.py | 2 +- ddsp/training/gin/papers/icml2020/__init__.py | 2 +- ddsp/training/heuristics.py | 2 +- ddsp/training/heuristics_test.py | 2 +- ddsp/training/inference.py | 2 +- ddsp/training/metrics.py | 2 +- ddsp/training/metrics_test.py | 2 +- ddsp/training/models/__init__.py | 2 +- ddsp/training/models/autoencoder.py | 2 +- ddsp/training/models/autoencoder_test.py | 2 +- ddsp/training/models/inverse_synthesis.py | 2 +- ddsp/training/models/midi_autoencoder.py | 2 +- ddsp/training/models/model.py | 2 +- ddsp/training/nn.py | 2 +- ddsp/training/nn_test.py | 2 +- ddsp/training/plotting.py | 2 +- ddsp/training/postprocessing.py | 2 +- ddsp/training/preprocessing.py | 10 ++++++---- ddsp/training/preprocessing_test.py | 2 +- ddsp/training/summaries.py | 2 +- ddsp/training/train_util.py | 2 +- ddsp/training/trainers.py | 2 +- ddsp/version.py | 2 +- pylintrc | 1 + setup.py | 2 +- update_gin_config.py | 2 +- 72 files changed, 78 insertions(+), 75 deletions(-) diff --git a/ddsp/__init__.py b/ddsp/__init__.py index 48ee4b81..0b714800 100644 --- a/ddsp/__init__.py +++ b/ddsp/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/colab/__init__.py b/ddsp/colab/__init__.py index ac3e7d30..05013bb0 100644 --- a/ddsp/colab/__init__.py +++ b/ddsp/colab/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/colab/colab_utils.py b/ddsp/colab/colab_utils.py index 05639694..0517319c 100644 --- a/ddsp/colab/colab_utils.py +++ b/ddsp/colab/colab_utils.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/core.py b/ddsp/core.py index 85aadb06..f723c370 100644 --- a/ddsp/core.py +++ b/ddsp/core.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/core_test.py b/ddsp/core_test.py index f4ce3c73..e7c2b826 100644 --- a/ddsp/core_test.py +++ b/ddsp/core_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/dags.py b/ddsp/dags.py index de0b7a08..20d6e42f 100644 --- a/ddsp/dags.py +++ b/ddsp/dags.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/dags_test.py b/ddsp/dags_test.py index d1f56bcb..8debe54a 100644 --- a/ddsp/dags_test.py +++ b/ddsp/dags_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/effects.py b/ddsp/effects.py index f9c39306..9e513673 100644 --- a/ddsp/effects.py +++ b/ddsp/effects.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/effects_test.py b/ddsp/effects_test.py index a53af212..e8904221 100644 --- a/ddsp/effects_test.py +++ b/ddsp/effects_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/losses.py b/ddsp/losses.py index efddeaeb..76b0179b 100644 --- a/ddsp/losses.py +++ b/ddsp/losses.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/losses_test.py b/ddsp/losses_test.py index 5b5a50b0..944a50a1 100644 --- a/ddsp/losses_test.py +++ b/ddsp/losses_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/processors.py b/ddsp/processors.py index b0fe3c10..8e6a6374 100644 --- a/ddsp/processors.py +++ b/ddsp/processors.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/processors_test.py b/ddsp/processors_test.py index a85b1da6..8e8fbd5a 100644 --- a/ddsp/processors_test.py +++ b/ddsp/processors_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/spectral_ops.py b/ddsp/spectral_ops.py index 0a638ece..d0c4e2df 100644 --- a/ddsp/spectral_ops.py +++ b/ddsp/spectral_ops.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -151,7 +151,7 @@ def get_framed_lengths(input_length, frame_size, hop_size, padding='center'): """ # Use numpy since this function isn't used dynamically. def get_n_frames(length): - return int(np.floor((length - frame_size) / hop_size)) + 1 + return int(np.floor((length - frame_size) // hop_size)) + 1 if padding == 'valid': padded_length = input_length diff --git a/ddsp/spectral_ops_test.py b/ddsp/spectral_ops_test.py index 47ed937c..4f70cf41 100644 --- a/ddsp/spectral_ops_test.py +++ b/ddsp/spectral_ops_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/synths.py b/ddsp/synths.py index 0cfb897f..c2f7522c 100644 --- a/ddsp/synths.py +++ b/ddsp/synths.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/synths_test.py b/ddsp/synths_test.py index 612c71c2..266de90c 100644 --- a/ddsp/synths_test.py +++ b/ddsp/synths_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/test_util.py b/ddsp/test_util.py index e86dcb47..37455763 100644 --- a/ddsp/test_util.py +++ b/ddsp/test_util.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/__init__.py b/ddsp/training/__init__.py index 66fca96d..e78c3b6e 100644 --- a/ddsp/training/__init__.py +++ b/ddsp/training/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/cloud.py b/ddsp/training/cloud.py index 608932b5..046d82d2 100644 --- a/ddsp/training/cloud.py +++ b/ddsp/training/cloud.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/cloud_test.py b/ddsp/training/cloud_test.py index c9dca6c4..4a8490b2 100644 --- a/ddsp/training/cloud_test.py +++ b/ddsp/training/cloud_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/data.py b/ddsp/training/data.py index 03f38d5e..3d1c124e 100644 --- a/ddsp/training/data.py +++ b/ddsp/training/data.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/data_preparation/__init__.py b/ddsp/training/data_preparation/__init__.py index dfd70faa..df8f0706 100644 --- a/ddsp/training/data_preparation/__init__.py +++ b/ddsp/training/data_preparation/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/data_preparation/ddsp_generate_synthetic_dataset.py b/ddsp/training/data_preparation/ddsp_generate_synthetic_dataset.py index 6d79abd8..7eb881c7 100644 --- a/ddsp/training/data_preparation/ddsp_generate_synthetic_dataset.py +++ b/ddsp/training/data_preparation/ddsp_generate_synthetic_dataset.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/data_preparation/ddsp_prepare_tfrecord.py b/ddsp/training/data_preparation/ddsp_prepare_tfrecord.py index 1cab8a61..06bacaaf 100644 --- a/ddsp/training/data_preparation/ddsp_prepare_tfrecord.py +++ b/ddsp/training/data_preparation/ddsp_prepare_tfrecord.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/data_preparation/prepare_tfrecord_lib.py b/ddsp/training/data_preparation/prepare_tfrecord_lib.py index 635c3bed..7ca22f21 100644 --- a/ddsp/training/data_preparation/prepare_tfrecord_lib.py +++ b/ddsp/training/data_preparation/prepare_tfrecord_lib.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/data_preparation/prepare_tfrecord_lib_test.py b/ddsp/training/data_preparation/prepare_tfrecord_lib_test.py index 83740316..e70cbae5 100644 --- a/ddsp/training/data_preparation/prepare_tfrecord_lib_test.py +++ b/ddsp/training/data_preparation/prepare_tfrecord_lib_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/data_preparation/synthetic_data.py b/ddsp/training/data_preparation/synthetic_data.py index 1312b4aa..870d8e9e 100644 --- a/ddsp/training/data_preparation/synthetic_data.py +++ b/ddsp/training/data_preparation/synthetic_data.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/ddsp_export.py b/ddsp/training/ddsp_export.py index 0d89d50e..00d2b8e2 100644 --- a/ddsp/training/ddsp_export.py +++ b/ddsp/training/ddsp_export.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/ddsp_run.py b/ddsp/training/ddsp_run.py index 1c9a39bf..1877c2a2 100644 --- a/ddsp/training/ddsp_run.py +++ b/ddsp/training/ddsp_run.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/decoders.py b/ddsp/training/decoders.py index 95f0155a..154f9cde 100644 --- a/ddsp/training/decoders.py +++ b/ddsp/training/decoders.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/decoders_test.py b/ddsp/training/decoders_test.py index 1d2c76d2..26367ab4 100644 --- a/ddsp/training/decoders_test.py +++ b/ddsp/training/decoders_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/docker/__init__.py b/ddsp/training/docker/__init__.py index fa3161bd..733268f7 100644 --- a/ddsp/training/docker/__init__.py +++ b/ddsp/training/docker/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/docker/ddsp_ai_platform.py b/ddsp/training/docker/ddsp_ai_platform.py index c449f882..64ac0188 100644 --- a/ddsp/training/docker/ddsp_ai_platform.py +++ b/ddsp/training/docker/ddsp_ai_platform.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/docker/task.py b/ddsp/training/docker/task.py index f3f05228..0440f013 100644 --- a/ddsp/training/docker/task.py +++ b/ddsp/training/docker/task.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/docker/task_test.py b/ddsp/training/docker/task_test.py index df02d2ee..23255cc4 100644 --- a/ddsp/training/docker/task_test.py +++ b/ddsp/training/docker/task_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/encoders.py b/ddsp/training/encoders.py index 54daa022..ee86b9e7 100644 --- a/ddsp/training/encoders.py +++ b/ddsp/training/encoders.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/eval_util.py b/ddsp/training/eval_util.py index f7f099ee..93bb43da 100644 --- a/ddsp/training/eval_util.py +++ b/ddsp/training/eval_util.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/evaluators.py b/ddsp/training/evaluators.py index a4ee12c6..f68d4b20 100644 --- a/ddsp/training/evaluators.py +++ b/ddsp/training/evaluators.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/gin/__init__.py b/ddsp/training/gin/__init__.py index ac3e7d30..05013bb0 100644 --- a/ddsp/training/gin/__init__.py +++ b/ddsp/training/gin/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/gin/datasets/__init__.py b/ddsp/training/gin/datasets/__init__.py index ac3e7d30..05013bb0 100644 --- a/ddsp/training/gin/datasets/__init__.py +++ b/ddsp/training/gin/datasets/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/gin/eval/__init__.py b/ddsp/training/gin/eval/__init__.py index ac3e7d30..05013bb0 100644 --- a/ddsp/training/gin/eval/__init__.py +++ b/ddsp/training/gin/eval/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/gin/models/__init__.py b/ddsp/training/gin/models/__init__.py index ac3e7d30..05013bb0 100644 --- a/ddsp/training/gin/models/__init__.py +++ b/ddsp/training/gin/models/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/gin/models/vst/__init__.py b/ddsp/training/gin/models/vst/__init__.py index ac3e7d30..05013bb0 100644 --- a/ddsp/training/gin/models/vst/__init__.py +++ b/ddsp/training/gin/models/vst/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/gin/optimization/__init__.py b/ddsp/training/gin/optimization/__init__.py index ac3e7d30..05013bb0 100644 --- a/ddsp/training/gin/optimization/__init__.py +++ b/ddsp/training/gin/optimization/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/gin/papers/__init__.py b/ddsp/training/gin/papers/__init__.py index ac3e7d30..05013bb0 100644 --- a/ddsp/training/gin/papers/__init__.py +++ b/ddsp/training/gin/papers/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/gin/papers/iclr2020/__init__.py b/ddsp/training/gin/papers/iclr2020/__init__.py index ac3e7d30..05013bb0 100644 --- a/ddsp/training/gin/papers/iclr2020/__init__.py +++ b/ddsp/training/gin/papers/iclr2020/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/gin/papers/icml2020/__init__.py b/ddsp/training/gin/papers/icml2020/__init__.py index ac3e7d30..05013bb0 100644 --- a/ddsp/training/gin/papers/icml2020/__init__.py +++ b/ddsp/training/gin/papers/icml2020/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/heuristics.py b/ddsp/training/heuristics.py index 56c60fc1..eb16338b 100644 --- a/ddsp/training/heuristics.py +++ b/ddsp/training/heuristics.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/heuristics_test.py b/ddsp/training/heuristics_test.py index 476481d2..b6921353 100644 --- a/ddsp/training/heuristics_test.py +++ b/ddsp/training/heuristics_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/inference.py b/ddsp/training/inference.py index 4832bb09..d2fe718a 100644 --- a/ddsp/training/inference.py +++ b/ddsp/training/inference.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/metrics.py b/ddsp/training/metrics.py index c2bbec66..6b603ef0 100644 --- a/ddsp/training/metrics.py +++ b/ddsp/training/metrics.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/metrics_test.py b/ddsp/training/metrics_test.py index c6ded967..cc885712 100644 --- a/ddsp/training/metrics_test.py +++ b/ddsp/training/metrics_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/models/__init__.py b/ddsp/training/models/__init__.py index 8553e31c..268a2edd 100644 --- a/ddsp/training/models/__init__.py +++ b/ddsp/training/models/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/models/autoencoder.py b/ddsp/training/models/autoencoder.py index 22d43a03..4ca89e84 100644 --- a/ddsp/training/models/autoencoder.py +++ b/ddsp/training/models/autoencoder.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/models/autoencoder_test.py b/ddsp/training/models/autoencoder_test.py index db90fbef..a03fbacd 100644 --- a/ddsp/training/models/autoencoder_test.py +++ b/ddsp/training/models/autoencoder_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/models/inverse_synthesis.py b/ddsp/training/models/inverse_synthesis.py index e8122dae..16e6aed4 100644 --- a/ddsp/training/models/inverse_synthesis.py +++ b/ddsp/training/models/inverse_synthesis.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/models/midi_autoencoder.py b/ddsp/training/models/midi_autoencoder.py index 1573cb74..4a58746c 100644 --- a/ddsp/training/models/midi_autoencoder.py +++ b/ddsp/training/models/midi_autoencoder.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/models/model.py b/ddsp/training/models/model.py index 999333f1..e7596ca6 100644 --- a/ddsp/training/models/model.py +++ b/ddsp/training/models/model.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/nn.py b/ddsp/training/nn.py index cd7f155c..f571c80d 100644 --- a/ddsp/training/nn.py +++ b/ddsp/training/nn.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/nn_test.py b/ddsp/training/nn_test.py index 8e898db1..1c28ffbb 100644 --- a/ddsp/training/nn_test.py +++ b/ddsp/training/nn_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/plotting.py b/ddsp/training/plotting.py index 76fc64ba..070da51b 100644 --- a/ddsp/training/plotting.py +++ b/ddsp/training/plotting.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/postprocessing.py b/ddsp/training/postprocessing.py index a4cc6ff6..4307a380 100644 --- a/ddsp/training/postprocessing.py +++ b/ddsp/training/postprocessing.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/preprocessing.py b/ddsp/training/preprocessing.py index 9f47cf1a..01854aa0 100644 --- a/ddsp/training/preprocessing.py +++ b/ddsp/training/preprocessing.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -179,13 +179,15 @@ def __init__(self, # Crepe model, must either be a model size or path to SavedModel. if crepe_saved_model_path: self.crepe_model = ddsp.spectral_ops.PretrainedCREPE( - model_size_or_path=crepe_saved_model_path, hop_size=self.hop_size) + model_size_or_path=crepe_saved_model_path, hop_size=self.hop_size + ) # Use viterbi decoding. self.viterbi = viterbi - def call(self, audio, f0_hz=None, f0_confidence=None, audio_16k=None) -> [ - 'f0_hz', 'pw_db', 'f0_scaled', 'pw_scaled', 'f0_confidence']: + def call( + self, audio, f0_hz=None, f0_confidence=None, audio_16k=None, pw_db=None + ) -> ['f0_hz', 'pw_db', 'f0_scaled', 'pw_scaled', 'f0_confidence']: """Compute power on the fly if it's not in the inputs.""" # Compute features at 16kHz (needed for CREPE). if audio_16k is not None: diff --git a/ddsp/training/preprocessing_test.py b/ddsp/training/preprocessing_test.py index 79fa2150..d3f2d7a0 100644 --- a/ddsp/training/preprocessing_test.py +++ b/ddsp/training/preprocessing_test.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/summaries.py b/ddsp/training/summaries.py index 07c4564d..7007deb4 100644 --- a/ddsp/training/summaries.py +++ b/ddsp/training/summaries.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/train_util.py b/ddsp/training/train_util.py index ec6f4eed..3ae342f3 100644 --- a/ddsp/training/train_util.py +++ b/ddsp/training/train_util.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/training/trainers.py b/ddsp/training/trainers.py index d60c5b9d..25dbdb9c 100644 --- a/ddsp/training/trainers.py +++ b/ddsp/training/trainers.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/ddsp/version.py b/ddsp/version.py index 9e6007c8..ed88c3e2 100644 --- a/ddsp/version.py +++ b/ddsp/version.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pylintrc b/pylintrc index 9b53f103..e44f0a52 100644 --- a/pylintrc +++ b/pylintrc @@ -119,6 +119,7 @@ disable=abstract-method, old-octal-literal, old-raise-syntax, parameter-unpacking, + possibly-used-before-assignment, print-statement, raise-missing-from, raising-string, diff --git a/setup.py b/setup.py index 526278a1..2cc529f7 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/update_gin_config.py b/update_gin_config.py index 71b6e5f8..634cb6ee 100644 --- a/update_gin_config.py +++ b/update_gin_config.py @@ -1,4 +1,4 @@ -# Copyright 2023 The DDSP Authors. +# Copyright 2024 The DDSP Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.