Spaces:
Paused
Paused
Download tests/test_nextgen/conftest.py from whassan/SensorflowStudio: direct link, hf CLI and curl.
- Browser
- Download file 921 Bytes
-
https://huggingface.co/spaces/whassan/SensorflowStudio/resolve/main/tests/test_nextgen/conftest.py
- Command line
-
hf download hf://spaces/whassan/SensorflowStudio/tests/test_nextgen/conftest.py
-
curl -L -o conftest.py https://huggingface.co/spaces/whassan/SensorflowStudio/resolve/main/tests/test_nextgen/conftest.py
921 Bytes
| """Shared fixtures: isolated runs/nextgen root + reusable scenario bundles.""" | |
| from __future__ import annotations | |
| import pytest | |
| from sensorflow.nextgen import store | |
| from sensorflow.nextgen.cache import reset_feature_cache | |
| from sensorflow.nextgen.models import TransformationStep | |
| def nextgen_env(tmp_path): | |
| store.set_nextgen_root(str(tmp_path / "nextgen")) | |
| reset_feature_cache() | |
| yield | |
| store.set_nextgen_root("runs/nextgen") | |
| reset_feature_cache() | |
| def emergence_bundle(): | |
| from sensorflow.nextgen import counterfactual as cf | |
| recipe = [TransformationStep(kind="actors.occluded_emergence", | |
| params={"t_emerge_s": 1.8})] | |
| scenario = cf.generate_counterfactuals(recipe, seed=3, n_scenarios=1, | |
| frames_per_sequence=50)[0] | |
| return cf.load_bundle(scenario.scenario_id) | |