Datasets:
Formats:
json
Languages:
English
Size:
< 1K
Tags:
artificial-intelligence
recursive-self-improvement
continual-learning
representation-learning
world-models
cognitive-architecture
Download src/axiomesh/cli.py from PureOne/FNE-AXIOMESH: direct link, hf CLI and curl.
- Browser
- Download file 1.31 kB
-
https://huggingface.co/datasets/PureOne/FNE-AXIOMESH/resolve/main/src/axiomesh/cli.py
- Command line
-
hf download hf://datasets/PureOne/FNE-AXIOMESH/src/axiomesh/cli.py
-
curl -L -o cli.py https://huggingface.co/datasets/PureOne/FNE-AXIOMESH/resolve/main/src/axiomesh/cli.py
1.31 kB
| """Fresh-process regenerative execution of a frozen quotient program.""" | |
| from __future__ import annotations | |
| import argparse | |
| import json | |
| from pathlib import Path | |
| import sys | |
| from .core import Capsule, FrozenModel | |
| def main() -> int: | |
| parser = argparse.ArgumentParser(description=__doc__) | |
| parser.add_argument("capsule", type=Path, help="JSON containing frozen program and surviving coded seed") | |
| parser.add_argument("--word", default="", help="comma-separated chronological action names") | |
| args = parser.parse_args() | |
| try: | |
| obj = json.loads(args.capsule.read_text(encoding="utf8")) | |
| status, seed = Capsule.from_json(obj["memory"]).recover() | |
| if status != "exact": | |
| print(json.dumps({"status": status, "output": None})) | |
| return 2 | |
| model = FrozenModel.from_json(obj["program"], seed=seed) | |
| word = tuple(a for a in args.word.split(",") if a) | |
| print(json.dumps({"status": "exact", "output": model.run(word).tolist(), | |
| "rank": len(seed), "source_state_present": False})) | |
| return 0 | |
| except (ValueError, KeyError, OSError, TypeError) as exc: | |
| print(json.dumps({"status": "error", "detail": str(exc)}), file=sys.stderr) | |
| return 1 | |
| if __name__ == '__main__': | |
| raise SystemExit(main()) | |