forked from luopingyi/xc_agent_platform_demo
Phase2 dry-run: pending A, probe, build-config client, gated task/add
Still default dry-run; ALLOW_LIVE_SUBMIT=0. Live gates closed.
This commit is contained in:
26
scripts/build_config_dry.py
Normal file
26
scripts/build_config_dry.py
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/usr/bin/env python3
|
||||
"""Generate config only; never creates a task or prints returned YAML/secrets."""
|
||||
import argparse
|
||||
import sys
|
||||
from pathlib import Path
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parents[1]))
|
||||
from src.build_config_client import build_config, BuildConfigError
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument('--gpu-type', default='Sunrise_pt-200-x1')
|
||||
parser.add_argument('--framework', default='vllm')
|
||||
parser.add_argument('--task-type', default='text-generation')
|
||||
args = parser.parse_args()
|
||||
try:
|
||||
yaml = build_config(args.gpu_type, args.framework, args.task_type)
|
||||
except BuildConfigError as error:
|
||||
print(str(error), file=sys.stderr)
|
||||
return 1
|
||||
print(f'configParams_source=build-config; generated YAML characters={len(yaml)}; no task submitted')
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
sys.exit(main())
|
||||
Reference in New Issue
Block a user