How to resolve "Version Mismatch Warning: Mismatched version found"

Hello everyone, I’m getting the following warning in dask when I tried to initiate workers via “Client()”:


/opt/conda/lib/python3.9/site-packages/distributed/client.py:1395: VersionMismatchWarning: Mismatched versions found

+---------+--------+-----------+---------+
| Package | Client | Scheduler | Workers |
+---------+--------+-----------+---------+
| pandas  | 2.0.3  | 2.0.3     | None    |
+---------+--------+-----------+---------+
  warnings.warn(version_module.VersionMismatchWarning(msg[0]["warning"]))

My current dask version is 0.3.1. The script I ran is as follows:

from dask_snowflake import read_snowflake
from dask.distributed import wait
import dask
import dask.dataframe as dd
from dask.distributed import Client, LocalCluster

def set_dask_config(): # pragma: no cover
    """ set dask configurations """
    env_variables = {
        'DASK_DISTRIBUTED__WORKER__MEMORY__TARGET': '0.80',
        'DASK_DISTRIBUTED__WORKER__MEMORY__SPILL': '0.85',
        'DASK_DISTRIBUTED__WORKER__MEMORY__PAUSE': '0.95',
        'DASK_DISTRIBUTED__WORKER__MEMORY__TERMINATE': '0.98',
        'DASK_DISTRIBUTED__LOGGING__DISTRIBUTED': "info",
        'DASK_DISTRIBUTED__ADMIN__TICK__LIMIT': "10m",
        'DASK_DISTRIBUTED__SCHEDULER__WORKER_SATURATION': '1.0',
        'DASK_DISTRIBUTED__SCHEDULER__WORK_STEALING': "True",
    }
    dask.config.set({
        'distributed.scheduler.active-memory-manager.start': True,
        'distributed.worker.memory.recent-to-old-time': '120s',
        'distributed.worker.transfer.message-bytes-limit': '250MB',
        'distributed.comm.timeouts.connect': '120s',
        'distributed.comm.timeouts.tcp': '120s',
        'distributed.deploy.lost-worker-timeout': '180s',
        'distributed.scheduler.worker-ttl': "10 minutes",
        'dataframe.shuffle.compression': 'Snappy',
        'temporary_directory': 'shuffle-data'
    })
    next(map(lambda x: os.environ.update({x[0]: x[1]}), env_variables.items()))

Does anyone know how to resolve this warning? Thanks!

Hi @JoyChen, welcome to Dask community!

Are you sure this is the correct version?

I don’t see any code initializing a Client in the code, could you share it?

The warning is strange though, if you use Client() constructor, this should use the same Python environment for Client, Scheduler and Workers.