-
Notifications
You must be signed in to change notification settings - Fork 283
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added files for downloading and converting datasets, and a guitarset …
…to test the ecosystem. Tests are written but tox is currently not passing. Many files reformatted by black.
- Loading branch information
Showing
21 changed files
with
80,213 additions
and
169 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,41 @@ | ||
import argparse | ||
import logging | ||
import sys | ||
|
||
from basic_pitch.data import commandline | ||
from basic_pitch.data.datasets.guitarset import main as guitarset_main | ||
|
||
logger = logging.getLogger() | ||
logger.setLevel(logging.INFO) | ||
handler = logging.StreamHandler(sys.stdout) | ||
formatter = logging.Formatter("%(levelname)s:: %(message)s") | ||
handler.setFormatter(formatter) | ||
logger.addHandler(handler) | ||
|
||
DATASET_DICT = { | ||
'guitarset': guitarset_main, | ||
"guitarset": guitarset_main, | ||
} | ||
|
||
|
||
def main(): | ||
dataset_parser = argparse.ArgumentParser() | ||
dataset_parser.add_argument("dataset", choices=list(DATASET_DICT.keys()), help="The dataset to download / process.") | ||
dataset_parser.add_argument( | ||
"dataset", | ||
choices=list(DATASET_DICT.keys()), | ||
help="The dataset to download / process.", | ||
) | ||
args, remaining_args = dataset_parser.parse_known_args() | ||
dataset = args.dataset | ||
logger.info(f"Downloading and processing {dataset}") | ||
|
||
print(f'got the arg: {dataset}') | ||
cl_parser = argparse.ArgumentParser() | ||
commandline.add_default(cl_parser, dataset) | ||
commandline.add_split(cl_parser) | ||
known_args, pipeline_args = cl_parser.parse_known_args(remaining_args) | ||
for arg in vars(known_args): | ||
logger.info(f"{arg} = {getattr(known_args, arg)}") | ||
DATASET_DICT[dataset](known_args, pipeline_args) | ||
|
||
|
||
if __name__ == '__main__': | ||
if __name__ == "__main__": | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.