Commit graph

12808 commits

Author SHA1 Message Date
Antoni Baum
84a9df9448
[AIR/Tune] Add TempFileLock (#25408)
Adds a `TempFileLock` class that stores lockfiles inside a temporary directory.
2022-06-03 10:12:53 +01:00
Jun Gong
1d24d6af98
[RLlib] Fix MARWIL tf policy. (#25384) 2022-06-03 10:50:36 +02:00
Qing Wang
99429b7a92
[Core] Remove thread local core worker instance 2/n (#25159)
We removed the thread local core worker instance in this PR, which is the further arch cleaning stuff for removing multiple workers in one process.
It also removes the unnecessary parameter `workerId` from JNI.
2022-06-03 14:08:44 +08:00
Yi Cheng
60587cf1dc
[flakey] Deflakey test_ray_shutdown.py (#25422)
The main issue with this test is that the worker is trying to connect to the raylet but the raylet exits, and in this case, it'll hang there. This happens before the periodical check runs so the worker won't exit as well.

This fix moves the hanging part to the place after the periodical check starts.

Another issue is the pubsub timeout. The default one is 60s, and we need to adjust it to smaller value to make it work within 60s for the test.
2022-06-02 23:00:33 -07:00
Yi Cheng
fd0f967d2e
Revert "[RLlib] Move (A/DD)?PPO and IMPALA algos to algorithms dir and rename policy and trainer classes. (#25346)" (#25420)
This reverts commit e4ceae19ef.

Reverts #25346

linux://python/ray/tests:test_client_library_integration never fail before this PR.

In the CI of the reverted PR, it also fails (https://buildkite.com/ray-project/ray-builders-pr/builds/34079#01812442-c541-4145-af22-2a012655c128). So high likely it's because of this PR.

And test output failure seems related as well (https://buildkite.com/ray-project/ray-builders-branch/builds/7923#018125c2-4812-4ead-a42f-7fddb344105b)
2022-06-02 20:38:44 -07:00
Jian Xiao
6589a4f8cb
[Datasets][UX Assessment] Add a section on how to write UDFs in Datasets (#25338)
The Datasets UX assessment showed that users had difficulties in writing UDFs: what's input/output types, how to write the function etc.

Co-authored-by: Ubuntu <ubuntu@ip-172-31-32-136.us-west-2.compute.internal>
2022-06-02 20:00:50 -07:00
SangBin Cho
ba90838b66
[Log monitor] Add unit tests + fix flaky test_logging (#25294)
Looks like the test_logging fails when syncer is enabled. However, I found the test was badly written, and the failure might be a side effect of syncer (I am not sure why. Maybe syncer slows down ray.init()?)

ray/python/ray/tests/test_logging.py

Line 228 in f75ede1

 def test_log_monitor_backpressure(ray_start_cluster, monkeypatch): 
Anyway, it seems like the test will fail if there's a delay after log monitor is started.
Testing this is not trivial. Instead, I made log_monitor unit testable and added full unit tests.

This also adds a better exception message on another flaky test test_log_rotation . I need more data before actually fixing this issue.
2022-06-02 19:15:57 -07:00
Siyuan (Ryans) Zhuang
b5e71fde23
[workflow] Remove workflow virtual actor (#25394)
* remove workflow virtual actor
2022-06-02 18:17:25 -07:00
Amog Kamsetty
c8b112ec46
[Train] Support amp for models with a custom __getstate__ method (#25335)
The current implementation of amp does not work if the model that is being wrapped defines a custom __getstate__ method. It would fail at the assertion like here: https://discuss.ray.io/t/ray-train-hangs-for-long-time/6333/7.

This PR fixes amp for this case, and adds tests for it.
2022-06-02 18:13:13 -07:00
Stephanie Wang
473a962d89
[Datasets] [Docs] Add docs about fault tolerance in Datasets (#25371)
Adds description of fault tolerance guarantees for Datasets.

Related issue number

Closes #24856.
2022-06-02 15:53:50 -07:00
Antoni Baum
f8551942bf
[AIR] Fix trainer allowed scaling config keys (#25350)
Adds `resources_per_worker` to allowed scaling config keys in `DataParallelTrainer` and `GBDTTrainer`.
2022-06-02 11:20:37 -07:00
shrekris-anyscale
16bdfe6a39
Restore "[Serve] Deploy Serve deployment graphs via REST API" (#25073) (#25333) 2022-06-02 11:06:53 -07:00
Stephanie Wang
ab8785ca5c
Revert "Revert "[core] Support generators for tasks with multiple return values (#25247)" (#25380)" (#25383)
Duplicate for #25247.

Adds a fix for Dask-on-Ray. Previously, for tasks with multiple return values, we implicitly allowed returning a dict with the return index as the key. This was used by Dask-on-Ray, but this is not documented behavior, and we now require task returns to be iterable instead.
2022-06-02 10:50:11 -07:00
Sihan Wang
3c9bd66485
[Serve][Doc] Add http endpoint for dag pattern doc (#25390) 2022-06-02 09:01:37 -07:00
Sihan Wang
b024a9543e
[Serve] Support scale replica down to 0 (#24892) 2022-06-02 08:06:46 -07:00
Sven Mika
e4ceae19ef
[RLlib] Move (A/DD)?PPO and IMPALA algos to algorithms dir and rename policy and trainer classes. (#25346) 2022-06-02 16:47:05 +02:00
Steven Morad
f781622f86
[RLlib] Bandits (torch) Policy sub-class. (#25254)
Co-authored-by: Steven Morad <smorad@anyscale.com>
2022-06-02 15:16:51 +02:00
Kai Fricke
6fe91885b0
[docs/lint] Fix reference to dataset_tune (#25402) 2022-06-02 11:40:26 +01:00
Kai Fricke
8a9512bf62
[ci/release] Install local wheels in release test shell script (#25227)
We're currently installing matching wheels on the fly in the python script for Ray client tests. However, we can't reload modules with changed protobuf configurations, and thus can't reload ray completely. Since the `anyscale` pacakge depends on Ray, this effectively prevents us from installing matching wheels within the python script.

There are a few possible solutions to this. First, we could separate out the local environment preparation from the test running - this will duplicate some logic and is thus a bit more involved, but should be considered in the future. For now, we adjust the `run_release_tests.sh` shell script to install any passed `--ray-wheels` wheels locally. We only do this in CI instances per default as these wheels will not be compatible with e.g. MacOS.

Link to successful build: https://buildkite.com/ray-project/release-tests-branch/builds/619#_
2022-06-02 10:32:51 +01:00
Antoni Baum
045c47f172
[CI] Check test files for if __name__... snippet (#25322)
Bazel operates by simply running the python scripts given to it in `py_test`. If the script doesn't invoke pytest on itself in the `if _name__ == "__main__"` snippet, no tests will be ran, and the script will pass. This has led to several tests (indeed, some are fixed in this PR) that, despite having been written, have never ran in CI. This PR adds a lint check to check all `py_test` sources for the presence of `if _name__ == "__main__"` snippet, and will fail CI if there are any detected without it. This system is only enabled for libraries right now (tune, train, air, rllib), but it could be trivially extended to other modules if approved.
2022-06-02 10:30:00 +01:00
Qing Wang
64f9a9066f
[doc] Update document on ray start command. (#25306) 2022-06-02 16:42:24 +08:00
Artur Niederfahrenhorst
71a8a443ce
[RLlib] Fix Policy global timesteps being off by init sample batch size. (#25349) 2022-06-02 10:19:21 +02:00
kourosh hakhamaneshi
87c9fdd0f8
RLlib: Fix bug: WorkerSet.stop() will raise error if self._local_worker is None (e.g. in evaluation worker sets). (#25332) 2022-06-02 09:41:43 +02:00
Eric Liang
6fe8f7e16b
fix lint (#25393) 2022-06-01 22:35:30 -07:00
Eric Liang
51b295ad74
[docs] Improve Tune + Datasets documentation (#25389) 2022-06-01 21:52:32 -07:00
Qing Wang
8c385cff11
[doc] Fix the document on how to build java from source. (#25351) 2022-06-02 12:39:54 +08:00
Yi Cheng
cb1f08a3c1
[core] Basic end-2-end multi-node tests for GCS HA in CI. (#25114)
In this PR we simulate the case where serve can continue to function even when GCS is down and the reconfig continue to work once GCS is back.

To make it close to the real-world case, the docker is used for isolation:

It starts a head node (0 cpus) and a worker node
It tried the basic function and make sure it's working
It kills GCS and make sure everything is working.
It starts GCS and make sure reconfig continues to work.
This is the basic cases for serve HA. We'll add more once we get better integrations.
2022-06-02 02:41:38 +00:00
Yi Cheng
287892657b
Revert "[Serve][Doc] Add http endpoint for dag pattern doc (#25243)" (#25388)
This reverts commit 4ad75056eb.
2022-06-02 02:40:09 +00:00
mwtian
8df5a24dbd
[Core] fix tsan issue in GcsRpcClient (#25365)
`//:global_state_accessor_test` has been flaky under `tsan`.
<img width="695" alt="image" src="https://user-images.githubusercontent.com/81660174/171493283-f36150e7-e1e5-4f1f-80e8-125a2f2f4bab.png">

I'm able to reproduce the issue on Linux EC2. It seems `GcsRpcClient::timer_` can be used from both application main thread and GCS RPC client event loop. Added a lock to avoid the data race.
2022-06-01 17:57:17 -07:00
Dmitri Gekhtman
e45054c130
[autoscaler][kuberay] Fix autoscaler event driver logs. Clean up entrypoint. (#25240)
This PR 
- enables piping of autoscaler events to the driver's stdout with KubeRay
- cleans up the autoscaler's startup sequence
- removes some redis references
2022-06-01 20:36:47 -04:00
Antoni Baum
70007c004e
[AIR] MultiHotEncoder and list support for encoders (#25319) 2022-06-01 17:34:41 -07:00
Eric Liang
c1b2ad112e
Comment our banner (#25369) 2022-06-01 16:36:33 -07:00
SangBin Cho
cb151d5ad6
Revert "Revert "use an agent-id rather than the process PID (#24968)"… (#25376) 2022-06-01 16:28:48 -07:00
Yi Cheng
80168a09a6
Revert "[core] Support generators for tasks with multiple return values (#25247)" (#25380)
This reverts commit 1f9488724a.
2022-06-01 15:31:59 -07:00
SangBin Cho
49efcab4fe
Revert "[core] Remove gcs addr updater in core worker. (#24747)" (#25375)
Turns out https://github.com/ray-project/ray/pull/25342 wasn't the root cause of the ray shutdown flakiness. I realized there's another PR that could affect this test suite. Let's try reverting it and see if things get better.
2022-06-01 15:12:33 -07:00
Simon Mo
b9874f5bd9
[CI][Hotfix] Fix macOS kickoff job (#25377) 2022-06-01 15:04:17 -07:00
Stephanie Wang
961b875ab8
[core] Allow user to override global default for max_retries (#25189)
This PR allows the user to override the global default for max_retries for non-actor tasks. It adds an OS env called RAY_task_max_retries which can be passed to the driver or set with runtime envs. Any future tasks submitted by that worker will default to this value instead of 3, the hard-coded default.

It would be nicer if we could have a standard way of setting these defaults, but I think this is fine as a one-off for now (not a clear need for overriding defaults of other @ray.remote options yet).
Related issue number

Closes #24854.
2022-06-01 14:42:18 -07:00
Eric Liang
71717e59c4
[data] [docs] Doc audit-- rebalance basic vs advanced materials (#25262) 2022-06-01 13:50:46 -07:00
Stephanie Wang
1f9488724a
[core] Support generators for tasks with multiple return values (#25247)
Adds support for Python generators instead of just normal return functions when a task has multiple return values. This will allow developers to cut down on total memory usage for tasks, as they can free previous return values before allocating the next one on the heap.

The semantics for num_returns are about the same as usual tasks - the function will throw an error if the number of values returned by the generator does not match the number of return values specified by the user. The one difference is that if num_returns=1, the task will throw the usual Python exception that the generator cannot be pickled.

As an example, this feature will allow us to reduce memory usage in Datasets shuffle operations (see #25200 for a prototype).
2022-06-01 13:30:52 -07:00
Antoni Baum
9085ea23ab
[AIR] Improve BatchPredictor performance & disk usage (#25101)
This PR attempts to improve `BatchPredictor` performance with directory checkpoints by avoiding unnecessary filesystem operations.

In order to achieve that, the `Checkpoint` class is changed to always use a canonical path for the temporary directory if the Checkpoint has been created form an object ref. The directory is filelocked to prevent concurrent writes.

Tests have been addded.

Co-authored-by: Kai Fricke <krfricke@users.noreply.github.com>
2022-06-01 21:45:39 +02:00
Simon Mo
61099faa58
[CI] Fix dashboard tests broken due to dep version upgrade (#25357) 2022-06-01 12:14:49 -07:00
Sihan Wang
4ad75056eb
[Serve][Doc] Add http endpoint for dag pattern doc (#25243) 2022-06-01 11:30:42 -07:00
Eric Liang
905258dbc1
Clean up docstyle in python modules and add LINT rule (#25272) 2022-06-01 11:27:54 -07:00
Jiao
97190e4574
[Deployment Graph] Remove _execute_impl and json serde code for DeploymentNode IR (#25331) 2022-06-01 11:26:56 -07:00
Eric Liang
517f78e2b8
[minor] Add a job submission hook by env var (#25343) 2022-06-01 11:15:43 -07:00
Yi Cheng
8c70f02652
[build] Fix the install-bazel.sh (#25251)
install-bazel.sh is broken due to the path is not correctly set. This PR fixed it.
2022-06-01 10:52:31 -07:00
SangBin Cho
ca75570f51
Revert "Revert "Revert "[dataset] Use polars for sorting (#24523)" (#24781)" (#25173)" (#25341)
This reverts commit 61676f26d3.
2022-06-01 10:49:12 -07:00
Chen Shen
49b8bbfd5e
[Core] Fix node affinity strategy when resource is empty (#25344)
Why are these changes needed?
Today, Ray scheduler always pick a random node if the resource requirement is empty, regardless of scheduling policy/strategy.

However, for node affinity scheduling policy, we should not pick random policy but try to stick to the node affinity constraints.
2022-06-01 10:38:48 -07:00
Zhe Zhang
52774e8460
Use bold font consistently on landing page (#25318) 2022-06-01 11:44:46 -04:00
code-review-doctor
d05f847778
[tune] Missing f prefix on f-strings fix (#24154)
Fix issue probably-meant-fstring found at https://codereview.doctor
2022-06-01 16:57:45 +02:00