7e4ef6f98b
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
19 lines
897 B
Python
19 lines
897 B
Python
"""Run upstream SPIDER contact guidance on the prepared L20 task."""
|
|
import os
|
|
from pathlib import Path
|
|
ROOT=Path(__file__).resolve().parents[1]
|
|
os.environ['WARP_CACHE_PATH']=str(ROOT/'.spider_cache/warp')
|
|
os.environ['TORCHINDUCTOR_CACHE_DIR']=str(ROOT/'.spider_cache/torchinductor')
|
|
os.environ.setdefault('MUJOCO_GL','osmesa')
|
|
os.environ.setdefault('OMP_NUM_THREADS','4')
|
|
import sys,json,importlib.util
|
|
sys.path.insert(0,str(ROOT/'third_party/spider'))
|
|
import torch
|
|
torch.set_num_threads(4)
|
|
from spider.config import Config
|
|
spec=importlib.util.spec_from_file_location('spider_original_runner',ROOT/'third_party/spider/examples/run_mjwp.py')
|
|
module=importlib.util.module_from_spec(spec);sys.modules[spec.name]=module;spec.loader.exec_module(module)
|
|
config=Config(**json.loads((ROOT/'output/spider_l20_contact/config.json').read_text()))
|
|
module.main(config)
|
|
print('SPIDER_RUN_COMPLETE',flush=True)
|