/
githubmirror
/
Made-With-ML
Обзор
Документация
Войти
/
githubmirror
/
Made-With-ML
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
tests/model/conftest.py
20 строк
529 B
GokuMohandas
updated to Ray 2.7
19 сен 2023, 08:03
19 сен 2023, 08:03
b98bd5b
Код
Авторство
О чём код?
import pytest from madewithml import predict from madewithml.predict import TorchPredictor def pytest_addoption(parser): parser.addoption("--run-id", action="store", default=None, help="Run ID of model to use.") @pytest.fixture(scope="module") def run_id(request): return request.config.getoption("--run-id") @pytest.fixture(scope="module") def predictor(run_id): best_checkpoint = predict.get_best_checkpoint(run_id=run_id) predictor = TorchPredictor.from_checkpoint(best_checkpoint) return predictor