Commit graph

13367 commits

Author SHA1 Message Date
SangBin Cho
93853e8f76 Finished. 2022-07-14 08:54:58 -07:00
SangBin Cho
8d22f55c9f Merge branch 'master' into fix-layout 2022-07-14 07:05:23 -07:00
Ricky Xu
c54916bc0f
[Core | State Observability] Add feedback prompt for dogfooding alpha (#26450)
Embed console print to gather dogfooding feedback. 

With CLIs: 
```
(dev) ➜  ray git:(ricky/obs-feedback) ray list --help
Usage: ray list [OPTIONS] {actors|jobs|placement-
                groups|nodes|workers|tasks|objects|runtime-envs}

      List RESOURCE used by Ray.

      RESOURCE is the name of the possible resources from `StateResource`,
      i.e. 'jobs', 'actors', 'nodes', ...



  ==========ALPHA PREVIEW, FEEDBACK NEEDED ===============

  State Observability APIs is currently in Alpha-Preview.

  If you have any feedback, you could do so at either way as below:

    1. Comment on API specification: https://tinyurl.com/api-spec

    2. Report bugs/issues with details: https://forms.gle/gh77mwjEskjhN8G46

    3. Follow up in #proj-state-obs-dogfooding slack channel.

  ==========================================================
```


With running SDK python api:
```
In [3]: from ray.experimental.state.api import list_nodes
In [6]: list_nodes()
2022-07-11 19:45:18,973 INFO api.py:69 -- 
==========ALPHA PREVIEW, FEEDBACK NEEDED ===============
State Observability APIs is currently in Alpha-Preview. 
If you have any feedback, you could do so at either way as below:
  1. Comment on API specification: https://tinyurl.com/api-spec
  2. Report bugs/issues with details: https://forms.gle/gh77mwjEskjhN8G46
  3. Follow up in #proj-state-obs-dogfooding slack channel.
==========================================================
Out[6]: 
[{'node_name': '172.31.47.143',
  'node_ip': '172.31.47.143',
  'resources_total': {'CPU': 8.0,
   'object_store_memory': 9149783654.0,
   'memory': 18299567310.0,
   'node:172.31.47.143': 1.0},
  'node_id': '513a3ca212403d234f6dfbe1f7523052637a06e0ee9e4502144f2da3',
  'state': 'ALIVE'}]

```
2022-07-14 06:45:07 -07:00
SangBin Cho
e9f6ffc5a5
[Core][State Observability] Use address arg + print warning if API responds slowly (#26008)
This PR is doing 2 things.

(1) Use api_server_url to address which is consistent to other submission APIs.
(2) When the API is not responded timely, it prints a warning every 5 seconds. Below is an example. This is useful when the API is slowly responded (e.g., when there are partial failures). Without this users will see hanging API for 30 seconds, which is a pretty bad UX.

(0.12 / 10 seconds) Waiting for the response from the API server address http://127.0.0.1:8265/api/v0/delay/5.
2022-07-14 06:44:07 -07:00
Antoni Baum
8f74e1f3ae
[AIR] Use cls in from_checkpoint (#26534)
Uses `cls` in `from_checkpoint` classmethods for better subclass development experience.
2022-07-14 00:15:48 -07:00
Cheng Su
f852ec82bf
[Datasets] Fix Parquet in-memory file size estimation (#26516) 2022-07-13 23:32:13 -07:00
Eric Liang
5f18c67ba3
Fix LINT (#26554)
Signed-off-by: Eric Liang <ekhliang@gmail.com>
2022-07-13 23:28:02 -07:00
Eric Liang
f2401a14d9
[air] Explicitly list out the args for BatchPredictor.predict_pipelined (#26551)
Signed-off-by: Eric Liang <ekhliang@gmail.com>
2022-07-13 22:30:32 -07:00
Jiao
15dbc0362a
[AIR][Docs] Fix torch_image_example (#26453) 2022-07-13 21:59:24 -07:00
Scott Cheng
1bc44c13fb
Update Python3.10 in docs (#26463)
Make it clear to users that ray supports Python 3.10
2022-07-13 20:08:56 -07:00
Eric Liang
31c8c908f9
[docs] Improve AIR API ref organization (#26530) 2022-07-13 18:05:17 -07:00
Kai Fricke
cd95569b01
[tune/release] Add up/down scaling release test (#25392)
This adds a nightly release test that asserts that autoscaling a cluster up and down in a Ray Tune run works.

Signed-off-by: Kai Fricke <kai@anyscale.com>
2022-07-13 22:57:24 +01:00
Stephanie Wang
6ef26cd8ff
[core] Cancel pending dependency resolution before failing a task (#26267)
Actor tasks are sometimes failed while their dependencies are still being resolved. This can cause hanging or crashes when we resolve the dependencies for a task that has already been canceled. It can lead to a crash from the ref counter when, for the same actor, actor task 1 depends on actor task 2. The sequence is:

    Actor tasks 1 and 2 queued, 1 depends on 2.
    Fail actor task 1. We clear its refs, including its dependency on 2.
    Fail actor task 2. We store an error as its return value. Since task 1 depends on it, we inline the dependency and try to clear task 1's refs again, causing a ref counting error because we already cleared them in step 2.

This PR fixes the issue by canceling dependency resolution for tasks before failing them. This involves some refactoring of the LocalDependencyResolver. Most of the changes are for testing (split out the unit tests for LocalDependencyResolver into their own suite).
Related issue number

Closes #18908.
2022-07-13 14:39:11 -07:00
Sihan Wang
b606169cb5
[Serve] Promote autoscaling feature (#26393)
1. get rid of the private attribute
2. fix unit test
3. docs and workflows
2022-07-13 14:38:38 -05:00
Sven Mika
ab10890e90
Revert "Bump pytest from 5.4.3 to 7.0.1" (breaks lots of RLlib tests for unknown reasons) (#26517) 2022-07-13 11:19:30 -07:00
Antoni Baum
cc7115f6a2
[Tune/CI] Fix tune-sklearn notebook example (#26470)
Fixes the tune-sklearn notebook example as found in #26410

Signed-off-by: Antoni Baum <antoni.baum@protonmail.com>
2022-07-13 18:14:36 +01:00
Jun Gong
104407a6e5
[RLlib] Fix all the erroneous on_trainer_init warning. (#26433) 2022-07-13 18:56:01 +02:00
Jun Gong
b383d987d1
[RLlib] Fix a bunch of issues related to connectors. (#26510) 2022-07-13 18:55:20 +02:00
Sihan Wang
e2cac0b324
[Serve][Part1] Update the tests to use graph deploy (#26310) 2022-07-13 09:53:51 -07:00
Antoni Baum
5ed10ef921
[AIR/CI] Fix Hugging Face notebook example (#26475) 2022-07-13 09:16:42 -07:00
Ricky Xu
365ffe21e5
[Core | State Observability] Implement API Server (Dashboard) HTTP Requests Throttling (#26257)
This is to limit the max number of HTTP requests the dashboard (API server) will accept before rejecting more requests.
This will make sure the observability requests do not overload the downstream systems (raylet/gcs) when delegating too many concurrent state observability requests to the cluster.
2022-07-13 09:05:26 -07:00
Antoni Baum
a8fb194c8b
[CI] Fix nightly horovod test (#26447)
Removes usage of deprecated Train APIs and uses Ray AIR HorovodTrainer instead.
2022-07-13 16:51:50 +01:00
Antoni Baum
ddb5572040
[Tune/CI] Fix Hyperopt notebook example (#26469)
Fixes failing hyperopt notebook in CI (as found in #26410). The cause was a mismatch between keys in points to evaluate and the search space - now, an informative exception will be raised.

Signed-off-by: Antoni Baum <antoni.baum@protonmail.com>
2022-07-13 16:50:11 +01:00
Antoni Baum
9b2cd29511
[CI] Install Horovod in doc tests to fix notebook (#26476)
Fixes the Horovod notebook example as found in #26410 by installing Horovod in doc tests jobs.

Signed-off-by: Antoni Baum <antoni.baum@protonmail.com>
2022-07-13 16:27:20 +01:00
Kai Fricke
e4a4f7de70
[ci/release] Fix fetching logs from staging clusters (#26515)
Replaces a formerly hard-coded URI to anyscale prod with the respective env variable.

Signed-off-by: Kai Fricke <kai@anyscale.com>
2022-07-13 11:15:50 +01:00
Kai Fricke
cf75cf7232
[air] Add AIR distributed training benchmark for Torch FashionMNIST (#26436)
This PR adds a distributed benchmark test for Pytorch MNIST training. It compares training with Ray AIR with training with vanilla PyTorch.

In both cases, the same training loop is used. For Ray AIR, we use a TorchTrainer with 4 CPU workers. For vanilla PyTorch, we upload a training script and kick it off (using Ray tasks) in subprocesses on each node. In both cases, we collect the end to end runtime.

Signed-off-by: Kai Fricke <kai@anyscale.com>
2022-07-13 10:53:24 +01:00
Antoni Baum
67a7ffa6b4
[Tune/CI] Fix BOHB notebook example (#26473)
Fixes the BOHB notebook example as found in #26410

Signed-off-by: Antoni Baum <antoni.baum@protonmail.com>
2022-07-13 10:35:38 +01:00
Avnish Narayan
5df66b917d
[Lint Check] Remove broken link (#26505)
The paper is not available anymore.
2022-07-13 10:30:20 +01:00
Antoni Baum
e48d381926
[Tune/CI] Fix Tune-Pytorch-CIFAR notebook example (#26474)
Fixes the Tune-Pytorch-CIFAR notebook example as found in #26410

Signed-off-by: Antoni Baum <antoni.baum@protonmail.com>
2022-07-13 10:28:30 +01:00
Christy Bergman
7c925fe99f
[RLlib; docs] Re-organize algorithms so TOC matches README. (#26339) 2022-07-13 10:46:36 +02:00
Amog Kamsetty
8ca5584b9f
Annotate more api (#26501) 2022-07-12 22:29:14 -07:00
Qing Wang
12d038b0e2
[Core][Minor] Remove unreachable code path for ray_namespace. (#25305)
The job level ray_namespace will be set to task spec when creating an actor without an explicitly specifying namespace for actor. Therefore, in the gcs actor manager, the ray_namespace in task spec shouldn't be empty.
This PR remove the unreachable code path which is using to get the namespace from a local cache.
2022-07-13 12:34:22 +08:00
clarng
b2cdd45e7c
Update import sorting blacklist, enable sorting for experimental dir (#26101)
Why are these changes needed?
There are directories that we don't lint / format. Ensure they are also the case for the import sorting tool.

Enable sorting for python/experimental to show case how to enable sorting for a directory as we convert more of the directories to be automatically sorted by the tool.
2022-07-12 21:25:58 -07:00
Riatre
2cdb76789e
Bump pytest from 5.4.3 to 7.0.1 (#26334)
See #23676 for context. This is another attempt at that as I figured out what's going wrong in `bazel test`. Supersedes #24828.

Now that there are Python 3.10 wheels for Ray 1.13 and this is no longer a blocker for supporting Python 3.10, I still want to make `bazel test //python/ray/tests/...` work for developing in a 3.10 env, and make it easier to add Python 3.10 tests to CI in future.

The change contains three commits with rather descriptive commit message, which I repeat here:

Pass deps to py_test in py_test_module_list

    Bazel macro py_test_module_list takes a `deps` argument, but completely
    ignores it instead of passes it to `native.py_test`. Fixing that as we
    are going to use deps of py_test_module_list in BUILD in later changes.

    cpp/BUILD.bazel depends on the broken behaviour: it deps-on a cc_library
    from a py_test, which isn't working, see upstream issue:
    https://github.com/bazelbuild/bazel/issues/701.
    This is fixed by simply removing the (non-working) deps.

Depend on conftest and data files in Python tests BUILD files

    Bazel requires that all the files used in a test run should be
    represented in the transitive dependencies specified for the test
    target. For py_test, it means srcs, deps and data.

    Bazel enforces this constraint by creating a "runfiles" directory,
    symbolic links files in the dependency closure and run the test in the
    "runfiles" directory, so that the test shouldn't see files not in the
    dependency graph.

    Unfortunately, the constraint does not apply for a large number of
    Python tests, due to pytest (>=3.9.0, <6.0) resolving these symbolic
    links during test collection and effectively "breaks out" of the
    runfiles tree.

    pytest >= 6.0 introduces a breaking change and removed the symbolic link
    resolving behaviour, see pytest pull request
    https://github.com/pytest-dev/pytest/pull/6523 for more context.

    Currently, we are underspecifying dependencies in a lot of BUILD files
    and thus blocking us from updating to newer pytest (for Python 3.10
    support). This change hopefully fixes all of them, and at least those in
    CI, by adding data or source dependencies (mostly for conftest.py-s)
    where needed.

Bump pytest version from 5.4.3 to 7.0.1

    We want at least pytest 6.2.5 for Python 3.10 support, but not past
    7.1.0 since it drops Python 3.6 support (which Ray still supports), thus
    the version constraint is set to <7.1.

    Updating pytest, combined with earlier BUILD fixes, changed the ground
    truth of a few error message based unit test, these tests are updated to
    reflect the change.

    There are also two small drive-by changes for making test_traceback and
    test_cli pass under Python 3.10. These are discovered while debugging CI
    failures (on earlier Python) with a Python 3.10 install locally.  Expect
    more such issues when adding Python 3.10 to CI.
2022-07-12 21:14:35 -07:00
Eric Liang
9de1add073
[Datasets] Autodetect dataset parallelism based on available resources and data size (#25883)
This PR defaults the parallelism of Dataset reads to `-1`. The parallelism is determined according to the following rule in this case:
- The number of available CPUs is estimated. If in a placement group, the number of CPUs in the cluster is scaled by the size of the placement group compared to the cluster size. If not in a placement group, this is the number of CPUs in the cluster. If the estimated CPUs is less than 8, it is set to 8.
- The parallelism is set to the estimated number of CPUs multiplied by 2.
- The in-memory data size is estimated. If the parallelism would create in-memory blocks larger than the target block size (512MiB), the parallelism is increased until the blocks are < 512MiB in size.

These rules fix two common user problems:
1. Insufficient parallelism in a large cluster, or too much parallelism on a small cluster.
2. Overly large block sizes leading to OOMs when processing a single block.

TODO:
- [x] Unit tests
- [x] Docs update

Supercedes part of: https://github.com/ray-project/ray/pull/25708

Co-authored-by: Ubuntu <ubuntu@ip-172-31-32-136.us-west-2.compute.internal>
2022-07-12 21:08:49 -07:00
Ram Rachum
14800e5ac7
Fix exception cause in preprocessors.py (#26322) 2022-07-12 20:15:04 -07:00
Tao Wang
5a0ca8da10
Revert "[Test]Disable java call cpp actor case for now (#26288)" (#26462)
The hanging is caused by hiding symbols(see https://github.com/ray-project/ray/issues/26435), let's enable this test again.
2022-07-13 10:42:48 +08:00
Jiajun Yao
75cdbc4d5c
Disable stack trace logging tests for windows (#26488)
Getting stack trace doesn't work for Windows yet.
2022-07-12 18:54:09 -07:00
Chen Shen
6d6bf20be9
[Core][Data] Fix resend protocol (#26349)
When Ray is under memory pressure, the pull manager might cancel ongoing pull request and retry it later. There is a race condition that a pull request is initiated and canceled, and the pull request for the same object is retried by pull manager shortly. When this happens, the pusher (where the object is being pulled) ignores the second pull request if it's still sending the object initiated by the first pull request; instead it will continue sending the remaining chunks. This leads to the puller receiving incomplete data chunks (as some chunks has already being received and then canceled), and the puller has to wait for 10 seconds timeout and retry the pull request.

To fix the problem we simply always resent all chunks when a pull request is received. Since we always send chunks in order, we implement the resend logic by simply reset the remaining number of chunks to send; and treat the chunks as ring buffer.
2022-07-12 18:46:02 -07:00
Clark Zinzow
12ea100527
Revert "Object GC for block splitting inside the dataset splitting (#26196)" (#26495)
This reverts commit 45ba0e3cac.

Failures in the Train GPU job started popping up involving lost references around when this PR was merged; there was an ongoing failure that was reverted that overlaps this PR, but this PR is the most likely culprit for this particular lost reference issue, so we should try reverting the PR.

- Flakey test tracker: https://flakey-tests.ray.io/
- Example failure: https://buildkite.com/ray-project/ray-builders-branch/builds/8585#0181f423-0fe2-42b5-9dd8-47d2c7f9efa7
2022-07-12 18:44:51 -07:00
brucez-anyscale
57258335bd
[Serve] Fix test_cli flakiness (#26471) 2022-07-12 17:57:08 -07:00
Amog Kamsetty
e6c04031fd
Revert "[Train] Add support for handling multiple batch data types for prepare_data_loader (#26386)" (#26483)
This reverts commit 36229d1234.
2022-07-12 17:18:46 -07:00
truelegion47
980a59477d
[Serve] [AIR] Adding reconfigure method to model deployment (#26026) 2022-07-12 17:06:33 -07:00
Pamphile Roy
53ecc28f9f
[docs] Install ray from conda-forge instead of PyPi when using conda (#25296) 2022-07-12 16:59:44 -07:00
Alan Guo
7ad3a247bf
[Dashboard] [Frontend] Add workers to the main node tab in the New Dashboard UI (#26274)
The old dashboard UI was much easier at seeing all the work across all workers because workers were shown along side nodes in the main nodes page. This change brings the same functionality to the new Dashboard UI.

Some changes in this PR:

Factor out the NodeRow into its own component and into its own file.
Introduce WorkerRow which shows information about a worker
Updates the heading of the table column because the column will show different data depending on if its a node row or a worker row.
Makes sure we're rounding percentages to a single decimal place.
Logs button for worker row will go to the logs page and filter out just the log files related to that worker.
Update the api for fetching nodes into fetching nodes + workers.
fix bug where object store memory was not showing the total size but instead the remaining size
2022-07-12 16:28:08 -07:00
Dmitri Gekhtman
0c1b6df368
Fix redis dependency (#26459)
Fix the specification of the Redis dependency for the Ray image.
2022-07-12 16:07:09 -07:00
Eric Liang
4c04c8d92c
[doc] Rename toc entry for libraries back to "Ray Libraries" (#26485) 2022-07-12 14:23:36 -07:00
Jiajun Yao
53d878804a
[Core] Set c++ terminate handler to print stack trace (#26444) 2022-07-12 13:54:20 -07:00
Jian Xiao
45ba0e3cac
Object GC for block splitting inside the dataset splitting (#26196)
The pipeline will spill objects when splitting the dataset into multiple equal parts.

Co-authored-by: Ubuntu <ubuntu@ip-172-31-32-136.us-west-2.compute.internal>
2022-07-12 11:34:52 -07:00
Philipp Moritz
b155bc4a54
Add ray/widgets/templates/ files to wheel (fix #26452) (#26457)
Add the html template files in `ray/widgets/templates/` to the wheel to make sure the Jupyter widget that is displayed in `ray.init()` works for the Ray wheels.
2022-07-12 11:23:57 -07:00