MCPcopy Create free account
hub / github.com/HKUDS/ClawWork / load_task_values

Function load_task_values

scripts/generate_static_data.py:17–33  ·  view source on GitHub ↗

Load task_id -> task_value_usd mapping and full pool metadata.

()

Source from the content-addressed store, hash-verified

15
16
17def load_task_values() -> tuple:
18 """Load task_id -> task_value_usd mapping and full pool metadata."""
19 values = {}
20 pool = {}
21 if not TASK_VALUES_PATH.exists():
22 return values, pool
23 for entry in read_jsonl(TASK_VALUES_PATH):
24 tid = entry.get("task_id")
25 val = entry.get("task_value_usd")
26 if tid and val is not None:
27 values[tid] = val
28 pool[tid] = {
29 "task_value_usd": val,
30 "occupation": entry.get("occupation", "Unknown"),
31 "sector": entry.get("sector", "Unknown"),
32 }
33 return values, pool
34
35
36def read_jsonl(path: Path) -> list:

Callers 1

Calls 1

read_jsonlFunction · 0.70

Tested by

no test coverage detected