zefancainlp's picture
download
raw
1.98 kB
"""Create a three-step plan; this module never creates a Tinker client."""
import argparse
import json
from pathlib import Path
import secrets
import shutil
import time
from common import atomic, IMAGE
def setup(root):
control = root / 'control'
if (control / 'plan.json').exists():
raise FileExistsError('Do not replace the experiment plan')
old = Path('/home/sigma/xiaofan/ahc058-private-entry-split-step0-api5-20261105')
(root / '.venv-api').symlink_to((old / '.venv-api').resolve(), target_is_directory=True)
for name in ['api_transport.py', 'local_storage.py']:
shutil.copy2(old / 'code' / name, root / 'code' / name)
assets = root / 'assets'
assets.mkdir()
(assets / 'tokenizer').symlink_to(old / 'assets/tokenizer', target_is_directory=True)
token = secrets.token_hex(32)
(control / 'judge_token.txt').write_text(token)
(control / 'judge_token.txt').chmod(0o600)
plan = dict(task='trimul', method='single_anchor_private', maximum_new_steps=3,
tokenizer=str(assets / 'tokenizer'), step0_sha256=None,
judge_url='http://10.0.0.8:8796', judge_token=token, judge_node='n4-4/datava270000004',
judge_gpus=[6, 7], judge_image=IMAGE, API_actor_on_node='n4-2/datava270000001',
sampling_concurrency=32, launch_authorized=True,
authorization='User authorized these two GPUs and 3 Kernel API update steps',
starting_program='semantics-preserving modularized original Step0',
initial_policy='fresh base LoRA; no old weights/Adam imported')
atomic(control / 'plan.json', plan)
(control / 'plan.json').chmod(0o600)
atomic(control / 'status.json', dict(status='preparing', paid_requests=0, time=time.time()))
print(json.dumps(dict(prepared=True, maximum_new_steps=3, judge_gpus=[6, 7], paid_requests=0)))
if __name__ == '__main__':
p = argparse.ArgumentParser()
p.add_argument('--root', type=Path, required=True)
setup(p.parse_args().root)

Xet Storage Details

Size:
1.98 kB
·
Xet hash:
570858e618a6df66a283ac69f4e99e767c218a3b69601092e425d492f6c8e6ac

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.