Download astra/CoverPattern-v1/policy_runner.py from Linslab/ManiLadder_Models: direct link, hf CLI and curl.
- Browser
- Download file 795 Bytes
-
https://huggingface.co/Linslab/ManiLadder_Models/resolve/main/astra/CoverPattern-v1/policy_runner.py
- Command line
-
hf download hf://Linslab/ManiLadder_Models/astra/CoverPattern-v1/policy_runner.py
-
curl -L -o policy_runner.py https://huggingface.co/Linslab/ManiLadder_Models/resolve/main/astra/CoverPattern-v1/policy_runner.py
795 Bytes
| """Frozen-program entry point; no development agent and no reset capability.""" | |
| import importlib.util | |
| import sys | |
| sys.path.insert(0,'/artifact') | |
| sys.path.insert(0,'/') | |
| from worker_api import API | |
| def main(): | |
| spec=importlib.util.spec_from_file_location('controller','/artifact/controller.py') | |
| module=importlib.util.module_from_spec(spec) | |
| spec.loader.exec_module(module) | |
| module.reset_episode() | |
| api=API() | |
| result=api.latest_observation() | |
| while not (result['terminated'] or result['truncated'] or result['horizon_reached']): | |
| obs=dict(result['observation'],step_id=result['step_id']) | |
| action=module.act(obs) | |
| if action is None:break | |
| response=api.execute_actions([action]) | |
| result=response['steps'][-1] | |
| if __name__=='__main__':main() | |