Skip to content

Commit 99883e8

Browse files
committed
Move public API imports next to __all__
1 parent 7db0945 commit 99883e8

1 file changed

Lines changed: 31 additions & 32 deletions

File tree

krum/tools/__init__.py

Lines changed: 31 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -54,37 +54,6 @@
5454
from pathlib import Path
5555
from typing import Any, Callable, TextIO
5656

57-
from .jobs import Command, Jobs, dict_to_cmdlist
58-
from .misc import (
59-
ClassRegister,
60-
MethodCallReplicator,
61-
TimedContext,
62-
UnavailableException,
63-
deltatime_format,
64-
deltatime_point,
65-
fatal_unavailable,
66-
fullqual,
67-
get_loaded_dependencies,
68-
interactive,
69-
line_maximize,
70-
localtime,
71-
onetime,
72-
pairwise,
73-
parse_keyval,
74-
)
75-
from .pytorch import (
76-
AccumulatedTimedContext,
77-
WeightedMSELoss,
78-
compute_avg_dev_max,
79-
flatten,
80-
grad_of,
81-
grads_of,
82-
pnm,
83-
regression,
84-
relink,
85-
weighted_mse_loss,
86-
)
87-
8857
# ---------------------------------------------------------------------------- #
8958
# User exception base class, print string representation and exit(1) on uncaught
9059

@@ -510,7 +479,37 @@ def import_directory(
510479
traceback.print_exc()
511480

512481

513-
# Public API of the tools package
482+
from .jobs import Command, Jobs, dict_to_cmdlist
483+
from .misc import (
484+
ClassRegister,
485+
MethodCallReplicator,
486+
TimedContext,
487+
UnavailableException,
488+
deltatime_format,
489+
deltatime_point,
490+
fatal_unavailable,
491+
fullqual,
492+
get_loaded_dependencies,
493+
interactive,
494+
line_maximize,
495+
localtime,
496+
onetime,
497+
pairwise,
498+
parse_keyval,
499+
)
500+
from .pytorch import (
501+
AccumulatedTimedContext,
502+
WeightedMSELoss,
503+
compute_avg_dev_max,
504+
flatten,
505+
grad_of,
506+
grads_of,
507+
pnm,
508+
regression,
509+
relink,
510+
weighted_mse_loss,
511+
)
512+
514513
__all__ = [
515514
# Logging & context
516515
"Context",

0 commit comments

Comments
 (0)