Commit graph

12208 commits

Author SHA1 Message Date
Sven Mika
14dd7aac13
[RLlib] Issue 22943: PettingZoo parallel should not use env checking (for now). (#24025) 2022-04-21 11:20:54 +02:00
jon-chuang
ddcc252b51
[Core] Ray logs API (1/n) (#23435)
Expose HTTP endpoint to retrieve logs from ray cluster
2022-04-20 23:11:02 -07:00
Balaji Veeramani
371d1f4533
[Datasets] Make BlockMetadata a dataclass (#23852) 2022-04-20 22:46:25 -07:00
Guyang Song
0e6c042e29
[Bugfix] fix invalid excluding of Black (#24042)
- We should use `--force-exclude` when we pass code path explicitly https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html?highlight=--force-exclude#command-line-options
- Recover the files in `python/ray/_private/thirdparty` which has been formatted in the PR https://github.com/ray-project/ray/pull/21975 by mistake.
2022-04-21 10:21:35 +08:00
Simon Mo
7b0c77dd38
[Serve] Fix torch_tune_serve_test client test (#24031) 2022-04-20 16:52:27 -07:00
iasoon
22a6fafbb5
[Serve] remove constants shorthands in tests (#24053) 2022-04-20 16:05:19 -07:00
Amog Kamsetty
47243ace7c
[Release] Upgrade instance types for xgboost gpu release tests (#24002)
In xgboost 1.6, support for older GPU architectures was removed (dmlc/xgboost#7767).

This PR updates the instance types used in our xgboost-ray gpu release tests to use Volta GPUs instead of Kepler GPUs so that xgboost-ray can run successfully with xgboost v1.6.

Closes #24048
2022-04-20 15:18:22 -07:00
Edward Oakes
4680de8acd
[serve] Deflake test_replica_startup_status_transitions by awaiting signal actor in constructor (#24044)
`test_cluster: test_replica_startup_status_transitions` is periodically flaky with the replica hanging in `PENDING_ALLOCATION`. This could be because there is no ordering guarantee on async actor calls, so the `reconfigure` method might execute first and block the asyncio loop (due to `ray.get`), not allowing the `is_allocated` call to run.
2022-04-20 16:58:45 -05:00
Yi Cheng
04611edf5a
[scheduler] Update syncer API and add reconnect feature. (#23929)
This PR focuses on updating syncer-related code and comments from this #23660 to reduce the code size.

Update Snapshot/Update -> CreateSyncMessage/ConsumeSyncMessage
Make ray syncer test work even when we add more components in the protobuf
Make ray syncer able to reconnect to a new node.
2022-04-20 14:31:24 -07:00
Simon Mo
b0d7888093
[Serve] Allow cloudpickle serializable objects as init args/kwargs (#24034)
Closes #23503 

We are fixing two issue here:
1. The unified controller API used pickle to pack the init args, we are changing it to cloudpickle for now. (this is something I missed during code review)
2. The checkpoint state functionality in controller uses pickle to prevent ray cluster specific state written to checkpoint and unable to recover in a fresh new cluster. However, this recover from new cluster is not good UX and we should prefer an end to end solution like resubmitting via REST API.


As a corollary, the deployment state manager should not care about deserializing replica config and init args. Rather, it should just pass the protobuf directly to replica. I can do that either here or as a follow up.
2022-04-20 15:51:34 -05:00
Eric Liang
6d8d7398df
[runtime_env] Add the ability to inject a setup hook for customization of runtime_env on init (#24036) 2022-04-20 13:27:37 -07:00
Kai Fricke
6353c805fa
[tune] Clean up base ProgressReporter API (#24010)
`set_start_time()` was not implemented for the progress reporter base class, but it's called in `tune.run()`.

Instead of adding new methods to set runtime arguments, this PR moves to a singular and forward-compatible `setup()` method that defaults to no-op. This way custom reporters can make use of runtime information passed to the reporter, but can choose to ignore it per default.
2022-04-20 21:00:23 +01:00
Gagandeep Singh
554831fad1
Increase register timeout seconds (#23223) 2022-04-20 12:25:01 -07:00
Chu Xiangyang
6f74040b15
[Job] Fix typo in job sdk docstring (#23940) 2022-04-20 12:30:32 -05:00
Jiao
3b632ad0d8
[Ray DAG][Serve Deployment Graph] Remove double json.dumps in DAGNode (#24026)
Previously we have double dump behavior that makes json serde not human readable or friendly, but it's required given `DAGDriver` takes `dag_node_json` as first arg and it will appear in YAML.

This PR removes extra `json.dumps()` in encoder path, eliminated and simplified most encoder / object_hooks that are not needed in the first place to make everything simpler again.

Sample YAML now for a complex DAG: https://gist.github.com/jiaodong/32991771e9d78c35767eb24ed73f8236

We're pretty close to have a better minimal JSON representation of the whole dag after this. I might include in this PR or separate one.
2022-04-20 11:57:35 -05:00
Avnish Narayan
477b9d22d2
[RLlib][Training iteration fn] APEX conversion (#22937) 2022-04-20 17:56:18 +02:00
Jiajun Yao
6cfec51d1e
Spread even if nodes are not available (#23445)
Several changes to make spread scheduling work better under load:

* When nodes are not available, spread among feasible nodes.
* If grant_or_reject is true, don't spill back if the selected node is not available.
* Don't spill due to waiting for dependencies for spread tasks.
2022-04-20 07:35:15 -07:00
Kai Fricke
261a8a7470
[air] Use custom fsspec handler for GS (#24008)
`gcsfs` complains about an invalid `create_parents` argument when using google cloud storage with cloud checkpoints. Thus we should use an alternative fs spec handler that omits this argument for gs.

The root issue will be fixed here: https://github.com/fsspec/gcsfs/pull/471
2022-04-20 14:51:43 +01:00
Antoni Baum
9364ec39e4
[joblib] Make PoolActor's Ray options configurable (#24009)
Makes it possible to configure joblib/multiprocessing `PoolActor`s' Ray options for greater user control. Also adds some type hints.
2022-04-20 06:38:30 -07:00
xwjiang2010
a34dcfce85
[tune] fix flaky test (#24037) 2022-04-20 10:14:32 +01:00
mwtian
34fb092656
[Pubsub] reduce memory usage for channels that do not require total memory cap (#23985)
In a1e06f64ae, memory bound was added for each subscribed entity in the publisher. It adds two extra `std::deque` per subscribed entity, which turns out to cost a lot more memory when there are a large number of `ObjectRef`s: https://github.com/ray-project/ray/pull/23853#issuecomment-1098382286

This PR avoids the extra memory usage for entities in channels unlikely to grow too large, i.e. all channels except those for logs and error info. Subscribed entity memory usage no longer shows up in the memory profile when there are 1M object refs. Raw data: [profile006.pb.gz](https://github.com/ray-project/ray/files/8508547/profile006.pb.gz)
2022-04-19 17:44:15 -07:00
Antoni Baum
2169007290
[AIR] SklearnTrainer&Predictor implementation (#23850)
Implements `SklearnTrainer` and `SklearnPredictor`. Full parallelism with joblib + support for GPU enabled estimators like cuML.

Interface has been modified slightly by addition of several arguments, which were required for full functionality.

I haven't tested cuML yet, will do it later.

Depends on https://github.com/ray-project/ray/pull/23889

Co-authored-by: Kai Fricke <kai@anyscale.com>
2022-04-19 16:45:17 -07:00
Avnish Narayan
0ddbce6518
Revert "[RLlib] DD-PPO training iteration fn (#23906)" (#24030)
The DDPPO LR scheduler test is broken because the learner_info_dictionary that is returned by the training iteration function does not consistently return a learner info for every training iteration, but the test expects that it does.

We'll need to fix the test then re-merge

Reverts #23906
2022-04-19 16:43:57 -07:00
Jiao
5ba29f040f
[Serve] Clean up deployment suffixes between pipeline build() calls (#23984) 2022-04-19 15:59:42 -07:00
mwtian
3af7fb6490
[Ray client] use SimpleQueue on Python 3.7 and newer in async dataclient (#23995) 2022-04-19 13:30:56 -07:00
Amog Kamsetty
7a3ccb93ee
[CI] Separate out banned words check from formatting script (#23998)
The recursive grep in the banned words check can get really messy when running locally depending on each person's directory structure or where the format script is being called from.

Separates the banned words check as a separate script so that it's not called by default in ./format.sh. Also adds this to the documentation
2022-04-19 13:30:37 -07:00
Avnish Narayan
55f6896142
[RLlib] Issue 24014: Change occurrences of randint to integers in RLlib (#24019) 2022-04-19 22:15:14 +02:00
Antoni Baum
1fc6db30a5
[AIR] Add Scaling Config validation (#23889)
Adds a `ScalingConfigDataClass.validate_config` classmethod to allow for a generic way of validating ScalingConfigs by allowing only certain keys.

Co-authored-by: Kai Fricke <kai@anyscale.com>
2022-04-19 13:05:47 -07:00
Michael (Mike) Gelbart
7f3031f451
[docs] Fix links and add clarifications to docs contributing page (#23693)
In the [docs contributing page](https://docs.ray.io/en/master/ray-contribute/docs.html), the links to other docs pages point to master/ instead of latest/, which can be a bit confusing since this is not the live version of the docs that people will be used to seeing.

I added a couple additional clarifications and fixed a typo as well. I also mentioned the need for an image and linked to the image directory (though some subprojects have their own image directories as well, which I did not mention).
2022-04-19 17:47:16 +01:00
Stephanie Wang
8e37fe59c8
[core] Add task function name to ray.timeline profiling events (#23920)
The ray.timeline command currently only shows task for task events, which isn't very useful if your program has multiple types of tasks. This PR adds "::<function name>" to the string, similar to what we do for process names, to distinguish between different tasks.
2022-04-19 09:38:52 -07:00
mwtian
2a5c40a149
[Core] remove Windows compatibility for Redis (#23991)
There should be no reference to Redis in Python anymore except parts of bootstrap code path.

closes #23982
2022-04-19 09:16:47 -07:00
Sven Mika
9de391b70e
[RLlib] Issue 23897: add_time_dimension() causes returned shape to be completely unknown. (#24006) 2022-04-19 17:56:56 +02:00
Sven Mika
de9e143938
[RLlib] Issue 23907: SampleBatch.shuffle does not flush intercepted_values dict (which it should). (#24005) 2022-04-19 17:55:59 +02:00
Sven Mika
eb54236d13
[RLlib] DD-PPO training iteration fn (#23906) 2022-04-19 17:55:26 +02:00
jon-chuang
e0c0ea2e59
[Core] Add node_name field to GcsNodeInfo (#23543)
Make it easier to identify nodes by a string identifier separate from their IP address.
2022-04-19 05:03:12 -07:00
SangBin Cho
082baa2342
[Test] Fix test_log (#24004)
The test verifies the first line 43~51 bytes are "dashboard"

But due to recent code addition to head.py, the line where logs are written became 2 digits -> 3 digits

Previously,
2022-04-18 23:23:56,946	INFO head.py:[less than 100] -- Dashboard head grpc address: 127.0.0.1:57208
 
Now
2022-04-18 23:23:56,946	INFO head.py:101 -- Dashboard head grpc address: 127.0.0.1:57208
So we should increase the bytes range.
2022-04-19 04:59:30 -07:00
Chen Shen
717e60cb4d
[Core][nightly-test] fix shuffle 5000 partition OOM #23997
closes #23992
#23781 changed the machine type where the memory capacity dropped from 128GB to 64GB and thus shuffle_1tb_5000_partitions starts OOMing.
2022-04-18 23:49:51 -07:00
Avnish Narayan
c9df6ce70c
[RLlib] Pinning gym to 0.21 to fix test issues (#24000) 2022-04-19 08:33:31 +02:00
Amog Kamsetty
9ec5793bea
[Release] Fix XGBoost Golden Notebook Tests (#23996)
Xgboost released a new version a few days ago. Due to caching of the Anyscale cluster env, this resulted in the server having an outdated xgboost version while the client has the most recent version causing the test to fail.

Instead, we reinstall xgboost-ray and xgboost in the post build commands so that these dependencies are not being cached in the cluster env.
2022-04-18 21:44:47 -07:00
SangBin Cho
1c3329fa38
Revert "Revert "[State Observability] Basic functionality for central… (#23933)
…ized data (#23744)" (#23918)"

This reverts commit fb14e82.
2022-04-18 21:15:43 -07:00
Dmitri Gekhtman
fc4ac71deb
[minor] Fix legacy OSS operator test (#23540)
A legacy K8s test fails due to incorrect usage of @ray.method which only started raising errors after the Ray 1.12.0 branch cut.
This PR removes the use of @ray.method in the test.

Some context in #23271 and #23471

In addition, I noticed some of the test were flakey due to out-of-memory issues. For that reason, I've doubled the memory request and limits in the legacy operator's example files.

I've also added CPU limits in an example file that was missing them -- it makes the most sense for consistency with Ray's resource model to use CPU limits in K8s configs.

Finally, I added an extra note to the instructions for running the tests.
2022-04-18 17:47:42 -07:00
mwtian
ea66192a38
[GCS] Use gRPC instead of socket for GCS client health check (#23939)
A user has reported a crash in GCS client where the client was unable to connect to the GCS server after retries, even when GCS server has always been running. I was not able to reproduce the exact issue, but noticed that the health check logic with socket has unexpected behavior sometimes, e.g. it is much slower to use socket for health check compared to using gRPC (~40s vs < 1s sometimes). The user issue could be related to this slowness, so this PR updates the logic to use gRPC health check.
2022-04-18 16:55:29 -07:00
Gabe Joseph
e402fc0eaa
[Datasets] Fix typo in Std docstring (#20917) 2022-04-18 13:15:37 -07:00
Edward Oakes
669b38a2d6
[serve] Make monitoring section top-level in the docs (#23919) 2022-04-18 14:46:41 -05:00
Clark Zinzow
395a1c9aa2
[Doc] Fix actor fault tolerance link. (#23972) 2022-04-18 11:49:53 -07:00
Clark Zinzow
422bff4c29
[RLlib] [Docs] Fix RLLib example link. (#23948)
This old example was deleted in this commit: c38a29573f (diff-a9306793e50066431972a0fe8ffc788c98fe4fa247a880d274f30ca1bb42aabc), breaking our LinkCheck stage in CI. This updates the link to the new example location: https://github.com/ray-project/ray/blob/master/rllib/examples/recommender_system_with_recsim_and_slateq.py
2022-04-18 11:01:01 -07:00
shrekris-anyscale
fab33fa730
[serve] Handle None in ReplicaConfig's resource_dict (#23851)
This change sets `"memory"`'s default to `0` in the `resource_dict` but keeps the default as `None` in `ray_actor_options`. It adds logic to both problematic lines to handle `None` in case of future settings updates. It also adds unit tests to prevent regressions.
2022-04-18 12:34:20 -05:00
Siyuan (Ryans) Zhuang
a940e643db
[core] Fix DAG options (#23880)
Now we are able to pass correct options to DAGs. Previously it was missing or skewed.
2022-04-18 10:32:43 -07:00
shrekris-anyscale
6151b75d9d
[serve] Move schema helpers out of api.py (#23934) 2022-04-18 12:25:21 -05:00
mwtian
d5d2ef4249
[Core] Add a utility to check GCS / Ray cluster health (#23382)
* Provide a utility to ping a Ray cluster and verify it has the same Ray version. This is useful to check if a Ray cluster is available at a given address, without connecting to the cluster with the more heavyweight ray.init(). This utility is integrated with ray memory to provide a better error message when the Ray cluster is unavailable. There seem to be user demand for exposing this as an API as well.
* Improve the error message when the address provided to Ray does not contain port.
2022-04-18 09:58:45 -07:00