Skip to content

Commit

Permalink
Make DistributedConfig only import for type checking to prevent cycli…
Browse files Browse the repository at this point in the history
…c imports
  • Loading branch information
JMGaljaard committed Sep 4, 2022
1 parent 949803b commit 68bf45a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion fltk/nets/util/model.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import annotations
import logging
from collections import OrderedDict
from pathlib import Path
Expand All @@ -6,8 +7,12 @@
import torch
from torch.utils.tensorboard import SummaryWriter

from fltk.util.config import DistributedConfig

from fltk.util.results import EpochData
from typing import TYPE_CHECKING

if TYPE_CHECKING:
from fltk.util.config import DistributedConfig


def flatten_params(model_description: Union[torch.nn.Module, OrderedDict]):
Expand Down

0 comments on commit 68bf45a

Please sign in to comment.