Evo jax io

From OpenLAIR/OpenSkill · View interactive version

Evo jax io is an AI agent skill from the GitHub repository OpenLAIR/OpenSkill. Handles loading problem.json, reading .npy/.npz input files into JAX arrays, and saving JAX array results back to .npy files with proper numpy conversion.

How to use this skill

Skill file

evo-jax-io

All file I/O for JAX computation tasks: parsing problem.json, loading numpy/npz data files and converting to JAX arrays, and safely serializing JAX arrays to .npy output files.

Quick Start

import sys
sys.path.insert(0, '/app/environment/skills/evo-jax-io/scripts')
from io_utils import load_problem_json, load_input_data, save_jax_array

# Load task definitions
tasks = load_problem_json('/app/problem.json')

# Load input data (.npy returns JAX array, .npz returns dict of JAX arrays)
data = load_input_data('/app/data/x.npy')       # single JAX array
data = load_input_data('/app/data/logistic.npz') # dict of JAX arrays

# Save result
save_jax_array('/app/basic_reduce.npy', result_array)

Key Functions

load_problem_json(path: str) -> list

Load and parse problem.json. Returns list of task dicts with keys: id, description, input, output.

load_input_data(file_path: str) -> JAX array or dict

Load .npy or .npz file. For .npy: returns single JAX array. For .npz: returns dict mapping names to JAX arrays.

save_jax_array(path: str, jax_array) -> None

Safely save JAX array to .npy file using np.asarray() for proper conversion.

Creates output directory if needed. Must be called outside jax.jit boundaries.

Domain Knowledge

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.