drop dead LLM pass-2 interface, refresh stale docs, add public-release plan
estimate_physics was abstract on LLMProvider and implemented by every provider, but pass 2 has been estimator-only for a while -- nothing called it. Removed it along with PHYSICS_ESTIMATION_PROMPT, format_metrics_for_prompt and parse_metric_json. STATUS.md and the original IMPLEMENTATION_PLAN.md described a project that no longer exists; replaced with a phased plan for making the repo and a hosted demo safe and presentable. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -2,26 +2,7 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from physcom.llm.parsing import parse_metric_json, parse_verdict
|
||||
from physcom.models.domain import MetricBound
|
||||
|
||||
|
||||
def _bounds():
|
||||
return [
|
||||
MetricBound("power_density", weight=0.5, norm_min=1, norm_max=2000, unit="W/kg"),
|
||||
MetricBound("safety", weight=0.5, norm_min=0.0, norm_max=1.0, unit="0-1"),
|
||||
]
|
||||
|
||||
|
||||
def test_parse_metric_json_strips_fences():
|
||||
text = '```json\n{"power_density": 500.0, "safety": 0.7}\n```'
|
||||
result = parse_metric_json(text, _bounds())
|
||||
assert result == {"power_density": 500.0, "safety": 0.7}
|
||||
|
||||
|
||||
def test_parse_metric_json_falls_back_to_range_midpoint_on_invalid():
|
||||
result = parse_metric_json("not json", _bounds())
|
||||
assert result == {"power_density": 1000.5, "safety": 0.5}
|
||||
from physcom.llm.parsing import parse_verdict
|
||||
|
||||
|
||||
def test_parse_verdict_plausible():
|
||||
|
||||
@@ -43,10 +43,7 @@ def test_pass4_with_mock_llm(seeded_repo):
|
||||
domain = seeded_repo.get_domain("urban_commuting")
|
||||
resolver = ConstraintResolver()
|
||||
scorer = Scorer(domain)
|
||||
mock_llm = MockLLMProvider(default_estimates={
|
||||
"power_density": 500.0, "cost_efficiency": 5e-4, "safety": 0.6,
|
||||
"availability": 0.7, "range_fuel": 200000.0,
|
||||
})
|
||||
mock_llm = MockLLMProvider()
|
||||
pipeline = Pipeline(seeded_repo, resolver, scorer, llm=mock_llm)
|
||||
|
||||
result = pipeline.run(
|
||||
|
||||
Reference in New Issue
Block a user