Commit graph

7584 commits

Author SHA1 Message Date
Simon Mo
6084eb6a9f
Revert "Revert "[Serve] ServeHandle detects ActorError and drop replicas from target group (#26685)" (#27283)" (#27348) 2022-08-02 20:04:03 -07:00
Richard Liaw
6dc3dbdd37
[air] Update to beta (#27393)
Update API references to beta. Needed as we are going to beta in 2.0.

I left out RL/Scikit-Learn/HuggingFace.
2022-08-02 17:10:41 -07:00
Eric Liang
91a03026ef
[air] Fix BatchPredictor.predict_pipelined not working with GPU stage (#27232) 2022-08-02 15:36:40 -07:00
Clark Zinzow
291a294208
[AIR - Serve] [Hotfix] Check for tensor extension via dtype rather than a NumPy conversion (#26891)
Converting a Pandas DataFrame column to an ndarray (e.g. via df[col].values) can often result in a full copy of the column in order to construct the ndarray due to Pandas' 2D block management. This PR ports tensor extension type checking to checking the dtype, which is always an O(1) check.

Signed-off-by: Clark Zinzow <clarkzinzow@gmail.com>
2022-08-02 14:52:46 -07:00
Ricky Xu
122eda2757
[Core] Move test_state_api test back to large test groups (#27377)
Why are these changes needed?
python/tests/test_state_api.py runs for 5min in normal run
2022-08-02 14:21:34 -07:00
Simon Mo
a9d94f740c
[Serve] Remove the warning for async handles in 2.0 (#27346)
Signed-off-by: simon-mo <simon.mo@hey.com>
2022-08-02 15:07:41 -05:00
Jiajun Yao
cd2e590567
Support placement_group=None in PlacementGroupSchedulingStrategy (#27370)
We decided to allow escaping the parent pg via `PlacementGroupSchedulingStrategy(placement_group=None)` instead of using "DEFAULT". Our doc is updated with that but in the code it's still not allowed.
2022-08-02 12:49:41 -07:00
Eric Liang
a1cb735035
Raise the (runtime_env max size) gRPC max message size to 500MiB
Signed-off-by: Eric Liang <ekhliang@gmail.com>
2022-08-02 12:41:34 -07:00
Ricky Xu
82a24f9319
[Doc][Core][State Observability] Adding Python SDK doc and docstring (#26997)
1. Add doc for python SDK and docstrings on public SDK
2. Rename list -> ray_list and get -> ray_get for better naming 
3. Fix some typos 
4. Auto translate address to api server url.

Co-authored-by: SangBin Cho <rkooo567@gmail.com>
2022-08-02 11:24:59 -05:00
Kai Fricke
149c031c4b
[tune/release] Do not use spot instances in k8s tests (#27250)
Spot instances are not being booted up, so let's go without them.

Signed-off-by: Kai Fricke <kai@anyscale.com>
2022-08-02 11:30:41 +01:00
Yi Cheng
a9697722cf
[workflow] Change step to task in workflow. (#27330)
* change step to task

Signed-off-by: Yi Cheng <74173148+iycheng@users.noreply.github.com>

* fix comments

Signed-off-by: Yi Cheng <74173148+iycheng@users.noreply.github.com>

* fix comments

Signed-off-by: Yi Cheng <74173148+iycheng@users.noreply.github.com>

* fix comments

Signed-off-by: Yi Cheng <74173148+iycheng@users.noreply.github.com>
2022-08-01 22:27:41 -07:00
Yi Cheng
00d22b6c7c
[core] Fix the test_failure_3.py in win (#27332)
Win tests were broken because when the child is killed, the parent is also killed. Change the signal sent and make it work.
2022-08-01 18:55:07 -07:00
shrekris-anyscale
324d8e4bca
[Serve] Serialize user_config with JSON instead of Pickle (#26235) 2022-08-01 17:53:43 -07:00
Eric Liang
f7ae8923f6
[docs] Reorganize the tensor data support docs; general editing (#26952)
Why are these changes needed?
Editing pass over the tensor support docs for clarity:

Make heavy use of tabbed guides to condense the content
Rewrite examples to be more organized around creating vs reading tensors
Use doc_code for testing
2022-08-01 17:31:41 -07:00
shrekris-anyscale
cc84953da3
[Serve] [Docs] Update "Getting Started" documentation (#26745) 2022-08-01 16:31:48 -07:00
jonathan-conder-sm
1d5fef2004
Fix dashboard with prometheus-client 0.14 (#23766)
Why are these changes needed?

The dashboard wasn't working (blank screen). See the linked issue for details. The cause is this exception in /tmp/ray/session_latest/logs/dashboard_agent.log:

Traceback (most recent call last):
  File "/usr/local/lib/python3.9/site-packages/ray/dashboard/agent.py", line 391, in <module>
    loop.run_until_complete(agent.run())
  File "/usr/local/lib/python3.9/asyncio/base_events.py", line 647, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.9/site-packages/ray/dashboard/agent.py", line 178, in run
    modules = self._load_modules()
  File "/usr/local/lib/python3.9/site-packages/ray/dashboard/agent.py", line 120, in _load_modules
    c = cls(self)
  File "/usr/local/lib/python3.9/site-packages/ray/dashboard/modules/reporter/reporter_agent.py", line 161, in __init__
    self._metrics_agent = MetricsAgent(
  File "/usr/local/lib/python3.9/site-packages/ray/_private/metrics_agent.py", line 75, in __init__
    prometheus_exporter.new_stats_exporter(
  File "/usr/local/lib/python3.9/site-packages/ray/_private/prometheus_exporter.py", line 332, in new_stats_exporter
    exporter = PrometheusStatsExporter(
  File "/usr/local/lib/python3.9/site-packages/ray/_private/prometheus_exporter.py", line 265, in __init__
    self.serve_http()
  File "/usr/local/lib/python3.9/site-packages/ray/_private/prometheus_exporter.py", line 319, in serve_http
    start_http_server(
  File "/usr/local/lib/python3.9/site-packages/prometheus_client/exposition.py", line 167, in start_wsgi_server
    TmpServer.address_family, addr = _get_best_family(addr, port)
  File "/usr/local/lib/python3.9/site-packages/prometheus_client/exposition.py", line 156, in _get_best_family
    infos = socket.getaddrinfo(address, port)
  File "/usr/local/lib/python3.9/socket.py", line 954, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name or service not known
There was a recent change in prometheus-client which passes the address given to start_http_server to socket.getaddrinfo. This prevents passing in an empty string, but we can get the same effect by passing None.

Related issue number
Closes #23765
2022-08-01 10:25:38 -07:00
Sihan Wang
410fe1b5ec
[Serve] Support Multiple DAG Entrypoints in DAGDriver (#26573) 2022-08-01 09:16:36 -07:00
matthewdeng
83fb2fb21d
[tune] pin pymoo (#27311)
Signed-off-by: Matthew Deng <matt@anyscale.com>
2022-07-31 01:06:27 -07:00
SangBin Cho
ec69fec1e0
Revert "[Job Submission][refactor 1/N] Add AgentInfo to GCSNodeInfo (#26302)" (#27242)
This reverts commit 14dee5f6a3.
2022-07-30 00:08:23 -07:00
Yi Cheng
7da700e337
[core] Suppress the logging error when python exits and actor not deleted. (#27300)
In py39, it seems the destruction order changed and in __del__ some component might have been uninstalled and some error will be thrown.
2022-07-29 23:12:41 -07:00
Eric Liang
e3d7930bb3
[data] When no pipeline stats are available, return a helpful message instead of empty #
Signed-off-by: Eric Liang <ekhliang@gmail.com>
2022-07-29 15:54:20 -07:00
Chris K. W
18109ec9f5
Deflake test_client_library_integration (#27105)
Using ray_start_regular_shared test_tune_library_integration seems to make test_serve_handle flake. Separate use ray_start_regular instead.

No flake: 
<img width="610" alt="Screen Shot 2022-07-27 at 1 10 59 PM" src="https://user-images.githubusercontent.com/14043490/181363214-522e9f41-df59-4b84-89b1-d8399b1901c6.png">
2022-07-29 15:50:54 -07:00
Simon Mo
1a10b53a61
Revert "[Serve] ServeHandle detects ActorError and drop replicas from target group (#26685)" (#27283)
This reverts commit 545c51609f.
2022-07-29 14:24:15 -07:00
Eric Liang
467430dd55
Fix logger initialization (#27238) 2022-07-29 10:55:15 -07:00
Simon Mo
545c51609f
[Serve] ServeHandle detects ActorError and drop replicas from target group (#26685) 2022-07-29 09:50:17 -07:00
Guyang Song
0b60d90283
[Hotfix] Fix the failure of C++ tests (#27249)
Signed-off-by: 久龙 <guyang.sgy@antfin.com>
2022-07-30 00:31:02 +08:00
Kai Fricke
1f097e9d12
[tune/docs] Update custom syncer example (#27252)
There is a small bug in the docs example for custom command based syncers. This PR fixes them and adds a test to test these changes.

Signed-off-by: Kai Fricke <kai@anyscale.com>
2022-07-29 16:09:19 +01:00
Jian Xiao
693856975a
Fix the ray version to doc version mapping (#27191)
Why are these changes needed?
It doesn't work if the ray version is something like "2.0.0rc0"
2022-07-28 23:35:24 -07:00
SangBin Cho
16aa102984
[Usage Stats] Record usage stats when dashboard disabled (#26042)
Since usage stats are recorded from the dashboard (which will become API server), it is not collected when the dashboard is not included (include_dashboard=False).

This PR fixes the issues by

change dashboard -> API server (to avoid confusing users that dashboard is still started when include_dashboard=False)
Only load modules that are irrelevant to the dashboard from the API server, so it will have the same impact as no dashboard.
2022-07-28 23:01:49 -07:00
Chen Shen
fda345335a
Revert "Allow grpcio >= 1.48 (#26765)" (#27244)
This reverts commit 6acd0a4c9b.
2022-07-28 22:25:21 -07:00
Cheng Su
b95f7b222e
[Datasets] Doing partition filtering in reader constructor (#27156)
currently we are doing things in this ordering:
1. [create the reader for data source](https://github.com/ray-project/ray/blob/master/python/ray/data/read_api.py#L1136)
2. [calculate number of tasks, based on data source estimated size and cluster resource](https://github.com/ray-project/ray/blob/master/python/ray/data/read_api.py#L1137)
3. [doing partition filtering and generate read tasks](https://github.com/ray-project/ray/blob/master/python/ray/data/read_api.py#L1143)

However, we should do partition filtering before step 2, so that the data source estimated size is calculated based on correct set of files. Otherwise estimation is calculated based on all files, while some files could be filtered out later. See https://github.com/ray-project/ray/issues/27152 for more detail.
2022-07-28 17:33:14 -07:00
Yi Cheng
137a1b12c3
[ci] Move test_storage to large test because of windows timeout. #27212
Windows actually can pass the test, but it'll need > 300s. Move it to large test.
2022-07-28 14:58:07 -07:00
Kai Fricke
b0edf21a0c
[tune/air] Exclude files in sync_dir_between_nodes, exclude temporary checkpoints (#27174)
Currently Tune sometimes syncs temporary (and thus ephemeral) checkpoint directories to the driver. This is unnecessary and should be avoided. This PR

1. Add an `exclude` argument to `sync_dir_between_nodes` to exclude files based on pattern matching
2. Adds three default patterns to exclude in node-to-driver syncing
3. Adds tests for all these utilities

Signed-off-by: Kai Fricke <kai@anyscale.com>
2022-07-28 22:55:48 +01:00
Kai Fricke
cf403d8aee
[air] Fix: Gracefully fail in file stat lookup race conditions (#27169)
See #27168, this fixes a race condition where a file is os.lstat'ed while being deleted.

Signed-off-by: Kai Fricke <kai@anyscale.com>
2022-07-28 22:54:57 +01:00
Alex Wu
b84ab363ec
[autoscaler] Remove deprecated fields from schema (#27040)
This change cuts off support for deprecated schema fields. It intentionally breaks backwards compatibility with old configs which set a global `min_workers`, use `head_node` or `worker_nodes`, `autoscaling_mode`, `initial_workers`, `target_utilization_fraction`, and `default_worker_node_type` fields.

Co-authored-by: Alex <alex@anyscale.com>
2022-07-28 11:03:43 -07:00
Yi Cheng
7db996e4db
[workflow] Fix test_logging in workflow. (#27144)
test_logging.py fail to run in CI. This PR update it to the latest API and make it run in CI.
2022-07-28 10:48:03 -07:00
Chen Shen
0d49901651
[Data][Split] Fix split ownership (#27149)
fb54679 introduced a bug by calling ray.put in the remote _split_single_block. This changes the ownership from driver to the worker who runs _split_single_block, which breaks dataset's lineage requirement and failed the chaos test.

To fix the issue we need to ensure the split block refs are created by the driver, which we can achieved by creating the block_refs as part of function returns.
2022-07-28 10:39:14 -07:00
Clark Zinzow
df124d0ad5
[AIR - Datasets] Hide tensor extension from UDFs. (#27019)
We previously added automatic tensor extension casting on Datasets transformation outputs to allow the user to not have to worry about tensor column casting; however, this current state creates several issues:

1. Not all tensors are supported, which means that we’ll need to have an opaque object dtype (i.e. ndarray of ndarray pointers) fallback for the Pandas-only case. Known unsupported tensor use cases:
a. Heterogeneous-shaped (i.e. ragged) tensors
b. Struct arrays
2. UDFs will expect a NumPy column and won’t know what to do with our TensorArray type. E.g., torchvision transforms don’t respect the array protocol (which they should), and instead only support Torch tensors and NumPy ndarrays; passing a TensorArray column or a TensorArrayElement (a single item in the TensorArray column) fails.
Implicit casting with object dtype fallback on UDF outputs can make the input type to downstream UDFs nondeterministic, where the user won’t know if they’ll get a TensorArray column or an object dtype column.
3. The tensor extension cast fallback warning spams the logs.

This PR:

1. Adds automatic casting of tensor extension columns to NumPy ndarray columns for Datasets UDF inputs, meaning the UDFs will never have to see tensor extensions and that the UDF input column types will be consistent and deterministic; this fixes both (2) and (3).
2. No longer implicitly falls back to an opaque object dtype when TensorArray casting fails (e.g. for ragged tensors), and instead raises an error; this fixes (4) but removes our support for (1).
3. Adds a global enable_tensor_extension_casting config flag, which is True by default, that controls whether we perform this automatic casting. Turning off the implicit casting provides a path for (1), where the tensor extension can be avoided if working with ragged tensors in Pandas land. Turning off this flag also allows the user to explicitly control their tensor extension casting, if they want to work with it in their UDFs in order to reap the benefits of less data copies, more efficient slicing, stronger column typing, etc.
2022-07-28 10:37:45 -07:00
shrekris-anyscale
510a0e038c
[Serve] Add host and port options to the Serve config file (#27026)
The Serve CLI and REST API always sets the host to `0.0.0.0` and the port to Serve's default. This change adds `host` and `port` as top level options in the Serve config file, so users can manually set the host and port of their Serve application to different values.

This change introduces a new Serve config file format:

```yaml
import_path: ...

runtime_env: ...

host: ...

port: ...

deployments: ...
    ...
```

`host` and `port` are optional and can be omitted. A running Serve application's `host` and `port` cannot be changed. If a user tries to `serve deploy` a config file with different `host` and `port` options than an already-running Serve application, `serve deploy` will fail without making any changes to the application. The user must `serve shutdown` their application and restart it with `serve deploy` to change their `host` and `port`.

**Follow-Up Items**
* The following CLI commands should **not** start Serve automatically. They should check whether Serve is running and perform some sort of no-op if it's not. That would alleviate the concern that the user starts Serve by accident through a `GET` request and needs to deal with default `host`/`port` options. Corresponding docs should also be updated.
    * `serve status`
    * `serve config`
    * `serve shutdown`
2022-07-28 11:26:46 -05:00
Guyang Song
79fb4a9821
[hotfix] Fix the failure of java test (#27183)
Signed-off-by: 久龙 <guyang.sgy@antfin.com>
2022-07-29 00:15:41 +08:00
Jialing He
14dee5f6a3
[Job Submission][refactor 1/N] Add AgentInfo to GCSNodeInfo (#26302)
This is the first PR of #25963 :
1. Moved the agent information from `internal KV to `GCSNodeInfo`,
2. raylet registers itself after the agent process finished register.

Motivation:
Storing agent information in `internal KV` and registering nodes in GCS (write node information to `GCSNodeInfo`) are two asynchronous operations, which will bring some complex timing problems, especially after `raylet` failover
2022-07-28 22:20:28 +08:00
Siyuan (Ryans) Zhuang
cca9030000
[Workflow] Fix flaky workflow events CI test by extending timeout (#27124)
Fix the flaky workflow events CI tests by extending timeout.
2022-07-28 00:10:15 -07:00
Eric Liang
a4434fac7f
[docs] Fix the remaining style violations in docstrings and add lint rule (#27033) 2022-07-27 22:24:20 -07:00
Jiao
0dbb18a87d
[AIR][Data] Fix nyc_taxi_basic_processing notebook (#26983) 2022-07-27 21:37:04 -07:00
Jiajun Yao
4f0fb3a5da
Mark test_usage_stats.py as large (#27111)
Currently the time is on the edge of 300s.

Signed-off-by: Jiajun Yao <jeromeyjj@gmail.com>
2022-07-27 14:16:06 -07:00
xwjiang2010
eb69c1ca28
[air] Add annotation for Tune module. (#27060)
Co-authored-by: Kai Fricke <kai@anyscale.com>
2022-07-27 13:53:46 -07:00
Amog Kamsetty
41aaf78274
[Hotfix/ML] Don't run ML tests in Windows (#27100)
Signed-off-by: Amog Kamsetty amogkamsetty@yahoo.com

Tests for upstream ML libraries (xgboost-ray, ray-lightning, etc.) were recently refactored from ray.util to ray.tests. This caused them to be run in Windows CI, but Windows CI does not have any ML dependencies. This PR disables these tests from being run on Windows, which matches the previous behavior.
2022-07-27 13:45:00 -07:00
Malinda
1d789aee63
[RLlib/Serve/Release tests] Few code refactoring for better use of efficient NumPy functions. (#26284) 2022-07-27 22:38:35 +02:00
Balaji Veeramani
66ed41b22a
[AIR] Add __repr__ to AIR classes (#27006) 2022-07-27 12:34:10 -07:00
Kai Fricke
3924a4b7cc
[air/train] Rename BaseWorkerMixin, only log info torch loop for rank 0 (#27098)
This PR

- only prints train_loop info strings (e.g. `train_loop_utils.py:298 -- Moving model to device: cpu`) for rank 0 workers for torch
- renames `BaseWorkerMixin` to `RayTrainWorker` as the name comes up often in output and is more meaningful

Signed-off-by: Kai Fricke <kai@anyscale.com>
2022-07-27 20:11:59 +01:00