Commit graph

6694 commits

Author SHA1 Message Date
Chris Wong
5847582593 Merge branch 'master' of github.com:ray-project/ray into chunkedclienttask 2022-05-10 09:14:16 -07:00
Chris Wong
133b9bc315 fix import 2022-05-10 09:14:04 -07:00
shrekris-anyscale
511d5d027b
[serve] Fix circular imports in api.py's serve.run() and build() functions (#24616)
There are delayed imports in the [`run()`](https://github.com/ray-project/ray/blob/master/python/ray/serve/api.py#L596-L597) and [`build()`](https://github.com/ray-project/ray/blob/master/python/ray/serve/api.py#L672) functions in [`api.py`](https://github.com/ray-project/ray/blob/master/python/ray/serve/api.py). These imports are no longer circular due to recent refactoring (see #23578 and #23759). This change promotes them to top-level imports.
2022-05-10 10:50:43 -05:00
Kai Fricke
d9b54d8bfa
[tune] Limit progress table column length (#24599)
Especially when using datasets, we sometimes run into very long string representations. Tune should make sure to cut these according to a specified maximum length.

Co-authored-by: Antoni Baum <antoni.baum@protonmail.com>
2022-05-10 09:28:47 +02:00
Siyuan (Ryans) Zhuang
bf6b7f4395
[Workflow] Simplify recovery algorithm (#24594)
* simplify recovery algorithm
2022-05-09 22:03:31 -07:00
Kai Yang
4a999777fa
[Core] Allow accepting gRPC HTTP proxy via env variable (#23526) 2022-05-10 11:30:46 +08:00
Chris Wong
a84a680321 Merge branch 'chunkedclienttask' of github.com:ray-project/ray into chunkedclienttask 2022-05-09 16:37:29 -07:00
Chris Wong
91b6950f2b document ClientTask.data format 2022-05-09 16:37:02 -07:00
Siyuan (Ryans) Zhuang
6e17c4a2b7
[core] More tests for setting options for Ray libraries (#24591)
* test

* update
2022-05-09 13:18:43 -07:00
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
Chris Wong
89ab1ce67f Merge branch 'master' of github.com:ray-project/ray into chunkedclienttask 2022-05-09 09:59:08 -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
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
Chris Wong
bfc88f3e51 fix get_actor 2022-05-08 23:12:37 -07:00
Chris Wong
c03eccf151 add cases for actor 2022-05-08 22:52:42 -07:00
Chris Wong
ad75e65638 Merge branch 'master' of github.com:ray-project/ray into chunkedclienttask 2022-05-08 22:46:01 -07:00
Chris Wong
c15593ed70 update test 2022-05-08 22:45:44 -07:00
Chris Wong
55a7598183 add test 2022-05-08 22:43:37 -07:00
Chris Wong
ce5290aba9 add test, fix _should_cache 2022-05-08 22:35:14 -07: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
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
Chris Wong
d84c018211 bump protocol version 2022-05-06 11:59:25 -07:00
Chris Wong
a5dc1a6a34 check 2022-05-06 11:39:32 -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
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
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
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
Simon Mo
a424e91aba
[Serve] Support serializing numpy scaler (#24512) 2022-05-05 10:46:01 -07: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
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
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
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
Simon Mo
21d76c4ca4
[Serve] Add short-hand for pydantic http adapter (#24404) 2022-05-04 09:43:18 -05:00
Antoni Baum
7ea00b282a
[AIR] Allow users to configure verbosity (#24443)
Makes verbosity a configurable parameter in RunConfig.
2022-05-04 15:43:01 +01:00
Kai Fricke
21f8c68c8d
[ci] Try/except pytest makereport (#24462)
kai.fricke@mailbox.org
2022-05-04 14:02:27 +01:00
Alyetama
5f43906b5d
Fix broken documentation URL (#24437)
The link to the documentation to troubleshoot TypeError: Could not serialize the function ... is broken. This PR fixes the link by replacing it with the correct URL.
2022-05-03 21:44:31 -07:00
Simon Mo
dccea240e8
[Serve] Unify Starlette and FastAPI JSON serialization stack (#24417) 2022-05-03 15:17:42 -07:00
Eric Liang
5bdd9e4be5
[minor] Make the max runtime_env size configurable (#24421) 2022-05-03 11:13:04 -07:00
Kai Fricke
4cec228657
[ci] Print pip environment in failed test annotations (#24427)
For better debugging, we should print the installed pip packages in the buildkite annotations. Additionally, shorten the summary message to make the output less cluttered.
2022-05-03 17:47:02 +01:00
Kai Fricke
c339f19b0f
[tune] Always sync down trial after completion (#24389)
As a follow-up from #12590, we should also always sync down after a trial terminated and clean up the trial syncer object after closing.
2022-05-03 15:32:44 +01:00