How to use the aicsimageio.dask_utils function in aicsimageio

To help you get started, we’ve selected a few aicsimageio examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github AllenCellModeling / aicsimageio / aicsimageio / aics_image.py View on Github external
If not provided an address, create a LocalCluster and Client connection.
        If not provided an address, other Dask kwargs are accepted and passed down to
        the LocalCluster object.
        """
        # Warn of future changes to API
        warnings.warn(
            "In aicsimageio>=4.*, the AICSImage context manager will no longer "
            "construct and manage a distributed local dask cluster for you. If this "
            "functionality is desired for your work, please switch to explictly "
            "calling the `aicsimageio.dask_utils.cluster_and_client` context manager.",
            FutureWarning,
        )

        from . import dask_utils

        self._cluster, self._client = dask_utils.spawn_cluster_and_client(
            **self._dask_kwargs
        )

        return self
github AllenCellModeling / aicsimageio / aicsimageio / aics_image.py View on Github external
If not provided an address, create a LocalCluster and Client connection.
        If not provided an address, other Dask kwargs are accepted and passed down to
        the LocalCluster object.
        """
        # Warn of future changes to API
        warnings.warn(
            "In aicsimageio>=4.*, the AICSImage context manager will no longer "
            f"construct and manage a distributed local dask cluster for you. If this "
            f"functionality is desired for your work, please switch to explictly "
            f"calling the `aicsimageio.dask_utils.cluster_and_client` context manager.",
            FutureWarning,
        )

        from . import dask_utils

        self._cluster, self._client = dask_utils.spawn_cluster_and_client(
            **self._dask_kwargs
        )

        return self
github AllenCellModeling / aicsimageio / aicsimageio / readers / reader.py View on Github external
def __enter__(self):
        """
        If provided an address, create a Dask Client connection.
        If not provided an address, create a LocalCluster and Client connection.
        If not provided an address, other Dask kwargs are accepted and passed down to
        the LocalCluster object.
        """
        from .. import dask_utils

        self._cluster, self._client = dask_utils.spawn_cluster_and_client(
            **self._dask_kwargs
        )

        return self