Commit graph

5917 commits

Author SHA1 Message Date
Chris K. W
27665fdf29
[client][test] skip test_valid_actor_state_2 (#20995)
* skip test_valid_actor_state_2

* rerun
2021-12-10 10:58:42 -08:00
mwtian
d751a242d8
[Core][Dashboard Pubsub 2/n] Add resource reporter and actor to Python GCS pubsub (#21001)
Dashboard contains resource reporter and actor subscribers. Dashboard agent has resource report publisher. So GCS pubsub needs to support these channel types.

Also refactor GCS AIO subscribers to have each subscriber per channel. This matches the API of GCS sync subscribers, and make subscribing with multiple channels easier.
2021-12-09 23:10:10 -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
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
6a274dfd76
CI][Chaos-test] chaos test now can set max-nodes-to-kill #20962 2021-12-09 13:41:46 -08: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
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
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
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
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
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
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
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
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
Siyuan (Ryans) Zhuang
3285bb6b9f
[train] Fix assertion in test (#20893) 2021-12-05 17:47:43 -08:00
Kai Fricke
d4413299c0
Revert "[Core] Support back pressure for actor tasks (#19936)" (#20880)
This reverts commit a4495941c2.
2021-12-03 17:48:47 -08:00
architkulkarni
ac911d6b51
[runtime_env] Change error log to debug log (#20875) 2021-12-03 18:21:43 -06:00
xwjiang2010
b0c56c8f9b
[tune] Fix testResourceScheduler and testMultiStepRun. (#20872)
This commit fixes flaky tests by relaxing strictly deterministic trial runner behavior constraints.
2021-12-03 16:07:52 -08:00
Amog Kamsetty
611bfc1352
[ML] Move find_free_port to ml_utils (#20828)
Small refactoring of common utility used by Train, Tune, and Rllib.
2021-12-03 13:38:42 -08:00
runedog48
c432815b10
Fix argument typo in post_mortem method (#20871) 2021-12-03 10:27:12 -08:00
xwjiang2010
368da1742b
[tune] Enforce one future at a time for any given trial at any given time. (#20783)
Also enforce disabling (instead of allowing user to override this) buffer training when checkpoint_at_end is used.
2021-12-03 08:14:12 -08:00
xwjiang2010
205d1e9d1f
remove on_pause/on_unpause (#20822) 2021-12-03 08:13:17 -08:00
Matti Picus
442943572b
DOC, BUILD: limit bazel resource usage with BAZEL_LIMIT_CPUS and document it (#20845)
So I have a AMD machine with many cores and 32GB of memory. When I do `pip install -e .`, my machine crashes since bazel tries to use all the cores, but quickly runs out of memory. It seems there is no native way to set environment variables to tell bazel to limit its resource consumption, but there is a `--local_cpu_resources` command-line option.

This PR exposes that to the `pip install` via an environment variable. I also went through the setup.py and documented all the environment variables I could find.
2021-12-02 16:39:36 -08:00
mwtian
c01fa39d84
[Cleanup] delete remaining protos related to ObjectLocation in GCS (#20823)
Object metadata are fully managed by workers now, so the related protos and logic in GCS are obsolete. Most of the logic has been removed in https://github.com/ray-project/ray/pull/19963. This PR removes some remaining obsolete protos.
2021-12-02 15:24:43 -08:00
WanXing Wang
a4495941c2
[Core] Support back pressure for actor tasks (#19936)
Support back pressure in core worker.
Job config added for python worker and java worker.
2021-12-02 14:41:30 -08:00
xwjiang2010
e8ce1edfdc
[tune] move on_no_available_trials to a subclass under runner (#20809)
Separates out warning logic to a different submodule.
2021-12-02 12:54:45 -08:00
architkulkarni
725480ad7e
Revert "[runtime_env] Allow working_dir and py_module to be Path type (#20810)" (#20852)
This reverts commit fb3d57fb71.
2021-12-02 10:17:16 -08:00
Chu Xiangyang
93732231cb
[Core] Update job id to hex in JOB_LOG_PATTERN (#20612) (#20816)
* [Core] Update job id to hex in JOB_LOG_PATTERN (#20612)

* Add test to log pid with hex job id
2021-12-02 16:47:26 +09:00
mwtian
8716ae9fdc
[Core][Pubsub] deflake test_gcs_pubsub (#20812)
In `test_gcs_pubsub.py`, ensure subscribers subscribe before data is published to the channel.
2021-12-01 19:11:18 -08:00
mwtian
b3264138b5
[cli] Use 8 Ansi colors for ray command output (#20485) 2021-12-01 16:44:52 -08:00
iasoon
7546ea452f
[serve] Catch errors caused by bad deployment configurations (#20617) 2021-12-01 17:20:25 -07:00
hckuo
fb3d57fb71
[runtime_env] Allow working_dir and py_module to be Path type (#20810) 2021-12-01 16:39:39 -07:00
Antoni Baum
da57c99f47
[tune] Add set_max_concurrency to Searcher API (#20576)
Adds a set_max_concurrency method to the Searcher API. This method allows for the ConcurrencyLimiter to override the max_concurrency value on searchers with custom internal logic for limiting concurrency (atm. SigOpt and HEBO). This PR also changes the initialisation of SigOpt and HEBO optimisers to happen on set_search_properties instead of in the constructor, so that the new max_concurrency is respected.

Furthermore, this PR breaks up test_tune_restore.py into test_tune_restore_warm_start.py and test_tune_restore.py to deal with a timeout, and ensures that the automatic application of ConcurrencyLimiter in tune.run doesn't override a user-defined ConcurrencyLimiter.
2021-12-01 13:07:48 -08:00
mwtian
0467bc9df5
[Core][Pubsub][Importer] GCS pubsub for function manager & importer (#20804)
This PR allows using Ray pubsub for notifying worker importers that a new function / actor class needs to be imported.
2021-12-01 10:44:50 -08:00
xwjiang2010
8c0bf41b17
[tune] clean up start_trial API. (#20796) 2021-12-01 08:46:22 -08:00
Stephanie Wang
162cc9e6bd
Add chaos test for shuffle (#20657)
Adds a working failure test for streaming and non-streaming shuffle, without lineage reconstruction. This does a few things.

Test improvements:
- modifies AutoscalingCluster to allow passing an idle node timeout (the default is very low)
- some small improvements to the NodeKiller actor to hopefully improve flakiness.

Shuffle fixes:
- modifies shuffle tracker to wait on futures instead of having tasks signal. During failures, tasks may never signal the tracker, so we can't rely on these to track progress.

Core fixes:
- raylet will exit immediately if it receives the Shutdown RPC with graceful=False - there was a bug here where it's supposed to exit after replying to the client, but the gRPC server goes down for an unknown reason and the client reply is never sent
- On reference deletion, the owner now publishes an additional message to subscribers that the object has been deleted. Previously, this was causing a hang in streaming shuffle because the raylets pulling an object subscribed after the object was already deleted, so they never received the error signal.
2021-11-30 15:24:09 -08:00
Alex Wu
9a0e67cd7e
Remove duplicate test (in test_component_failure_2) (#20798)
test_component_failure_2::test_worker_failed is a duplicate of test_mulitnode_failure::test_worker_failed
2021-11-30 12:49:43 -08:00