Skip to main content

utility functions for https://github.com/ray-project/ray/

Project description

ray-utils

PyPI version

utility functions for https://github.com/ray-project/ray/

Usage

Installation

pip install ray-utils

Documentation

apply_parallel

Apply a function in parallel on elements of an iterable.

Example:

from ray_utils import apply_parallel
apply_parallel(
    group_l=enumerate([1,2,3,4]),
    func_apply=lambda x, val_init: val_init*x,
    func_init=lambda: 3
)

init_in_context

Like ray.init() but automatically calls ray.shutdown() at the end of the "python context".

Example:

from ray_utils import init_in_context
with init_in_context():
    print("bla")

Dev notes

Edit project in github.dev at:

Push python package updates to pypi at:

Python package development tutorial:

pypi page:

pypi badge in this readme:

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ray_utils-0.0.5.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

ray_utils-0.0.5-py3-none-any.whl (4.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page