question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Can't run Onset Frames Transcription

See original GitHub issue

I’m not sure if I’m doing something wrong, but I can’t figure out how to run onsets_frames_transcription_transcribe. Any help would be very much appreciated!

I’ve tried pip install magenta and the full Development Environment.

Then I tried to run Onset Frames Transcription as follows:

MODEL_DIR=train
onsets_frames_transcription_transcribe --model_dir="${CHECKPOINT_DIR}" /Users/klt/Desktop/tmp/p.wav

I get this output:

/Users/klt/code/phd/magenta-master/venv/lib/python2.7/site-packages/librosa/__init__.py:35: FutureWarning: You are using librosa with Python 2. Please note that librosa 0.7 will be the last version to support Python 2, after which it will require Python 3 or later.
  FutureWarning)
WARNING:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  * https://github.com/tensorflow/addons
  * https://github.com/tensorflow/io (for I/O related ops)
If you depend on functionality not listed there, please file an issue.

WARNING:tensorflow:From /Users/klt/code/phd/magenta-master/venv/lib/python2.7/site-packages/tensorflow_estimator/python/estimator/api/_v1/estimator/__init__.py:12: The name tf.estimator.inputs is deprecated. Please use tf.compat.v1.estimator.inputs instead.

W1123 20:41:19.349154 4733580736 module_wrapper.py:139] From /Users/klt/code/phd/magenta-master/venv/lib/python2.7/site-packages/tensorflow_estimator/python/estimator/api/_v1/estimator/__init__.py:12: The name tf.estimator.inputs is deprecated. Please use tf.compat.v1.estimator.inputs instead.

WARNING:tensorflow:From /Users/klt/code/phd/magenta-master/magenta/models/onsets_frames_transcription/data.py:136: py_func (from tensorflow.python.ops.script_ops) is deprecated and will be removed in a future version.
Instructions for updating:
tf.py_func is deprecated in TF V2. Instead, there are two
    options available in V2.
    - tf.py_function takes a python function which manipulates tf eager
    tensors instead of numpy arrays. It's easy to convert a tf eager tensor to
    an ndarray (just call tensor.numpy()) but having access to eager tensors
    means `tf.py_function`s can use accelerators such as GPUs as well as
    being differentiable using a gradient tape.
    - tf.numpy_function maintains the semantics of the deprecated tf.py_func
    (it is not differentiable, and manipulates numpy arrays). It drops the
    stateful argument making all functions stateful.
    
W1123 20:41:20.726474 4733580736 deprecation.py:323] From /Users/klt/code/phd/magenta-master/magenta/models/onsets_frames_transcription/data.py:136: py_func (from tensorflow.python.ops.script_ops) is deprecated and will be removed in a future version.
Instructions for updating:
tf.py_func is deprecated in TF V2. Instead, there are two
    options available in V2.
    - tf.py_function takes a python function which manipulates tf eager
    tensors instead of numpy arrays. It's easy to convert a tf eager tensor to
    an ndarray (just call tensor.numpy()) but having access to eager tensors
    means `tf.py_function`s can use accelerators such as GPUs as well as
    being differentiable using a gradient tape.
    - tf.numpy_function maintains the semantics of the deprecated tf.py_func
    (it is not differentiable, and manipulates numpy arrays). It drops the
    stateful argument making all functions stateful.
    
WARNING:tensorflow:From /Users/klt/code/phd/magenta-master/magenta/models/onsets_frames_transcription/data.py:626: output_shapes (from tensorflow.python.data.ops.dataset_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.data.get_output_shapes(dataset)`.
W1123 20:41:27.954725 4733580736 deprecation.py:323] From /Users/klt/code/phd/magenta-master/magenta/models/onsets_frames_transcription/data.py:626: output_shapes (from tensorflow.python.data.ops.dataset_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.data.get_output_shapes(dataset)`.
WARNING:tensorflow:Using temporary folder as model directory: /var/folders/35/xkv0vz050bn4_qxdn4dclz700000gn/T/tmpolFdbX
W1123 20:41:27.996778 4733580736 estimator.py:1821] Using temporary folder as model directory: /var/folders/35/xkv0vz050bn4_qxdn4dclz700000gn/T/tmpolFdbX
INFO:tensorflow:Using config: {'_save_checkpoints_secs': None, '_session_config': allow_soft_placement: true
graph_options {
  rewrite_options {
    meta_optimizer_iterations: ONE
  }
}
, '_keep_checkpoint_max': None, '_task_type': 'worker', '_train_distribute': None, '_is_chief': True, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x14141c990>, '_model_dir': '/var/folders/35/xkv0vz050bn4_qxdn4dclz700000gn/T/tmpolFdbX', '_protocol': None, '_save_checkpoints_steps': 300, '_keep_checkpoint_every_n_hours': 1, '_service': None, '_num_ps_replicas': 0, '_tpu_config': TPUConfig(iterations_per_loop=300, num_shards=None, num_cores_per_replica=None, per_host_input_for_training=2, tpu_job_name=None, initial_infeed_sleep_secs=None, input_partition_dims=None, eval_training_input_configuration=2, experimental_host_call_every_n_steps=1), '_tf_random_seed': None, '_save_summary_steps': 300, '_device_fn': None, '_session_creation_timeout_secs': 7200, '_cluster': None, '_experimental_distribute': None, '_num_worker_replicas': 1, '_task_id': 0, '_log_step_count_steps': None, '_experimental_max_worker_delay_secs': None, '_evaluation_master': '', '_eval_distribute': None, '_global_id_in_cluster': 0, '_master': ''}
I1123 20:41:28.003739 4733580736 estimator.py:212] Using config: {'_save_checkpoints_secs': None, '_session_config': allow_soft_placement: true
graph_options {
  rewrite_options {
    meta_optimizer_iterations: ONE
  }
}
, '_keep_checkpoint_max': None, '_task_type': 'worker', '_train_distribute': None, '_is_chief': True, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x14141c990>, '_model_dir': '/var/folders/35/xkv0vz050bn4_qxdn4dclz700000gn/T/tmpolFdbX', '_protocol': None, '_save_checkpoints_steps': 300, '_keep_checkpoint_every_n_hours': 1, '_service': None, '_num_ps_replicas': 0, '_tpu_config': TPUConfig(iterations_per_loop=300, num_shards=None, num_cores_per_replica=None, per_host_input_for_training=2, tpu_job_name=None, initial_infeed_sleep_secs=None, input_partition_dims=None, eval_training_input_configuration=2, experimental_host_call_every_n_steps=1), '_tf_random_seed': None, '_save_summary_steps': 300, '_device_fn': None, '_session_creation_timeout_secs': 7200, '_cluster': None, '_experimental_distribute': None, '_num_worker_replicas': 1, '_task_id': 0, '_log_step_count_steps': None, '_experimental_max_worker_delay_secs': None, '_evaluation_master': '', '_eval_distribute': None, '_global_id_in_cluster': 0, '_master': ''}
INFO:tensorflow:_TPUContext: eval_on_tpu False
I1123 20:41:28.022785 4733580736 tpu_context.py:220] _TPUContext: eval_on_tpu False
WARNING:tensorflow:From /Users/klt/code/phd/magenta-master/magenta/models/onsets_frames_transcription/onsets_frames_transcription_transcribe.py:103: make_initializable_iterator (from tensorflow.python.data.ops.dataset_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `for ... in dataset:` to iterate over a dataset. If using `tf.estimator`, return the `Dataset` object directly from your input function. As a last resort, you can use `tf.compat.v1.data.make_initializable_iterator(dataset)`.
W1123 20:41:28.025648 4733580736 deprecation.py:323] From /Users/klt/code/phd/magenta-master/magenta/models/onsets_frames_transcription/onsets_frames_transcription_transcribe.py:103: make_initializable_iterator (from tensorflow.python.data.ops.dataset_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `for ... in dataset:` to iterate over a dataset. If using `tf.estimator`, return the `Dataset` object directly from your input function. As a last resort, you can use `tf.compat.v1.data.make_initializable_iterator(dataset)`.
2019-11-23 20:41:28.055441: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-11-23 20:41:28.102833: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7f9c4d6bd0b0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2019-11-23 20:41:28.102980: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
INFO:tensorflow:Starting transcription for /Users/klt/Desktop/tmp/p.wav...
I1123 20:41:28.128268 4733580736 onsets_frames_transcription_transcribe.py:113] Starting transcription for /Users/klt/Desktop/tmp/p.wav...
INFO:tensorflow:Processing file...
I1123 20:41:28.128619 4733580736 onsets_frames_transcription_transcribe.py:119] Processing file...
INFO:tensorflow:Running inference...
I1123 20:41:32.646573 4733580736 onsets_frames_transcription_transcribe.py:129] Running inference...
INFO:tensorflow:Could not find trained model in model_dir: /var/folders/35/xkv0vz050bn4_qxdn4dclz700000gn/T/tmpolFdbX, running initialization to predict.
I1123 20:41:32.646955 4733580736 estimator.py:615] Could not find trained model in model_dir: /var/folders/35/xkv0vz050bn4_qxdn4dclz700000gn/T/tmpolFdbX, running initialization to predict.
WARNING:tensorflow:From /Users/klt/code/phd/magenta-master/venv/lib/python2.7/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling __init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
W1123 20:41:32.658987 4733580736 deprecation.py:506] From /Users/klt/code/phd/magenta-master/venv/lib/python2.7/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling __init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
Bus error: 10
(venv) (base) MacBook-Pro:onsets_frames_transcription klt$ MODEL_DIR="train"
(venv) (base) MacBook-Pro:onsets_frames_transcription klt$ onsets_frames_transcription_transcribe --model_dir="${CHECKPOINT_DIR}" "/Users/klt/Desktop/tmp/p.wav"
/Users/klt/code/phd/magenta-master/venv/lib/python2.7/site-packages/librosa/__init__.py:35: FutureWarning: You are using librosa with Python 2. Please note that librosa 0.7 will be the last version to support Python 2, after which it will require Python 3 or later.
  FutureWarning)
WARNING:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  * https://github.com/tensorflow/addons
  * https://github.com/tensorflow/io (for I/O related ops)
If you depend on functionality not listed there, please file an issue.

WARNING:tensorflow:From /Users/klt/code/phd/magenta-master/venv/lib/python2.7/site-packages/tensorflow_estimator/python/estimator/api/_v1/estimator/__init__.py:12: The name tf.estimator.inputs is deprecated. Please use tf.compat.v1.estimator.inputs instead.

W1123 20:42:42.978538 4656154048 module_wrapper.py:139] From /Users/klt/code/phd/magenta-master/venv/lib/python2.7/site-packages/tensorflow_estimator/python/estimator/api/_v1/estimator/__init__.py:12: The name tf.estimator.inputs is deprecated. Please use tf.compat.v1.estimator.inputs instead.

WARNING:tensorflow:From /Users/klt/code/phd/magenta-master/magenta/models/onsets_frames_transcription/data.py:136: py_func (from tensorflow.python.ops.script_ops) is deprecated and will be removed in a future version.
Instructions for updating:
tf.py_func is deprecated in TF V2. Instead, there are two
    options available in V2.
    - tf.py_function takes a python function which manipulates tf eager
    tensors instead of numpy arrays. It's easy to convert a tf eager tensor to
    an ndarray (just call tensor.numpy()) but having access to eager tensors
    means `tf.py_function`s can use accelerators such as GPUs as well as
    being differentiable using a gradient tape.
    - tf.numpy_function maintains the semantics of the deprecated tf.py_func
    (it is not differentiable, and manipulates numpy arrays). It drops the
    stateful argument making all functions stateful.
    
W1123 20:42:44.601079 4656154048 deprecation.py:323] From /Users/klt/code/phd/magenta-master/magenta/models/onsets_frames_transcription/data.py:136: py_func (from tensorflow.python.ops.script_ops) is deprecated and will be removed in a future version.
Instructions for updating:
tf.py_func is deprecated in TF V2. Instead, there are two
    options available in V2.
    - tf.py_function takes a python function which manipulates tf eager
    tensors instead of numpy arrays. It's easy to convert a tf eager tensor to
    an ndarray (just call tensor.numpy()) but having access to eager tensors
    means `tf.py_function`s can use accelerators such as GPUs as well as
    being differentiable using a gradient tape.
    - tf.numpy_function maintains the semantics of the deprecated tf.py_func
    (it is not differentiable, and manipulates numpy arrays). It drops the
    stateful argument making all functions stateful.
    
WARNING:tensorflow:From /Users/klt/code/phd/magenta-master/magenta/models/onsets_frames_transcription/data.py:626: output_shapes (from tensorflow.python.data.ops.dataset_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.data.get_output_shapes(dataset)`.
W1123 20:42:49.091053 4656154048 deprecation.py:323] From /Users/klt/code/phd/magenta-master/magenta/models/onsets_frames_transcription/data.py:626: output_shapes (from tensorflow.python.data.ops.dataset_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.data.get_output_shapes(dataset)`.
WARNING:tensorflow:Using temporary folder as model directory: /var/folders/35/xkv0vz050bn4_qxdn4dclz700000gn/T/tmpLReVyx
W1123 20:42:49.123639 4656154048 estimator.py:1821] Using temporary folder as model directory: /var/folders/35/xkv0vz050bn4_qxdn4dclz700000gn/T/tmpLReVyx
INFO:tensorflow:Using config: {'_save_checkpoints_secs': None, '_session_config': allow_soft_placement: true
graph_options {
  rewrite_options {
    meta_optimizer_iterations: ONE
  }
}
, '_keep_checkpoint_max': None, '_task_type': 'worker', '_train_distribute': None, '_is_chief': True, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x13b54bd90>, '_model_dir': '/var/folders/35/xkv0vz050bn4_qxdn4dclz700000gn/T/tmpLReVyx', '_protocol': None, '_save_checkpoints_steps': 300, '_keep_checkpoint_every_n_hours': 1, '_service': None, '_num_ps_replicas': 0, '_tpu_config': TPUConfig(iterations_per_loop=300, num_shards=None, num_cores_per_replica=None, per_host_input_for_training=2, tpu_job_name=None, initial_infeed_sleep_secs=None, input_partition_dims=None, eval_training_input_configuration=2, experimental_host_call_every_n_steps=1), '_tf_random_seed': None, '_save_summary_steps': 300, '_device_fn': None, '_session_creation_timeout_secs': 7200, '_cluster': None, '_experimental_distribute': None, '_num_worker_replicas': 1, '_task_id': 0, '_log_step_count_steps': None, '_experimental_max_worker_delay_secs': None, '_evaluation_master': '', '_eval_distribute': None, '_global_id_in_cluster': 0, '_master': ''}
I1123 20:42:49.126346 4656154048 estimator.py:212] Using config: {'_save_checkpoints_secs': None, '_session_config': allow_soft_placement: true
graph_options {
  rewrite_options {
    meta_optimizer_iterations: ONE
  }
}
, '_keep_checkpoint_max': None, '_task_type': 'worker', '_train_distribute': None, '_is_chief': True, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x13b54bd90>, '_model_dir': '/var/folders/35/xkv0vz050bn4_qxdn4dclz700000gn/T/tmpLReVyx', '_protocol': None, '_save_checkpoints_steps': 300, '_keep_checkpoint_every_n_hours': 1, '_service': None, '_num_ps_replicas': 0, '_tpu_config': TPUConfig(iterations_per_loop=300, num_shards=None, num_cores_per_replica=None, per_host_input_for_training=2, tpu_job_name=None, initial_infeed_sleep_secs=None, input_partition_dims=None, eval_training_input_configuration=2, experimental_host_call_every_n_steps=1), '_tf_random_seed': None, '_save_summary_steps': 300, '_device_fn': None, '_session_creation_timeout_secs': 7200, '_cluster': None, '_experimental_distribute': None, '_num_worker_replicas': 1, '_task_id': 0, '_log_step_count_steps': None, '_experimental_max_worker_delay_secs': None, '_evaluation_master': '', '_eval_distribute': None, '_global_id_in_cluster': 0, '_master': ''}
INFO:tensorflow:_TPUContext: eval_on_tpu False
I1123 20:42:49.128591 4656154048 tpu_context.py:220] _TPUContext: eval_on_tpu False
WARNING:tensorflow:From /Users/klt/code/phd/magenta-master/magenta/models/onsets_frames_transcription/onsets_frames_transcription_transcribe.py:103: make_initializable_iterator (from tensorflow.python.data.ops.dataset_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `for ... in dataset:` to iterate over a dataset. If using `tf.estimator`, return the `Dataset` object directly from your input function. As a last resort, you can use `tf.compat.v1.data.make_initializable_iterator(dataset)`.
W1123 20:42:49.129336 4656154048 deprecation.py:323] From /Users/klt/code/phd/magenta-master/magenta/models/onsets_frames_transcription/onsets_frames_transcription_transcribe.py:103: make_initializable_iterator (from tensorflow.python.data.ops.dataset_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `for ... in dataset:` to iterate over a dataset. If using `tf.estimator`, return the `Dataset` object directly from your input function. As a last resort, you can use `tf.compat.v1.data.make_initializable_iterator(dataset)`.
2019-11-23 20:42:49.145057: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-11-23 20:42:49.196234: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7fe191151f50 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2019-11-23 20:42:49.196301: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
INFO:tensorflow:Starting transcription for /Users/klt/Desktop/tmp/p.wav...
I1123 20:42:49.234787 4656154048 onsets_frames_transcription_transcribe.py:113] Starting transcription for /Users/klt/Desktop/tmp/p.wav...
INFO:tensorflow:Processing file...
I1123 20:42:49.238156 4656154048 onsets_frames_transcription_transcribe.py:119] Processing file...
INFO:tensorflow:Running inference...
I1123 20:42:51.931320 4656154048 onsets_frames_transcription_transcribe.py:129] Running inference...
INFO:tensorflow:Could not find trained model in model_dir: /var/folders/35/xkv0vz050bn4_qxdn4dclz700000gn/T/tmpLReVyx, running initialization to predict.
I1123 20:42:51.931879 4656154048 estimator.py:615] Could not find trained model in model_dir: /var/folders/35/xkv0vz050bn4_qxdn4dclz700000gn/T/tmpLReVyx, running initialization to predict.
WARNING:tensorflow:From /Users/klt/code/phd/magenta-master/venv/lib/python2.7/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling __init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
W1123 20:42:51.936925 4656154048 deprecation.py:506] From /Users/klt/code/phd/magenta-master/venv/lib/python2.7/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling __init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
Bus error: 10
(venv) (base) MacBook-Pro:onsets_frames_transcription klt$ onsets_frames_transcription_transcribe --model_dir="${CHECKPOINT_DIR}" /Users/klt/Desktop/tmp/p.wav
/Users/klt/code/phd/magenta-master/venv/lib/python2.7/site-packages/librosa/__init__.py:35: FutureWarning: You are using librosa with Python 2. Please note that librosa 0.7 will be the last version to support Python 2, after which it will require Python 3 or later.
  FutureWarning)
WARNING:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  * https://github.com/tensorflow/addons
  * https://github.com/tensorflow/io (for I/O related ops)
If you depend on functionality not listed there, please file an issue.

WARNING:tensorflow:From /Users/klt/code/phd/magenta-master/venv/lib/python2.7/site-packages/tensorflow_estimator/python/estimator/api/_v1/estimator/__init__.py:12: The name tf.estimator.inputs is deprecated. Please use tf.compat.v1.estimator.inputs instead.

W1123 20:43:46.547178 4500542912 module_wrapper.py:139] From /Users/klt/code/phd/magenta-master/venv/lib/python2.7/site-packages/tensorflow_estimator/python/estimator/api/_v1/estimator/__init__.py:12: The name tf.estimator.inputs is deprecated. Please use tf.compat.v1.estimator.inputs instead.

WARNING:tensorflow:From /Users/klt/code/phd/magenta-master/magenta/models/onsets_frames_transcription/data.py:136: py_func (from tensorflow.python.ops.script_ops) is deprecated and will be removed in a future version.
Instructions for updating:
tf.py_func is deprecated in TF V2. Instead, there are two
    options available in V2.
    - tf.py_function takes a python function which manipulates tf eager
    tensors instead of numpy arrays. It's easy to convert a tf eager tensor to
    an ndarray (just call tensor.numpy()) but having access to eager tensors
    means `tf.py_function`s can use accelerators such as GPUs as well as
    being differentiable using a gradient tape.
    - tf.numpy_function maintains the semantics of the deprecated tf.py_func
    (it is not differentiable, and manipulates numpy arrays). It drops the
    stateful argument making all functions stateful.
    
W1123 20:43:48.238924 4500542912 deprecation.py:323] From /Users/klt/code/phd/magenta-master/magenta/models/onsets_frames_transcription/data.py:136: py_func (from tensorflow.python.ops.script_ops) is deprecated and will be removed in a future version.
Instructions for updating:
tf.py_func is deprecated in TF V2. Instead, there are two
    options available in V2.
    - tf.py_function takes a python function which manipulates tf eager
    tensors instead of numpy arrays. It's easy to convert a tf eager tensor to
    an ndarray (just call tensor.numpy()) but having access to eager tensors
    means `tf.py_function`s can use accelerators such as GPUs as well as
    being differentiable using a gradient tape.
    - tf.numpy_function maintains the semantics of the deprecated tf.py_func
    (it is not differentiable, and manipulates numpy arrays). It drops the
    stateful argument making all functions stateful.
    
WARNING:tensorflow:From /Users/klt/code/phd/magenta-master/magenta/models/onsets_frames_transcription/data.py:626: output_shapes (from tensorflow.python.data.ops.dataset_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.data.get_output_shapes(dataset)`.
W1123 20:43:52.166743 4500542912 deprecation.py:323] From /Users/klt/code/phd/magenta-master/magenta/models/onsets_frames_transcription/data.py:626: output_shapes (from tensorflow.python.data.ops.dataset_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `tf.compat.v1.data.get_output_shapes(dataset)`.
WARNING:tensorflow:Using temporary folder as model directory: /var/folders/35/xkv0vz050bn4_qxdn4dclz700000gn/T/tmpP9UtYs
W1123 20:43:52.207689 4500542912 estimator.py:1821] Using temporary folder as model directory: /var/folders/35/xkv0vz050bn4_qxdn4dclz700000gn/T/tmpP9UtYs
INFO:tensorflow:Using config: {'_save_checkpoints_secs': None, '_session_config': allow_soft_placement: true
graph_options {
  rewrite_options {
    meta_optimizer_iterations: ONE
  }
}
, '_keep_checkpoint_max': None, '_task_type': 'worker', '_train_distribute': None, '_is_chief': True, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x135b4f650>, '_model_dir': '/var/folders/35/xkv0vz050bn4_qxdn4dclz700000gn/T/tmpP9UtYs', '_protocol': None, '_save_checkpoints_steps': 300, '_keep_checkpoint_every_n_hours': 1, '_service': None, '_num_ps_replicas': 0, '_tpu_config': TPUConfig(iterations_per_loop=300, num_shards=None, num_cores_per_replica=None, per_host_input_for_training=2, tpu_job_name=None, initial_infeed_sleep_secs=None, input_partition_dims=None, eval_training_input_configuration=2, experimental_host_call_every_n_steps=1), '_tf_random_seed': None, '_save_summary_steps': 300, '_device_fn': None, '_session_creation_timeout_secs': 7200, '_cluster': None, '_experimental_distribute': None, '_num_worker_replicas': 1, '_task_id': 0, '_log_step_count_steps': None, '_experimental_max_worker_delay_secs': None, '_evaluation_master': '', '_eval_distribute': None, '_global_id_in_cluster': 0, '_master': ''}
I1123 20:43:52.208148 4500542912 estimator.py:212] Using config: {'_save_checkpoints_secs': None, '_session_config': allow_soft_placement: true
graph_options {
  rewrite_options {
    meta_optimizer_iterations: ONE
  }
}
, '_keep_checkpoint_max': None, '_task_type': 'worker', '_train_distribute': None, '_is_chief': True, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x135b4f650>, '_model_dir': '/var/folders/35/xkv0vz050bn4_qxdn4dclz700000gn/T/tmpP9UtYs', '_protocol': None, '_save_checkpoints_steps': 300, '_keep_checkpoint_every_n_hours': 1, '_service': None, '_num_ps_replicas': 0, '_tpu_config': TPUConfig(iterations_per_loop=300, num_shards=None, num_cores_per_replica=None, per_host_input_for_training=2, tpu_job_name=None, initial_infeed_sleep_secs=None, input_partition_dims=None, eval_training_input_configuration=2, experimental_host_call_every_n_steps=1), '_tf_random_seed': None, '_save_summary_steps': 300, '_device_fn': None, '_session_creation_timeout_secs': 7200, '_cluster': None, '_experimental_distribute': None, '_num_worker_replicas': 1, '_task_id': 0, '_log_step_count_steps': None, '_experimental_max_worker_delay_secs': None, '_evaluation_master': '', '_eval_distribute': None, '_global_id_in_cluster': 0, '_master': ''}
INFO:tensorflow:_TPUContext: eval_on_tpu False
I1123 20:43:52.209754 4500542912 tpu_context.py:220] _TPUContext: eval_on_tpu False
WARNING:tensorflow:From /Users/klt/code/phd/magenta-master/magenta/models/onsets_frames_transcription/onsets_frames_transcription_transcribe.py:103: make_initializable_iterator (from tensorflow.python.data.ops.dataset_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `for ... in dataset:` to iterate over a dataset. If using `tf.estimator`, return the `Dataset` object directly from your input function. As a last resort, you can use `tf.compat.v1.data.make_initializable_iterator(dataset)`.
W1123 20:43:52.210043 4500542912 deprecation.py:323] From /Users/klt/code/phd/magenta-master/magenta/models/onsets_frames_transcription/onsets_frames_transcription_transcribe.py:103: make_initializable_iterator (from tensorflow.python.data.ops.dataset_ops) is deprecated and will be removed in a future version.
Instructions for updating:
Use `for ... in dataset:` to iterate over a dataset. If using `tf.estimator`, return the `Dataset` object directly from your input function. As a last resort, you can use `tf.compat.v1.data.make_initializable_iterator(dataset)`.
2019-11-23 20:43:52.221619: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-11-23 20:43:52.251399: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x7fb7beeaf4c0 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2019-11-23 20:43:52.251438: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
INFO:tensorflow:Starting transcription for /Users/klt/Desktop/tmp/p.wav...
I1123 20:43:52.303266 4500542912 onsets_frames_transcription_transcribe.py:113] Starting transcription for /Users/klt/Desktop/tmp/p.wav...
INFO:tensorflow:Processing file...
I1123 20:43:52.306233 4500542912 onsets_frames_transcription_transcribe.py:119] Processing file...
INFO:tensorflow:Running inference...
I1123 20:43:54.843364 4500542912 onsets_frames_transcription_transcribe.py:129] Running inference...
INFO:tensorflow:Could not find trained model in model_dir: /var/folders/35/xkv0vz050bn4_qxdn4dclz700000gn/T/tmpP9UtYs, running initialization to predict.
I1123 20:43:54.843811 4500542912 estimator.py:615] Could not find trained model in model_dir: /var/folders/35/xkv0vz050bn4_qxdn4dclz700000gn/T/tmpP9UtYs, running initialization to predict.
WARNING:tensorflow:From /Users/klt/code/phd/magenta-master/venv/lib/python2.7/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling __init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
W1123 20:43:54.848026 4500542912 deprecation.py:506] From /Users/klt/code/phd/magenta-master/venv/lib/python2.7/site-packages/tensorflow_core/python/ops/resource_variable_ops.py:1630: calling __init__ (from tensorflow.python.ops.resource_variable_ops) with constraint is deprecated and will be removed in a future version.
Instructions for updating:
If using Keras pass *_constraint arguments to layers.
Bus error: 10

As far as I can tell the problem happens at

prediction_list = list(
            estimator.predict(
                input_fn,
                checkpoint_path=checkpoint_path,
                yield_single_examples=False))

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:11

github_iconTop GitHub Comments

1reaction
cghawthornecommented, Apr 6, 2020

Sorry for the confusion, the use_cudnn hparam does not apply to the drum model. It was written to be trained on TPUs, so it doesn’t have any cudnn-specific code.

The bus error indicates that TensorFlow is trying to use instructions your CPU doesn’t support. You’ll need to either use a different computer or compile TensorFlow specifically for your machine.

0reactions
eupstoncommented, Apr 6, 2020

I’m getting Bus 10 error as well and when I try to add the hparam above I run into: ValueError: Unknown hyperparameter type for use_cudnn

my arguments are: python onsets_frames_transcription_transcribe.py --model_dir=e-gmd_checkpoint/ --config="drums" --hparams=use_cudnn=false danny_test.wav

tensorflow version is: 1.15.2

any ideas?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can't run Onset Frames Transcription · Issue #1628 - GitHub
I am now running on my Mac, but with Linux Ubuntu 18.04 installed through Parallels. tensorflow.python.framework.errors_impl.
Read more >
Real-time Onset and Frames - Google Groups
I'm working on a project to do onset and frame detection from real-time audio. ... I have the pyaudio code up and running,...
Read more >
Onsets and Frames: Dual-Objective Piano ... - Magenta
Onsets and Frames is our new model for automatic polyphonic piano music transcription. Using this model, we can convert raw recordings of ...
Read more >
Event-Based Piano Transcription With Neural Semi-CRFs
Since piano transcripts include asynchronous events and vanilla semi-CRF is not able to cope with these, the paper assumes that the events are...
Read more >
[P] High-resolution Piano Transcription with Pedals by ... - Reddit
Try onsets and frames: https://magenta.tensorflow.org/onsets-frames ... Doesn't the processing duration scale linearly with audio duration?
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found