Commit graph

10665 commits

Author SHA1 Message Date
Yi Cheng
4e0de0053d
[nightly] Add staging nightly test for gcs ha (#21004)
This PR adds four staging nightly tests for gcs :
- many_actors
- many_tasks
- many_pgs
- many_nodes

These are benchmark tests that are highly related to gcs ha. 

To make it easier to add tests, this PR also change e2e.py a little bit to include testing flags to app config.
2021-12-09 23:07:23 -08:00
Yi Cheng
2ed5b1ee07
[2/gcs-mem-kv] Use memory store client when flag is set (#20931)
This is part of redis removal. In this PR, if `RAY_gcs_storage=memory`, it'll use memory table instead of redis table.
The config setup has to be moved into GcsServer because with the memory table it's transistent.
2021-12-09 22:41:05 -08:00
Jules S. Damji
065786b7fe
[docs] Make design pattern example self contained (#20981)
Signed-off-by: Jules S.Damji jules@anyscale.com

Why are these changes needed?
The code snippet referenced a python function that was not defined, therefore the code snippet as is won't work. All complete or self-contained code in our docs should run.

The changes made were adding the undefined function, iterating over a list of different random large arrays to show the difference between local or distributed sort's execution time, and print them.

Closes #20960
2021-12-09 20:19:38 -08:00
Jiajun Yao
5b21bc5c93
[BUILD] Use bazel-skylib rule to check bazel version (#20990)
Bazel has a rule for enforcing the version so we can just reuse that.

This redundant bazel version check logic in setup.py is also causing issue when building conda package, because conda has its own version of bazel and it doesn't support `--version`.
2021-12-09 15:25:22 -08:00
mwtian
2410ec5ef0
[Core][Dashboard Pubsub 1/n] Allow a channel to have subscribers to a key and to the whole channel concurrently (#20954)
For actor channel, GCS clients subscribe to a single actor but dashboard subscribes to all actors. This change makes supporting this possible.

Most of the added code is in `integration_test.cc`, which tests the publisher and subscriber together.

Also, add the basic support for dashboard reporter pubsub.
2021-12-09 15:00:38 -08:00
SangBin Cho
f4d46398f7
[Internal Observability] [Part 2] Share the same code for RecordMetrics & DebugString for cluster task manager. (#20958)
Share the same code for RecordMetrics & DebugString for cluster task manager.

Both requires almost identical (and also expensive) operation. This PR makes them share the same `UpdateState` code which stores stats in the struct. 

Note that we don't update state when metrics are recorded because the debug string is anyway consistently called and states are updated.

Ideally, we should dynamically update the stats.
2021-12-09 14:24:33 -08:00
SangBin Cho
05a302b468
[Internal Observability] [Part 3] Support debug state metrics on all components. (#20957)
This PR adds RecordMetrics and DebugString to all raylet components. 

Some of methods are probably empty now. They are going to be supported in the next PR
2021-12-09 14:24:15 -08:00
Chen Shen
d0e79a36f9
[chaos-test] chaos test pipeline ingestion (#20929)
since it has been passing my test run; i'll land it and mark it as unstable.
2021-12-09 13:43:00 -08:00
Chen Shen
6a274dfd76
CI][Chaos-test] chaos test now can set max-nodes-to-kill #20962 2021-12-09 13:41:46 -08:00
Kai Fricke
97ec2a03b6
[ci/buildkite] Add ml pipeline to speed up ML/RLLib tests (#20895)
ML tests will be built in a separate bootstrap step installing all required dependencies.
2021-12-09 21:14:10 +00:00
Yi Cheng
83c639ea76
[core] Ensure failed to register worker is killed and print better log (#20964)
Before this PR, then raylet notices there is something wrong with the worker starting, it'll start a new worker but not kill the old one. If the old one is hanging, it'll lead to resource waste.
This PR killed the failed worker if it's still alive and also print useful logs
2021-12-09 12:37:39 -08:00
kk-55
9acf2f954d
[RLlib] Example containing a proposal for computing an adapted (time-dependent) GAE used by the PPO algorithm (via callback on_postprocess_trajectory) (#20850) 2021-12-09 14:48:56 +01:00
Tomasz Wrona
39c202fa66
[RLlib] Allow extra keys in info in multi-agent (#20793) 2021-12-09 14:44:33 +01:00
Carlo Grisetti
a8286c55af
[RLLib] Fix deprecated convert_to_non_torch_type (#20751) 2021-12-09 14:42:12 +01:00
Avnish Narayan
6996eaa986
[RLlib] Add necessary fields to Base Envs, and BaseEnv wrapper classes (#20832) 2021-12-09 14:40:40 +01:00
chenk008
8bb9bfe632
[Core]Add metrics: worker_register_time_ms (#20472)
Recently I am testing some benchmark about worker registering with running worker in container. Current the Ray core has `process_startup_time_ms` metrics which is about process fork time.

This PR try to add metrics about the duration of worker registering.
2021-12-09 21:25:49 +08:00
Sven Mika
63db0e3a7c
[RLlib] Fix SAC learning test flakiness introduced in PR: "Sub-class Trainer (instead of build_trainer()): All remaining classes; soft-deprecate build_trainer." (#20985) 2021-12-09 14:24:27 +01:00
Yi Cheng
f7b0b872f9
[1/kv-regression] Put KV into a dedicated thread pool (#20922)
After moving internal kv to grpc, there is a regression in actor launching performance. This PR move the work from main thread to a dedicated thread for internal kv to mitigate it.

Co-authored-by: Eric Liang <ekhliang@gmail.com>
2021-12-09 00:21:47 -08:00
Jiajun Yao
655cc584a9
[Scheduler] Support per task/actor SpreadSchedulingStrategy (#20972)
This PR adds per task/actor SpreadSchedulingStrategy which will try to spread the tasks on a best effort basis.
2021-12-08 22:22:07 -08:00
Eric Liang
22ccc6b300
Initial stats framework for datasets (#20867)
This adds an initial Dataset.stats() framework for debugging dataset performance. At a high level, execution stats for tasks (e.g., CPU time) are attached to block metadata objects. Datasets have stats objects that hold references to these stats and parent dataset stats (this avoids stats holding references to parent datasets, allowing them to be gc'ed). Similarly, DatasetPipelines hold stats from recently computed datasets.

Currently only basic ops like map / map_batches are instrumented. TODO placeholders are left for future PRs.
2021-12-08 16:13:57 -08:00
SangBin Cho
5298a9046c
[Internal Observability] [Part 1] Centralize existing metrics to metric_defs.h (#20728)
This PR centralizes all existing metrics to `metric_defs.h`. 

Previously, each file relies on implicit import of metric_def.h within the stats module. After this PR we only precisely import `metric_defs.h` for each file.
2021-12-08 14:06:05 -08:00
Antoni Baum
4c47f56b61
[tune] Add random state to BasicVariantGenerator (#20926)
This PR adds an ability to set a random seed/numpy random generator in BasicVariantGenerator, allowing for reproducibility across separate runs. All the changes are fully backwards compatible.

Co-authored-by: Kai Fricke <krfricke@users.noreply.github.com>
2021-12-08 20:15:53 +00:00
architkulkarni
5593819135
Revert "Revert "[runtime env] Allow working_dir and py_module to be Path type"" (#20853) 2021-12-08 11:17:19 -08:00
Yi Cheng
442b1025cd
[1/gcs-mem-kv] Memory mode for internal kv (#20881)
This is part work of redis removal. In this PR we introduced a new mode for internal kv, memory mode.
There are two ways to address this:
- Update store client and use store client in internal kv
- Add memory table into internal kv directly.

The former one actually is a better choice since it put everything related to storage into a lowerlevel. But it's pretty hard to do this now, since internal kv use hset/hget and redis store client use set/get, so the data will not be compatible and it'll be a brake change.

So the easier way to do this is 2) and it's what this PR doing.

Next: use the flag for store client
2021-12-08 10:40:35 -08:00
architkulkarni
78cd377775
[Serve] Bump test_cluster from small to medium (#20942) 2021-12-08 09:58:27 -08:00
Jiajun Yao
5b168a1515
[Scheduler] Support per task/actor PlacementGroupSchedulingStrategy (#20507)
This PR adds per task/actor scheduling strategy and currently the only strategy are PlacementGroupSchedulingStrategy and DefaultSchedulingStrategy.

Going forward, people should use `scheduling_strategy=PlacementGroupSchedulingStrategy` to define placement group for actor/task. The old way will be deprecated.
2021-12-07 23:11:31 -08:00
Lixin Wei
96dc10a95a
[Core] Fix Crash in ObjectDirectory (#20540)
Here we met a crash in line 446's RAY_CHECK

d26c9e67e8/src/ray/object_manager/ownership_based_object_directory.cc (L441-L450)


And we found out that it's because we didn't set the node_id for dead nodes. If there are dead nodes and we are trying to LookupRemoteConnectionInfo in it. This crash will happen.

This PR fixes this crash.
2021-12-07 23:03:49 -08:00
Stephanie Wang
1b9c03adb3
[core] Remove spammy code in object directory client (#20838)
* log

* remove

* fix

* fix

* x

* x
2021-12-07 19:51:44 -08:00
Jiajun Yao
6a07f03a6a
[Test] Fix flaky test_failure_2.py (#20949)
There is a race condition between `DestoryActor` (due to handle out of scope) and `CreateActor`. If `DestoryActor` happens first, then `CreateActor` will fail complaining about not being able to find the registered actor.
2021-12-07 19:44:16 -08:00
Flamur Gogolli
3ca10ccc47
Textual correction on TLS Authentication (#20935)
Correct wording on the TLS Authentication section of the configure.rst page.
2021-12-07 19:05:16 -08:00
Hankpipi
67518bdc50
[serve] Reconfiguration bug fix (#20315)
As described in #18884, reconfiguration will mutate state mid-query. I try to solve this problem by adding read/write lock to each replica.

Co-authored-by: yuzihao.2001 <yuzihao.2001@bytedance.com>
2021-12-07 18:53:45 -08:00
Jiajun Yao
2208cf7672
[Ray Client] Pickle task options for ray client (#20930)
We can just pickle task options instead of json so that we don't need to write custom `to_dict` and `from_dict` methods for complex python option objects (e.g. PlacementGroup).
2021-12-07 17:07:19 -08:00
Dmitri Gekhtman
94883f61b1
[autoscaler] Event summarizer reports launch failure (#20814)
Partly addresses #20774 by registering node launcher failures in driver logs, via the event summarizer.
This way, users can tell that the launch failed from the driver logs.

Also pushes the node creation exception to driver logs, but only once per 60 minutes.
2021-12-07 16:23:45 -08:00
Yi Cheng
ea1d081aac
[core] Simple chaos testing for asio (#19970)
Right now in ray, a lot of edge cases related to grpc are not tested. This PR is just a simple try to give the developer some way to delay grpc request. It could be used with manual testing and also e2e test since it's supporting delay for specific grpc method.

To use this feature, just simple set os env `RAY_TESTING_ASIO_DELAY_US="method1=10:20,method2=20:30,*=200:200"`

This means, for `method1` it'll delay 10-20us, for method2 it'll delay 20-30us. For all the rest, it'll delay 200us.
2021-12-07 14:47:07 -08:00
mwtian
dd3a4aa63e
[Core] upgrade grpc and boringssl (#20919)
Upgrade these dependencies to their respective latest stable versions. The latest version of GRPC C++ API has marked the callback API stable.
2021-12-07 14:35:46 -08:00
architkulkarni
cd12814975
[Serve] [doc] Fix broken serve metrics doc snippet (#20925)
Was failing with `TypeError: f() missing 1 required positional argument: 'request'
`
2021-12-07 14:02:47 -08:00
Clark Zinzow
336882e32c
[Datasets] Fix boolean tensor column slicing. (#20905)
Arrow byte-packs boolean arrays, with 8 entries per byte, and both Arrow and NumPy utilize bit-based offsets for indexing into data buffers. This PR adds support for properly indexing into boolean tensor columns by using bit-based offsets for such columns.
2021-12-07 12:47:43 -08:00
liuyang-my
f3ef6a221f
[Serve]Change Java LongPollClient's polling thread to singleton. (#20756)
Now the Java LongPollClient's is not singleton, and a new polling thread will be created within a new LongPollClient for per RayServeHandle. It will degrade the performance of Replica Actor. So we change the LongPollClient's polling thread to singleton.
2021-12-07 11:14:00 -08:00
xwjiang2010
011ae389a6
[tune] minor clean up of executor.restore(). (#20916)
Removes two unneeded parameters that were not used anymore
2021-12-07 16:37:48 +00:00
Ishant Mrinal
2868d1a2cf
[RLlib] Support for RE3 exploration algorithm (for tf) (#19551) 2021-12-07 13:26:34 +01:00
Chen Shen
aca954e8dd
[dataset][cuj2] add another single node ingestion example (#20754)
* add runner

* fix bugs

* add configs

* add time
2021-12-07 02:50:17 -08:00
architkulkarni
15391026c1
add bazel build OOM tip to docs (#20833) 2021-12-06 21:34:27 -08:00
Eric Liang
5d5ca8fed4
[dataset] Reduce memory usage during .to_pandas() (#20921)
We shouldn't ray.get() all the blocks immediately during the to_pandas call, it's better to do it one by one. That's a little slower but to_pandas() isn't expected to be fast anyways.
2021-12-06 18:17:16 -08:00
Balaji Veeramani
17b6130f9f
[Train] Clarify Session.get_next docstring (#20877)
This PR addresses two issues an issue with the Session.get_next docstring:

It's unclear whether the tense should be imperative or non-imperative. The Ray documentation states that we use Google style (which is non-imperative), but we are formatting using PEP8 (which is imperative). Moreover, we use both imperative and non-imperative summaries across the Ray Train code. I've stuck with a non-imperative summary for consistency with the rest of the Session class.
The docstring doesn't describe the conditions under which the function returns None.
2021-12-06 17:26:25 -08:00
Dmitri Gekhtman
10ed6765c7
[Autoscaler] Add autoscaler update time prometheus metric. (#20831)
It's useful when measuring autoscaler performance to know how long the autoscaler takes for update iterations.
This PR adds a prometheus metric for that. 

The bucket ticks for the histogram are arranged in powers of ten: 
[.001, .01, .1, 1, 10, 100, 1000]. Depending on the situation, we've seen the update time range from .1 second to a few minutes.
2021-12-06 11:55:07 -08:00
shrekris-anyscale
2d58664f98
Add Pydantic validation to Serve AutoscalingConfig class (#20779) 2021-12-06 11:51:02 -08:00
Chen Shen
b9a418352b
[Core][Refactor CoreWorker 3/n] split static function from CoreWorkerProcess (#19678)
Separate the CoreWorkerProcess static functions from CoreWorkerProcess state; Currently the static and non-static state are mixed together, and more importantly the static state is not thread safe. By separating them and create helper class for non-static state CoreWorkerProcessImpl, we can make it thread safe.

in follow up PR we will make CoreWorkerProcess state thread safe.

This PR depends on #19677, The follow up PR is #19679
2021-12-06 11:12:21 -08:00
Jiao
e065f2e30a
[Jobs] Update CLI examples to use the same setup (#20844) 2021-12-06 12:15:17 -06:00
architkulkarni
c024d984e5
[runtime_env] Parse local conda/pip requirements files before sending runtime env to Ray Client Server (#20885) 2021-12-06 12:04:22 -06:00
Chen Shen
a628182cf5
[nighly-test] update cuj2 to reflect latest change #20889
we fixed groupby issue in cuj2; sync the change into nightly test. this test doesn't need to use gpu at all. it returns soon after data ingestion finishes.
2021-12-06 09:59:21 -08:00