Skip to content

Commit 4a545f1

Browse files
committed
Fix circular import
1 parent 4342e94 commit 4a545f1

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

conf/project.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,19 @@
1313
from enum import Enum
1414
from os import environ as env
1515

16-
from utils import str_to_bool
16+
17+
def str_to_bool(s: str) -> bool:
18+
assert s.lower() in (
19+
"yes",
20+
"true",
21+
"t",
22+
"1",
23+
"no",
24+
"false",
25+
"f",
26+
"0",
27+
), f"Invalid boolean value: {s}"
28+
return s.lower() in ("yes", "true", "t", "1")
1729

1830

1931
class TerminationBehavior(Enum):

utils/__init__.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,6 @@
2222
from conf import project as project_conf
2323

2424

25-
def str_to_bool(s: str) -> bool:
26-
assert s.lower() in (
27-
"yes",
28-
"true",
29-
"t",
30-
"1",
31-
"no",
32-
"false",
33-
"f",
34-
"0",
35-
), f"Invalid boolean value: {s}"
36-
return s.lower() in ("yes", "true", "t", "1")
37-
38-
3925
def seed_everything(seed: int):
4026
torch.manual_seed(seed)
4127
np.random.seed(seed)

0 commit comments

Comments
 (0)