Skip to content

Commit

Permalink
[BUG] Fix set_config logic so it can be called after call to set runn…
Browse files Browse the repository at this point in the history
…er (#1709)

Co-authored-by: Jay Chia <[email protected]@users.noreply.github.com>
  • Loading branch information
jaychia and Jay Chia authored Dec 9, 2023
1 parent 9bf06cb commit 7de0bbe
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions daft/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,10 +209,10 @@ def set_config(
fewer partitions. (Defaults to 512MB)
"""
ctx = get_context()
if ctx.disallow_set_runner:
if ctx._runner is not None:
raise RuntimeError(
"Cannot call `set_config` after the runner has already been created. "
"Please call `set_config` before any calls to set the runner and before any dataframe creation or execution."
"Please call `set_config` before any dataframe creation or execution."
)

# Replace values in the DaftConfig with user-specified overrides
Expand Down

0 comments on commit 7de0bbe

Please sign in to comment.