Skip to content

API: lazy_xp_function: rename allow_dask_compute to max_dask_computes and adjust accepted values #415

Description

@ev-br

lazy_xp_function' accepts its allow_dask_compute argument as either bool or int where True is equivalent to a very large integer:

    allow_dask_compute : bool | int, optional
        Whether `func` is allowed to internally materialize the Dask graph, or maximum
        number of times it is allowed to do so. 

This is very much unexpected. First of all, bool | int typing is equivalent to just int. So I'd expect that either False is converted to zero, or an int gets converted to a boolean via bool(allow_dask_compute).

Since the "number of times" is non-negative, I'd very much expect to express "any number of times" as -1 or just negative.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions