Grader Timeout Bug? (Week3, Trigger word detection)

Hey there,

i somehow struggle with the autograder for the assignment of week 3 (trigger word detection). In short, the unit test “insert_audio_clip_test” seems to get stuck. Upon execution, it remains busy until i restart the kernel. I can skip the unit test, of course, which allows me to continue working on the assignment. My code passes all following unit tests, but when i submit my work, the auto-grader times out. I assume this is because of the fauly (?) unit test i was referring to. Has anyone encountered this before?

Thanks and best,
Tom

I’m not aware of any faults in the unit tests.

Did you happen to add any print() statements to your notebook for debugging? If they output a lot of data, this can bog down the grader and make it time out.

That should not be happening. I don’t know of any issues in that unit test. Maybe there is an issue (like an infinite loop?) in your code.

thanks for your reply. i use a while-loop when applying the is_overlapping function, but considering the comment just above where i have to insert my code (“(…) keep picking new segment_time at random until it doesn’t overlap”), that seems to be okay.

when i print the segments, what i get is that previous_segment is [0, 9999] - but isn’t the randomly picked segment always lying within [0, 9999], i.e., does always overlap?

thanks again for your help!

edit: adding some clunky workaround, i can now pass the unit test (using more than 2 lines as indicated by the comment in the respective cell). now my code passes all unit tests in the notebook, but the grader still times out.

Yes, there is a while-loop in the insert_audio_clip() function.

But it should run at most five iterations, because of the decrementing retry counter.

Did you perhaps delete some of the template code?

1 Like

Thank you. It seems i’ve indeed deleted parts of the code - i use google colab to work on the code, as it’s easier to debug there and in the tranfer, sth went wrong. anyway, i started from scratch again and now everything is working fine. thanks so much for your help and have a nice weekend!