Commit graph

6741 commits

Author SHA1 Message Date
xwjiang2010
3c9e704e83
[tuner] Integrate with serialize_lineage. (#24229)
Also add back the test to tune dataset.
2022-05-02 23:01:49 +01:00
SangBin Cho
2bce07d4ce
[State API] List runtime env API (#24126)
This PR supports list runtime env API
2022-05-02 14:01:00 -07:00
Sihan Wang
59debac670
[Serve] Move deployment clean up under serve.run() api (#24306)
On the ServeHead level, it is talking to serve api and controller to do deployment and clean up now. With this pr, it hides the  deployment clean up logic into server.run() for code cleanness and easy to refactor in the future.
2022-05-02 12:10:11 -05:00
Dmitri Gekhtman
2aee537f92
[kuberay] Add a test of the Ray Job Submission API to the KubeRay e2e tests. (#24319)
This PR modifies the KubeRay e2e autoscaling test so that one of its scaling commands is sent via the Ray Job Submission API.

This validates that the Ray Job Submission API works with KubeRay and, in particular, that the Ray Dashboard is correctly exposed.
2022-05-02 10:04:16 -07:00
Sven Mika
d4a906e177
Issue 24143: Some f-strings missing f. (#24383) 2022-05-02 17:12:38 +02:00
Adrish Dey
d02b4cb2d6
Adding support to wandb service (#24017)
Updating W&B Ray Tune Integration with new standards. Adding support to wandb service, the soon to be default way for multiprocessing + wandb run logging.

Co-authored-by: Kai Fricke <krfricke@users.noreply.github.com>
2022-05-02 15:47:08 +01:00
Edward Oakes
11954e6798
Issue 24143: Fix a few f-strings missing the f. (#24232) 2022-05-02 16:11:33 +02:00
Chong-Li
f3767131cb
[Enable gcs actor scheduler 1/n] Raylet and GCS schedulers share cluster_task_manager (#23829) 2022-05-02 21:45:23 +08:00
SangBin Cho
6f192b6e17
[Metrics] Allow to completely disable metrics collection (#24333)
This PR allows for Ray to disable metrics collection. It was possible with RAY_enable_metrics_collection, but it didn't fully disable collection because there was a metrics collection happening from agent that wasn't properly disabled. This PR also adds tests.
2022-05-02 05:33:03 -07:00
Eric Liang
38a46b71de
Add a hook that runs at the beginning of ray start (#24368) 2022-05-01 11:32:33 -07:00
Chris K. W
29ecffe805
[client] set log level to debug for actor errors (#24308)
Users get error messages from client/server on actor failures, even if they already try-except'd the error. For example:

```
import ray
ray.init("ray://localhost:10001")
try:
   ray.get_actor("doesnotexist")
except ValueError:
   pass
```

Will still generate the log `Caught schedule exception` and `Exception from actor creation is ignored in destructor. To receive this exception in application code, call a method on the actor reference before its destructor is run.`. Reduce the level of these logs to debug by default.
2022-04-30 21:30:54 -07:00
Philipp Moritz
27917f570d
[runtime_env] Extend runtime_env hook to also cover jobs (#24328)
This extends https://github.com/ray-project/ray/pull/24036 to also cover job submission.

Co-authored-by: Eric Liang <ekhliang@gmail.com>
2022-04-30 09:15:51 -07:00
Jiajun Yao
cfc192ebc4
Collect library usage (#24312)
Collect which libraries are used for usage stats purpose.
2022-04-30 07:51:01 -07:00
Antoni Baum
87eaf55d82
[tune] Fix checkpoint manager with nan checkpoints (#24349)
Fixes checkpoints not being recorded in Tune's checkpoint manager if the first checkpoint has None value. This also deflakes `test_checkpoint_manager.py::CheckpointManagerTest`.
2022-04-30 09:23:57 +01:00
Clark Zinzow
f72555262a
[Datasets] Provide more efficient + intuitive block clearing semantics for different execution modes (#24127)
**TL;DR:** Don't clear for eager, clear all but non-lazy input blocks if lazy, clear everything if pipelining.
 
This PR provides more efficient and intuitive block clearing semantics for eager mode, lazy mode, and pipelining, while still supporting multiple operations applied to the same base dataset, i.e. fan-out. For example, two different map operations are applied to the same base `ds` in this example:

```python
ds = ray.data.range(10).map(lambda x: x+1)
ds1 = ds.map(lambda x: 2*x)
ds2 = ds.map(lambda x: 3*x)
```

If naively clear the blocks when executing the map to produce `ds1`, the map producing `ds2` will fail.

### Desired Semantics

- **Eager mode** - don’t clear input blocks, thereby supporting fan-out from cached data at any point in the stage chain without triggering unexpected recomputation.
- **Lazy mode** - if lazy datasource, clear the input blocks for every stage, relying on recomputing via stage lineage if fan-out occurs; if non-lazy datasource, do not clear source blocks for execution plan when executing first stage, but do clear input blocks for every subsequent stage.
- **Pipelines** - Same as lazy mode, although the only fan-out that can occur is from the pipeline source blocks when repeating a dataset/pipeline, so unintended intermediate recomputation will never happen.
2022-04-29 18:12:48 -07:00
Jonathan Giannuzzi
9f88031d4f
Fix bogus warning about excess queuing for async actors (#22386)
#17581 introduced a warning about excess queuing for actors. Unfortunately since Ray 1.10.0, the metric used became wrong for async actors, resulting in bogus warnings when they are called more than 5000 times, even though there are not 5000 pending tasks.

The difference between 1.9.2 and 1.10.0 is that async actors tasks skip the queue in CoreWorkerClient::PushActorTask. However CoreWorkerClient::ClientProcessedUpToSeqno uses max_finished_seq_no_ which is never updated when the queue is skipped.

I think that a better metric for the amount of tasks that are pending submissions is the size of the internal queue CoreWorkerDirectActorTaskSubmitter::inflight_task_callbacks.
2022-04-29 17:19:43 -07:00
Simon Mo
3378e1924e
[Serve] Rename input_schema to http_adapter and clarify it in doc (#24353) 2022-04-29 16:14:04 -07:00
Antoni Baum
ff0ced1a64
[AIR] HuggingFaceTrainer&Predictor implementation (#23876)
Implements HuggingFaceTrainer & HuggingFacePredictor.
2022-04-29 14:31:54 -07:00
Kai Fricke
ac036e4fe8
[ci/release] Print local environment information (#24346)
For debugging client environments, it is helpful to print the installed pip packages.
Additionally, a fix for the environment of the ml_user_tune_rllib_connect_test is added. Additionally, anyscale import errors are reported verbosely to help debug missing packages.
2022-04-29 21:01:50 +01:00
Patrick Ames
f337f04084
[Datasets] Add bulk Parquet file reader API (#23179)
Adds a reader suitable for quickly reading a large number (e.g. 1-100K+) of Parquet files into a Ray Dataset from either local disk or cloud storage.
2022-04-29 12:47:41 -07:00
Balaji Veeramani
2190f7ff25
[Datsets] Add SimpleTensorFlowDatasource (#24022)
This PR makes it easier to use TensorFlow datasets with Ray Datasets.
2022-04-29 12:15:30 -07:00
Chen Shen
f375200acd
[Datasets] Fix prefetching with actor-based prefetcher. (#23952)
The prefetch_blocks implementation doesn't work as expected. Due to ray.wait() doesn't given us fine grained control, today we block waiting any of the block returns. As I read the code, it may or may not actually fetching all the blocks.

A better way to ensure prefetching not blocking is to use ray remote function call, which is not blocking and ensures the blocks are fetched eventually.
2022-04-29 11:50:00 -07:00
Siyuan (Ryans) Zhuang
3c3b5390d6
[workflow] Use internal storage (#24120)
* use internal storage

* rename

* fix examples

* try fixing storage

* fix storage

* reuse upstream test utils

* break down tests

* down size the array to avoid timeout
2022-04-29 10:11:07 -07:00
Shawn
43ed78f6fd
[Datasets] Integrate Mars-on-Ray with Datasets; improve docs and add tests (#23402)
Add Mars-on-Ray + Datasets integration; improve Mars-on-Ray docs and add tests.
2022-04-29 09:43:52 -07:00
Patrick Ames
4691d2d339
[Datasets] Add fast file metadata provider and refactor Parquet datasource (#24094)
Adds a fast file metadata provider that trades comprehensive file metadata collection for speed of metadata collection, and which also disabled directory path expansion which can be very slow on some cloud storage service providers. This PR also refactors the Parquet datasource to be able to take advantage of both these changes and the content-type agnostic partitioning support from #23624.

This is the second PR of a series originally proposed in #23179.
2022-04-29 09:39:13 -07:00
Antoni Baum
825a8b92c5
[AIR] Add Categorizer preprocessor (#24180)
Adds a Categorizer preprocessor to automatically set the Categorical dtype on a dataset. This is useful for eg. LightGBM, which has build-in support for features with that dtype.

Depends on #24144.
2022-04-29 09:37:18 -07:00
Guillaume Desforges
02ca3c34d2
[Datasets] Fix #24296 by limiting parallelism in FileBasedDatasource (#24298)
This prevents a MemoryError when a high value is provided to parallelism to ensure exactly one ReadTask is created per file.
2022-04-29 09:30:12 -07:00
Kai Fricke
dd87e61808
[ci/release] Fix module import errors in release tests (#24334)
After https://github.com/ray-project/ray/pull/24066, some release tests are running into:

```
ModuleNotFoundError: No module named 'ray.train.impl'
```

This PR simply adds a `__init__.py` file to resolve this.

We also add a 5 wecond delay for client runners in release test to give clusters a bit of slack to come up (and avoid ray client connection errors)
2022-04-29 17:03:17 +01:00
shrekris-anyscale
caba3d44fd
[serve] Add test_update_num_replicas_anonymous_namespace (#24313)
#24311 added the `test_update_num_replicas_anonymous_namespace` unit test to check for replica leaks in anonymous namespaces. This change adds this test to the master branch.
2022-04-29 10:14:17 -05:00
Xuehai Pan
9c76e21a5e
[RLlib] Ensure MultiCallbacks always implements all callback methods (#24254) 2022-04-29 10:30:24 +02:00
ZhuSenlin
2c0f9d7e8f
improve redis connection backoff (#24168) 2022-04-29 14:36:13 +08:00
Jiajun Yao
8fdde12e9e
Delay 1 minutes for the first usage stats report (#24291)
Delay the first report for 1 minutes so the system is probably set up and we can get the information to report.
2022-04-28 22:53:33 -07:00
Clark Zinzow
14f2729b3a
[Datasets] Rename _experimental_lazy() --> experimental_lazy(). (#24321)
The experimental_ prefix should suffice, we shouldn't also need to make it a private method.
2022-04-28 19:40:03 -07:00
Clark Zinzow
0825078a20
[Datasets] Revert Spark-on-Ray test revert (#24317)
A bad merge/stale CI resulted in a fixture renaming not propagating to all uses. This PR reverts the recent revert, and fixes the test.
2022-04-28 18:22:15 -07:00
Clark Zinzow
15d66a8dd7
Revert "[Datasets] Re-enable raydp test & Support to_spark while using ray client (#22852)" (#24316)
This reverts commit 024eafb5f4.
2022-04-28 16:40:44 -07:00
Siyuan (Ryans) Zhuang
b0f00a1872
[Core] Ensure "get_if_exists" takes effect in the decorator. (#24287) 2022-04-28 16:38:18 -07:00
Kai Fricke
561e169625
[air/tune] Remove postprocess_checkpoint (#24297)
The postprocess checkpoint method was introduced to be able to add data to function runner checkpoint directories before they are uploaded to external (cloud) storage. Instead, we should just use the existing separation of `save_checkpoint()` and `save()`.
2022-04-28 15:33:48 -07:00
Stephanie Wang
a5a11f6d11
[Datasets] Implement push-based shuffle (#24281)
The simple shuffle currently implemented in Datasets does not reliably scale past 1000+ partitions due to metadata and I/O overhead.

This PR adds an experimental shuffle implementation for a "push-based shuffle", as described in this paper draft. This algorithm should see better performance at larger data scales. The algorithm works by merging intermediate map outputs at the reducer side while other map tasks are executing. Then, a final reduce task merges these merged outputs.

Currently, the PR exposes this option through the DatasetContext. It can also be set through a hidden OS environment variable (RAY_DATASET_PUSH_BASED_SHUFFLE). Once we have more comprehensive benchmarks, we can better document this option and allow the algorithm to be chosen at run time.

Redo for #23758 to fix CI.
2022-04-28 14:58:23 -07:00
Jiajun Yao
bdb3b27d45
Fix autoscaler for node affinity scheduling strategy (#24250)
For tasks with node affinity scheduling strategy, the resource demands shouldn't create new nodes. This PR achieves this by not reporting demand to autoscaler. In the future, we will explore sending scheduling strategy information to autoscaler.
2022-04-28 14:57:17 -07:00
Linsong Chu
5c06e3f149
[DAG] add basic plotting on Ray DAGs (#24223)
To add basic plotting feature for Ray DAGs. 

`ray.experimental.dag.plot(dag: DAGNode, to_file=None)`

### Behavior
1. dump the dag plot (Dot) to file.
2. also render the image whenever possible. E.g. if running in Jupyter notebook, the image will not only be saved, but also rendered in the notebook.
3. when to_file is not set (i.e. None), it will be saved to a tempfile for rendering purpose only.  This is common when users plot DAGs in notebook env to explore the DAG structure without wanting to save it to a file.
2022-04-28 13:56:25 -07:00
Antoni Baum
e62d3fac74
[AIR] Refactor _get_unique_value_indices (#24144)
Refactors _get_unique_value_indices (used in Encoder preprocessors) for much improved performance with multiple columns. Also uses the same, more robust intermediary dataset format in _get_most_frequent_values (Imputers).

The existing unit tests pass, and no functionality has been changed.
2022-04-28 13:39:04 -07:00
Zhi Lin
024eafb5f4
[Datasets] Re-enable raydp test & Support to_spark while using ray client (#22852)
RayDP has updated their code and tests can be re-enabled now.

In addition, we want to support ray client in raydp dataset operation. Right now, if users want to do dataset.to_spark(spark) while using ray client, it will immediately fail because the local ray worker is not connected. By wrapping it in a function decorated with @client_mode_wrap, It works well no matter ray client is used or not.
2022-04-28 12:20:58 -07:00
Balaji Veeramani
2fdea6e24f
[Datasets] Add SimpleTorchDatasource (#23926)
It's difficult to use torchvision datasets with Ray ML. This PR makes it easier to use Torch datasets with Ray Data.
2022-04-28 11:56:45 -07:00
Clark Zinzow
2f4cb1256f
[Datasets] Clean up lineage serialization support for fan-in operations. (#24190)
Lineage-based serialization isn't supported for fan-in operations such as unions and zips. This PR adds documentation indicating as much, and ensures that a good error message is raised.
2022-04-28 09:45:37 -07:00
Clark Zinzow
d7c4a2477b
[Datasets] Pipeline task dependency prefetching with actor compute via customizable max tasks in flight per worker. (#24194)
When using the actor compute model for batch mapping (e.g. in batch inference), map tasks are often blocked waiting for their dependencies to be fetched since we submit one actor task at a time. This commit changes the default behavior of the actor compute model to have up to two actor tasks in flight for each actor in order to better pipeline task dependency fetching with the actual compute.

This "max tasks in flight per actor worker" is also made configurable, in case a particular use case warrants more aggressive pipelining (e.g. big blocks and/or fast maps) or more conservative pipelining (e.g. small data or slow maps).
2022-04-28 09:42:30 -07:00
xwjiang2010
576addf9ca
[tune] hyperopt searcher to support tune.choice([[1,2],[3,4]]). (#24181)
Have Hyperopt Searcher to support tune.choice([1,2],[3,4]) type search space.
2022-04-28 09:37:13 +01:00
Amog Kamsetty
629424f489
[AIR/Train] Make Dataset ingest configurable (#24066)
Refactors Dataset splitting to make it less hacky and address the TODO. Also makes Dataset ingest in general configurable for Ray Train. This is an internal only change for now, but will set the stage for the proposed ingest API

Customizable ingest for GBDT Trainers is out of scope for this PR.
2022-04-27 21:41:44 -07:00
Jiajun Yao
abba263f4e
Revert "[Datasets] Implement push-based shuffle (#23758)" (#24279)
This reverts commit c1054a0baa.
2022-04-27 18:36:59 -07:00
Dmitri Gekhtman
d68c1ecaf9
[kuberay] Test Ray client and update autoscaler image (#24195)
This PR adds KubeRay e2e testing for Ray client and updates the suggested autoscaler image to one running the merge commit of PR #23883 .
2022-04-27 18:02:12 -07:00
Archit Kulkarni
cc864401fb
[Dashboard] Add environment variable flag to skip dashboard log processing (#24263) 2022-04-27 15:33:08 -07:00