Skip to content

Commit

Permalink
Ruff fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
klieret committed Jul 26, 2023
1 parent e18ef07 commit 30391c4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/gnn_tracking/utils/lightning.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ def get_model(
freeze: Whether to freeze the model
"""
if not chkpt_path:
return
return None
lm = get_lightning_module(class_path, chkpt_path, freeze=freeze)
if lm is None:
return
return None
return lm.model


Expand Down
2 changes: 1 addition & 1 deletion src/gnn_tracking/utils/timing.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,4 @@ def timing(name="Codeblock", logger=None):
try:
yield
finally:
logger.info(f"{name} took {t():.2f} seconds")
logger.info("%s took %f seconds", name, t())
2 changes: 1 addition & 1 deletion tests/test_tcn_training.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def __post_init__(self):


@pytest.mark.parametrize("t", _test_train_test_cases)
def test_train(tmp_path, built_graphs, t: TestTrainCase) -> None:
def test_train(built_graphs, t: TestTrainCase) -> None:
fix_seeds()
_, graph_builder = built_graphs
g = graph_builder.data_list[0]
Expand Down

0 comments on commit 30391c4

Please sign in to comment.