Datasets:
Modalities:
Text
Formats:
json
Languages:
English
Size:
< 1K
Tags:
mathematics
formal-verification
symbolic-algebra
theorem-proving
multi-agent-systems
benchmark
Download agents/math_agent from tailot/lingologos-math: direct link, hf CLI and curl.
- Browser
- Download file 1.14 kB
-
https://huggingface.co/datasets/tailot/lingologos-math/resolve/main/agents/math_agent
- Command line
-
hf download hf://datasets/tailot/lingologos-math/agents/math_agent
-
curl -L -o math_agent https://huggingface.co/datasets/tailot/lingologos-math/resolve/main/agents/math_agent
1.14 kB
| #!/usr/bin/env python3 | |
| """Node executable of the math topology. | |
| The orchestrator starts this program once per turn, writes the incoming envelope as JSON on | |
| stdin and reads the outgoing envelope from stdout. The behaviour is selected by --role, which | |
| the topology sets to the node id (formalizer_a, formalizer_b, solver_a, solver_b, verifier, | |
| adversary or arbiter). Extra arguments added by the orchestrator are accepted and ignored. | |
| """ | |
| import argparse | |
| import json | |
| import os | |
| import sys | |
| sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) | |
| from lgmath import agents, faults # noqa: E402 | |
| def main() -> int: | |
| parser = argparse.ArgumentParser(description="Math topology node") | |
| parser.add_argument("--role", required=True, choices=sorted(agents.STEPS)) | |
| parser.add_argument("--node-id", default=None) | |
| args, _ignored = parser.parse_known_args() | |
| faults.from_env() | |
| incoming = json.loads(sys.stdin.read()) | |
| outgoing = agents.run_step(args.role, incoming, args.node_id or args.role) | |
| sys.stdout.write(json.dumps(outgoing)) | |
| return 0 | |
| if __name__ == "__main__": | |
| sys.exit(main()) | |