Commit graph

13683 commits

Author SHA1 Message Date
Jun Gong
e1cf0cc982
[RLlib] Deflake cartpole crashing tests. (#27097)
Make sure cartpole crashing tests are not flaky.
2022-07-27 12:50:34 -07: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
shrekris-anyscale
4ab97399cd
[Serve] Only start Serve in the CLI through the serve deploy command (#27063)
These Serve CLI commands start Serve if it's not already running:

* `serve deploy`
* `serve config`
* `serve status`
* `serve shutdown`

#27026 introduces the ability to specify a `host` and `port` in the Serve config file. However, once Serve starts running, changing these options requires tearing down the entire Serve application and relaunching it. This limitation is an issue because users can inadvertently start Serve by running one of the `GET`-based CLI commands (i.e. `serve config` or `serve status`) before running `serve deploy`.

This change makes `serve deploy` the only CLI command that can start a Serve application on a Ray cluster. The other commands have updated behavior when Serve is not yet running on the cluster.

* `serve config`: prints an empty config body.

```yaml
import_path: ''
runtime_env: {}
deployments: []
```

* `serve status`: prints an empty status body, with a new `app_status` `status` value: `NOT_STARTED`.

```yaml
app_status:
  status: NOT_STARTED
  message: ''
  deployment_timestamp: 0
deployment_statuses: []
```

* `serve shutdown`: performs a no-op.
2022-07-27 13:21:19 -05:00
Cheng Su
0217c25d6f
Datasets] Cover more pattern of AWS S3 read error message (#27027)
Seeing one more pattern of AWS S3 read error message related to credential - https://gist.github.com/jiaodong/a805577c35e44e720ff10136f5ec6f6c, shared from @jiaodong. Change the regex pattern to match the error message as well, so it prints out more understandable error message.

Signed-off-by: Cheng Su <scnju13@gmail.com>
2022-07-27 11:13:24 -07:00
Simon Mo
8bb37c3a9e
[Serve] Add Custom Usage Tags for Reporting (#27061) 2022-07-27 10:59:41 -07:00
Amog Kamsetty
2fe0ac11a4
[Train] Remove CheckpointConfig from ray.train (#27101)
Signed-off-by: Amog Kamsetty amogkamsetty@yahoo.com

Quick follow up to #27005 to add back CheckpointConfig to ray.train
2022-07-27 10:59:25 -07:00
Jun Gong
acf2bf9b2f
[RLlib] Get rid of all these deprecation warnings. (#27085) 2022-07-27 10:48:54 -07:00
Yuan-Chi Chang
659d25a3a9
[workflow] http_event_provider and accompanied listener (#26010)
### Why are these changes needed?
This PR enhances workflow functionality to receive external events from a Serve based HTTP endpoint. A workflow can then consume events asynchronously as they arrive. 

### Design Logic
A `workflow.wait_for_event` node subscribes to the endpoint instantiated by a Ray Serve deployment of class `http_event_provider.HTTPEventProvider`. The subscription is made through a helper class `http_event_provider.HTTPListener`. `HTTPListener` implements the methods of `EventListener` to poll from and confirm event checkpointing to `HTTPEventProvider`, before `HTTPEventProvider`acknowledges success or error to the event submitter. 

### Architecture Improvement
The logic of this enhancement conforms with existing workflow runtime design.
2022-07-27 17:26:22 +00:00
Richard Liaw
5c995ca824
[air] improve warning for datasets usage (#26988)
Co-authored-by: Amog Kamsetty <amogkamsetty@yahoo.com>
Co-authored-by: Amog Kamsetty <amogkam@users.noreply.github.com>
2022-07-27 10:15:59 -07:00
matthewdeng
113c4d7fab
[air][data] move train_test_split to ray.data.Dataset (#27065) 2022-07-27 09:53:37 -07:00
SangBin Cho
eb5225e0f3
[Core] Reduce surfacing scary Failed to get the resource load: messages upon node failures (#27094)
Why are these changes needed?
Node failures logs become extremely spammy with Failed to get the resource load: logs. This PR removes the logs from driver-side logs and prints it less often
2022-07-27 09:35:57 -07:00
Kai Fricke
f1f526ef1d
[hotfix/xgboost/lightgbm] Fix checkpoint creation in test
Signed-off-by: Kai Fricke <kai@anyscale.com>
2022-07-27 17:31:55 +01:00
Archit Kulkarni
60f33777a2
[runtime env] Add URI support for plugins (#26746) 2022-07-28 00:28:19 +08:00
Jimmy Yao
274ea2a1ba
[Ray Air] followup to the PR (#26493) set the correct gpu id in TorchTrainer (2.0) (#26704) 2022-07-27 09:27:24 -07:00
Kai Fricke
1a7007e50c
[tune/rllib] Beautify long sequence output for verbose=3 (#27093)
RLLib outputs for verbose=3 are too long at the moment. This is the first step of beautifying this table output by putting sequences of length > 3 into flow style.

Signed-off-by: Kai Fricke <kai@anyscale.com>
2022-07-27 17:25:49 +01:00
Simon Mo
e5a8b1dd55
[Serve] Add API Annotations And Move to _private (#27058) 2022-07-27 09:08:26 -07:00
Archit Kulkarni
0e47fb4ed9
[Jobs] [runtime env] Allow RuntimeEnvConfig object in Job Submission (#26989) 2022-07-27 11:06:23 -05:00
Kai Fricke
0e5626a0e7
[air/train] Default to 2 CPUs per actor for LightGBM Trainer (#27014)
Before this PR, updating default ray params in GBDT trainers was faulty. This PR addresses these issues and sets the default number of cpus per actor for lightgbm trainer to 2.

Signed-off-by: Kai Fricke <kai@anyscale.com>
2022-07-27 16:25:31 +01:00
Tao Wang
93f640751b
Add DCO prompt in PR template (#27072)
We require DCO in the PR, but people always forget it until the PR being created.
Putting a prompt line in the PR template may help.
2022-07-27 23:19:51 +08:00
Kai Fricke
8fda425eca
[tune/rllib] Hotfix ml_utils deprecation import error (#27095)
The changes conflicted with a recently merged PR that refactored the package structure (#27005).

Signed-off-by: Kai Fricke <kai@anyscale.com>
2022-07-27 16:11:58 +01:00
Kai Fricke
a5ea99cf95
[rfc] [tune/rllib] Fetch _progress_metrics from trainable for verbose=2 display (#26967)
RLLibs trainables produce a large number of metrics which makethe log output with verbose=2 illegible. This PR introduces a private `_progress_metrics` property for trainables. If set, the trial progress callback will only print these metrics per default, unless overridden e.g. with a custom `TrialProgressCallback`.
2022-07-27 16:04:23 +01:00
Guyang Song
87b164c84b
Add C++ worker code owner (#27088)
Signed-off-by: 久龙 <guyang.sgy@antfin.com>
Add @kfstorm to the C++ worker code owner group.
2022-07-27 23:00:26 +08:00
SangBin Cho
a6fe2c1e87
[Release test] Add a memory monitor to nightly test long running actor death (#27083)
Add a memory monitor to nightly test long running actor death. It will be used to see memory leak from the test
2022-07-27 07:32:10 -07:00
Alan Guo
a7dca17973
Make New Dashboard the default dashboard (#26996)
Add UsageStats alert to new dashboard
Update wording of "back to legacy dashboard", "try new dashboard" buttons

Signed-off-by: Alan Guo aguo@anyscale.com
2022-07-27 07:04:34 -07:00
SangBin Cho
028684032b
[State Observability] Add warnings for data truncation + order columns as it is defined in StateSchema (#27018)
# Why are these changes needed?

This PR does 3 things

Add warnings for data truncation (which is a follow-up)
Improve some of confusing warning messages
order columns as it is defined in StateSchema (so that we can customize the column order for better usability). I did this only for list because i thought it wasn't that important for summary, but I might be wrong
2022-07-27 06:56:30 -07:00
Ricky Xu
2451b5ff33
[Core][State Observability] Customized options for grpc at state manager (#27071)
Signed-off-by: rickyyx rickyx@anyscale.com

# Why are these changes needed?

This should make the state API more scalable, and somewhat lower the chance issues like #27009 happening.
2022-07-27 06:39:21 -07:00
Kai Fricke
1d2735093d
[air] Add tests for BatchPredictor and all data batch types (#27013)
This PR makes sure that all predictors work in a BatchPredictor

Signed-off-by: Kai Fricke <kai@anyscale.com>
2022-07-27 14:25:18 +01:00
Amog Kamsetty
862d10c162
[AIR] Remove ML code from ray.util (#27005)
Removes all ML related code from `ray.util`

Removes:
- `ray.util.xgboost`
- `ray.util.lightgbm`
- `ray.util.horovod`
- `ray.util.ray_lightning`

Moves `ray.util.ml_utils` to other locations

Closes #23900

Signed-off-by: Amog Kamsetty <amogkamsetty@yahoo.com>
Signed-off-by: Kai Fricke <kai@anyscale.com>
Co-authored-by: Kai Fricke <kai@anyscale.com>
2022-07-27 14:24:19 +01:00
Jiajun Yao
6c2bfccad9
Support recording usage in ray client (#26957)
Signed-off-by: Jiajun Yao jeromeyjj@gmail.com

# Why are these changes needed?

Fix internval kv operations in ray client mode
Support recording usages in ray client. Currently we may miss library usages if users use ray client to run their program.
2022-07-27 06:21:45 -07:00
xwjiang2010
4c30325172
[air] update xgboost test (catch test failures properly). (#27023)
- Update xgboost test (catch test failures properly)
- Remove `path` from `from_model` for XGBoostCheckpoint and LightGbmCheckpoint.

Signed-off-by: xwjiang2010 <xwjiang2010@gmail.com>
2022-07-27 12:18:51 +01:00
xwjiang2010
fcf897ee72
[air] update rllib example to use Tuner API. (#26987)
update rllib example to use Tuner API.

Signed-off-by: xwjiang2010 <xwjiang2010@gmail.com>
2022-07-27 12:12:59 +01:00
Kai Fricke
ce5c5d858b
[ci/release/RLlib] Fix IMPALA long running release test. (#27086) 2022-07-27 12:38:32 +02:00
Guyang Song
06b0e715c7
[runtime env] plugin refactor [7/n]: support runtime env in C++ API (#27010)
Signed-off-by: 久龙 <guyang.sgy@antfin.com>
2022-07-27 18:24:31 +08:00
Alan Guo
5d6bc5360d
Fix the jobs tab in the beta dashboard and fill it with data from both "submission" jobs and "driver" jobs (#25902)
## Why are these changes needed?
- Fixes the jobs tab in the new dashboard. Previously it didn't load.
- Combines the old job concept, "driver jobs" and the new job submission conception into a single concept called "jobs". Jobs tab shows information about both jobs.

- Updates all job APIs: They now returns both submission jobs and driver jobs. They also contains additional data in the response including "id", "job_id", "submission_id", and "driver". They also accept either job_id or submission_id as input.

- Job ID is the same as the "ray core job id" concept. It is in the form of "0100000" and is the primary id to represent jobs.
- Submission ID is an ID that is generated for each ray job submission. It is in the form of "raysubmit_12345...". It is a secondary id that can be used if a client needs to provide a self-generated id. or if the job id doesn't exist (ex: if the submission job doesn't create a ray driver)

This PR has 2 deprecations
- The `submit_job` sdk now accepts a new kwarg `submission_id`. `job_id is deprecated.
- The `ray job submit` CLI now accepts `--submission-id`. `--job-id` is deprecated.

**This PR has 4 backwards incompatible changes:**
- list_jobs sdk now returns a list instead of a dictionary
- the `ray job list` CLI now prints a list instead of a dictionary
- The `/api/jobs` endpoint returns a list instead of a dictionary
- The `POST api/jobs` endpoint (submit job) now returns a json with `submission_id` field instead of `job_id`.
2022-07-27 02:39:52 -07:00
Jiajun Yao
30ed942aa3
Deprecate object_store_memory option (#26252)
Why are these changes needed?
object_store_memory as task option has already been removed and object_store_memory as actor option is actually broken since at least last year (#20344).

Given we now have object spilling and fallback allocation, this option is no longer useful.
2022-07-27 02:07:09 -07:00
Cheng Su
eb71365f32
[Datasets] Use SPREAD scheduling strategy and turn off Parquet sampling by default (#27034)
Why are these changes needed?
The Parquet file sampling PR (#26868) caused nightly test regression - #26995 . Turning off the feature by default, and keep debugging the root cause, to unblock nightly test.
2022-07-27 01:35:22 -07:00
Eric Liang
6a41c10496
[docs] Try to clarify the cpu fraction setting (#27030)
Try to clarify the behavior of this option with better wording.
2022-07-27 01:30:58 -07:00
Jun Gong
c7ae787cc8
[RLlib] Beef up worker failure test. (#26953) 2022-07-27 00:10:45 -07:00
Jun Gong
a22457b548
[RLlib] Small bug fix (#27003) 2022-07-27 00:02:18 -07:00
Jun Gong
54df8bfe42
[RLlib] Try to checkpoint a durable policy name (#27016) 2022-07-27 00:01:14 -07:00
Dmitri Gekhtman
c4a259828b
[kuberay] Update KubeRay operator commit, turn autoscaler RPC drain back on (#27077)
This PR:

- Updates the KubeRay operator commit used in the Ray CI autoscaling test
- Uses the RayCluster autoscaling sample config from the KubeRay repo in place of of a config from the Ray repo
- Turns the autoscaler RPC worker drain back on, as I saw some dead node messages from the GCS, and the RPC drain is supposed to avoid those.

Signed-off-by: Dmitri Gekhtman <dmitri.m.gekhtman@gmail.com>
2022-07-27 00:00:51 -07:00
Kai Yang
34d0233aba
[Core] No RAY_LOG in the constructor of DelayManager (#26958)
We encountered SIGSEGV when running Python test `python/ray/tests/test_failure_2.py::test_list_named_actors_timeout`. The stack is:

```
#0  0x00007fffed30f393 in std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&) ()
   from /lib64/libstdc++.so.6
#1  0x00007fffee707649 in ray::RayLog::GetLoggerName() () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so
#2  0x00007fffee70aa90 in ray::SpdLogMessage::Flush() () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so
#3  0x00007fffee70af28 in ray::RayLog::~RayLog() () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so
#4  0x00007fffee2b570d in ray::asio::testing::(anonymous namespace)::DelayManager::Init() [clone .constprop.0] ()
   from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so
#5  0x00007fffedd0d95a in _GLOBAL__sub_I_asio_chaos.cc () from /home/admin/dev/Arc/merge/ray/python/ray/_raylet.so
#6  0x00007ffff7fe282a in call_init.part () from /lib64/ld-linux-x86-64.so.2
#7  0x00007ffff7fe2931 in _dl_init () from /lib64/ld-linux-x86-64.so.2
#8  0x00007ffff7fe674c in dl_open_worker () from /lib64/ld-linux-x86-64.so.2
#9  0x00007ffff7b82e79 in _dl_catch_exception () from /lib64/libc.so.6
#10 0x00007ffff7fe5ffe in _dl_open () from /lib64/ld-linux-x86-64.so.2
#11 0x00007ffff7d5f39c in dlopen_doit () from /lib64/libdl.so.2
#12 0x00007ffff7b82e79 in _dl_catch_exception () from /lib64/libc.so.6
#13 0x00007ffff7b82f13 in _dl_catch_error () from /lib64/libc.so.6
#14 0x00007ffff7d5fb09 in _dlerror_run () from /lib64/libdl.so.2
#15 0x00007ffff7d5f42a in dlopen@@GLIBC_2.2.5 () from /lib64/libdl.so.2
#16 0x00007fffef04d330 in py_dl_open (self=<optimized out>, args=<optimized out>)
    at /tmp/python-build.20220507135524.257789/Python-3.7.11/Modules/_ctypes/callproc.c:1369
```

The root cause is that when loading `_raylet.so`, `static DelayManager _delay_manager` is initialized and `RAY_LOG(ERROR) << "RAY_testing_asio_delay_us is set to " << delay_env;` is executed. However, the static variables declared in `logging.cc` are not initialized yet (in this case, `std::string RayLog::logger_name_ = "ray_log_sink"`).

It's better not to rely on the initialization order of static variables in different compilation units because it's not guaranteed. I propose to change all `RAY_LOG`s to `std::cerr` in `DelayManager::Init()`.

The crash happens in Ant's internal codebase. Not sure why this test case passes in the community version though.

BTW, I've tried different approaches:

1. Using a static local variable in `get_delay_us` and remove the global variable. This doesn't work because `init()` needs to access the variable as well.
2. Defining the global variable as type `std::unique_ptr<DelayManager>` and initialize it in `get_delay_us`. This works but it requires a lock to be thread-safe.
2022-07-27 14:42:05 +08:00
Alex Wu
3322558287
[autoscaler][aws] Fix example minimal (#27075)
Why are these changes needed?
The DLAMI moved underneath us and broke for 2 reasons.

The AMI's snapshot size increased to 140 GB which was more than our hardcoded max EBS volume size of 100GB
The AMI dropped support for python 3.7 and only has 3.8 now.
The solutions short term solutions are simple.

Allocate a bigger EBS volume.
Use the tensorflow 3.8 env.
Related issue number
Closes #26368

Co-authored-by: Alex <alex@anyscale.com>
2022-07-26 23:14:49 -07:00
Alex Wu
eacc763c84
[autoscaler][docs] No more legacy autoscaler yamls (#27037)
Why are these changes needed?
This PR updates all autoscaler yaml examples/defaults to not use the legacy head_node and worker_node fields and deletes the explicit example-full-legacy yamls and the corresponding tests.

Related issue number
For ease of review, this PR is purely cosmetic/yaml editing (plus minor test changes to keep CI happy). It partially satisfies #20837. There will be 2 more follow up PRs (one to make the schema change and update the configs baked into unit tests, and another to clean up the legacy code).

Co-authored-by: Alex <alex@anyscale.com>
2022-07-26 22:29:47 -07:00
kourosh hakhamaneshi
8ddcf89096
[RLlib] Implemented ViewRequirementConnector (#26998) 2022-07-26 21:52:14 -07:00
Alex Wu
837ef777a3
[ci][kuberay] Always cleanup KinD cluster (#27073)
When cleaning up after the k8s operator tests, we should always delete the k8s cluster even if something went wrong (in fact, it's not clear we even need to clean up the resources within the cluster. 

Signed-off-by: Alex Wu <itswu.alex@gmail.com>
2022-07-26 21:46:19 -07:00
Amog Kamsetty
13d185cd81
[AIR] Predictor call_model API for unsupported output types (#26845) 2022-07-26 20:48:52 -07:00
Andrew Li
989bb48339
[K8s/Autoscaler] Added a field for the service account name (#27004)
Exposed serviceAccountName on values.yaml (#26657)

Signed-off-by: Andrew Li <orcahmlee@gmail.com>
2022-07-26 19:47:18 -07:00
Cade Daniel
7a817ad364
Moving Ray Clusters restructuring section to be subpage under existing Ray Clusters. (#27036)
This PR puts the Ray Clusters (under construction) docs section (see #26754) under Ray Clusters as a subpage.

This makes the master branch docs clean and presentable for users
Ray Clusters doc writers can use existing CI to iterate on the docs, without having a massive PR once we're done.

Signed-off-by: Cade Daniel <cade@anyscale.com>
2022-07-26 15:52:06 -07:00