---
name: scitex-repro
description: Reproducibility helpers for scientific Python experiments — unified seeded random-state for `random`/`numpy`/`torch`/`tf`, experiment ID + timestamp generation, and deterministic hashing of numpy arrays. Public API (9 symbols) — random state (`RandomStateManager` — class that fixes seeds across `random`, `numpy.random`, `torch`, `tensorflow`, `os.environ[PYTHONHASHSEED]` in one call; `get(seed=42)` factory returning a configured instance; `reset(seed=None)` rewinds all RNGs), ID/timestamp generation (`gen_ID(n=8)`, `gen_id(n=8)` alias, `gen_timestamp()`, `timestamp()` alias — producing strings suitable for experiment/run directory names), array hashing (`hash_array(arr)` — deterministic hex digest of a numpy array's values for experiment fingerprinting), legacy shim (`fix_seeds(seed=...)` — deprecated wrapper kept for older scripts). No CLI, no MCP tools. Drop-in replacement for hand-rolled "seed all frameworks" functions (`random.seed` + `np.random.seed` + `torch.manual_seed` + `torch.cuda.manual_seed_all` + `tf.random.set_seed` boilerplate), ad-hoc timestamp strings via `datetime.now().strftime(...)` in run dirs, and bespoke `hashlib.sha256(arr.tobytes())` one-liners. Use whenever the user asks to "seed this experiment deterministically", "seed numpy and torch together", "generate an experiment ID for this run", "make an output folder name like 20261023_1530_abc12345", "hash a numpy array for reproducibility", "reset the RNG mid-experiment", or mentions `RandomStateManager`, `gen_ID`, `hash_array`, `scitex.repro`, seed-everything.
user-invocable: false
primary_interface: python
interfaces:
  python: 3
  cli: 0
  mcp: 0
  skills: 2
  hook: 0
  http: 0
---

# scitex-repro

> **Interfaces:** Python ⭐⭐⭐ (primary) · CLI — · MCP — · Skills ⭐⭐ · Hook — · HTTP —

Small utility package that bundles the reproducibility helpers extracted
from the monolithic `scitex.repro` module. Four concerns:

## Installation & import (two equivalent paths)

The same module is reachable via two install paths. Both forms work at
runtime; which one a user has depends on their install choice.

```python
# Standalone — pip install scitex-repro
import scitex_repro
scitex_repro.gen_ID(...)

# Umbrella — pip install scitex
import scitex.repro
scitex.repro.gen_ID(...)
```

`pip install scitex-repro` alone does NOT expose the `scitex` namespace;
`import scitex.repro` raises `ModuleNotFoundError`. To use the
`scitex.repro` form, also `pip install scitex`.

See [../../general/02_interface-python-api.md] for the ecosystem-wide
rule and empirical verification table.

1. Random state — `RandomStateManager`, `get`, `reset`
2. ID / timestamp generation — `gen_ID`, `gen_id`, `gen_timestamp`, `timestamp`
3. Array hashing — `hash_array`
4. Legacy `fix_seeds` shim (deprecated)

## Sub-skills

- [01_quick-start.md](01_quick-start.md) — install, import, one snippet per area
- [02_python-api.md](02_python-api.md) — full public symbol table with signatures

No CLI, no MCP tools.
