Commit graph

12412 commits

Author SHA1 Message Date
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
Jiao
ba7cc1803a
[Deployment Graph] Add release test for long chain & wide fanout pattern (#24246) 2022-04-29 17:03:33 -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
mwtian
02fda97c86
[CI] Re-balance concurrency groups to allow more quota for large tests (#24344)
Currently nightly tests are unable to finish in a day because of concurrency group limit on `large` tests. This is an attempt to adjust the limits so buildkite can run / finish more tests. I will observe which tests fall into the `enormous` group and adjust the test resource / concurrency group limits again.
2022-04-29 22:26:16 +01:00
Sven Mika
3052193c9e
[RLlib] Fix CQL getting stuck when deprecated timesteps_per_iteration is used (use min_train_timesteps_per_reporting instead). (#24345)
Fix CQL getting stuck when deprecated timesteps_per_iteration is used (use min_train_timesteps_per_reporting instead).

CQL does not perform sampling timesteps and the deprecated timesteps_per_iteration is automatically translated into the new min_sample_timesteps_per_reporting, but should be translated (only for CQL and other purely offline RL algos) into min_train_timesteps_per_reporting.

If timesteps_per_iteration, CQL lever leaves the first iteration as it thinks it's not done yet (sample timesteps always remain at 0).
2022-04-29 21:02:34 +01: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
Kai Fricke
7a4d58d80f
[rllib] Fix doctest failure (#24343)
Lint was still failing (but only caught with doctest):

```
File "../../python/ray/rllib/utils/numpy.py", line ?, in default

Failed example:

    tree.traverse(make_action_immutable, d, top_down=False)

Exception raised:

    Traceback (most recent call last):

      File "/opt/miniconda/lib/python3.6/doctest.py", line 1330, in __run

        compileflags, 1), test.globs)

      File "<doctest default[4]>", line 1, in <module>

        tree.traverse(make_action_immutable, d, top_down=False)

    NameError: name 'make_action_immutable' is not defined

```
2022-04-29 19:13:24 +01: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
Sven Mika
539832f2c5
[RLlib] SlateQ training iteration function. (#24151) 2022-04-29 18:38:17 +02: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
6282090401
[ci] Fix GPU docker builds (#24336)
NVIDIA Docker builds are currently broken, e.g.: https://buildkite.com/ray-project/ray-builders-branch/builds/7239#e9dea1d6-7dea-4323-801c-b7efe917be03

Following this workaround: https://forums.developer.nvidia.com/t/invalid-public-key-for-cuda-apt-repository/212901/11
to hopefully fix this for now.
2022-04-29 17:10:18 +01: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
Omar Sanseviero
94432d64c9
Fix Ray Serve example (#24276)
The current example in the `README.md` is broken, which is same issue as https://github.com/ray-project/ray/pull/22228. cc @simon-mo
2022-04-29 10:27:26 -05: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
Archit Kulkarni
1b67e6a8ae
[Jobs] [Dashboard] Add job submission id as field to job snapshot (#24303)
Closes https://github.com/ray-project/ray/issues/24300

Adds a field to the job submission snapshot that matches the job name in the existing snapshot.  Before this PR, the job submission name was camelcased because all snapshot keys are automatically camelcased.  This PR allows jobs from the old job field to be linked to ones in the new job submission snapshot.
2022-04-29 10:10:24 -05:00
Kai Fricke
242706922b
[rllib] Fix linting (#24335)
#24262 broke linting. This fixes this.
2022-04-29 15:21:11 +01:00
SangBin Cho
46cd7f1830
Make large multi tests to nightly + remove k8s tests (#24302)
As discussed, to reduce backlog for large tests, we will (1) remove k8s tests (2) make large multi daily tests to nightly tests
2022-04-29 03:40:12 -07:00
Jun Gong
ec636dcb29
[RLlib] Do not print warning message during env pre-checking, if there is nothing wrong with user envs. (#24289) 2022-04-29 10:41:19 +02:00
Xuehai Pan
377a522ce2
[RLlib] Fix time dimension shaping for PyTorch RNN models. (#21735) 2022-04-29 10:39:03 +02:00
Pavel C
de0c6f6132
[RLlib] Fix policy_map always loading all policies from disk due to (not always needed) global_vars update. (#22010) 2022-04-29 10:38:05 +02:00
Ishant Mrinal
0248c60387
[RLlib] Add additional return values to action_sampler_fn. (#22721) 2022-04-29 10:34:48 +02:00
Xuehai Pan
3c3dd5051f
[RLlib] Fix type hints for original_batches in callbacks. (#24214) 2022-04-29 10:33:53 +02:00
Xuehai Pan
9c76e21a5e
[RLlib] Ensure MultiCallbacks always implements all callback methods (#24254) 2022-04-29 10:30:24 +02:00
simonsays1980
ff575eeafc
[RLlib] Make actions sent by RLlib to the env immutable. (#24262) 2022-04-29 10:27:06 +02:00
HJasperson
5f12c62226
[RLlib] Fix "tf variable is unhashable" Error. (#24273) 2022-04-29 10:07:02 +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
Amog Kamsetty
60ded3ef79
[Docker] Start building ray-ml CPU Docker image again (#24266) 2022-04-28 15:29:23 -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
Sven Mika
ba14f0a41b
[RLlib] PGTrainer config object class (PGConfig). (#24295) 2022-04-28 22:25:16 +02:00
Sven Mika
2f5eb96ad9
[RLlib] Make Max and Kourosh RLlib code owners. (#24299) 2022-04-28 22:24:24 +02: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
Yi Cheng
38c15e734f
[scheduler][5.3] Remove upward functionality in ray syncer. (#24284)
Since we have moved loads reporting to other places, upward is not that useful. Remove this one in ray syncer to simplify the API.
2022-04-28 11:29:53 -07:00
Chen Shen
3bc690228c
[GCS][Storage unification 3/n] Deprecate MemoryInternalKV, use StoreClientInternalKV<MemoryStoreClient> instead (#24211)
In this PR, we deprecated MemoryInternalKV. Instead, we use a wrapper that wraps around MemoryStoreClient. This PR is build upon #23754 and #23725
2022-04-28 10:08:19 -07:00