Jax problem runner

From XuShuwenn/RedAct · View interactive version

Jax problem runner is an AI agent skill from the GitHub repository XuShuwenn/RedAct. Read problem.json, load .npy/.npz inputs, perform JAX computations (reductions, elementwise maps, gradients, scans, and JIT models), verify shapes, and save outputs.

How to use this skill

Skill file

JAX Problem Runner

A reusable workflow for executing small JAX computations described by a JSON task list. Covers typical patterns: reductions, elementwise maps, logistic gradients, recurrent scans, and simple JIT-compiled MLPs. Includes robust data loading from .npy/.npz, shape validation, numerically stable formulas, and reliable saving.

When to Use

Use this skill when you are given a list of tasks in a JSON file (e.g., problem.json) that specify:

This skill applies to small JAX exercises or pipelines where data inspection, shape checks, and correct JAX idioms (grad, lax.scan, jit) are required.

Core Workflow

  1. Inspect tasks
  1. Load inputs safely
  1. Convert to JAX arrays
  1. Task patterns (common examples)
  1. Save outputs reliably

Verification

Perform these checks for each task before saving:

If reference outputs are available, compare with np.allclose using a small tolerance.

Common Pitfalls

Optional Script Usage

This skill provides a generic runner script that supports common task IDs and safe key resolution.

Example:

The script will:

You can extend the handler map for new task IDs following the same validation and saving conventions.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.