Skip to content

numpy is imported unconditionally #5729

@crusaderky

Description

@crusaderky

We have many unit tests that generate Nannies with spawn method. In theory, those tests should become a lot faster if numpy was imported only if needed.
This is not the case today, because of

  1. two places that import pandas; see blockers:
  2. two import blosc statements in distributed.protocol.compression

xfailed unit test is already in #5695.

Note that this means that fixing this issue means that, across all unit tests that do use numpy data on nannies, import numpy will be moved from @gen_cluster start to the first time where a numpy array or function is deserialised - which in turn may cause flakiness if the test time margins are too tight.

CC @gjoseph92

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions