Skip to content

Commit

Permalink
update config docs, code cov
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt711 committed Jan 15, 2025
1 parent 93dba86 commit c4f03e9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions py-polars/docs/source/reference/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Config options
Config.set_ascii_tables
Config.set_auto_structify
Config.set_decimal_separator
Config.set_default_engine
Config.set_float_precision
Config.set_fmt_float
Config.set_fmt_str_lengths
Expand Down
2 changes: 1 addition & 1 deletion py-polars/polars/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1456,7 +1456,7 @@ def set_expr_depth_warning(cls, limit: int) -> type[Config]:
@classmethod
def set_default_engine(cls, engine: Literal["cpu", "gpu"] | None) -> type[Config]:
"""
Set the default engine to use the GPU.
Set which engine to use by default.
Parameters
----------
Expand Down
4 changes: 2 additions & 2 deletions py-polars/polars/lazyframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2004,8 +2004,8 @@ def collect(
if not (is_config_obj or engine in ("cpu", "gpu")):
msg = f"Invalid engine argument {engine=}"
raise ValueError(msg)
if get_default_engine() == "gpu":
is_gpu = True
if get_default_engine() == "gpu": # pragma: no cover
is_gpu = True # pragma: no cover
if (streaming or background or new_streaming) and is_gpu:
issue_warning(
"GPU engine does not support streaming or background collection, "
Expand Down

0 comments on commit c4f03e9

Please sign in to comment.