AI Blocks

Putting the blocks together

This is taking longer than expected.

Try againBrowse the library
AI Blocks · All skills by job · Minds · Mini tools · How it works · From a source · Apps

AI Blocks › Test and fix code

Model math debugger

Give it the PyTensor code that errors or runs slow. Get it fixed, with checks that the numbers still match.

Model math debugger is a free AI skill for the job "Test and fix code". Give the instructions to an AI assistant that supports the required files and tools, then review its output.

Free · No account · MIT licence · Made by PyMC Labs · Level: expert · Thinking: high

Made by PyMC Labs. See the original on GitHub; we copied it as it is, with its licence.

What it does

Your PyTensor code fixed, with proof that the numbers still come out the same. Errors with shapes, slow compile times and wrong gradients get traced to their cause, not patched over. The skill first writes down what each input should look like: its shape, type and which axis is which. It picks the simplest built-in operation instead of a custom one. Then it builds an independent reference, a plain number check or a formula, and compares values, shapes and gradients against it. Separate guides cover shapes, numerics, random draws, compilation and profiling, and custom operations. It works in your existing Python setup.

You give it

You get

Use it when

How to use it

  1. Add it to your AI once: download it and add the folder to Claude, ChatGPT or Codex as a skill.
  2. Ask for the job in your own words. Your AI opens the skill when it fits.
  3. It works best when your AI can run Python code.

More for Test and fix code

Every test and fix code skill