Commit graph

12208 commits

Author SHA1 Message Date
Qing Wang
ef5b9b87d3
[Java] Add set runtime env api for normal task. (#23412)
This PR adds the API `setRuntimeEnv` for submitting a normal task, for the usage:
```java
RuntimeEnv runtimeEnv =
    new RuntimeEnv.Builder()
        .addEnvVar("KEY1", "A")
        .build();

/// Return `A`
Ray.task(RuntimeEnvTest::getEnvVar, "KEY1").setRuntimeEnv(runtimeEnv).remote().get();
```
2022-03-24 15:57:24 +08:00
mwtian
26f1a7ef7d
[Core] Account for spilled objects when reporting object store memory usage (#23425) 2022-03-23 22:25:22 -07:00
Linsong Chu
63d6884509
[workflow]align the behavior of workflow's max_retires with remote function's max_retries (#22903)
To address the issue https://github.com/ray-project/ray/issues/22824

Basically the current behavior of `max_retries` in workflow is different from the one in remote functions in the following ways:
1. workflow's max_retries is not the number of retries, but the number of total tries. 
2. workflow's max_retries does not allow "-1" (infinite retries) while remote function's max_retries does.

This PR altered the behavior of `max_retries` in workflow to be consistent with the `max_retries` in remote functions:
1. make max_retries to be truly max retries (i.e. total tries = original try + max retries)
 - [x] implementation
 - [x] update logging
 - [x] update tests
2. make max_retries accept infinite tries (i.e. `max_retries=-1`)
2022-03-23 22:11:44 -07:00
Eric Liang
38925f60d2
Add a get_if_exists option for simpler creation of named actors (#23344)
Getting or creating a named actor is a common pattern, however it is somewhat esoteric in how to achieve this. Add a utility function and test that it doesn't cause any scary error messages.

Actor.options(name="my_singleton", get_if_exists=True).remote(args)
2022-03-23 22:02:58 -07:00
Jiajun Yao
ce93bfff7e
Fix broken doc link (#23440)
https://github.com/ray-project/ray/blob/master/benchmarks/README.md is moved to a new place.
2022-03-23 18:54:02 -07:00
Dmitri Gekhtman
bc98afcdf8
Test of KubeRay autoscaler integration (#23365)
This PR adds a test of KubeRay autoscaler integration to the Ray CI.

- Tests scaling with autoscaler.sdk.request_resources
- Tests autoscaler response to RayCluster CR change
2022-03-23 18:18:48 -07:00
Stephanie Wang
aa6f773283
Switch long running tests to SDK (#23433)
These tests are flakey on the job-based test submission system. Switching them to the SDK-based test runner for now.
2022-03-23 17:44:26 -07:00
Chong-Li
6e0e46ea56
[GCS] Make gcs scheduler accommodate cluster/local task managers (#22942)
* Accommodate cluster and local task managers

* Fix warning

* Fix bug

* Format

* Format

* fix torch

* Fix comments

* lint

Co-authored-by: Chong-Li <lc300133@antgroup.com>
2022-03-23 15:58:59 -07:00
Simon Mo
5c2ea1d5f4
[Serve][Tests] Deflake by disable test_runtime_env on OSX (#23436)
https://github.com/ray-project/ray/pull/23380 made the test flakier 
<img width="838" alt="image" src="https://user-images.githubusercontent.com/21118851/159805531-d085cd7a-7ffd-45e2-8a2c-cd4984ac2397.png">
2022-03-23 15:29:26 -07:00
Jiajun Yao
583f86e582
[Test] Delete the unused benchmarks folder (#23411)
These files have been copied to release/benchmarks
2022-03-23 14:28:16 -07:00
Chen Shen
48d456d373
[RFC][Doc] add a page describe actor execution order. (#23406)
* add

* task-orders

* fix

* address comments

* add

* address comments
2022-03-23 11:07:18 -07:00
Kai Fricke
668eade515
[docs] Add oracle to linkcheck ignore list (#23422)
This link currently breaks the linter CI.
2022-03-23 17:14:52 +00:00
Dmitri Gekhtman
f91a134dc6
[core/autoscaler] Restore use_gcs_for_bootstrap (#23413)
Certain external integrations rely on ray._private.use_gcs_for_bootstrap to determine if Ray is using the gcs to bootstrap. The current version of Ray always uses the gcs to bootstrap, so this should just return True.
2022-03-23 10:39:23 +00:00
Max Pumperla
9b1a3f9f9a
[docs] fix nav (#23417)
Algolia search now does not overflow on mobile devices anymore, making the nav scrollable again.

Signed-off-by: Max Pumperla <max.pumperla@googlemail.com>
2022-03-23 10:38:33 +00:00
dependabot[bot]
05bfcdbaf8
[tune](deps): Bump ax-platform in /python/requirements/ml (#23098)
Bumps [ax-platform](https://github.com/facebook/Ax) from 0.2.1 to 0.2.4.
- [Release notes](https://github.com/facebook/Ax/releases)
- [Changelog](https://github.com/facebook/Ax/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/Ax/compare/0.2.1...0.2.4)

---
updated-dependencies:
- dependency-name: ax-platform
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-23 10:13:00 +00:00
Kai Fricke
724377163f
[ci/release] Unstable tests should only soft fail the build (#23403)
This will leave the tests green if the test is failing but marked as unstable.
2022-03-23 09:38:56 +00:00
mwtian
51feac9868
Clean up dev docs (#23407) 2022-03-22 23:22:56 -07:00
Qing Wang
160e2ca9f8
[Java] Add per job runtime env env vars. (#23366)
1. Support setting environment variables in runtime env for a job, like:
```yaml
ray : {
  job : {
    runtime-env: {
         // Environment variables to be set on worker processes in current job.
         "env-vars": {
           // key1: "value11"
           // key2: "value22"
         }
      }
   }
}
```
It could be set by system properties before `Ray.init()` as well:
```java
  System.setProperty("ray.job.runtime-env.env-vars.KEY1", "A");
  System.setProperty("ray.job.runtime-env.env-vars.KEY2", "B");

  Ray.init();
```

2. Setting environment variables for an actor will overwrite and merge to the environment variables of job.
```java
System.setProperty("ray.job.runtime-env.env-vars.KEY1", "A");
System.setProperty("ray.job.runtime-env.env-vars.KEY2", "B");

Ray.init();
  
RuntimeEnv runtimeEnv = new RuntimeEnv.Builder().addEnvVar("KEY1", "C").build();

/// actor1 has the env vars: {"KEY1" : "C", "KEY2" : "B"}
ActorHandle<A> actor1 = Ray.actor(A::new).setRuntimeEnv(runtimeEnv).remote();
/// actor2 has the env vars: {"KEY1" : "A", "KEY2" : "B"} 
ActorHandle<A> actor2 = Ray.actor(A::new).remote();
```
2022-03-23 08:00:00 +08:00
Amog Kamsetty
6d776976c1
[Train] Fix multi node horovod bug (#22564)
Closes #20956
2022-03-22 16:22:53 -07:00
Simon Mo
67a4450d69
[Serve] Test that EveryNode configuration allow scale down (#23408) 2022-03-22 16:18:59 -07:00
Jiajun Yao
dfebf7ffae
Fix metric type for NumSpilledTasks to gauge (#23391)
The metric type for NumSpilledTasks should be gauge since the sum already happens in SchedulerStats.
2022-03-22 16:17:00 -07:00
Jiajun Yao
bab19e8e68
Add perf metrics for test_many_tasks.py (#23318)
Add perf metrics for test_many_tasks.py
Use the new smoke test structure
2022-03-22 16:16:42 -07:00
Archit Kulkarni
04ff0a9398
Deflake serve:test_runtime_env by splitting into two files (#23380)
- Also removes the unnecessary "post-wheel-build" tag, which is only used for conda tests.
2022-03-22 15:47:38 -05:00
Siyuan (Ryans) Zhuang
aea93e4a1f
[tune] simpler get_next_trial (#23396)
* simpler next_trial

* update

* update
2022-03-22 12:27:53 -07:00
Chen Shen
3efe437298
[Dataset] optionally pin pipeline actors on driver node. (#23397)
pin pipeline actors on driver node doesn't work when Ray dataset is used with Ray client.
2022-03-22 10:31:23 -07:00
Matti Picus
b190d7c214
[WINDOWS] skip flaky test that often fails (#23204) 2022-03-22 09:34:15 -07:00
Fabian Witter
2547055f38
[RLlib] Add support for complex observations in CQL (#23332) 2022-03-22 17:04:07 +01:00
SangBin Cho
0cd687cc19
[Nightly test] Fix job download retry (#23401)
Currently when we download a file to the cluster using a job, we don't do the retry.
2022-03-22 08:31:24 -07:00
xwjiang2010
587e46611f
[tuner] return new checkpoint in result grid. (#23280)
Closes #23295
Closes #23303
2022-03-22 15:21:53 +00:00
Kai Fricke
02644ab4d8
[ci/release] Retry cluster env build on failure (#23378)
Failed cluster env builds should be retried.
2022-03-22 09:45:22 +00:00
Avnish Narayan
754bcd16f8
[rllib] Pin gym everywhere (#23384)
This PR Pins gym in the app config.yaml's for rllib and tune so that release tests are no longer broken by the new gym version.
2022-03-22 09:44:22 +00:00
Paige Bailey
f21092e80a
Added a "Getting Involved" table. (#23387) 2022-03-22 00:17:53 -07:00
shrekris-anyscale
b00977b1b1
[serve] Remove dashboard's dependency on Serve (#23389) 2022-03-21 22:14:41 -07:00
Eric Liang
f31e4099ed
Add storage-based spilling backend (#23341)
Why are these changes needed?
This adds a ray-storage based spilling backend, which can be enabled by setting the spill config to {"type": "ray_storage", "buffer_size": N}. This will cause Ray to spill to the configured storage (pyarrow FS).

In a future PR, I'll add documentation and deprecate the existing smart_open backend.
2022-03-21 19:17:42 -07:00
Richard Liaw
1fe110f8f4
[ml] Add a starter page for docstrings (#23312) 2022-03-21 17:20:45 -07:00
Kai Fricke
9d8ce1db59
[tune] Fix docstrings according to code style guide (#23375)
According to https://docs.ray.io/en/latest/ray-contribute/getting-involved.html#code-style, typed arguments should not repeat thetypes in the docstrings. This PR removes these annotations and adds further annotations in some places where they were missing before.
2022-03-21 17:57:50 +00:00
Amog Kamsetty
54d1f6c704
[CI] Better error message for fake multi-node cluster (#22647)
Differentiate between a "resources not available" error vs. other types of errors.

Had this happen to me when I was trying out the fake cluster- I was using Ray client incorrectly, but because we were doing a generic except Exception, this was raised as "Timed out waiting for resources"
2022-03-21 17:35:56 +00:00
Edward Oakes
f22a34bd4f
Restore "[Serve] Implement Default DAGDriver (#23301)" (#23373) 2022-03-21 10:35:00 -07:00
Kai Fricke
b64452bc63
[tune] Add multinode sync test (#23229)
This adds a multinode checkpoint/restore test for Ray Tune. This covers some of the functionality of the release tests, but in a more controlled environment. In a follow-up PR, we should test (mocked) cloud checkpointing, too.
2022-03-21 17:02:17 +00:00
Michael (Mike) Gelbart
99d60ef18c
[docs] Fix typos in ray docs contributing guide (#23360)
There are a couple typos in the [Ray contributing guide](https://docs.ray.io/en/master/ray-contribute/docs.html). I fixed the typos, added a relevant link, and reworded a sentence.
2022-03-21 10:01:41 -07:00
Kai Fricke
e48c407b13
[release] long running many drivers: Use SDK file manager (#23379)
This will make the test pass again: https://buildkite.com/ray-project/release-tests-branch/builds/226#_
2022-03-21 09:56:59 -07:00
Guyang Song
69af9764b2
[runtime env] URI reference refactor (#22828)
- Move the URI reference logic from raylet to agent.
- Redefine the runtime env agent RPC to `CreateRuntimeEnvOrGet` and `DeleteRuntimeEnvIfPossible`
- More details https://github.com/ray-project/ray/issues/21695#issuecomment-1032161528

Future works
- We don't remove the `RuntimeEnvUris` from `RuntimeEnv` protobuf in current PR because gcs also uses those URIs to do GC by runtime_env_manager. We should also clear this.
- Ray client server shouldn't interact with agent directly. Or Ray client server should also decrease the reference count.
- Currently, `WorkerPool::HandleJobStarted` will be called multiple times for one job. So we should make sure this function is idempotent. Can we change this logic and make this function be called only once?
2022-03-21 11:21:15 -05:00
shrekris-anyscale
75b7465ba4
[serve] Reject Ray client addresses when submitting via Dashboard (#23339)
Some commands in the Serve CLI use Ray client and some commands ping the Ray dashboard; however, all commands read `RAY_ADDRESS` to get the address. This change raises a nice exception if the user accidentally passes a Ray client address as the Ray Dashboard address.
2022-03-21 11:17:51 -05:00
Jun Gong
d12977c4fb
[RLlib] TF2 Bandit Agent (#22838) 2022-03-21 16:55:55 +01:00
Stephanie Wang
e507aa5758
Revert "[Serve] Implement Default DAGDriver (#23301)" (#23358)
This reverts commit 91a1c3411f.
2022-03-21 10:54:52 -05:00
Larry
81dcf9ff35
[Placement Group] Make PlacementGroupID generate from JobID (#23175) 2022-03-21 17:09:16 +08:00
Jiajun Yao
d3159f201b
[Doc] Add scheduling doc (#23343) 2022-03-20 16:05:06 -07:00
ZhuSenlin
871f749baf
[GCS] [2 / n] Refactor gcs_resource_scheduler to cluster_resource_scheduler (#23323)
* Add new interface to policy for batch scheduling and unify the scheduling result and context

* Remove the dependence of GcsClient on ClusterResourceScheduler

* fix compile error

* fix lint error

Co-authored-by: 黑驰 <senlin.zsl@antgroup.com>
2022-03-20 15:03:14 -07:00
Kai Fricke
7085749d50
[tune] Adjust release test timeouts (#23362)
Currently release tests fail because they exceed the (rather arbitrary) timeout by 1-2 seconds.
2022-03-20 17:05:20 +00:00
Avnish Narayan
e008a48ef2
[release tests] Pin gym everywhere (#23349) 2022-03-19 02:52:54 -07:00