Fix session path monkeypatch
This commit is contained in:
@@ -100,7 +100,6 @@ class TempPrimaiteSession(PrimaiteSession):
|
|||||||
@pytest.fixture
|
@pytest.fixture
|
||||||
def temp_primaite_session(request, monkeypatch) -> TempPrimaiteSession:
|
def temp_primaite_session(request, monkeypatch) -> TempPrimaiteSession:
|
||||||
"""Create a temporary PrimaiteSession object."""
|
"""Create a temporary PrimaiteSession object."""
|
||||||
with monkeypatch.context() as m:
|
monkeypatch.setattr(PRIMAITE_PATHS, "user_sessions_path", temp_user_sessions_path())
|
||||||
m.setattr(PRIMAITE_PATHS, "user_sessions_path", temp_user_sessions_path())
|
|
||||||
config_path = request.param[0]
|
config_path = request.param[0]
|
||||||
return TempPrimaiteSession.from_config(config_path=config_path)
|
return TempPrimaiteSession.from_config(config_path=config_path)
|
||||||
|
|||||||
@@ -40,6 +40,8 @@ class TestPrimaiteSession:
|
|||||||
with temp_primaite_session as session:
|
with temp_primaite_session as session:
|
||||||
session: TempPrimaiteSession
|
session: TempPrimaiteSession
|
||||||
session.start_session()
|
session.start_session()
|
||||||
|
for i in range(100):
|
||||||
|
print(session.io_manager.generate_session_path())
|
||||||
# TODO: include checks that the model was trained, e.g. that the loss changed and checkpoints were saved?
|
# TODO: include checks that the model was trained, e.g. that the loss changed and checkpoints were saved?
|
||||||
|
|
||||||
@pytest.mark.parametrize("temp_primaite_session", [[EVAL_ONLY_PATH]], indirect=True)
|
@pytest.mark.parametrize("temp_primaite_session", [[EVAL_ONLY_PATH]], indirect=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user