29 lines
1.2 KiB
Python
29 lines
1.2 KiB
Python
#!/usr/bin/env python3
|
|
"""Planning arithmetic only: no model loading, hardware emulation or speed claims."""
|
|
import argparse
|
|
import json
|
|
import math
|
|
from pathlib import Path
|
|
|
|
|
|
def main():
|
|
parser = argparse.ArgumentParser(description=__doc__)
|
|
parser.add_argument('--checkpoint-gib', type=float, default=123.568)
|
|
args = parser.parse_args()
|
|
if not math.isfinite(args.checkpoint_gib) or args.checkpoint_gib <= 0:
|
|
parser.error('--checkpoint-gib must be finite and positive')
|
|
cfg = json.loads((Path(__file__).resolve().parents[1] / 'configs/target.json').read_text())
|
|
combined = cfg['inference_vram_budget_gib'] + cfg['process_tree_and_page_cache_budget_gib']
|
|
print(json.dumps({
|
|
'status': 'planning_arithmetic_only',
|
|
'checkpoint_gib': args.checkpoint_gib,
|
|
'combined_runtime_budget_gib': combined,
|
|
'optimistic_nonresident_checkpoint_gib': round(max(0, args.checkpoint_gib - combined), 3),
|
|
'warning': 'Budgets include runtime overhead. File size is not runtime size. No loadability or speed prediction.',
|
|
'hardware_test_executed': False
|
|
}, ensure_ascii=False, indent=2))
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|