Commit graph

13825 commits

Author SHA1 Message Date
Kai Fricke
8d7b865614
[air/tuner/docs] Update docs for Tuner() API 2a: Tune examples (non-docs) (#26931)
Splitting up #26884: This PR includes changes to use Tuner() instead of tune.run() for all examples included in python/ray/tune/examples

Signed-off-by: xwjiang2010 <xwjiang2010@gmail.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>

Co-authored-by: xwjiang2010 <xwjiang2010@gmail.com>
Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
2022-07-24 21:00:22 +01:00
Kai Fricke
803c094534
[air/tuner/docs] Update docs for Tuner() API 2b: Tune examples (ipynb) (#26884)
This PR updates the Ray AIR/Tune ipynb examples to use the Tuner() API instead of tune.run().

Signed-off-by: Kai Fricke <kai@anyscale.com>
Signed-off-by: Richard Liaw <rliaw@berkeley.edu>
Signed-off-by: Xiaowei Jiang <xwjiang2010@gmail.com>
Signed-off-by: Kai Fricke <coding@kaifricke.com>

Co-authored-by: Richard Liaw <rliaw@berkeley.edu>
Co-authored-by: Xiaowei Jiang <xwjiang2010@gmail.com>
2022-07-24 18:53:57 +01:00
Eric Liang
008eecfbff
[docs] Update the AIR data ingest guide (#26909) 2022-07-24 09:59:29 -07:00
Cheng Su
e19cf164fd
[Datasets] Use sampling to estimate in-memory data size for Parquet data source (#26868) 2022-07-24 09:58:57 -07:00
Kai Fricke
8fe439998e
[air/tuner/docs] Update docs for Tuner() API 1: RSTs, docs, move reuse_actors (#26930)
Signed-off-by: Kai Fricke coding@kaifricke.com

Why are these changes needed?
Splitting up #26884: This PR includes changes to use Tuner() instead of tune.run() for most docs files (rst and py), and a change to move reuse_actors to the TuneConfig
2022-07-24 07:45:24 -07:00
Kai Fricke
c01bb831d4
[hotfix/data] Fix linter for test_split (#26944)
Signed-off-by: Kai Fricke <kai@anyscale.com> fix linting
2022-07-24 07:01:36 -07:00
Christy Bergman
e9503dbe2b
[RLlib] Push suggested changes from #25652 docs wording Parametric Models Action Masking. (#26793) 2022-07-24 15:36:55 +02:00
Artur Niederfahrenhorst
e9a8f7d9ae
[RLlib] Unify gnorm mixin for tf and torch policies. (#26102) 2022-07-24 15:31:09 +02:00
Yi Cheng
c44d9ff397
[core] Fix the deadlock in submit task when actor failed. (#26898)
Signed-off-by: Yi Cheng <chengyidna@gmail.com>

## Why are these changes needed?

When actor died, it'll send notification to core workers. Right now, sometimes, core worker will queue the task waiting for actor death info and pop it up for better usability. But in async cases, this is going to cause issues.

The callback might submit tasks which require holding the lock. But it's already being held. This is going to cause a deadlock.

This PR fixed this by moving the failure part out of the lock.
2022-07-24 00:23:49 -07:00
Jian Xiao
90cea203be
Ray 2.0 API deprecation (#26116)
Ray 2.0 API deprecation for:

 ray.remote(): placement_group
 ray.remote(): placement_group_bundle_index
 ray.remote(): placement_group_capture_child_tasks
 ray.get_dashboard_url()
 ray.get_resource_ids()
 ray.disconnect()
 ray.connect()
 ray.util.ActorGroup
 ray.util.ActorPool
 Add get_xx_id() to return hex (rather than object), and then deprecate the xx_id() (which returns Cython object): the xx here can be node, task etc.
 ray start: --plasma-store-socket-name
 ray start: --raylet-socket-name
2022-07-23 22:18:58 -07:00
Chen Shen
aaab4abad5
[Data][Split] stable version of split with hints (#26778)
Why are these changes needed?
Introduce a stable version of split with hints with a stable equalizing algorithm:

use the greedy algorithm to generate the initial unbalanced splits.
for each splits, first shave them so the number for rows are below the target_size
based on how many rows needed for each split, do a one time split_at_index to the left over blocks.
merge the shaved splits with the leftover splits.
The guarantee of this algorithm is we at most need to split O(split) number of blocks.
2022-07-23 22:13:11 -07:00
SangBin Cho
37f4692aa8
[State Observability] Fix "No result for get crashing the formatting" and "Filtering not handled properly when key missing in the datum" #26881
Fix two issues

No result for get crashing the formatting
Filtering not handled properly when key missing in the datum
2022-07-23 21:33:07 -07:00
Eric Liang
d692a55018
[data] Make lazy mode non-experimental (#26934) 2022-07-23 21:28:31 -07:00
Ishant Mrinal
b32c784c7f
[RLLib] RE3 exploration algorithm TF2 framework support (#25221) 2022-07-23 18:05:01 -07:00
matthewdeng
bcec60d898
Revert "[data] set iter_batches default batch_size #26869 " (#26938)
This reverts commit b048c6f659.
2022-07-23 17:46:45 -07:00
Jian Xiao
da9581b746
GC the blocks that have been splitted during .split() if they are owned by consumer (#26902)
Eagerly GC blocks no longer needed to improve memory efficiency and reduce object spilling.
2022-07-23 16:41:22 -07:00
matthewdeng
b048c6f659
[data] set iter_batches default batch_size #26869
Why are these changes needed?
Consumers (e.g. Train) may expect generated batches to be of the same size. Prior to this change, the default behavior would be for each batch to be one block, which may be of different sizes.

Changes
Set default batch_size to 256. This was chosen to be a sensible default for training workloads, which is intentionally different from the existing default batch_size value for Dataset.map_batches.
Update docs for Dataset.iter_batches, Dataset.map_batches, and DatasetPipeline.iter_batches to be consistent.
Updated tests and examples to explicitly pass in batch_size=None as these tests were intentionally testing block iteration, and there are other tests that test explicit batch sizes.
2022-07-23 13:44:53 -07:00
Jiao
3dc4189d88
Revert "[air] remove unnecessary logs + improve repr for result (#26906)" (#26932) 2022-07-23 12:12:26 -07:00
Stephanie Wang
55a0f7bb2d
[core] ray.init defaults to an existing Ray instance if there is one (#26678)
ray.init() will currently start a new Ray instance even if one is already existing, which is very confusing if you are a new user trying to go from local development to a cluster. This PR changes it so that, when no address is specified, we first try to find an existing Ray cluster that was created through `ray start`. If none is found, we will start a new one.

This makes two changes to the ray.init() resolution order:
1. When `ray start` is called, the started cluster address was already written to a file called `/tmp/ray/ray_current_cluster`. For ray.init() and ray.init(address="auto"), we will first check this local file for an existing cluster address. The file is deleted on `ray stop`. If the file is empty, autodetect any running cluster (legacy behavior) if address="auto", or we will start a new local Ray instance if address=None.
2. When ray.init(address="local") is called, we will create a new local Ray instance, even if one is already existing. This behavior seems to be necessary mainly for `ray.client` use cases.

This also surfaces the logs about which Ray instance we are connecting to. Previously these were hidden because we didn't set up the log until after connecting to Ray. So now Ray will log one of the following messages during ray.init:
```
(Connecting to existing Ray cluster at address: <IP>...)
...connection...
(Started a local Ray cluster.| Connected to Ray Cluster.)( View the dashboard at <URL>)
```

Note that this changes the dashboard URL to be printed with `ray.init()` instead of when the dashboard is first started.

Co-authored-by: Eric Liang <ekhliang@gmail.com>
2022-07-23 11:27:22 -07:00
Siyuan (Ryans) Zhuang
1fa8ddb07a
[Workflow] Make sure no side effects during workflow resuming (#26918)
Signed-off-by: Siyuan Zhuang <suquark@gmail.com>
2022-07-23 11:04:07 -07:00
Avnish Narayan
a50a81a13a
Revert "[RLlib] Fix apex breakout release test performance. (#26867)" (#26927) 2022-07-23 17:27:50 +02:00
Rohan Potdar
a53bbe49bf
[RLlib]: Raise deprecation warning in MARWIL OPE methods. (#26893) 2022-07-23 13:55:40 +02:00
Rohan Potdar
97bcf38ec0
[RLlib] Fix torch None conversion in torch_utils.py::convert_to_torch_tensor. (#26863) 2022-07-23 13:54:57 +02:00
Rohan Potdar
69f6b843da
[RLlib] Test output length in DatasetReader with default IOContext. (#26852) 2022-07-23 13:53:59 +02:00
Avnish Narayan
2cfd6c2e97
[RLlib] Fix apex breakout release test performance. (#26867) 2022-07-23 13:53:03 +02:00
Richard Liaw
96e8027c7e
[air] large tune/torch benchmark (#26763)
Co-authored-by: Kai Fricke <krfricke@users.noreply.github.com>
2022-07-23 01:17:25 -07:00
Richard Liaw
d79431e32c
[air] remove unnecessary logs + improve repr for result (#26906) 2022-07-23 01:15:13 -07:00
Siyuan (Ryans) Zhuang
be5476cd55
[Workflow] Update API stability (#26903)
* alpha API

Signed-off-by: Siyuan Zhuang <suquark@gmail.com>

* mark exceptions as alpha APIs

Signed-off-by: Siyuan Zhuang <suquark@gmail.com>

* update

Signed-off-by: Siyuan Zhuang <suquark@gmail.com>
2022-07-23 00:15:34 -07:00
Eric Liang
c118373afe
[air] Simplify the local shuffle API (#26915)
Simplify the local shuffle API by removing a constraint in the args that we can calculate internally.
2022-07-22 23:31:58 -07:00
Eric Liang
63a6c1dfac
[docs] Cleanup the Datasets key concept docs (#26908)
Clean up the Datasets key concept doc to be suitable for consumption by a beginner level user and improving the diagrams.
2022-07-22 23:30:54 -07:00
Chen Shen
042450d319
Revert "[Datasets] Automatically cast tensor columns when building Pandas blocks. (#26684)" (#26921)
This reverts commit 0c139914bb.
2022-07-22 22:26:40 -07:00
clarng
170bde40a0
Mark local mode as deprecated with warning message about possible memory leak (#26855)
Mark local mode as deprecated with a warning message.

Related issue number
#24216
#26095
2022-07-22 22:12:23 -07:00
Kai Fricke
1f32cb95db
[air/tune] Add top-level imports for Tuner, TuneConfig, move CheckpointConfig (#26882) 2022-07-22 20:17:06 -07:00
Eric Liang
36c46e9686
[docs] Improve AIR table of contents titles (#26858) 2022-07-22 17:17:49 -07:00
Rohan Potdar
2f22262d39
[RLlib]: Fix SampleBatch.split_by_episode to use dones if episode id is not available (#26492) 2022-07-22 16:46:05 -07:00
Jiajun Yao
46a19c1e47
[RFC] [Usage Stats] Expose api to record extra usage tags (#26834)
Library authors can record extra usage tags via usage_lib.record_extra_usage_tag(key, value)

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
2022-07-22 16:07:10 -07:00
Jiao
840b0478aa
[AIR CUJ] Add wait_for_nodes for 4x4 gpu test 2022-07-22 16:04:54 -07:00
Kai Fricke
77ba30d34e
[tune] Docs for custom command based syncer (awscli / gsutil) (#26879)
Co-authored-by: matthewdeng <matthew.j.deng@gmail.com>
2022-07-22 15:28:53 -07:00
mwtian
aadd82dcbd
[Core] stop retrying after successfully created GCS client (#26788) 2022-07-22 12:43:46 -07:00
Steven Morad
259429bdc3
Bump gym dep to 0.24 (#26190)
Co-authored-by: Steven Morad <smorad@anyscale.com>
Co-authored-by: Avnish <avnishnarayan@gmail.com>
Co-authored-by: Avnish Narayan <38871737+avnishn@users.noreply.github.com>
2022-07-22 12:37:16 -07:00
Jiao
a03716e75f
[AIR][Serve] Add windows check for pd.DataFrame comparison #26889
n previous implementation #26821 we have windows failure suggesting we behave differently on windows regarding datatype conversion.

In our https://sourcegraph.com/github.com/ray-project/ray/-/blob/python/ray/data/tests/test_dataset.py?L577 regarding use of TensorArray we seem to rely on pd'sassert_frame_equal rather than manually comparing frames.

This PR adds a quick conditional on windows only to ignore dtype for now.
2022-07-22 12:36:40 -07:00
Sihan Wang
bca4b179ea
[Serve] Separate internal API and Public API (#26804) 2022-07-22 12:12:35 -07:00
Siyuan (Ryans) Zhuang
4b50ef6a28
[Workflow] Rename the argument of "workflow.get_output" (#26876)
* rename get_output

Signed-off-by: Siyuan Zhuang <suquark@gmail.com>

* update doc

Signed-off-by: Siyuan Zhuang <suquark@gmail.com>
2022-07-22 12:06:19 -07:00
Avnish Narayan
82395c4646
[RLlib] Put learning test into own folders (#26862)
Co-authored-by: Artur Niederfahrenhorst <artur@anyscale.com>
2022-07-22 11:20:47 -07:00
SangBin Cho
95c6ff153b
[State Observability] Remove an unnecessary field from list workers (#26815)
Worker info is useless
2022-07-22 10:56:42 -07:00
Avnish Narayan
2a0ef663c9
[rllib] Use compress observations where replay buffers and image obs are used in tuned examples (#26735) 2022-07-22 10:10:51 -07:00
Clark Zinzow
0c139914bb
[Datasets] Automatically cast tensor columns when building Pandas blocks. (#26684)
This PR tries to automatically cast tensor columns to our TensorArray extension type when building Pandas blocks, logging a warning and falling back to the opaque object-typed column if the cast fails. This should allow users to remain mostly tensor extension agnostic.

TensorArray now eagerly validates the underlying tensor data, raising an error if e.g. the underlying ndarrays have heterogeneous shapes; previously, TensorArray wouldn't validate this on construction and would instead let failures happen downstream. This means that our internal TensorArray use needs to follow a try-except pattern, falling back to a plain NumPy object column.
2022-07-22 10:10:26 -07:00
Clark Zinzow
a29baf93c8
[Datasets] Add .iter_torch_batches() and .iter_tf_batches() APIs. (#26689)
This PR adds .iter_torch_batches() and .iter_tf_batches() convenience APIs, which takes care of ML framework tensor conversion, the narrow tensor waste for the .iter_batches() call ("numpy" format), and unifies batch formats around two options: a single tensor for simple/pure-tensor/single-column datasets, and a dictionary of tensors for multi-column datasets.
2022-07-22 10:09:36 -07:00
Edward Oakes
1fd2913abd
[serve] Refactor checkpointing to write ahead target state (#26797) 2022-07-22 09:59:09 -07:00
zcin
b856daebbd
[Serve] Fix Formatting of Error Messages printed in serve status (#26578) 2022-07-22 09:52:13 -07:00