Supplementary code for the experiments described in the 2021 ISMIR submission: Leveraging Hierarchical Structures for Few Shot Musical Instrument Recognition.

Overview

Music Trees

Supplementary code for the experiments described in the 2021 ISMIR submission: Leveraging Hierarchical Structures for Few Shot Musical Instrument Recognition.

train-test splits and hierarchies.

  • For all experiments, we used the instrument-based split in /music_trees/assets/partitions/mdb-aug.json.
  • To view our Hornbostel-Sachs class hierarchy, see /music_trees/assets/taxonomies/deeper-mdb.yaml. Note that not all of the instruments on this taxonomy are used in our experiments.
  • All random taxonomies are in /music_trees/assets/taxonomies/scrambled-*.yaml

Installation

first, clone the medleydb repo and install using pip install -e:

  • medleydb from marl

Now, download the medleydb and mdb 2.0 datasets from zenodo.

install some utilities for visualizing the embedding space:

git clone https://github.com/hugofloresgarcia/embviz.git
cd embviz
pip install -e .

then, clone this repo and install with

pip install -e .

Usage

1. Generate data

Make sure the MEDLEYDB_PATH environment variable is set (see the medleydb repo for more instructions ). Then, run the generation script:

python -m music_trees.generate \
                --dataset mdb \
                --name mdb-aug \
                --example_length 1.0 \
                --augment true \
                --hop_length 0.5 \
                --sample_rate 16000 \

This will generate both augmented and unaugmented data for MedleyDB. NOTE: There was a bug in the code that disabled data augmentation silently. This bug has been left in the code for the sake of reproducibility. This is why we don't report any data augmentation in the paper, as none was applied at the time of experiments.

2. Partition data

The partition file used for all experiments is available at /music_trees/assets/partitions/mdb-aug.json.

3. Run experiments

The search script will train all models for a particular experiment. It will grab as many GPUs are available (use CUDA_VISIBLE_DEVICES to change the availability of GPUs) and train as many models as it can in parallel.

Each model will be stored under /runs/<NAME>/<VERSION>.

Arbitrary Hierarchies

python music_trees/search.py --name scrambled-tax

Height Search (note that height=0 and height=1 are the baseline and proposed model, respectively)

python music_trees/search.py --name height-v1

Loss Ablation

python music_trees/search.py --name loss-alpha

train the additional BCE baseline:

python music_trees/train.py --model_name hprotonet --height 4 --d_root 128 --loss_alpha 1 --name "flat (BCE)" --dataset mdb-aug --learning_rate 0.03 --loss_weight_fn cross-entropy

4. Evaluate

Perform evaluation on a model. Make sure to pass the path to the run that you wish to evaluate.

To evaluate a model:

python music_trees/eval.py --exp_dir <PATH_TO_RUN>/<VERSION>

Each model will store its evaluation results under /results/<NAME>/<VERSION>

5. Analyze

To compare models and generate analysis figures and tables, place of all the results folders you would like to analyze under a single folder. The resulting folder should look like this:

my_experiment/trial1/version_0
my_experiment/trial2/version_0
my_experiment/trial3/version_0

Then, run analysis using

python music_trees analyze.py my_experiment   <OUTPUT_NAME> 

the figures will be created under /analysis/<OUTPUT_NAME>

To generate paper-ready figures, see scripts/figures.ipynb.

Comments
  • FileNotFoundError: [Errno 2] No such file or directory: '/home/ec2-user/SageMaker/music-trees/data/mdb-aug'

    FileNotFoundError: [Errno 2] No such file or directory: '/home/ec2-user/SageMaker/music-trees/data/mdb-aug'

    After fixing the reported issues, I get this error

    /home/ec2-user/SageMaker/medleydb/medleydb/__init__.py:64: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
      INST_TAXONOMY = yaml.load(fhandle)
    /home/ec2-user/SageMaker/medleydb/medleydb/__init__.py:72: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
      MIXING_COEFFICIENTS = yaml.load(fhandle)
    /home/ec2-user/SageMaker/medleydb/medleydb/__init__.py:94: UserWarning: The medleydb audio was not found at the expected path: None This module will still function, but without the ability to access any of the audio.
      UserWarning
    Global seed set to 42
    Traceback (most recent call last):
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/runpy.py", line 193, in _run_module_as_main
        "__main__", mod_spec)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/runpy.py", line 85, in _run_code
        exec(code, run_globals)
      File "/home/ec2-user/SageMaker/music-trees/music_trees/generate/__main__.py", line 18, in <module>
        generate_data(**vars(args))
      File "/home/ec2-user/SageMaker/music-trees/music_trees/generate/core.py", line 81, in generate_data
        output_dir.mkdir(exist_ok=False)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/pathlib.py", line 1248, in mkdir
        self._accessor.mkdir(self, mode)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/pathlib.py", line 387, in wrapped
        return strfunc(str(pathobj), *args)
    FileNotFoundError: [Errno 2] No such file or directory: '/home/ec2-user/SageMaker/music-trees/data/mdb-aug'
    

    when running

    ! python -m music_trees.generate \
                    --dataset medleydb \
                    --name mdb-aug \
                    --example_length 1.0 \
                    --augment true \
                    --hop_length 0.5 \
                    --sample_rate 16000 \
    

    Is this related to the augment true as stated in the docs? In that case, running with --augment false

    ! python -m music_trees.generate \
                    --dataset medleydb \
                    --name mdb-aug \
                    --example_length 1.0 \
                    --augment false \
                    --hop_length 0.5 \
                    --sample_rate 16000 \
    

    I get the same error...

    opened by loretoparisi 21
  • TypeError: __init__() got an unexpected keyword argument 'output_filename'

    TypeError: __init__() got an unexpected keyword argument 'output_filename'

    I get this error when running the training

    %set_env MEDLEYDB_PATH=/home/ec2-user/SageMaker/medleydb
    %cd /home/ec2-user/SageMaker/music-trees
    ! python music_trees/search.py --name height-v1
    

    Stacktrace:

    env: MEDLEYDB_PATH=/home/ec2-user/SageMaker/medleydb
    /home/ec2-user/SageMaker/music-trees
    Global seed set to 42
    /home/ec2-user/SageMaker/medleydb/medleydb/__init__.py:64: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
      INST_TAXONOMY = yaml.load(fhandle)
    /home/ec2-user/SageMaker/medleydb/medleydb/__init__.py:72: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
      MIXING_COEFFICIENTS = yaml.load(fhandle)
    /home/ec2-user/SageMaker/medleydb/medleydb/__init__.py:94: UserWarning: The medleydb audio was not found at the expected path: None This module will still function, but without the ability to access any of the audio.
      UserWarning
    Global seed set to 42
    2021-11-12:13:59:08,293 INFO     [tune.py:748] Initializing Ray automatically.For cluster usage or custom Ray initialization, call `ray.init(...)` before `tune.run`.
    2021-11-12 13:59:09,772	WARNING experiment.py:272 -- No name detected on trainable. Using DEFAULT.
    2021-11-12 13:59:09,773	INFO registry.py:70 -- Detected unknown callable for trainable. Converting to class.
    2021-11-12 13:59:09,780	INFO logger.py:606 -- pip install 'ray[tune]' to see TensorBoard files.
    2021-11-12 13:59:09,780	WARNING callback.py:115 -- The TensorboardX logger cannot be instantiated because either TensorboardX or one of it's dependencies is not installed. Please make sure you have the latest version of TensorboardX installed: `pip install -U tensorboardx`
    (pid=24752) Global seed set to 42
    (pid=24752) /home/ec2-user/SageMaker/medleydb/medleydb/__init__.py:64: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
    (pid=24752)   INST_TAXONOMY = yaml.load(fhandle)
    (pid=24752) /home/ec2-user/SageMaker/medleydb/medleydb/__init__.py:72: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
    (pid=24752)   MIXING_COEFFICIENTS = yaml.load(fhandle)
    (pid=24752) /home/ec2-user/SageMaker/medleydb/medleydb/__init__.py:94: UserWarning: The medleydb audio was not found at the expected path: None This module will still function, but without the ability to access any of the audio.
    (pid=24752)   UserWarning
    (pid=24752) Global seed set to 42
    == Status ==
    Current time: 2021-11-12 13:59:09 (running for 00:00:00.15)
    Memory usage on this node: 1.6/15.4 GiB
    Using AsyncHyperBand: num_stopped=0
    Bracket: Iter 60000.000: None
    Resources requested: 1.0/4 CPUs, 1.0/1 GPUs, 0.0/8.63 GiB heap, 0.0/4.31 GiB objects (0.0/1.0 accelerator_type:T4)
    Result logdir: /home/ec2-user/SageMaker/music-trees/runs/height-v1-11.12.2021/height-v1
    Number of trials: 5/5 (4 PENDING, 1 RUNNING)
    +---------------------+----------+----------------------+----------+
    | Trial name          | status   | loc                  |   height |
    |---------------------+----------+----------------------+----------|
    | DEFAULT_b5663_00000 | RUNNING  | 172.16.105.192:24752 |        4 |
    | DEFAULT_b5663_00001 | PENDING  |                      |        2 |
    | DEFAULT_b5663_00002 | PENDING  |                      |        0 |
    | DEFAULT_b5663_00003 | PENDING  |                      |        3 |
    | DEFAULT_b5663_00004 | PENDING  |                      |        1 |
    +---------------------+----------+----------------------+----------+
    
    
    (ImplicitFunc pid=24752) PARSING KNOWN ARGS
    (ImplicitFunc pid=24752) root
    (ImplicitFunc pid=24752) ├── aerophones
    (ImplicitFunc pid=24752) │   ├── free aerophones
    (ImplicitFunc pid=24752) │   │   └── interruptive free aerophones
    (ImplicitFunc pid=24752) │   │       └── interruptive free aerophones_
    (ImplicitFunc pid=24752) │   │           ├── accordion
    ...
    (ImplicitFunc pid=24752)                 ├── male rapper
    (ImplicitFunc pid=24752)                 ├── male screamer
    (ImplicitFunc pid=24752)                 ├── male singer
    (ImplicitFunc pid=24752)                 ├── male speaker
    (ImplicitFunc pid=24752)                 └── vocalists
    (ImplicitFunc pid=24752) 
    2021-11-12 13:59:13,924	ERROR trial_runner.py:924 -- Trial DEFAULT_b5663_00000: Error processing event.
    Traceback (most recent call last):
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/trial_runner.py", line 890, in _process_trial
        results = self.trial_executor.fetch_result(trial)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/ray_trial_executor.py", line 788, in fetch_result
        result = ray.get(trial_future[0], timeout=DEFAULT_GET_TIMEOUT)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/_private/client_mode_hook.py", line 105, in wrapper
        return func(*args, **kwargs)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/worker.py", line 1625, in get
        raise value.as_instanceof_cause()
    ray.exceptions.RayTaskError(TuneError): ray::ImplicitFunc.train_buffered() (pid=24752, ip=172.16.105.192, repr=<types.ImplicitFunc object at 0x7f1bbef16400>)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/trainable.py", line 224, in train_buffered
        result = self.train()
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/trainable.py", line 283, in train
        result = self.step()
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 381, in step
        self._report_thread_runner_error(block=True)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 529, in _report_thread_runner_error
        ("Trial raised an exception. Traceback:\n{}".format(err_tb_str)
    ray.tune.error.TuneError: Trial raised an exception. Traceback:
    ray::ImplicitFunc.train_buffered() (pid=24752, ip=172.16.105.192, repr=<types.ImplicitFunc object at 0x7f1bbef16400>)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 262, in run
        self._entrypoint()
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 331, in entrypoint
        self._status_reporter.get_checkpoint())
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 599, in _trainable_func
        output = fn()
      File "music_trees/search.py", line 110, in run_trial
        return mt.train.train(hparams, use_ray=True)
      File "/home/ec2-user/SageMaker/music-trees/music_trees/train.py", line 107, in train
        output_filename=exp_dir / 'profiler-report.txt'),
    TypeError: __init__() got an unexpected keyword argument 'output_filename'
    
    opened by loretoparisi 2
  • AttributeError: module 'music_trees' has no attribute 'utils'

    AttributeError: module 'music_trees' has no attribute 'utils'

    Hello this was my command,

    !python -m music_trees.generate \
                    --dataset medleydb \
                    --name mdb-aug \
                    --example_length 1.0 \
                    --augment true \
                    --hop_length 0.5 \
                    --sample_rate 16000 \
    

    and outcome

    Traceback (most recent call last):
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/runpy.py", line 183, in _run_module_as_main
        mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/runpy.py", line 109, in _get_module_details
        __import__(pkg_name)
      File "/home/ec2-user/SageMaker/medleydb/medleydb/medleydb/music-trees/music_trees/__init__.py", line 2, in <module>
        from . import utils
      File "/home/ec2-user/SageMaker/medleydb/medleydb/medleydb/music-trees/music_trees/utils/__init__.py", line 2, in <module>
        from . import effects
      File "/home/ec2-user/SageMaker/medleydb/medleydb/medleydb/music-trees/music_trees/utils/effects.py", line 9, in <module>
        import music_trees.utils as utils
    AttributeError: module 'music_trees' has no attribute 'utils'
    
    opened by loretoparisi 1
  • Bump numpy from 1.20 to 1.22.0

    Bump numpy from 1.20 to 1.22.0

    Bumps numpy from 1.20 to 1.22.0.

    Release notes

    Sourced from numpy's releases.

    v1.22.0

    NumPy 1.22.0 Release Notes

    NumPy 1.22.0 is a big release featuring the work of 153 contributors spread over 609 pull requests. There have been many improvements, highlights are:

    • Annotations of the main namespace are essentially complete. Upstream is a moving target, so there will likely be further improvements, but the major work is done. This is probably the most user visible enhancement in this release.
    • A preliminary version of the proposed Array-API is provided. This is a step in creating a standard collection of functions that can be used across application such as CuPy and JAX.
    • NumPy now has a DLPack backend. DLPack provides a common interchange format for array (tensor) data.
    • New methods for quantile, percentile, and related functions. The new methods provide a complete set of the methods commonly found in the literature.
    • A new configurable allocator for use by downstream projects.

    These are in addition to the ongoing work to provide SIMD support for commonly used functions, improvements to F2PY, and better documentation.

    The Python versions supported in this release are 3.8-3.10, Python 3.7 has been dropped. Note that 32 bit wheels are only provided for Python 3.8 and 3.9 on Windows, all other wheels are 64 bits on account of Ubuntu, Fedora, and other Linux distributions dropping 32 bit support. All 64 bit wheels are also linked with 64 bit integer OpenBLAS, which should fix the occasional problems encountered by folks using truly huge arrays.

    Expired deprecations

    Deprecated numeric style dtype strings have been removed

    Using the strings "Bytes0", "Datetime64", "Str0", "Uint32", and "Uint64" as a dtype will now raise a TypeError.

    (gh-19539)

    Expired deprecations for loads, ndfromtxt, and mafromtxt in npyio

    numpy.loads was deprecated in v1.15, with the recommendation that users use pickle.loads instead. ndfromtxt and mafromtxt were both deprecated in v1.17 - users should use numpy.genfromtxt instead with the appropriate value for the usemask parameter.

    (gh-19615)

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • "Trials did not complete", incomplete_trials

    I was finally able to run trees.generate 🚀

    ! python -m music_trees.generate \
                    --dataset mdb \
                    --name mdb-aug \
                    --example_length 1.0 \
                    --augment true \
                    --hop_length 0.5 \
                    --sample_rate 16000 \
                
      Global seed set to 42
    /home/ec2-user/SageMaker/medleydb/medleydb/__init__.py:64: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
      INST_TAXONOMY = yaml.load(fhandle)
    /home/ec2-user/SageMaker/medleydb/medleydb/__init__.py:72: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
      MIXING_COEFFICIENTS = yaml.load(fhandle)
    Global seed set to 42
    2021-11-22:18:47:14,891 INFO     [seed.py:54] Global seed set to 42
    0it [00:00, ?it/s]
    

    I then try

    %cd /home/ec2-user/SageMaker/music-trees
    %set_env CUDA_VISIBLE_DEVICES=0
    ! python music_trees/search.py --name height-v1
    

    but I get this error

    /home/ec2-user/SageMaker/music-trees
    env: CUDA_VISIBLE_DEVICES=0
    Global seed set to 42
    /home/ec2-user/SageMaker/medleydb/medleydb/__init__.py:64: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
      INST_TAXONOMY = yaml.load(fhandle)
    /home/ec2-user/SageMaker/medleydb/medleydb/__init__.py:72: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
      MIXING_COEFFICIENTS = yaml.load(fhandle)
    Global seed set to 42
    2021-11-22:18:52:10,882 INFO     [seed.py:54] Global seed set to 42
    2021-11-22:18:52:11,34 INFO     [tune.py:748] Initializing Ray automatically.For cluster usage or custom Ray initialization, call `ray.init(...)` before `tune.run`.
    2021-11-22 18:52:12,530	WARNING experiment.py:272 -- No name detected on trainable. Using DEFAULT.
    2021-11-22 18:52:12,531	INFO registry.py:70 -- Detected unknown callable for trainable. Converting to class.
    (pid=24191) Global seed set to 42
    (pid=24191) /home/ec2-user/SageMaker/medleydb/medleydb/__init__.py:64: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
    (pid=24191)   INST_TAXONOMY = yaml.load(fhandle)
    (pid=24191) /home/ec2-user/SageMaker/medleydb/medleydb/__init__.py:72: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
    (pid=24191)   MIXING_COEFFICIENTS = yaml.load(fhandle)
    (pid=24191) Global seed set to 42
    (pid=24191) 2021-11-22:18:52:16,277 INFO     [seed.py:54] Global seed set to 42
    == Status ==
    Current time: 2021-11-22 18:52:12 (running for 00:00:00.15)
    Memory usage on this node: 4.4/15.4 GiB
    Using AsyncHyperBand: num_stopped=0
    Bracket: Iter 60000.000: None
    Resources requested: 1.0/4 CPUs, 1.0/1 GPUs, 0.0/6.93 GiB heap, 0.0/3.47 GiB objects (0.0/1.0 accelerator_type:T4)
    Result logdir: /home/ec2-user/SageMaker/music-trees/runs/height-v1-11.22.2021/height-v1
    Number of trials: 5/5 (4 PENDING, 1 RUNNING)
    +---------------------+----------+---------------------+----------+
    | Trial name          | status   | loc                 |   height |
    |---------------------+----------+---------------------+----------|
    | DEFAULT_4daba_00000 | RUNNING  | xxxxxxxxx:24191 |        4 |
    | DEFAULT_4daba_00001 | PENDING  |                     |        2 |
    | DEFAULT_4daba_00002 | PENDING  |                     |        0 |
    | DEFAULT_4daba_00003 | PENDING  |                     |        3 |
    | DEFAULT_4daba_00004 | PENDING  |                     |        1 |
    +---------------------+----------+---------------------+----------+
    (ImplicitFunc pid=24191) PARSING KNOWN ARGS
    (ImplicitFunc pid=24191) root
    (ImplicitFunc pid=24191) ├── aerophones
    (ImplicitFunc pid=24191) │   ├── free aerophones
    (ImplicitFunc pid=24191) │   │   └── interruptive free aerophones
    (ImplicitFunc pid=24191) │   │
    ....
    .....
    (pid=24191) /home/ec2-user/SageMaker/music-trees/music_trees/utils/data.py:140: YAMLLoadWarning:
    (pid=24191) 
    (pid=24191) calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
    (pid=24191) 
    (pid=24191) GPU available: True, used: True
    (pid=24191) 2021-11-22:18:52:16,591 INFO     [distributed.py:54] GPU available: True, used: True
    (pid=24191) TPU available: None, using: 0 TPU cores
    (pid=24191) 2021-11-22:18:52:16,591 INFO     [distributed.py:54] TPU available: None, using: 0 TPU cores
    (pid=24191) Using native 16bit precision.
    (pid=24191) 2021-11-22:18:52:16,591 INFO     [accelerator_connector.py:331] Using native 16bit precision.
    (pid=24191) 2021-11-22:18:52:16,594 INFO     [data.py:125] loading files
    0it [00:00, ?it/s]1) 
    0it [00:00, ?it/s]1) 
    ...
    ...
    (pid=24191) 2021-11-22:18:52:16,615 INFO     [data.py:131] done
    (pid=24191) 2021-11-22 18:52:16,616	ERROR function_runner.py:268 -- Runner Thread raised error.
    (pid=24191) Traceback (most recent call last):
    (pid=24191)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 262, in run
    (pid=24191)     self._entrypoint()
    (pid=24191)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 331, in entrypoint
    (pid=24191)     self._status_reporter.get_checkpoint())
    (pid=24191)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/util/tracing/tracing_helper.py", line 451, in _resume_span
    (pid=24191)     return method(self, *_args, **_kwargs)
    (pid=24191)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 599, in _trainable_func
    (pid=24191)     output = fn()
    (pid=24191)   File "music_trees/search.py", line 110, in run_trial
    (pid=24191)     return mt.train.train(hparams, use_ray=True)
    (pid=24191)   File "/home/ec2-user/SageMaker/music-trees/music_trees/train.py", line 113, in train
    (pid=24191)     trainer.fit(task, datamodule=datamodule)
    (pid=24191)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 471, in fit
    (pid=24191)     self.call_setup_hook(model)
    (pid=24191)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 1070, in call_setup_hook
    (pid=24191)     self.datamodule.setup(stage_name)
    (pid=24191)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/pytorch_lightning/core/datamodule.py", line 92, in wrapped_fn
    (pid=24191)     return fn(*args, **kwargs)
    (pid=24191)   File "/home/ec2-user/SageMaker/music-trees/music_trees/data.py", line 313, in setup
    (pid=24191)     **self.tr_kwargs)
    (pid=24191)   File "/home/ec2-user/SageMaker/music-trees/music_trees/data.py", line 90, in __init__
    (pid=24191)     self.files = self._load_files(name, partition)
    (pid=24191)   File "/home/ec2-user/SageMaker/music-trees/music_trees/data.py", line 144, in _load_files
    (pid=24191)     assert len(new_records) > 0
    (pid=24191) AssertionError
    (pid=24191) Exception in thread Thread-2:
    (pid=24191) Traceback (most recent call last):
    (pid=24191)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    (pid=24191)     self.run()
    (pid=24191)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 281, in run
    (pid=24191)     raise e
    (pid=24191)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 262, in run
    (pid=24191)     self._entrypoint()
    (pid=24191)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 331, in entrypoint
    (pid=24191)     self._status_reporter.get_checkpoint())
    (pid=24191)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/util/tracing/tracing_helper.py", line 451, in _resume_span
    (pid=24191)     return method(self, *_args, **_kwargs)
    (pid=24191)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 599, in _trainable_func
    (pid=24191)     output = fn()
    (pid=24191)   File "music_trees/search.py", line 110, in run_trial
    (pid=24191)     return mt.train.train(hparams, use_ray=True)
    (pid=24191)   File "/home/ec2-user/SageMaker/music-trees/music_trees/train.py", line 113, in train
    (pid=24191)     trainer.fit(task, datamodule=datamodule)
    (pid=24191)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 471, in fit
    (pid=24191)     self.call_setup_hook(model)
    (pid=24191)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 1070, in call_setup_hook
    (pid=24191)     self.datamodule.setup(stage_name)
    (ImplicitFunc pid=24191) │       │   └── indirectly struck idiophones_
    ...
    (pid=24191)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/pytorch_lightning/core/datamodule.py", line 92, in wrapped_fn
    (pid=24191)     return fn(*args, **kwargs)
    (pid=24191)   File "/home/ec2-user/SageMaker/music-trees/music_trees/data.py", line 313, in setup
    (pid=24191)     **self.tr_kwargs)
    (pid=24191)   File "/home/ec2-user/SageMaker/music-trees/music_trees/data.py", line 90, in __init__
    (pid=24191)     self.files = self._load_files(name, partition)
    (pid=24191)   File "/home/ec2-user/SageMaker/music-trees/music_trees/data.py", line 144, in _load_files
    (pid=24191)     assert len(new_records) > 0
    (pid=24191) AssertionError
    (pid=24191) 
    2021-11-22 18:52:16,636	ERROR trial_runner.py:924 -- Trial DEFAULT_4daba_00000: Error processing event.
    Traceback (most recent call last):
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/trial_runner.py", line 890, in _process_trial
        results = self.trial_executor.fetch_result(trial)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/ray_trial_executor.py", line 788, in fetch_result
        result = ray.get(trial_future[0], timeout=DEFAULT_GET_TIMEOUT)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/_private/client_mode_hook.py", line 105, in wrapper
        return func(*args, **kwargs)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/worker.py", line 1625, in get
        raise value.as_instanceof_cause()
    ray.exceptions.RayTaskError(TuneError): ray::ImplicitFunc.train_buffered() (pid=24191, ip=172.16.71.215, repr=<types.ImplicitFunc object at 0x7f9528381f98>)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/trainable.py", line 224, in train_buffered
        result = self.train()
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/trainable.py", line 283, in train
        result = self.step()
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 381, in step
        self._report_thread_runner_error(block=True)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 529, in _report_thread_runner_error
        ("Trial raised an exception. Traceback:\n{}".format(err_tb_str)
    ray.tune.error.TuneError: Trial raised an exception. Traceback:
    ray::ImplicitFunc.train_buffered() (pid=24191, ip=172.16.71.215, repr=<types.ImplicitFunc object at 0x7f9528381f98>)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 262, in run
        self._entrypoint()
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 331, in entrypoint
        self._status_reporter.get_checkpoint())
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 599, in _trainable_func
        output = fn()
      File "music_trees/search.py", line 110, in run_trial
        return mt.train.train(hparams, use_ray=True)
      File "/home/ec2-user/SageMaker/music-trees/music_trees/train.py", line 113, in train
        trainer.fit(task, datamodule=datamodule)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 471, in fit
        self.call_setup_hook(model)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 1070, in call_setup_hook
        self.datamodule.setup(stage_name)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/pytorch_lightning/core/datamodule.py", line 92, in wrapped_fn
        return fn(*args, **kwargs)
      File "/home/ec2-user/SageMaker/music-trees/music_trees/data.py", line 313, in setup
        **self.tr_kwargs)
      File "/home/ec2-user/SageMaker/music-trees/music_trees/data.py", line 90, in __init__
        self.files = self._load_files(name, partition)
      File "/home/ec2-user/SageMaker/music-trees/music_trees/data.py", line 144, in _load_files
        assert len(new_records) > 0
    AssertionError
    Result for DEFAULT_4daba_00000:
      date: 2021-11-22_18-52-16
      experiment_id: 61b50089859345f8883ff565d7daa318
      hostname: ip-xxxxxxx
      node_ip: xxxxxxx
      pid: 24191
      timestamp: 1637607136
      trial_id: 4daba_00000
      
    (pid=24192) Global seed set to 42
    (pid=24192) /home/ec2-user/SageMaker/medleydb/medleydb/__init__.py:64: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
    (pid=24192)   INST_TAXONOMY = yaml.load(fhandle)
    (pid=24192) /home/ec2-user/SageMaker/medleydb/medleydb/__init__.py:72: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details.
    (pid=24192)   MIXING_COEFFICIENTS = yaml.load(fhandle)
    (pid=24192) Global seed set to 42
    (pid=24192) 2021-11-22:18:52:20,187 INFO     [seed.py:54] Global seed set to 42
    == Status ==
    Current time: 2021-11-22 18:52:17 (running for 00:00:05.19)
    Memory usage on this node: 4.5/15.4 GiB
    Using AsyncHyperBand: num_stopped=0
    Bracket: Iter 60000.000: None
    Resources requested: 1.0/4 CPUs, 1.0/1 GPUs, 0.0/6.93 GiB heap, 0.0/3.47 GiB objects (0.0/1.0 accelerator_type:T4)
    Result logdir: /home/ec2-user/SageMaker/music-trees/runs/height-v1-11.22.2021/height-v1
    Number of trials: 5/5 (1 ERROR, 3 PENDING, 1 RUNNING)
    ...
    

    That is too much difficult to read and debug, the last part was

    0it [00:00, ?it/s]1) 
    (pid=24421) 2021-11-22:18:52:32,688 INFO     [data.py:131] done
    (pid=24421) 2021-11-22 18:52:32,688	ERROR function_runner.py:268 -- Runner Thread raised error.
    (pid=24421) Traceback (most recent call last):
    (pid=24421)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 262, in run
    (pid=24421)     self._entrypoint()
    (pid=24421)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 331, in entrypoint
    (pid=24421)     self._status_reporter.get_checkpoint())
    (pid=24421)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/util/tracing/tracing_helper.py", line 451, in _resume_span
    (pid=24421)     return method(self, *_args, **_kwargs)
    (pid=24421)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 599, in _trainable_func
    (pid=24421)     output = fn()
    (pid=24421)   File "music_trees/search.py", line 110, in run_trial
    (pid=24421)     return mt.train.train(hparams, use_ray=True)
    (pid=24421)   File "/home/ec2-user/SageMaker/music-trees/music_trees/train.py", line 113, in train
    (pid=24421)     trainer.fit(task, datamodule=datamodule)
    (pid=24421)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 471, in fit
    (pid=24421)     self.call_setup_hook(model)
    (pid=24421)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 1070, in call_setup_hook
    (pid=24421)     self.datamodule.setup(stage_name)
    (pid=24421)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/pytorch_lightning/core/datamodule.py", line 92, in wrapped_fn
    (pid=24421)     return fn(*args, **kwargs)
    (pid=24421)   File "/home/ec2-user/SageMaker/music-trees/music_trees/data.py", line 313, in setup
    (pid=24421)     **self.tr_kwargs)
    (pid=24421)   File "/home/ec2-user/SageMaker/music-trees/music_trees/data.py", line 90, in __init__
    (pid=24421)     self.files = self._load_files(name, partition)
    (pid=24421)   File "/home/ec2-user/SageMaker/music-trees/music_trees/data.py", line 144, in _load_files
    (pid=24421)     assert len(new_records) > 0
    (pid=24421) AssertionError
    (pid=24421) Exception in thread Thread-2:
    (pid=24421) Traceback (most recent call last):
    (pid=24421)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    (pid=24421)     self.run()
    (pid=24421)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 281, in run
    (pid=24421)     raise e
    (pid=24421)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 262, in run
    (pid=24421)     self._entrypoint()
    (pid=24421)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 331, in entrypoint
    (pid=24421)     self._status_reporter.get_checkpoint())
    (pid=24421)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/util/tracing/tracing_helper.py", line 451, in _resume_span
    (pid=24421)     return method(self, *_args, **_kwargs)
    (pid=24421)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/function_runner.py", line 599, in _trainable_func
    (pid=24421)     output = fn()
    (pid=24421)   File "music_trees/search.py", line 110, in run_trial
    (pid=24421)     return mt.train.train(hparams, use_ray=True)
    (pid=24421)   File "/home/ec2-user/SageMaker/music-trees/music_trees/train.py", line 113, in train
    (pid=24421)     trainer.fit(task, datamodule=datamodule)
    (pid=24421)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 471, in fit
    (pid=24421)     self.call_setup_hook(model)
    (pid=24421)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/pytorch_lightning/trainer/trainer.py", line 1070, in call_setup_hook
    (pid=24421)     self.datamodule.setup(stage_name)
    (pid=24421)   File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/pytorch_lightning/core/datamodule.py", line 92, in wrapped_fn
    (pid=24421)     return fn(*args, **kwargs)
    (pid=24421)   File "/home/ec2-user/SageMaker/music-trees/music_trees/data.py", line 313, in setup
    (pid=24421)     **self.tr_kwargs)
    (pid=24421)   File "/home/ec2-user/SageMaker/music-trees/music_trees/data.py", line 90, in __init__
    (pid=24421)     self.files = self._load_files(name, partition)
    (pid=24421)   File "/home/ec2-user/SageMaker/music-trees/music_trees/data.py", line 144, in _load_files
    (pid=24421)     assert len(new_records) > 0
    (pid=24421) AssertionError
    (pid=24421) 
    Traceback (most recent call last):
      File "music_trees/search.py", line 161, in <module>
        run_experiment(exp)
      File "music_trees/search.py", line 134, in run_experiment
        progress_reporter=reporter)
      File "/home/ec2-user/anaconda3/envs/python3/lib/python3.6/site-packages/ray/tune/tune.py", line 624, in run
        raise TuneError("Trials did not complete", incomplete_trials)
    ray.tune.error.TuneError: ('Trials did not complete', [DEFAULT_4daba_00000, DEFAULT_4daba_00001, DEFAULT_4daba_00002, DEFAULT_4daba_00003, DEFAULT_4daba_00004])
    

    Any idea?

    Thank you!

    opened by loretoparisi 5
Owner
Hugo Flores García
PhD @interactiveaudiolab
Hugo Flores García
🏆 The 1st Place Submission to AICity Challenge 2021 Natural Language-Based Vehicle Retrieval Track (Alibaba-UTS submission)

AI City 2021: Connecting Language and Vision for Natural Language-Based Vehicle Retrieval ?? The 1st Place Submission to AICity Challenge 2021 Natural

null 82 Dec 29, 2022
Code for T-Few from "Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learning"

T-Few This repository contains the official code for the paper: "Few-Shot Parameter-Efficient Fine-Tuning is Better and Cheaper than In-Context Learni

null 220 Dec 31, 2022
Music Source Separation; Train & Eval & Inference piplines and pretrained models we used for 2021 ISMIR MDX Challenge.

Music Source Separation with Channel-wise Subband Phase Aware ResUnet (CWS-PResUNet) Introduction This repo contains the pretrained Music Source Separ

Lau 100 Dec 25, 2022
working repo for my xumx-sliCQ submissions to the ISMIR 2021 MDX

Music Demixing Challenge - xumx-sliCQ This repository is the GitHub mirror of my working submission repository for the AICrowd ISMIR 2021 Music Demixi

null 4 Aug 25, 2021
Few-NERD: Not Only a Few-shot NER Dataset

Few-NERD: Not Only a Few-shot NER Dataset This is the source code of the ACL-IJCNLP 2021 paper: Few-NERD: A Few-shot Named Entity Recognition Dataset.

THUNLP 319 Dec 30, 2022
All the essential resources and template code needed to understand and practice data structures and algorithms in python with few small projects to demonstrate their practical application.

Data Structures and Algorithms Python INDEX 1. Resources - Books Data Structures - Reema Thareja competitiveCoding Big-O Cheat Sheet DAA Syllabus Inte

Shushrut Kumar 129 Dec 15, 2022
Supplementary code for the AISTATS 2021 paper "Matern Gaussian Processes on Graphs".

Matern Gaussian Processes on Graphs This repo provides an extension for gpflow with Matérn kernels, inducing variables and trainable models implemente

null 41 Dec 17, 2022
Supplementary code for SIGGRAPH 2021 paper: Discovering Diverse Athletic Jumping Strategies

SIGGRAPH 2021: Discovering Diverse Athletic Jumping Strategies project page paper demo video Prerequisites Important Notes We suspect there are bugs i

null 54 Dec 6, 2022
Woosung Choi 63 Nov 14, 2022
Simple and Effective Few-Shot Named Entity Recognition with Structured Nearest Neighbor Learning

structshot Code and data for paper "Simple and Effective Few-Shot Named Entity Recognition with Structured Nearest Neighbor Learning", Yi Yang and Arz

ASAPP Research 47 Dec 27, 2022
PyTorch framework, for reproducing experiments from the paper Implicit Regularization in Hierarchical Tensor Factorization and Deep Convolutional Neural Networks

Implicit Regularization in Hierarchical Tensor Factorization and Deep Convolutional Neural Networks. Code, based on the PyTorch framework, for reprodu

Asaf 3 Dec 27, 2022
Code and data of the ACL 2021 paper: Few-Shot Text Ranking with Meta Adapted Synthetic Weak Supervision

MetaAdaptRank This repository provides the implementation of meta-learning to reweight synthetic weak supervision data described in the paper Few-Shot

THUNLP 5 Jun 16, 2022
Code for 'Self-Guided and Cross-Guided Learning for Few-shot segmentation. (CVPR' 2021)'

SCL Introduction Code for 'Self-Guided and Cross-Guided Learning for Few-shot segmentation. (CVPR' 2021)' We evaluated our approach using two baseline

null 34 Oct 8, 2022
Official code release for "Learned Spatial Representations for Few-shot Talking-Head Synthesis" ICCV 2021

Official code release for "Learned Spatial Representations for Few-shot Talking-Head Synthesis" ICCV 2021

Moustafa Meshry 16 Oct 5, 2022
PyTorch implementation of the R2Plus1D convolution based ResNet architecture described in the paper "A Closer Look at Spatiotemporal Convolutions for Action Recognition"

R2Plus1D-PyTorch PyTorch implementation of the R2Plus1D convolution based ResNet architecture described in the paper "A Closer Look at Spatiotemporal

Irhum Shafkat 342 Dec 16, 2022
LBK 20 Dec 2, 2022
Supplementary code for the paper "Meta-Solver for Neural Ordinary Differential Equations" https://arxiv.org/abs/2103.08561

Meta-Solver for Neural Ordinary Differential Equations Towards robust neural ODEs using parametrized solvers. Main idea Each Runge-Kutta (RK) solver w

Julia Gusak 25 Aug 12, 2021
Code for the RA-L (ICRA) 2021 paper "SeqNet: Learning Descriptors for Sequence-Based Hierarchical Place Recognition"

SeqNet: Learning Descriptors for Sequence-Based Hierarchical Place Recognition [ArXiv+Supplementary] [IEEE Xplore RA-L 2021] [ICRA 2021 YouTube Video]

Sourav Garg 63 Dec 12, 2022
git《FSCE: Few-Shot Object Detection via Contrastive Proposal Encoding》(CVPR 2021) GitHub: [fig8]

FSCE: Few-Shot Object Detection via Contrastive Proposal Encoding (CVPR 2021) This repo contains the implementation of our state-of-the-art fewshot ob

null 233 Dec 29, 2022