Commit graph

12462 commits

Author SHA1 Message Date
Matti Picus
ffb67203e9
debug call_ray_start failure (#24252)
Exploring #24251. The call to the `call_ray_start` fixture seems to be timing out in `test_ray_init`.
2022-05-09 13:28:28 -05:00
Simon Mo
07986349c6
[Serve] Run health check in separate thread (#24560) 2022-05-09 09:59:37 -07:00
Kai Fricke
76da2255d9
[air/rllib] Add RL serving example (#24215)
This PR includes the changes from #24172

This PR adds an end-to-end training and serving example for the RLTrainer/RLPredictor. It also adds an `RLServeEnv` that can be used as an external env for rllib inference, querying the served policy from the RLPredictor.

This draft PR runs end to end, but I'd like to gather some initial feedback before promoting it to a full PR.
2022-05-09 16:44:49 +02:00
Artur Niederfahrenhorst
8d906f9bf8
[RLlib] SAC with new Replay Buffer API. (#24156) 2022-05-09 14:33:02 +02:00
Artur Niederfahrenhorst
bd2fdf4752
[RLlib] Automate sequences in timeslice_along_seq_lens_with_overlap(). (#24561) 2022-05-09 11:55:06 +02:00
Artur Niederfahrenhorst
bc8742792c
[Tune] Logging of bad results dict keys (#23954)
[User complains](https://discuss.ray.io/t/which-attributes-can-be-used-in-checkpoint-score-attr-when-using-tune-run/5826) about logging on failure of locating `checkpoint_score_attr ` in results dict not being informative.
I propose that we log the actual results dict keys and extended stopping criteria, which imho should not log the whole result dict as this might contain tensors.

Maybe there are other similar cases in tune library, in which I don't know my way around that good.
2022-05-09 11:54:11 +02:00
Steven Morad
b76273357b
[RLlib] APEX-DQN replay buffer config validation fix. (#24588) 2022-05-09 09:59:04 +02:00
Dmitri Gekhtman
e3db45eb86
[hotfix][kuberay][docs] Match up Ray versions in example config (#24580)
This PR fixes a typo in the KubeRay example config in Ray's docs.

Specifics:
Ray versions in the Ray repo's example KubeRay CR were recently updated from 1.11.0 to 1.12.0.
However, the worker group's Ray version was accidentally left at 1.11.0. This leads to alarming crash-looping when deploying the example in the docs.

This PR matches up the Ray images by setting the worker group to rayproject/ray:1.12.0.
2022-05-08 16:01:34 -07:00
Linsong Chu
5964a58d84
[Workflow] Enable auto-config for persistent storage when connecting to existing cluster (#24490)
* fix init() requires hardcoded storage path when connecting to existing cluster

* update tests with new init(storage) behavior

* update tests with latest api behavior
2022-05-08 15:42:29 -07:00
Jiajun Yao
d462172be7
Add doc for actor spread scheduling (#24552)
grant_or_reject for raylet based actor scheduling is implemented as part of #23829, so spread scheduling now works for actors just like tasks.
2022-05-06 21:36:47 -07:00
Jian Xiao
78cab9f0f1
Test the CSV read with column types specified (#24398)
Make sure users can read csv with columns types specified.
Users may want to do this because sometimes PyArrow's type inference doesn't work as intended, in which case users can step in and work around the type inference.
2022-05-06 21:29:11 -07:00
Qing Wang
ea6c2d634b
[Java] Shade jackson to avoid conflict. (#24535)
Jackson is a widely-used utility. User from Ant reports the jackson class is conflicted between Ray jar and user's jar.
This PR shade the jackson in Ray jar to avoid the conflict.

Co-authored-by: Kai Yang <kfstorm@outlook.com>
2022-05-07 10:44:31 +08:00
mwtian
918d3601c6
[Datasets] mark nightly test dataset_shuffle_sort_1tb_small_instances stable (#24481) 2022-05-06 15:55:59 -07:00
Simon Mo
95c11c97ef
[Serve] Ensure SimpleSchemaIngress uses FastAPI custom serializers (#24549) 2022-05-06 14:17:36 -07:00
Antoni Baum
668049492c
[Datasets] Add from_huggingface for Hugging Face datasets integration (#24464)
Adds a from_huggingface method to Datasets, which allows the conversion of a Hugging Face Dataset to a Ray Dataset. As a Hugging Face Dataset is backed by an Arrow table, the conversion is trivial.
2022-05-06 13:09:28 -07:00
Siyuan (Ryans) Zhuang
84ccab2d5f
[workflow] Defining and updating workflow options (#24498)
* implement "options" for workflow

* update tests
2022-05-06 13:08:22 -07:00
Charles Greer
189f7a469b
change docs for ray.remote num_gpus (#24551)
The documentation says that @ray.remote can take fractional num_gpus which is true, but the documentation lists it as an integer. I think this is strictly a problem in the docs.
2022-05-06 11:04:11 -07:00
kourosh hakhamaneshi
69055f556d
[RLlib] Move agents.ars to algorithms.ars. (#24516) 2022-05-06 19:11:15 +02:00
Kai Fricke
5d9bf4234a
[air] Example to track runs with Weights & Biases (#24459)
This PR 
- adds an example on how to run Ray Train and log results to weights & biases
- adds functionality to the W&B plugin to store checkpoints
- fixes a bug introduced in #24017
- Adds a CI utility script to setup credentials
- Adds a CI utility script to remove test state from external services cc @simon-mo
2022-05-06 15:52:37 +01:00
Daewoo Lee
fee35444ab
[RLlib] Issue 24530: Fix add_time_dimension (#24531)
Co-authored-by: Daewoo Lee <dwlee@rtst.co.kr>
2022-05-06 15:21:42 +02:00
kourosh hakhamaneshi
f48f1b252c
[RLlib] Moved agents.es to algorithms.es (#24511) 2022-05-06 14:54:22 +02:00
Antoni Baum
c5e1851ab9
[Tune] Improve JupyterNotebookReporter (#24444)
Improves Tune Jupyter notebook experience by modifying the `JupyterNotebookReporter` in two ways:
* Previously, the `overwrite` flag controlled whether the entire cell would be overwritten with the updated table. This caused all the other logs to be cleared. Now, we use IPython display handle functionality to create a table at the top of the cell and update only that, preserving the rest of the output. The `overwrite` flag now controls whether the cell output *prior* to the initialization of `JupyterNotebookReporter` is overwritten or not.
* The Ray Client detection was not working unless the user specifically passed a `JupyterNotebookReporter` as the `progress_reporter`. Now, the default value allows for correct detection of the enviroment while running Ray Client.

Furthermore, the progress reporter detection logic in `rllib/train.py` has been replaced to make use of the `detect_reporter` function for consistency with Tune (the sign in the overwrite condition was similarly flipped).
2022-05-06 11:52:47 +01:00
Sven Mika
7ab19ddc32
[RLlib] MADDPG: Move into agents folder (from contrib) and use training_iteration method. (#24502) 2022-05-06 12:35:21 +02:00
Sven Mika
f54557073e
[RLlib] Remove execution_plan API code no longer needed. (#24501) 2022-05-06 12:29:53 +02:00
Sven Mika
f891a2b6f1
[RLlib] SlateQ + tf; release test fixes, related to TD-error not properly being formatted. (#24521) 2022-05-06 08:50:30 +02:00
Siyuan (Ryans) Zhuang
417b72efdc
[workflow] Update workflow docs (#24249)
* update workflow docs

* rename "step" to "task"
2022-05-05 22:22:51 -07:00
Chris K. W
5a7c5ab79c
[client] fix OOM caused by debug log (#24477)
When this line tries to format the task into the string, it also attempts to format all of the serialized arguments passed to the task, which can be memory intensive, even if the debug log never gets displayed. Switch to only logging the task name, type and payload_id.

Repro script if you want to see how big a difference commenting out the debug log makes (takes up about 8GiB swap on my machine):
```
import ray
import numpy as np
import logging
ray.init("ray://localhost:10001")

@ray.remote
def run_ray_remote(np_array):
    return np_array.shape

a = np.random.random((1024, 1024, 128))  # approx 1GiB
b = run_ray_remote.remote(a) 
c = ray.get(b)
print(c)

```
2022-05-05 16:37:39 -07:00
Stephanie Wang
2931a23760
[doc] Add docs for push-based shuffle in Datasets (#24486)
Adds recommendations, example, and brief benchmark results for push-based shuffle in Datasets.
2022-05-05 14:59:33 -07:00
Kai Fricke
d6096df742
[release] Add utility script to fetch release logs (#24508)
This PR adds a utility script to automatically fetch release test results from the Buildkite pipeline for a release branch. This was previously a manual process.
2022-05-05 19:32:34 +01:00
mwtian
68c4023c20
[Core] fix inaccurate Raylet log message for aborting object creation (#24450)
Found many log messages about Not enough memory to create requested object ... when running shuffle tests, even when object store memory is far from full.

It seems when ObjectBufferPool::AbortCreate() is called, Raylet logs Not enough memory to create requested object .... However, ObjectBufferPool::AbortCreate() is called under 3 different codepaths:

    ObjectManager::ReceiveObjectChunk()
    PullManager::UpdatePullsBasedOnAvailableMemory() -> cancel_pull_request_
    PullManager::CancelPull() -> cancel_pull_request_

Only codepath (2) is due to having not enough object store memory. So the logging in ObjectBufferPool::AbortCreate() is moved to the callsites instead, which have more context of the situation and can log with more accurate messages.

Also change codepath (3) to be DEBUG, because it is an expected behavior and can be quite spammy when running shuffle / sort workload.
2022-05-05 10:59:10 -07:00
Simon Mo
a424e91aba
[Serve] Support serializing numpy scaler (#24512) 2022-05-05 10:46:01 -07:00
Sven Mika
70d3bfcf9c
[RLlib] Provide more time for APPO Pong release and performance tests. (#24503) 2022-05-05 18:19:38 +02:00
Kai Fricke
e1eec5507a
[ci/release] Fix ray version from init test (#24510)
This release package unit test fails on release branches. Instead of checking for a hard-coded version number, we should just require the value to be non-empty.

See e.g. https://buildkite.com/ray-project/ray-builders-pr/builds/31295#b6c6c952-ce34-4521-9342-429e92560dd3
2022-05-05 16:05:23 +01:00
Avnish Narayan
f2bb6f6806
[RLlib] Impala training iteration fn (#23454) 2022-05-05 16:11:08 +02:00
Christy Bergman
76eb47e226
[RLlib; docs] Rename UCB -> LinUCB. (#24348) 2022-05-05 10:20:16 +02:00
Artur Niederfahrenhorst
86bc9ecce2
[RLlib] DDPG Training iteration fn & Replay Buffer API (#24212) 2022-05-05 09:41:38 +02:00
Siyuan (Ryans) Zhuang
b3c93b91b0
[Serve] Reuse existing validation functions for Ray Serve config & bug fix (#24265)
* set default cpus in ray_actor_options

* remove unnecessary tests

* update message
2022-05-04 23:17:44 -07:00
Siyuan (Ryans) Zhuang
7a48d708d5
[core] Update metadata in options properly (#24458)
* implement proper updating of metadata in options
2022-05-04 23:11:36 -07:00
ZhuSenlin
83dd3b6cfc
remove TABLE_PREFIX_MAX from TablePrefix (#24331) 2022-05-05 14:08:35 +08:00
SangBin Cho
295b4436b3
[Nightly tests] Increase wait for nodes timeout (#24457)
Although there's enough quota, it is possible the AWS doesn't have enough capacity to start up new nodes. According to @allenyin55, the current wait for node timeout is too short. This PR increases the timeout to 3000 seconds (50 minutes) from 600 seconds. Let's see if this can resolve the issue. If it makes things worse, I will revert it quickly (I will closely monitor the infra failure rate)
2022-05-04 19:42:21 -07:00
Frank Luan
af1684af51
[Storage] Fix spill/restore error when using Arrow S3FS (#24196) 2022-05-04 19:06:36 -07:00
mwtian
b02029b29f
[Core] allow using grpcio > 1.44.0 (#23722) 2022-05-04 19:06:11 -07:00
SangBin Cho
168790c276
[Test] Add grace period to long running actor test failure (#24469)
Add 30 seconds grace period before raising an exception from this test failure (https://console.anyscale.com/o/anyscale-internal/projects/prj_2xR6uT6t7jJuu1aCwWMsle/clusters/ses_1FL4g3cMg1wYifWf52tAaWtJ?command-history-section=command_history). What I'd like to see is some sort of error messages are propagated to the driver if this is due to some unexpected issues.

Note that this PR also adds more detailed exit information to all worker failures, but this is still WIP #24468
2022-05-04 16:00:22 -07:00
Kai Fricke
b05531177c
[tune/ci] Fix GRPC resource exhausted test for tune trainables (#24467)
#24421 increased the default maximum GRPC limit to 250MB, which broke a Tune test that catches too large training functions.

This PR fixes this test by increasing the size of the experiment. However, please note that this leads to an inconsistency: For training functions of size 100 < fn < 250, an error will be raised only at runtime when trying to start the actor:

```
ValueError: The actor ImplicitFunc is too large (125 MiB > FUNCTION_SIZE_ERROR_THRESHOLD=95 MiB). Check that its definition is not implicitly capturing a large array or other object in scope. Tip: use ray.put() to put large objects in the Ray object store.
```

But it will successfully pass the registration stage `self._run_identifier = Experiment.register_if_needed(run)`.

cc @ericl should we set the default limit back to 100 MB (or maybe set the FUNCTION_SIZE_ERROR_THRESHOLD to 250 or whatever the GRPC limit is?)
2022-05-04 18:32:13 +01:00
Jiajun Yao
6bd65ceb1c
Fix flaky test_locality_aware_leasing_borrowed_objects (#24452)
The test is flaky because we schedule g task without waiting for f task to complete (because f_obj is embedded inside a list) so we may not have the locality information for f_obj from owner during g task scheduling.

Related issue number

Closes #23964
2022-05-04 10:12:31 -07:00
mwtian
e00c611807
[Core] rename PinObjectIDs to PinObjectID (#24451)
As discussed in #24322, rename so the function name matches its signature for PinObjectID(). Also rename the RPC request/reply/method names, to keep them consistent.
2022-05-04 10:08:32 -07:00
Archit Kulkarni
b79b8340f0
Don't redefine runtime_env in actor, to skip bug (#24448)
test_usage_stats was very flaky due to a runtime env setup error.

The test defined the runtime env {pip: "ray[serve]"} simultaneously in ray.init() and also in ray.remote() for the actor. This is redundant but should be supported by runtime_env, but it turns out it reveals a bug in runtime_env. The env appears to be installed twice concurrently in this situation, causing flakiness.

I'll make a followup issue for the runtime env bug with more details and a simpler repro, and link it here. Until then, we should merge this PR to deflake CI. This PR only defines the runtime_env in ray.init(), and removes the redefinition in ray.remote(). The actor will still inherit the correct runtime environment.

I tested manually by inspecting dashboard_agent.log locally. The virtualenv install commands were duplicated about 75% of the time before this PR, indicating the concurrent install. But with this change, the commands were never duplicated in the 7-8 times that I ran it. So this PR should deflake the test.
2022-05-04 09:51:53 -07:00
Yi Cheng
09f1cf26dc
[core] Share channel with GcsClient. (#24409)
According to https://grpc.io/docs/guides/performance/ we should: Always re-use stubs and channels when possible.

This PR share channels between different services.
2022-05-04 09:45:47 -07:00
Sihan Wang
3f5da8af7a
[Serve] Add serve handle graph workload nightly tests (#24435) 2022-05-04 09:07:50 -07:00
Simon Mo
21d76c4ca4
[Serve] Add short-hand for pydantic http adapter (#24404) 2022-05-04 09:43:18 -05:00