Skip to content

Commit db22a10

Browse files
committed
remove overloads...unnecessary?
1 parent e43c0dc commit db22a10

1 file changed

Lines changed: 2 additions & 28 deletions

File tree

tierkreis/tierkreis/builder.py

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -277,23 +277,11 @@ def task[Out: TModel](self, func: Function[Out]) -> Out:
277277
OutModel = func.out() # noqa: N806
278278
return init_tmodel(OutModel, lambda p: (idx, p))
279279

280-
@overload
281-
def eval[A: TModel, B: TModel](
282-
self,
283-
body: TypedGraphRef[A, B],
284-
eval_inputs: A,
285-
) -> B: ...
286-
@overload
287280
def eval[A: TModel, B: TModel](
288281
self,
289-
body: GraphBuilder[A, B],
282+
body: GraphBuilder[A, B] | TypedGraphRef[A, B],
290283
eval_inputs: A,
291-
) -> B: ...
292-
def eval[A: TModel, B: TModel](
293-
self,
294-
body: GraphBuilder[A, B] | TypedGraphRef,
295-
eval_inputs: Any,
296-
) -> Any:
284+
) -> B:
297285
"""Add a evaluation node to the graph.
298286
299287
This will evaluate a nested graph with the given inputs.
@@ -312,20 +300,6 @@ def eval[A: TModel, B: TModel](
312300
idx, _ = self.data.eval(body.graph_ref, dict_from_tmodel(eval_inputs))("dummy")
313301
return init_tmodel(body.outputs_type, lambda p: (idx, p))
314302

315-
@overload
316-
def loop[A: TModel, B: LoopOutput](
317-
self,
318-
body: TypedGraphRef[A, B],
319-
loop_inputs: A,
320-
name: str | None = None,
321-
) -> B: ...
322-
@overload
323-
def loop[A: TModel, B: LoopOutput](
324-
self,
325-
body: GraphBuilder[A, B],
326-
loop_inputs: A,
327-
name: str | None = None,
328-
) -> B: ...
329303
def loop[A: TModel, B: LoopOutput](
330304
self,
331305
body: TypedGraphRef[A, B] | GraphBuilder[A, B],

0 commit comments

Comments
 (0)