Commit graph

5656 commits

Author SHA1 Message Date
xwjiang2010
96b44adf67
[Tune] Remove pg caching with fixes to pbt scheduler (#20403)
This reverts commit f13c2a5350.

Re-land remove PG caching logic.

As a result, pbt scheduler cannot stop and start trial within itself for weight transfer and perturbation now. So these are some changes to pbt scheduler:

1. the trial being perturbed is always left in a PAUSED state upon exiting on_trial_result. This is because instead of maintaining two separate paths for replacing a trial, we consolidate to always "stop" and "restore" and rely on reuse_actor as an optimization if available. (see 2)
2. consolidates pbt replacing a trial with reuse_actor.
3. introduces a NOOP scheduler decision to indicate that (pbt) scheduler has finished its interaction with executor and thus no decision is further needed in Tune loop.

Long term, we should control the interface between scheduler and executor. For example, on_trial_result taking in the whole runner is too much API exposure that we want to remove.
2021-11-26 15:54:45 +00:00
Qing Wang
55cb88f085
Add python unit test to make sure task in default group doesn't block others. (#20718)
Why are these changes needed?
This PR only adds a unit tests for Python concurrency group.

Related issue number
#20475
2021-11-26 21:10:49 +08:00
SangBin Cho
31f378e45a
[Part 2] Improve RayActorDiedError: Store why the actor is dead to the actor table. (#20528)
This PR includes the precise reason why actor is dead to `ActorTable`. The `death cause` stored in the table will be propagated to core worker through pubsub, so that core worker can eventually raise a good error message with metadata.
2021-11-25 04:39:02 -08:00
SangBin Cho
cd7a32f1a5
[Nightly test] Chaos test fixture (#20277)
This PR is mostly for implementing "fixture" for nightly test. Note that the current fixture implementation is not that great, and we can probably improve this in the future after refactoring e2e.py.
2021-11-24 17:13:29 -08:00
Eric Liang
75bd1fb01c
[data] Fix slow block evaluation when splitting is enabled (#20693)
This fixes slow lazy block evaluation by adding an explicit get_blocks() bulk method, and using that when-ever lazy iteration is not needed.

The root cause of the slowdown was because block splitting requires ray.get() during iteration over block refs, to materialize split blocks. However, this interferes with exponential rampup.
2021-11-24 15:25:54 -08:00
Gagandeep Singh
f22a24aca4
Replace time based seed generation with absl::BitGen and absl::Uniform (#20696) 2021-11-24 14:36:35 -08:00
Matti Picus
8299f94ab8
Fail calling Cluster() on windows, skip tests appropriately (#20172) 2021-11-24 13:40:59 -08:00
SangBin Cho
cc6dc4683f
Try deflaking worker capping on Windows (#20669) 2021-11-24 09:41:35 -08:00
Guyang Song
53630ee03b
Revert "Revert "[runtime env] redefine runtime env to protobuf"" and fix windows compiling (#20692)
- Fix windows compiling and revert https://github.com/ray-project/ray/pull/20641
- Seems the pr https://github.com/ray-project/ray/pull/20670 can solve the windows compiling issue.
2021-11-24 09:01:01 -08:00
Yihong Chen
05a7d1f34e
[serve] Fix autoscaling config is not loaded when calling options() (#20613) 2021-11-24 09:14:28 -06:00
Antoni Baum
a8d7897a56
[CI] Modify remote wrapper in XGBoost-Ray client test (#20544)
Instead of wrapping the whole training run in a remote call, we only query the files on the node in a remote call. XGBoost-Ray is then started from the local node.
2021-11-24 10:27:17 +00:00
Kai Fricke
7446269ac9
[tune/rllib] Fix tune cloud tests for function and rllib trainables (#20536)
Fixes some race conditions and softens some constraints around checkpoint numbers.
2021-11-24 09:29:12 +00:00
SangBin Cho
414737b7c7
[Core] Raise an exception on Ray version mismatch (#20179)
Add unit tests that verify Ray version mismatches
2021-11-23 21:25:58 -08:00
Alex Wu
b616aecd89
[ci][windows] Skip test_worker_capping.py::test_zero_cpu_scheduling (#20605)
1 second doesn't seem to be a long enough timeout for test_worker_capping.py::test_zero_cpu_scheduling on windows.
2021-11-23 20:21:08 -08:00
Eric Liang
163620ba94
[data] Make block splitting feature flagged off by default (#20660)
block splitting and makes it off by default. This makes it easier to debug problems potentially related to this feature. Criteria for enabling by default:
- We're confident all nightly tests pass (currently, there may be an issue with large-scale groupby with block splitting).
- We're confident lineage-based reconstruction can work with block splitting.
2021-11-23 19:46:18 -08:00
iasoon
186c16c50e
[serve] Don't create placement group for deployment with no resources (#20471) 2021-11-23 21:27:43 -06:00
Alex Wu
af9f1ef4dc
Pin redis back to redis >= 3.5.0 (#20661)
With the release of redis 4.0.2, there are no more warning message issues. Therefore, we no longer need to pin a maximum version of redis.
2021-11-23 15:51:20 -08:00
Amog Kamsetty
4484be6c96
[Train] Fix test_callback (#20603)
* fix

* Update test_callbacks.py
2021-11-23 09:10:47 -08:00
xwjiang2010
2b5ad4a3c0
[tune] TrialExecutor should not take in Runner interface. (#20655) 2021-11-23 16:54:47 +00:00
xwjiang2010
e24c1dccb0
[Tune] Remove unnecessary argument in update_last_result. (#20653) 2021-11-23 16:53:28 +00:00
Eric Liang
80d9476c50
Deflake test_multi_node_3.py::test_calling_start_head (#20652)
This test seems to be flaking since ray stop sometimes fails when sending SIGTERM only. While that's desirable to fix, the test is still testing the intended behavior even if we send SIGKILL.
2021-11-22 19:01:04 -08:00
Alex Wu
9388d28233
Revert "[runtime env] redefine runtime env to protobuf" (#20641)
Reverts #19511

Breaks windows compilation
2021-11-22 13:11:30 -08:00
iasoon
7745925203
[Serve] log errors in deployment initialization/configuration user code (#20620) 2021-11-22 09:23:15 -08:00
xwjiang2010
ae5c4d0dae
[tune] Remove _pause and related method in RayTrialExecutor. (#20555)
Removes legacy code path that is never invoked
2021-11-22 16:42:05 +00:00
Kai Fricke
236951ee4c
[tune] Introduce TrialCheckpoint class, making checkpoint down/upload easie (#20585)
This PR introduces a TrialCheckpoint class which is returned e.g. by ExperimentAnalysis.best_checkpoint. The class enables easy access to cloud storage locations (rather than just local directories before). It also comes with utilities to download, upload, and save trial checkpoints to local and cloud targets.
2021-11-22 14:16:26 +00:00
Dmitri Gekhtman
76a01862cb
[autoscaler][commands] Fix load metrics summary (#20623)
Running ray status with the changes from #20359
while running an autoscaler older than those changes
results in an error on input "head_ip" to LoadMetricsSummary.
See #20359 (comment)
This PR fixes the bug by restoring head_ip as an optional parameter of LoadMetricsSummary.
2021-11-22 07:34:02 -05:00
matthewdeng
caa4ff3783
[train][datasets] update example and remove dask (#20592) 2021-11-21 17:06:44 -08:00
Dmitri Gekhtman
0f70f40a2a
[autoscaler] Fewer non terminated nodes calls (#20359)
non_terminated_nodes calls are expensive for some node provider implementations.

This PR refactors autoscaler._update() such that it results in at most one non_terminated_nodes call.
Conceptually, the change is that the autoscaler only needs a consistent view of the world once per update interval.

The structure of an autoscaler update is now

call non_terminated_nodes to update internal state
update autoscaler status strings
terminate nodes we don't need, removing them from internal state as we go
run node updaters if needed
get nodes to launch based on internal state
There's a small operational difference introduced:
Previously -- After a node is created, its NodeUpdater thread is initiated immediately.
Now -- After a node is created, its NodeUpdater thread is initiated in the next autoscaler update.

This typically will not introduce latency, since the time to get SSH access (a few minutes) is much longer than the autoscaler update interval (5 seconds by default).

Along the way, I've removed the local_ip initialization parameter for LoadMetrics because it was confusing and not useful (and caused some tests to fail)
2021-11-21 12:22:24 -05:00
Yi Cheng
36ee3fd46b
[gcs] Remove rpush for storage in py (#20410)
## Why are these changes needed?
In python, redis rpush is used to broadcast and store the keys. In this PR, we use gcs kv to store the keys. pubsub is still using redis which need to be remove later.

The protocol before this PR:
- worker subscribe to redis key spaces
- worker write the key of function/actor to (export:sqn, key)
- so the other worker will be notified and start to load the data by checking export:sqn

This depends on redis for both kv and pubsub, and this PR fix the kv part.

After this PR:
- worker subscribe to redis key space
- For exporting:
  - worker will find the first key not being hold. This is guaranteed by internal kv which right now is a single thread, atomic db. The worker will just check until it find one key not existing and write it (this is single operation). One optimization right now is to use the import counter as the start offset since this counter means all keys before the counter has already been used.
  - worker will then write a dummy key to redis key space for broadcasting
- For importer
 - It's working as before, but instead of reading from redis, it will read from gcs kv.


This is part in redis removal project.

## Related issue number
https://github.com/ray-project/ray/issues/19443
2021-11-21 00:40:13 -08:00
Stephanie Wang
88136fa495
[core] Timeout object fetches that take too long (#20516)
Remerging #19789 with some fixes for Dask-on-Ray 1TB sort:

- Fixes a bug where the timer was not getting reset correctly
- Increased timeout to 10min just to be safe
- Changed the error to a unique exception ObjectFetchTimedOutError to improve debugging. 

This exception should usually indicate a system-level bug.
2021-11-20 16:43:56 -08:00
Guyang Song
ad56b9b432
[runtime env] redefine runtime env to protobuf (#19511) 2021-11-20 16:54:42 +08:00
Jiajun Yao
255bdc8fb1
Make fake node provider thread safe (#20591)
We may have multiple NodeLauncher threads access the same node provider so it should be thread safe.
2021-11-19 18:59:38 -08:00
Amog Kamsetty
e1cd7b0016
[Train] Propagate env vars to BackendExecutor (#20523)
Propagates environment variables to BackendExecutor actor using runtime envs.

Also actually run test_callbacks in CI.

Note that there is an issue with runtime envs: #20587. But this only happens if you shutdown Ray and start a new session again.
2021-11-19 15:36:03 -08:00
Alex Wu
4cc225e9d4
Revert "Revert "[core] Nested task support via task depth + backpressure" (#20438)" (#20443)
This PR reverts the previous revert with the following minor changes.

Worker capping is off by default.
The cap feature flag is on the for the tests that explicitely require it.
2021-11-19 15:22:35 -08:00
Antoni Baum
c385756817
[datasets] Add an env var for progress bar behavior (#20586)
Adds a RAY_DATA_DISABLE_PROGRESS_BARS env var to control the default progress bar behavior. The default value is "0". Setting it to "1" disables progress bars, unless they are reenabled again by the set_progress_bars method.
2021-11-19 15:09:58 -08:00
mwtian
da79f24e8c
[Core][Pubsub] Refactor to prepare for migrating logging to Ray pubsub (#20560)
## Why are these changes needed?
Publisher and subscriber for logs, in driver, dashboard and tests are refactored to make it easier to support using Ray pubsub for logs. Actual support of Ray pubsub for logs will be added later in #20492.

This PR does not intend to introduce any behavior change.

## Related issue number
2021-11-19 12:28:37 -08:00
Chen Shen
77a8723bba
[Core][actor out-of-order execution 6/n] plumbing work to make it work e2e (#20177)
This PR is the last PR that enables out of order execution. Previous PR: #20176

In this PR specifically, we added an execute_out_of_order option to .options call, which creates the actor with both out_of_order_submit_queue and out_of_order_scheduling queue.

this PR also added @simon-mo original case for testing.
2021-11-19 11:05:18 -08:00
Dmitri Gekhtman
41af24c2ea
Head pod identity can change (#20566) 2021-11-19 09:57:48 -08:00
Eric Liang
79911510d3
Raise better error message when workers are killed with SIGTERM in k8s (#20557)
In k8s, sigterm almost always means the pod was killed due to memory limits. Raise a better error message there.
2021-11-19 09:36:37 -08:00
Ameer Haj Ali
3c308667f1
[Tune] Fix checkpointing error message on K8s (#20559)
This commit improves the error message to guide users to setup cloud checkpointing if trial checkpoint syncing failed.
2021-11-19 09:17:38 +00:00
Eric Liang
65a8698e82
Raise the dataset block size limit to 2GiB (#20551)
The default block size of 500MiB seems too low for some common workloads, e.g. shuffling 500GB. This creates 1000 blocks which means 1 million intermediate shuffle objects until we implement #20500.
2021-11-18 19:36:10 -08:00
Clark Zinzow
2d50bf1302
[Datasets] Bump NumPy version to >= 1.19.0 for Python 3.6. (#20542)
Datasets groupby boundary sampling requires `numpy>=1.19.0` otherwise it fails to concatenate the Arrow table columns.
2021-11-18 17:33:06 -08:00
Clark Zinzow
462e389791
[Datasets] Fix empty Dataset.iter_batches() when trying to prefetch more blocks than exist in the dataset (#20480)
Before this PR, `ds.iter_batches()` would yield no batches if `prefetch_blocks > ds.num_blocks()` was given, since the sliding window semantics were to return no windows if `window_size > len(iterable)`. This PR tweaks the sliding window implementation to always return at least one window, even if the one window is smaller than the given window size.
2021-11-18 17:02:54 -08:00
Antoni Baum
0b14f38ac7
[tune] Multi-objective support for Optuna (#20489)
This PR adds multi-objective support for Optuna searchers, including a test and example.

Co-authored-by: gjoliver <jungong@anyscale.com>
2021-11-18 18:47:29 +00:00
Simon Mo
7143d5d494
[Serve] Bump timeout for test_standalone to fix windows (#20543) 2021-11-18 10:00:23 -08:00
Edward Oakes
d26c9e67e8
[job submission] Add a message to the JobStatus to return more detailed errors (#20491) 2021-11-18 10:15:23 -06:00
shrekris-anyscale
a91ddbdeb9
Add smart_open dependency to ray[default] (#20420) 2021-11-18 10:00:30 -06:00
Amog Kamsetty
9796ae56d5
[Train][Data] Change usages of iter_datasets to iter_epochs (#20487) 2021-11-17 18:05:51 -08:00
Gagandeep Singh
33b4245df2
Fix race condition when starting redis (#19836)
Co-authored-by: Philipp Moritz <pcmoritz@gmail.com>
2021-11-17 17:43:35 -08:00
gjoliver
724a140795
[rllib] Make sure json can serialize result dict (#20439)
We may have fields in the result dict that are or None.
Make sure our results are json serializable.
2021-11-17 10:27:00 -08:00