Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion basic_pitch/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
SEMITONES_PER_OCTAVE = 12 # for frequency bin calculations

FFT_HOP = 256
N_FFT = 8 * FFT_HOP
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The constant is not used.


NOTES_BINS_PER_SEMITONE = 1
CONTOURS_BINS_PER_SEMITONE = 3
Expand Down
2 changes: 1 addition & 1 deletion basic_pitch/data/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ The code and scripts in this section deal with training basic pitch on your own.
* **--runner**: The method used to run the Beam Pipeline for processing the dataset. Options include `DirectRunner`, running directly in the code process running the pipeline, `PortableRunner`, which can be used to run the pipeline in a docker container locally, and `DataflowRunner`, which can be used to run the pipeline in a docker container on Dataflow.
* **--timestamped**: If passed, the dataset will be put into a timestamp directory instead of 'splits'.
* **--batch-size**: Number of examples per tfrecord when partitioning the dataset.
* **--sdk_container_image**: The Docker container image used to process the data if using `PortableRunner` or `DirectRunner`.
* **--sdk_container_image**: The Docker container image used to process the data if using `PortableRunner`.
* **--job_endpoint**: the endpoint where the job is running. It defaults to `embed` which works for `PortableRunner`.

Additional arguments that work with Beam in general can be used as well, and will be passed along and used by the pipeline. If using `DataflowRunner`, you will be required to pass `--temp_location={Path to GCS Bucket}`, `--staging_location={Path to GCS Bucket}`, `--project={Name of GCS Project}` and `--region={GCS region}`.
1 change: 0 additions & 1 deletion basic_pitch/data/datasets/guitarset.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ def main(known_args: argparse.Namespace, pipeline_args: List[str]) -> None:
"save_main_session": True,
"sdk_container_image": known_args.sdk_container_image,
"job_endpoint": known_args.job_endpoint,
"environment_type": "DOCKER",
"environment_config": known_args.sdk_container_image,
}
pipeline.run(
Expand Down
1 change: 0 additions & 1 deletion basic_pitch/data/datasets/ikala.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ def main(known_args: argparse.Namespace, pipeline_args: List[str]) -> None:
"save_main_session": True,
"sdk_container_image": known_args.sdk_container_image,
"job_endpoint": known_args.job_endpoint,
"environment_type": "DOCKER",
"environment_config": known_args.sdk_container_image,
}
input_data = create_input_data(known_args.train_percent, known_args.split_seed)
Expand Down
4 changes: 0 additions & 4 deletions basic_pitch/data/datasets/maestro.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,6 @@ def __init__(self, source: str) -> None:
self.source = source

def setup(self) -> None:
# Oddly enough we dont want to include the gcs bucket uri.
# Just the path within the bucket
self.maestro_remote = mirdata.initialize("maestro", data_home=self.source)
self.filesystem = beam.io.filesystems.FileSystems()

Expand Down Expand Up @@ -89,8 +87,6 @@ def setup(self) -> None:
import apache_beam as beam
import mirdata

# Oddly enough we dont want to include the gcs bucket uri.
# Just the path within the bucket
self.maestro_remote = mirdata.initialize("maestro", data_home=self.source)
self.filesystem = beam.io.filesystems.FileSystems()
if self.download:
Expand Down
1 change: 0 additions & 1 deletion basic_pitch/data/datasets/medleydb_pitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ def main(known_args: argparse.Namespace, pipeline_args: List[str]) -> None:
"save_main_session": True,
"sdk_container_image": known_args.sdk_container_image,
"job_endpoint": known_args.job_endpoint,
"environment_type": "DOCKER",
"environment_config": known_args.sdk_container_image,
}
pipeline.run(
Expand Down
1 change: 0 additions & 1 deletion basic_pitch/data/datasets/slakh.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,6 @@ def main(known_args: argparse.Namespace, pipeline_args: List[str]) -> None:
"save_main_session": True,
"sdk_container_image": known_args.sdk_container_image,
"job_endpoint": known_args.job_endpoint,
"environment_type": "DOCKER",
"environment_config": known_args.sdk_container_image,
}
pipeline.run(
Expand Down
2 changes: 1 addition & 1 deletion basic_pitch/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ def console_entry_point() -> None:
args.size_evaluation_callback_datasets,
datasets_to_use,
dataset_sampling_frequency,
args.dont_sonify,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

dont_sonify is incorrect

args.no_sonify,
args.no_contours,
args.weighted_onset_loss,
args.positive_onset_weight,
Expand Down