My submission failed because of AssertionError:

I did my first submission using demucs but it failed and all it says is AssertionError:

This is the log that was on gitlab https://gitlab.aicrowd.com/kimberley_jensen/music-demixing-challenge-starter-kit/snippets/38587/raw

This is what the log says incase you cant read it

===========================
Partial run on init: None
All music names on init: ['SS_008', 'SS_018', 'SS_AM_Contra']
Partial run on init: None
All music names on init: ['SS_008', 'SS_018', 'SS_AM_Contra']
Partial run on init: None
All music names on init: ['SS_008', 'SS_AM_Contra', 'SS_018']
Partial run on init: None
All music names on init: ['SS_008', 'SS_AM_Contra', 'SS_018']
Partial run on init: None
All music names on init: ['SS_AM_Contra', 'SS_018', 'SS_008']
Overriding time out for SS_008 to 167 seconds
Traceback (most recent call last):
  File "/home/aicrowd/evaluator/music_demixing.py", line 141, in run
    self.evaluation()
  File "/home/aicrowd/evaluator/music_demixing.py", line 127, in evaluation
    vocals_file_path=self.get_music_file_location(music_name, "vocals"),
  File "/home/aicrowd/test_demucs.py", line 63, in prediction
    assert sr == self.separator.samplerate
AssertionError

Traceback (most recent call last):
  File "predict.py", line 25, in <module>
    submission.run()
  File "/home/aicrowd/evaluator/music_demixing.py", line 96, in run
    self.run()
  File "/home/aicrowd/evaluator/music_demixing.py", line 149, in run
    raise e
  File "/home/aicrowd/evaluator/music_demixing.py", line 141, in run
    self.evaluation()
  File "/home/aicrowd/evaluator/music_demixing.py", line 127, in evaluation
    vocals_file_path=self.get_music_file_location(music_name, "vocals"),
  File "/home/aicrowd/test_demucs.py", line 63, in prediction
    assert sr == self.separator.samplerate
AssertionError

and a picture

Please can someone help me

Hi @kimberley_jensen,

It is happening because of the assert statement here:

Your trained separator’s sample rate is different from the file you are trying to demix.

The mixture file’s rate is 44100 Hz.

You can either train your model to be with sample rate or resample the mixture file on the go. (it might take few seconds of your valuable per song timeout)

An example snippet for it can be found here:

1 Like

Thank you !! I just got my first submission graded

2 Likes