Skip to content

Commit

Permalink
move routing info to avoid circ import
Browse files Browse the repository at this point in the history
  • Loading branch information
Alessandro Sordoni committed Aug 8, 2024
1 parent 8c9a02c commit 77a4ab7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions mttl/models/expert_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
import threading
from typing import List

from mttl.models.modifiers.routing import RoutingInfo


class InfoContainer:
local = threading.local()
Expand Down Expand Up @@ -36,7 +34,7 @@ def routing_gates(self):
return self._routing_gates

@routing_infos.setter
def routing_infos(self, value: RoutingInfo):
def routing_infos(self, value: "RoutingInfo"):
self._routing_infos = value

@routing_gates.setter
Expand All @@ -48,6 +46,7 @@ def wrap_forward(cls, f):
"""
Decorator method that wraps a ``forward()`` function of a model class.
"""
from mttl.models.modifiers.routing import RoutingInfo

@functools.wraps(f)
def wrapper_func(model, *args, **kwargs):
Expand Down

0 comments on commit 77a4ab7

Please sign in to comment.