Skip to content

Commit

Permalink
Fix learn dependency issue (#5201)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexpeters1208 authored and stanbrub committed Feb 28, 2024
1 parent 589eaae commit 4698b9f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions py/server/deephaven/learn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,14 @@ def learn(table: Table = None, model_func: Callable = None, inputs: List[Input]

result = _create_non_conflicting_col_name(table, "__Result")

# calling __computer.clear() in a separate update ensures calculations are complete before computer is cleared
return (table
.update(formulas=[
f"{future_offset} = __computer.compute(k)",
f"{result} = {future_offset}.getFuture().get()",
f"{clean} = __computer.clear()",
f"{result} = {future_offset}.getFuture().get()"
])
.update(formulas=[
f"{clean} = __computer.clear()"
])
.drop_columns(cols=[
f"{future_offset}",
Expand Down

0 comments on commit 4698b9f

Please sign in to comment.