INNER CODE UNIT · Python
shard
yihong1120/Construction-Hazard-Detection · main.py:552
shard = sorted_configs[start: start + cameras_per_engine]
source_urls = [str(cfg['video_url']) for cfg in shard]
camera_ids = [
f"{cfg['site']}|{cfg['stream_name']}" for cfg in shard
]
for source_url in source_urls:
slots[source_url] = worker_index
signature_shards.append(
{
'model_key': model_key,
'cameras_per_engine': cameras_per_engine,
'sources': source_urls,
'cameras': camera_ids,
},
)
worker_index += 1
signature = json.dumps(