mirror of
https://github.com/azaion/detections.git
synced 2026-04-22 21:46:31 +00:00
6c24d09eab
Made-with: Cursor
16 lines
507 B
Python
16 lines
507 B
Python
def test_ai_config_from_dict_defaults():
|
|
from inference import ai_config_from_dict
|
|
|
|
cfg = ai_config_from_dict({})
|
|
assert cfg.model_batch_size == 8
|
|
assert cfg.frame_period_recognition == 4
|
|
assert cfg.frame_recognition_seconds == 2
|
|
|
|
|
|
def test_ai_config_from_dict_overrides():
|
|
from inference import ai_config_from_dict
|
|
|
|
cfg = ai_config_from_dict({"model_batch_size": 4, "probability_threshold": 0.5})
|
|
assert cfg.model_batch_size == 4
|
|
assert cfg.probability_threshold == 0.5
|