Commit graph

13280 commits

Author SHA1 Message Date
Chen Shen
95fe3271ec
[Core][Doc] remove cython section from advanced doc. #26062
the example is removed.
2022-06-24 10:39:45 -07:00
SangBin Cho
ef8461abac
[Core] Fix check failure from incorrect death cause (#26007)
rkooo567
Member
rkooo567 commented 2 days ago
Why are these changes needed?
Fixes the check failure;

  | 2022-06-21 19:14:10,718	WARNING worker.py:1737 -- A worker died or was killed while executing a task by an unexpected system error. To troubleshoot the problem, check the logs for the dead worker. RayTask ID: ffffffffffffffff7cc1d49b6d4812ea954ca19a01000000 Worker ID: 9fb0f63d84689c6a9e5257309a6346170c827aa7f970c0ee45e79a8b Node ID: 2d493b4f39f0c382a5dc28137ba73af78b0327696117e9981bd2425c Worker IP address: 172.18.0.3 Worker port: 35883 Worker PID: 31945 Worker exit type: SYSTEM_ERROR Worker exit detail: Worker unexpectedly exits with a connection error code 2. End of file. There are some potential root causes. (1) The process is killed by SIGKILL by OOM killer due to high memory usage. (2) ray stop --force is called. (3) The worker is crashed unexpectedly due to SIGSEGV or other unexpected errors.
  | (HTTPProxyActor pid=31945) [2022-06-21 19:14:10,710 C 31945 31971] pb_util.h:202:  Check failed: death_cause.context_case() == ContextCase::kActorDiedErrorContext
  | (HTTPProxyActor pid=31945) *** StackTrace Information ***
  | (HTTPProxyActor pid=31945)     ray::SpdLogMessage::Flush()
  | (HTTPProxyActor pid=31945)     ray::RayLog::~RayLog()
  | (HTTPProxyActor pid=31945)     ray::core::CoreWorker::HandleKillActor()
  | (HTTPProxyActor pid=31945)     std::_Function_handler<>::_M_invoke()
  | (HTTPProxyActor pid=31945)     EventTracker::RecordExecution()
  | (HTTPProxyActor pid=31945)     std::_Function_handler<>::_M_invoke()
  | (HTTPProxyActor pid=31945)     boost::asio::detail::completion_handler<>::do_complete()
  | (HTTPProxyActor pid=31945)     boost::asio::detail::scheduler::do_run_one()
  | (HTTPProxyActor pid=31945)     boost::asio::detail::scheduler::run()
  | (HTTPProxyActor pid=31945)     boost::asio::io_context::run()
  | (HTTPProxyActor pid=31945)     ray::core::CoreWorker::RunIOService()
  | (HTTPProxyActor pid=31945)     execute_native_thread_routine
  | (HTTPProxyActor pid=31945)
  | (HTTPProxyActor pid=31982) INFO:     Started server process [31982]
NOTE: This is a temporary fix. The root cause is that there's a path that doesn't properly report the death cause (when this RPC is triggered by gcs_actor_scheduler). This should be addressed separately to improve exit observability.

Since this is intended to be picked for 1.13.1, I only added the minimal fix.
2022-06-24 06:22:33 -07:00
Kai Fricke
012306da68
[hotfix] Fix linkcheck (#26070) 2022-06-24 13:38:01 +01:00
Artur Niederfahrenhorst
bed9083f35
[RLlib] Add timeout to filter synchronization. (#25959) 2022-06-24 14:37:43 +02:00
Kai Fricke
eee866d762
[tune/structure] Introduce logger package (#26049)
This PR splits up logger.py and moves it into its own subpackage. External imports don't have to be changed at all.
2022-06-24 08:46:24 +01:00
Jun Gong
257e67474c
[RLlib] introduce serialization for our custom gym space types. (#25923) 2022-06-23 22:55:57 -07:00
Jun Gong
8c9cac350d
Fix unit test test_check_env.py and est_check_multi_agent.py. (#25993) 2022-06-23 22:55:41 -07:00
Artur Niederfahrenhorst
a3f1323457
[RLlib] Make QMix use the ReplayBufferAPI (#25560) 2022-06-23 22:55:22 -07:00
Chen Shen
ef00917df0
[CI] deflake test_multi_node_3 by increasing its timeout 2022-06-23 22:48:17 -07:00
Simon Mo
5342163b9d
[CI] Use BUILDKITE_JOB_ID for better navigation for flaky tracker (#26021) 2022-06-23 18:07:29 -07:00
Antoni Baum
94492c2b49
[AIR/Docs] Improve user guide gallery (#26016)
Moves logging to examples, reorders to match TOC, adds missing entry.
2022-06-23 17:51:01 -07:00
Sebastián Ramírez
8bde3f5dd7
🎨 Update type annotations to include options in ray.remote() (#25999)
The current type annotations expect and support using:

```Python
@ray.remote
def do_things(x: int, y: float):
    return x * y
```

...without options.

This PR adds type annotations for passing options, as in:

```Python
@ray.remote(num_cpus=3)
def do_more_things(name: str, value: float):
    return f"{name}: {value}"
```

Before:

<img width="687" alt="Screenshot 2022-06-22 at 04 49 11" src="https://user-images.githubusercontent.com/1326112/174999689-80bdc3ce-b437-464f-b05c-7613b3f8f89b.png">

After (autocompletion):

<img width="687" alt="Screenshot 2022-06-22 at 04 50 34" src="https://user-images.githubusercontent.com/1326112/174999899-5062335a-17ee-44a8-ad5c-97335e201e7b.png">

...and no errors:

<img width="687" alt="Screenshot 2022-06-22 at 04 51 15" src="https://user-images.githubusercontent.com/1326112/175000001-0a978871-8835-426f-9e09-5848194639fd.png">
2022-06-23 17:50:25 -07:00
SangBin Cho
c2e003a47a
[Usage stats] Record Ray native library usage from a home temp folder (#25842)
This PR records the historical Ray native library usage to the home temp folder. Note that library usage only includes Ray native libraries (rllib, tune, dataset, workflow, and train). NOTE: The library usage is always recorded to /tmp/ray, but they will only recorded when the cluster that enables the usage stats is running. Note that this can generate quite big amount of false positive (e.g., If I import rllib once, and start cluster for local development, they will all considered as a rllib cluster).
2022-06-23 17:49:06 -07:00
Sihan Wang
478733d751
[Serve] Bump min_workers configuration for Serve nightly tests (#25892) 2022-06-23 15:38:07 -07:00
Kai Fricke
b0e1cfbcaa
[ci] repro-ci.py: Use Name tag instead of repo_name (#26035) 2022-06-23 14:12:45 -07:00
Kai Fricke
b21314fac2
[tune/structure] Introduce trainable package (#26046)
Introduce a `trainable` package to house Trainable, FunctionTrainable (renamed), Session, and utilities.
2022-06-23 21:50:55 +01:00
Sven Mika
59a967a3a0
[RLlib] Cleanup some deprecated metric keys and classes. (#26036) 2022-06-23 21:30:01 +02:00
Jian Xiao
33b30aed15
[Datasets] Object GC for pipelining (#25820)
We leak memory when we create a DatasetPipeline from a "collapsed" DatasetPipeline (which executes multiple stages and produces a stream of output Datasets as the input base Datasets for the new DatasetPipeline).
The DatasetPipeline splitting is such a collapsing operation, so the child pipelines will have zero stages (no matter how many stages the parent pipeline had), which will make us no longer able to tell if it's safe to clear output blocks of child pipelines.

This PR fixes this by preserving whether the base Datasets can be cleared when we create new DatasetPipeline from the old.
2022-06-23 12:28:51 -07:00
JYX
bde46e8a88
Fix several typos in rollout_worker.py (#26028) 2022-06-23 11:41:53 -07:00
Guyang Song
2934efe502
[runtime_envmove 'eager_intall' to 'config' (#26004) 2022-06-23 13:16:52 -05:00
Guyang Song
26ae3a0239
[Doc] [C++ API] Add note about ABI issue (#26030) 2022-06-23 13:14:50 -05:00
Sven Mika
be1042429d
[RLlib] Deprecation: Replace remaining evaluation_num_episodes with evaluation_duration. (#26000) 2022-06-23 19:11:29 +02:00
Kai Fricke
7e93370c91
[tune/structure] Introduce stopper package (#26040)
Split different stoppers and put them in a `stopper` package.
2022-06-23 18:05:43 +01:00
Kai Fricke
8a2f6bda62
[tune/structure] Introduce experiment package (#26033)
Experiment, Trial, and config parsing moves into an `experiment` package.

Notably, the new public facing APIs will be

```
from ray.tune.experiment import Experiment
from ray.tune.experiment import Trial
```
2022-06-23 14:52:46 +01:00
Kai Fricke
edcf7489ef
[hotfix] Fix dashboard cli test (#26034)
#22698 broke master because the dashboard CLI test was not adjusted.
2022-06-23 11:39:09 +01:00
Kai Fricke
0959f44b6f
[tune/structure] Introduce execution package (#26015)
Execution-specific packages are moved to tune.execution.

Co-authored-by: Xiaowei Jiang <xwjiang2010@gmail.com>
2022-06-23 11:13:19 +01:00
Clark Zinzow
caa3868570
[Datasets] Add UDF passthrough args to map_batches(). (#25613)
Users often have UDFs that require arguments only known at Dataset creation time, and sometimes these arguments may be large objects better suited for shared zero-copy access via the object store. One example is batch inference on a large on-CPU model using the actor pool strategy: without putting the large model into the object store and sharing across actors on the same node, each actor worker will need its own copy of the model.

Unfortunately, we can't rely on closing over these object refs, since the object ref will then be serialized in the exported function/class definition, causing the object to be indefinitely pinned and therefore leaked. It's much cleaner to instead link these object refs in as actor creation and task arguments. This PR adds support for threading such object refs through as actor creation and task arguments and supplying the concrete values to the UDFs.
2022-06-22 23:30:09 -07:00
Eric Cousineau
647f6790c0
scripts: Update dashboard output to print URL (#22698)
Useful for Ctrl+Click for certain terminal emulators
2022-06-23 11:33:22 +08:00
Guyang Song
a8ef296649
[runtime env] remove unused runtime env uris from protobuf (#26001) 2022-06-23 10:45:54 +08:00
Yi Cheng
a1f02f68b7
[core][gcs] Make GCS client working with timeout_ms. (#25975)
In [PR](https://github.com/ray-project/ray/pull/24764) we move the reconnection to GcsRPCClient. In case of a GCS failure, we'll queue the requests and resent them once GCS is back.
This actually breaks request with timeout because  now, the request will be queued and never got a response. This PR fixed it.

For all requests, it'll be stored by the time it's supposed to be timeout. When GCS is down, we'll check the queued requests and make sure if it's timeout, we'll reply immediately with a Timeout error message.
2022-06-22 18:02:29 -07:00
shrekris-anyscale
4d8a82bdf6
[Serve] Use "serve" namespace during controller recovery (#25987) 2022-06-22 16:08:07 -07:00
Sumanth Ratna
67140f2d26
Remove node.py and ray_constants.py links from setup-dev.py (#25997) 2022-06-22 15:45:29 -07:00
Kai Fricke
d65d4aff9a
[tune/structure] Move CLI files into subpackage (#26011)
As part of the Tune restructuring, move the CLI scripts and commands to a cli subpackage.
2022-06-22 23:05:26 +01:00
Kai Fricke
ecf0b93146
[tune/structure] Move AutoML board (#26012)
As part of the Tune restructuring, move the AutoML Board into the automl package.
2022-06-22 21:52:38 +01:00
Sihan Wang
c0cf9b8098
[Serve][Doc] Autoscaling (#25646)
- new section of doc for autoscaling (introduction of serve autoscaling and config parameter)
- Remove the version requirement note inside the doc

Co-authored-by: Simon Mo <simon.mo@hey.com>
Co-authored-by: Edward Oakes <ed.nmi.oakes@gmail.com>
Co-authored-by: shrekris-anyscale <92341594+shrekris-anyscale@users.noreply.github.com>
Co-authored-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
2022-06-22 15:32:18 -05:00
sychen52
84401bb616
add missing brackets (#25992) 2022-06-22 15:30:55 -05:00
Chen Shen
afb092a03a
[Core] Out of Disk prevention (#25370)
Ray (on K8s) fails silently when running out of disk space.
Today, when running a script that has a large amount of object spilling, if the disk runs out of space then Kubernetes will silently terminate the node. Autoscaling will kick in and replace the dead node. There is no indication that there was a failure due to disk space.
Instead, we should fail tasks with a good error message when the disk is full.

We monitor the disk usage, when node disk usage grows over the predefined capacity (like 90%), we fail new task/actor/object put that allocates new objects.
2022-06-22 12:25:32 -07:00
Amog Kamsetty
d6e8b90236
[AIR] Update TorchPredictor to new Predictor API (#25536) 2022-06-22 09:49:07 -07:00
SangBin Cho
6552e096e6
[State Observability] Summary APIs (#25672)
Task/actor/object summary

Tasks: Group by the func name. In the future, we will also allow to group by task_group.
Actors: Group by actor class name. In the future, we will also allow to group by actor_group.
Object: Group by callsite. In the future, we will allow to group by reference type or task state.
2022-06-22 06:21:50 -07:00
Sven Mika
3d6df50258
[RLlib] Fix get_num_samples_loaded_into_buffer in TorchPolicyV2. (#25956) 2022-06-22 13:11:41 +02:00
Sven Mika
464ac82207
[RLlib] Small docs fixes for evaluation + training. (#25957) 2022-06-22 13:11:18 +02:00
Avnish Narayan
871aef80dc
[RLlib] Aggregate Impala learner info. (#25856) 2022-06-22 09:43:10 +02:00
Guyang Song
a0fbd54753
[C++ worker] use dynamic library in C++ default_worker (#25720) 2022-06-22 15:11:15 +08:00
xwjiang2010
b4026f9971
[air] RunConfig.failure --> failure_config (#25967) 2022-06-21 16:51:26 -07:00
Kai Fricke
fb3dd0ea40
[release/1.13.0] Add release logs (#24509)
Preliminary release logs for review and approval.
2022-06-21 23:51:25 +01:00
Rina Ueno
a29eeaa1f6
[Workflows] Explain workflow_id and task_name in the docs (#25800) 2022-06-21 15:24:16 -07:00
Eric Liang
43aa2299e6
[api] Annotate as public / move ray-core APIs to _private and add enforcement rule (#25695)
Enable checking of the ray core module, excluding serve, workflows, and tune, in ./ci/lint/check_api_annotations.py. This required moving many files to ray._private and associated fixes.
2022-06-21 15:13:29 -07:00
Archit Kulkarni
565e366529
[runtime env] Use async internal kv in package download and plugins (#25788)
Uses the async KV API for downloading in the runtime env agent. This avoids the complexity of running the runtime env creation functions in a separate thread.

Some functions are still sync, including the working_dir/py_modules upload, installing wheels, and possibly others.
2022-06-21 15:02:36 -07:00
Antoni Baum
b7d4ae541d
[Train] Move load_checkpoint to utils (#25940)
Moves load_checkpoint methods from trainer files to util files for consistency and better modularity.
2022-06-21 13:03:56 -07:00
shrekris-anyscale
3d6a5450c9
[Serve] Stop Ray in test_serve_head.py fixture (#25893) 2022-06-21 11:28:07 -07:00