def _compute()

in smallpond/dataframe.py [0:0]


    def _compute(self) -> List[DataSet]:
        """
        Compute the data and return the datasets.
        """
        for retry_count in range(3):
            try:
                return ray.get([task.run_on_ray() for task in self._get_or_create_tasks()])
            except ray.exceptions.RuntimeEnvSetupError as e:
                # XXX: Ray may raise this error when a worker is interrupted.
                #      ```
                #      ray.exceptions.RuntimeEnvSetupError: Failed to set up runtime environment.
                #      Failed to create runtime env for job 01000000, status = IOError:
                #      on_read bad version, maybe there are some network problems, will fail the request.
                #      ```
                #      This is a bug of Ray and has been fixed in Ray 2.24: <https://github.com/ray-project/ray/pull/45513>
                #      However, since Ray dropped support for Python 3.8 since 2.11, we can not upgrade Ray.
                #      So we catch this error and retry by ourselves.
                logger.error(f"found ray RuntimeEnvSetupError, retrying...\n{e}")
                time.sleep(10 << retry_count)
        raise RuntimeError("Failed to compute data after 3 retries")