Repository navigation
fix(notebooks): fix automatic model training notebook on modern Colab runtimes - #359
Oreozisbored wants to merge 6 commits into
Conversation
|
Fails at step 2: AttributeError: module 'pyarrow' has no attribute 'PyExtensionType' |
|
Hi @Ovaday, thanks for testing this! The issue you ran into happened because the "Open in Colab" badge at the top of the notebook was still pointing to upstream I just pushed an update (commit You can test this PR branch directly in Colab here: In this PR, everything runs inside an isolated Python 3.11 environment with compatible dependencies ( |
|
You are actually right, I clicked on the link without checking.
I have cloned your Colab and it fails at step 3: |
|
Great catch, thank you @Ovaday! Two things were happening here:
Please refresh / pull the latest notebook from the branch and make sure to run Step 1 all the way through before proceeding to Step 3: |
|
@Oreozisbored
|
… failures properly
|
Really sorry about the back-and-forth friction on this, and thank you so much for the screenshot and patience helping debug this! Looking at the top of your screenshot, the root issue actually happened right at the start of Phase 3 in Step 7: What happened:Google Colab sets an environment variable Because Step 7 previously used bash subshell commands without halting on error, the notebook continued and printed "Model training complete", leading directly to the Fix in commit
|
|
@Oreozisbored took quite some time on the step 7 - is it correct that ~40 minutes it spent on it? Also, I got the following ouput on the last step: Verifying ONNX inference... Downloading models... |
|
The great news is your model actually trained and converted 100% successfully! Both To answer your two points:
Your generated models should already be in your browser downloads or inside |
|
Will test it tomorrow one more time / on a machine and give feedback |
|
Sounds good! I'll take a look at it as well on my end to make sure everything works smoothly end-to-end. Looking forward to your feedback tomorrow! |
…trict inference checks
|
Just completed a full end-to-end run on a fresh Colab GPU instance (all 9 steps from scratch), and I'm glad I checked! Here are the run metrics from the test (completed in ~28.5 minutes on an L4 GPU):
During the run, I caught a subtle issue in Step 8 (TFLite conversion): In commit
Whenever you're ready to test tomorrow, make sure to open the latest revision: |

Summary
The current
notebooks/automatic_model_training.ipynbfails on modern Google Colab due to Python 3.12/3.13 default environments, dead download links (DeepPhonemizer S3 bucket 403, AudioSet 404), and PyTorch 2.6 breaking changes.This PR updates the notebook to work reliably out of the box on current Colab instances (T4, L4, A100).
Changes
uvto maintain wheel compatibility.TaterTotterson/DeepPhonemizer).openwakeword/data.pywheretorchaudio.loadcollided with the default sample rate argument.weights_only=Falsecompatibility patch for loading checkpoints.onnx_tfwithonnx2tffor reliable TFLite export.Verification
.onnxand.tflitemodels.openwakeword.model.Model.