Commit graph

13280 commits

Author SHA1 Message Date
Clark Zinzow
e111b173e9
[Datasets] Workaround for unserializable Arrow JSON ReadOptions. (#25821)
pyarrow.json.ReadOptions are not picklable until Arrow 8.0.0, which we do not yet support. This PR adds a custom serializer for this type and ensures that said serializer is registered before each Ray task submission.
2022-06-16 18:33:59 -07:00
Clark Zinzow
3dda4e1d46
[Docs] Add a py:obj default role to Sphinx builds. (#25765)
By setting the [Sphinx `default_role`](https://www.sphinx-doc.org/en/master/usage/configuration.html#confval-default_role) to [`py:obj`](https://www.sphinx-doc.org/en/master/usage/restructuredtext/domains.html#role-py-obj), we can concisely cross-reference other Python APIs (classes or functions) in API docstrings while still maintaining the editor/IDE/terminal readability of the docstrings.

Before this PR, when referencing a class or a function, the relevant role specification is required: :class:`Dataset`, :meth:`Dataset.map`, :func:`.read_parquet`.

After this PR, the raw cross reference will work in most cases: `Dataset`, `Dataset.map`, `read_parquet`.

## Checks

- [x] I've run `scripts/format.sh` to lint the changes in this PR.
- [x] I've included any doc changes needed for https://docs.ray.io/en/master/.
- [x] I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
- Testing Strategy
   - [x] Unit tests
   - [ ] Release tests
   - [ ] This PR is not tested :(
2022-06-16 16:33:20 -07:00
Stephanie Wang
977fff16a6
Set object spill config from env var (#25794)
Previously it was not possible to set the object spill config from the RAY_xxx environment variable, unlike other system configs. This is because the config is initialized in Python first, before the C++ config is parsed.
2022-06-16 16:08:19 -07:00
Chen Shen
8e7e89a178
[Data] fix broken link (#25867)
update the broken spark link.
2022-06-16 14:01:38 -07:00
Antoni Baum
2120d3ea09
[AIR] Change the name of GBDTTrainable dynamically (#25804) 2022-06-16 13:54:09 -07:00
Simon Mo
d83773b2f1
[Serve][AIR] Support mixed input and output type, with batching (#25688) 2022-06-16 13:00:29 -07:00
Clark Zinzow
04280d6e4e
[Datasets] Preserve cached block metadata on LazyBlockList splits. (#25745)
Preserves cached block metadata on LazyBlockList splits. Before this PR, after these splits, all block metadata would have to be re-fetched.
2022-06-16 12:36:25 -07:00
Clark Zinzow
d98adbc448
[Datasets] Fix tensor extension string formatting (repr). (#25768)
Fixes tensor extension string formatting, e.g. when invoking the DataFrame repr.
2022-06-16 12:35:11 -07:00
Kai Fricke
9b052d220e
[tune] Fix checkpoint deletion for custom syncers (#25859)
Deleting checkpoints with custom syncers was faulty and untested before this PR.
2022-06-16 19:53:43 +01:00
Simon Mo
e560bce3a4
[Serve] bind to 0.0.0.0 in serve_head (#25862) 2022-06-16 11:45:11 -07:00
Kai Fricke
c4590f3ab5
[air] Convert _TrackedCheckpoint to ray.air.Checkpoint (#25849)
We often need to convert our internal `_TrackedCheckpoint` objects to `ray.air.Checkpoint`s - we should do this in a utility method in the `_TrackedCheckpoint` class.
This PR also fixes cases where we haven't resolved the saved checkpoint futures, yet.
2022-06-16 19:31:18 +01:00
Jimmy Yao
b2e9aea908
[Ray dataset] detect dataframe dtype as object (#25811)
* fix ci

* not break master
2022-06-16 11:23:03 -07:00
Artur Niederfahrenhorst
f34cd2fd8f
[RLlib] Take replay buffer api example out of GPU examples. (#25841) 2022-06-16 19:12:38 +02:00
Clark Zinzow
56c001884d
[CI] [Core] Fix C++ lint on node_manager.cc (#25854)
Master CI lint is currently broken, this fixes the C++ lint on node_manager.cc.
2022-06-16 09:43:13 -07:00
Matti Picus
e275e8b0e7
WINDOWS: replace ':' with '$' for filename (#25767)
On windows, creating a file with a ':' in the name will fail. However '$' is fine.
2022-06-16 09:38:45 -07:00
Edward Oakes
e4352305dd
Revert "[serve] Use soft constraint for pinning controller on head node (#25091)" (#25857)
This reverts commit 0f600362dd.
2022-06-16 11:16:20 -05:00
shrekris-anyscale
d944f7469c
[Serve] [Docs] Remove references to namespaces in the Serve documentation (#25830)
#25575 starts all Serve actors in the `"serve"` namespace. This change updates the Serve documentation to remove now-outdated explanations about namespaces and to specify that all Serve actors start in the `"serve"` namespace.
2022-06-16 10:50:49 -05:00
Yi Cheng
4c5c5763ef
[ci][core] Add option for parallel ci for ray core tests (#25801)
This is the first step to enable the parallel tests for ray core ci. To reduce the noise this test only add the option and not enable them. Parallel CI can be 40%-60% faster compared with running them one-by-one.

We'll enable them by bk jobs one-by-one.

Prototype here #25612
2022-06-15 22:46:50 -07:00
Tao Wang
2d9af5028e
[Cpp worker]Support cpp call java task (#25757) 2022-06-16 10:02:46 +08:00
Stephanie Wang
1bd5b93ef4
[core] Clear backlogged deletions for spilled objects (#25742)
When objects that are spilled or being spilled are freed, we queue a request to delete them. We only clear this queue when additional objects get freed, so GC for spilled objects can fall behind when there is a lot of concurrent spilling and deletion (as in Datasets push-based shuffle). This PR fixes this to clear the deletion queue if the backlog is greater than the configured batch size. Also fixes some accounting bugs for how many bytes are pinned vs pending spill.
Related issue number

Closes #25467.
2022-06-15 18:23:21 -07:00
SangBin Cho
5fb61abba3
[Usage Stats][Hotfix] Import usage reported from workers. (#25785)
## Why are these changes needed?

We currently only record usage stats from drivers. This can lose some of information when libraries are imported from workers (e.g., doing some rllib import from trainable).

@jjyao just for the future reference.
2022-06-15 18:20:12 -07:00
matthewdeng
383954fb15
[CI] upgrade to go 1.18 (#25829)
upgrade go 1.18 to fix ci linter issue.
2022-06-15 17:31:07 -07:00
Antoni Baum
91dd360f9d
[AIR/train] Move predictors to ray.train (#25769) 2022-06-15 17:02:15 -07:00
Yi Cheng
5d77d2b160
[core][gcs] Fix the issue when gcs restarts, actor is destroyed due to bundle index equals -1 (#25789)
When GCS restarts, it'll recover the placement group and make sure no resource is leaking. The protocol now is like:

- Sending the committed PGs to raylets
- Raylets will check whether any worker is using resources from the PG not in this group
- If there is any, it'll kill that worker.

Right now there is a bug, which will kill the worker using bundle index equals -1.
2022-06-15 16:57:22 -07:00
Yi Cheng
bcb8ae9fbd
[core] Enable test_get_locations.py (#25814)
This test was skipped accidentally. This PR enabled it.
2022-06-15 16:47:09 -07:00
Antoni Baum
b5fd02af4f
[CI] Print linkcheck summary only in linkcheck (#25781) 2022-06-15 16:21:08 -07:00
Edward Oakes
0f600362dd
[serve] Use soft constraint for pinning controller on head node (#25091)
Un-reverting https://github.com/ray-project/ray/pull/24934 which caused `test_cluster` to become flaky. This was due to an oversight: we need to update the `HTTPState` logic to account for the controller not necessarily running on the head node.

This will require using the new `SchedulingPolicy` API, but I'm not quite sure the best way to do it. Context here: https://github.com/ray-project/ray/issues/25090.
2022-06-15 17:52:20 -05:00
Clark Zinzow
b51b777aae
[CI] [Datasets] [RayDP] Skip failing RayDP integration tests. (#25818)
Current causing the master Datasets CI job to fail due to a hard dependency on MLDataset, which has been deleted in Ray master. See #25816.
2022-06-15 15:20:52 -07:00
clarng
1a5f42742d
import sort rest of autoscaler (#25796)
Continue to import sort the rest of autoscaler.
2022-06-15 15:00:21 -07:00
Archit Kulkarni
23030dbcaa
[runtime env] Hide URI cache behind class (#24622)
Followup PR to https://github.com/ray-project/ray/pull/20273.

- Hides cache logic behind a class.
- Adds "name" field to runtime env plugin class and makes existing conda, pip, working_dir, and py_modules inherit from the plugin class. 

Future work will unify the codepath for these "base plugins" with the codepath for third-party plugins; currently these are different, and URI support is missing for third-party plugins.
2022-06-15 16:14:06 -05:00
Antoni Baum
090024c297
[AIR] Fix FailureConfig not being a dataclass (#25807) 2022-06-15 13:46:51 -07:00
Robert
b4d85a2c8a
[RuntimeEnv] Fixes spaces in paths causing failures on Windows (#25659)
This is a follow-up to the previous PR (GitHub did some funky things when I did a rebase, so I had to create a new one)

On Windows systems, the `exec_worker` method may fail due to spaces being present in arguments that are file paths. This addresses said issue.
2022-06-15 15:22:17 -05:00
zcin
3f91cbd979
[serve][docs] Replaced term 'actor_init_options' with 'ray_actor_options' in documentation (#25808)
Replaced the term `actor_init_options` with `ray_actor_options` in [this documentation section](https://docs.ray.io/en/releases-1.13.0/serve/performance.html#choosing-the-right-hardware) because `actor_init_options` is an outdated variable name. It's been changed to `ray_actor_options` in the [code](2546fbf99d/python/ray/serve/deployment.py (L45)).
2022-06-15 15:21:24 -05:00
Clark Zinzow
526e12074a
[Datasets] Make it clear that read_parquet() does not support multiple directories. (#25747)
Unfortunately, ray.data.read_parquet() doesn't work with multiple directories since it uses Arrow's Dataset abstraction under-the-hood, which doesn't accept multiple directories as a source: https://arrow.apache.org/docs/python/generated/pyarrow.dataset.dataset.html

This PR makes this clear in the docs, and as a driveby, adds ray.data.read_parquet_bulk() to the API docs.
2022-06-15 13:19:39 -07:00
Ian Rodney
7800172041
[AWS] Cleanup Naming/Typing of Boto3 resources/clients (#25731)
It's a bit hard to follow if these are clients or resources so add typing + rename a mis-named function.
2022-06-15 11:57:20 -07:00
clarng
ef866d1e49
exclude doc_code from import sorting (#25772)
Skip sorting the imports in doc_code.
2022-06-15 11:34:45 -07:00
Chen Shen
8982e4d78c
Revert "[Ray Dataset] fix the type infer of pd.dataframe (when dtype is object)" (#25809)
This reverts commit f61f60f708.
2022-06-15 11:20:14 -07:00
Stephanie Wang
68be44ade1
[datasets] Avoid unnecessary metadata serialization in Datasets shuffle (#25734)
Push-based shuffle has some extra metadata involving merge and reduce tasks. Previously we were serializing an O(n) (n = reduce tasks) metadata and sending this to tasks, which caused a lot of unnecessary plasma usage on the head node. This PR splits up the metadata into parts that can be kept on the driver and a relatively cheap part that is sent to all tasks.
Related issue number

One of the issues needed for #24480.
2022-06-15 10:33:52 -07:00
Simon Mo
503e197f8c
[CI] Upload macOS bazel test files (#25744) 2022-06-15 10:09:04 -07:00
Jimmy Yao
f61f60f708
[Ray Dataset] fix the type infer of pd.dataframe (when dtype is object) 2022-06-15 08:11:49 -07:00
xwjiang2010
88d824d067
[air] remove fully_executed from Tune. (#25750) 2022-06-14 22:32:48 -07:00
Chen Shen
4ecfa9374d
Revert "[Ray Dataset] fix the type infer of pd.dataframe (when dtype is object.) (#25563)" (#25790)
This reverts commit 57d02eec2e.
2022-06-14 20:46:40 -07:00
Antoni Baum
11c556f887
[Train] Remove bad arg from SklearnTrainer doc (#25773)
Removes docstring for an argument that is not present. Looks like it was introduced by mistake.
2022-06-14 19:29:49 -07:00
shrekris-anyscale
a371756b3c
[Serve] Update Serve CLI and REST API behavior to use new config (#25691) 2022-06-14 19:01:51 -07:00
Kai Fricke
fdf85ea403
[air] Add tutorial to convert existing pytorch code to Ray AIR (#25723) 2022-06-14 18:11:32 -07:00
clarng
badf444eda
Respect import order for psutil and setproctitle (#25780)
Sort imports in a way that preserves the ordering requirements. This PR is needed for any file changes that imports psutil or setproctitle.
2022-06-14 17:44:41 -07:00
Antoni Baum
067a244c84
[AIR] Arrow support for preprocessors (#25623)
Adds a _transform_arrow method to Preprocessors that allows them to implement logic for arrow-based Datasets.

- If only _transform_arrow is implemented, will convert the data to arrow.
- If only _transform_pandas is implemented, will convert the data to pandas.
- If both are implemented, will pick the method corresponding to the format for best performance.
Implementation is defined as overriding the method in a sub-class.

This is only a change to the base Preprocessor class. Implementations for sub-classes will come in the future.
2022-06-14 16:48:31 -07:00
Jimmy Yao
5f6f2d9f29
[AIR] Tf end2end CV example (#25070) 2022-06-14 16:24:38 -07:00
Yi Cheng
7b8b0f8e03
Revert "[RLlib] Remove execution plan code no longer used by RLlib. (#25624)" (#25776)
This reverts commit 804719876b.
2022-06-14 13:59:15 -07:00
Sihan Wang
d4aa7691e9
[Serve] Add compact for InMemoryMetricsStore max function (#25770) 2022-06-14 13:09:30 -07:00