Commit graph

12034 commits

Author SHA1 Message Date
mwtian
d1ef498638
[Python Worker] load actor dependency without importer thread (#23383)
Import actor dependency when not found, so actor dependencies can be imported without the importer thread.

Remaining blockers to remove importer thread are to support running a function on all workers `run_function_on_all_workers()`, and raising a warning when the same function / class is exported too many times.
2022-03-27 15:09:08 -07:00
Siyuan (Ryans) Zhuang
6b1b25168f
[workflow][doc] Doc for workflow checkpointing (#23510) 2022-03-27 12:18:14 -07:00
shrekris-anyscale
65d72dbd91
[serve] Make serve.shutdown() shut down remote Serve applications (#23476) 2022-03-25 18:27:34 -05:00
Amog Kamsetty
7fd7efc8d9
[AIR] Do not deepcopy RunConfig (#23499)
RunConfig is not a tunable hyperparameter, so we do not need to deep copy it when merging parameters with Ray Tune's param_space.
2022-03-25 13:12:17 -07:00
Edward Oakes
cf7b4e65c2
[serve] Implement serve.build (#23232)
The Serve REST API relies on YAML config files to specify and deploy deployments. This change introduces `serve.build()` and `serve build`, which translate Pipelines to YAML files.

Co-authored-by: Shreyas Krishnaswamy <shrekris@anyscale.com>
2022-03-25 13:36:59 -05:00
shrekris-anyscale
be216a0e8c
[serve] Raise error in test_local_store_recovery (#23444) 2022-03-25 13:36:51 -05:00
shrekris-anyscale
891301ff54
[serve] [docs] Add tip about serve status (#23481)
The `serve status` command allows users to get their deployments' status info through the CLI. This change adds a tip to the health-checking documentation to inform users about `serve status`.
2022-03-25 13:36:15 -05:00
dependabot[bot]
e69f7f33ee
[tune](deps): Bump optuna in /python/requirements/ml (#19669)
Bumps [optuna](https://github.com/optuna/optuna) from 2.9.1 to 2.10.0.
- [Release notes](https://github.com/optuna/optuna/releases)
- [Commits](https://github.com/optuna/optuna/compare/v2.9.1...v2.10.0)

---
updated-dependencies:
- dependency-name: optuna
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kai Fricke <kai@anyscale.com>
2022-03-25 17:58:22 +00:00
Sven Mika
7cb86acce2
[RLlib] trainer_template.py: hard deprecation (error when used). (#23488) 2022-03-25 18:25:51 +01:00
Jan Weßling
f78404da4a
[serve] Add ensemble model example to docs (#22771)
Added ensemble model examples to the Documentation. That was needed, due to a user request and there was no methodology outlining the creation of higher level ensemble models.

Co-authored-by: Jiao Dong <sophchess@gmail.com>
2022-03-25 11:17:54 -05:00
ddelange
e109c13b83
[ci] Clean up ray-ml requirements (#23325)
In https://github.com/ray-project/ray/blob/ray-1.11.0/docker/ray-ml/Dockerfile, the order of pip install commands currently matters (potentially a lot). It would be good to run one big pip install command to avoid ending up with a broken env.

Co-authored-by: Kai Fricke <krfricke@users.noreply.github.com>
2022-03-25 15:59:54 +00:00
Philipp Moritz
46c1b98b2f
[ci/lint] Fix linkcheck flakiness (#23482)
As seen in https://buildkite.com/ray-project/ray-builders-branch/builds/6736#de2e23c9-3ec1-4c1b-83cb-41ae658ef1f8
2022-03-25 15:58:24 +00:00
Maxim Egorushkin
3e7ef04203
Don't rsync checkpoint_tmp directories. (#18434)
checkpoint_tmpxxxxxx directories must not be synced from the worker nodes to the head node.

Co-authored-by: Maxim Egorushkin <maxim.egorushkin@gmail.com>
Co-authored-by: Kai Fricke <kai@anyscale.com>
Co-authored-by: Kai Fricke <krfricke@users.noreply.github.com>
2022-03-25 15:50:38 +00:00
Kai Fricke
940c028540
[ci] Clean up artifacts before/after jobs (#23463)
We sometimes end up with stale wheel uploads from previous runs of a Buildkite agent. The result is that commit wheels are being overwritten from old build jobs - effectively breaking the wheel build logic.

Example:

This Agent: https://buildkite.com/organizations/ray-project/agents/4b955117-2f6c-4849-b703-3457daf69f89

- builds wheels (in post-wheels tests) for a35ebc945b
- and then runs both the Ray CPP worker and the Train + Tune tests in 6746e9f
- Usually these two tests shouldn't provide artifacts at all, but they do - these are the wheels from a35ebc945b though! Meaning these are uncleaned leftovers from the first build task.
- See here for proof of artifact upload: https://buildkite.com/ray-project/ray-builders-pr/builds/27622#d11bc514-ebd8-4e0c-a2ce-826b9bad27de

The solution is thus to always clean up the artifacts directory in the worker, i.e. `rm -rf /artifact-mount/*`

This PR adds two of such clean up instructions - once before commands are run and once after artifacts are uploaded. We can probably just do either, but it doesn't hurt to have both.
2022-03-25 13:07:20 +00:00
Brett Göhre
f5e492ea8a
[Docs] optuna notebook (#23477) 2022-03-25 09:04:53 +01:00
mwtian
c2404cce62
avoid adding gpu utilization when unavailable (#23468)
From #22954, GPU utilization can be unavailable for consumer hardware. So dashboard should not assume the value cannot be None.

There might be a better way to represent "not reported". But currently utilizations are summed up which makes using non-zero to represent "not reported" hard to do.
2022-03-24 22:48:17 -07:00
Antoni Baum
ebb592b2ca
[Tune/Train] Make MLflowLoggerUtil copyable (#23333)
Makes sure mlflow module is not saved as an attribute in MLflowLoggerUtil, which was causing an exception when running deepcopy on the callback.
2022-03-24 17:48:02 -07:00
Max Pumperla
60054995e6
[docs] fix doctests and activate CI (#23418) 2022-03-24 17:04:02 -07:00
Siyuan (Ryans) Zhuang
d39cef5725
[workflow] Deprecate "workflow.step" [Part 1 - most common cases] (#23456)
* replacing workflow decorator

* replacing workflow decorator
2022-03-24 13:11:46 -07:00
Stephanie Wang
d67a4f5c88
[datasets] Fix missing arg in RandomIntRowDatasource (#23255)
Previously failed with
```
E                       ray.exceptions.RayTaskError(TypeError): ray::_prepare_read() (pid=166631, ip=10.103.212.102)
E                         File "/home/swang/ray/python/ray/data/read_api.py", line 902, in _prepare_read
E                           return ds.prepare_read(parallelism, **kwargs)
E                         File "/home/swang/ray/python/ray/data/datasource/datasource.py", line 331, in prepare_read
E                           input_files=None,
E                       TypeError: __init__() missing 1 required keyword-only argument: 'exec_stats'
```

This PR adds the missing arg.
2022-03-24 13:05:01 -07:00
Sven Mika
22c9c4aa39
[RLlib] Slate-Q +GPU torch bug fix. (#23464) 2022-03-24 17:39:33 +01:00
Dmitri Gekhtman
9ce221f514
Disable KubeRay tests on windows. (#23453)
This PR disables KubeRay tests on windows, because they're not relevant there.
2022-03-24 08:11:17 -07:00
xwjiang2010
4f34b53e83
[AIR] Add tuner test. (#23364)
Add tuner tests.
   
These tests are mainly focusing on non ray client mode, including successful runs, and failures in both driver and trainer side and resume.
   
One issue surfaced through writing the tests (which probably means the API is not quite right) is whether RunConfig should be supplied in Tuner.init v.s. Tuner.fit(). At least for some fields in RunConfig, we want to be able to change it across runs (e.g. callbacks). Plus with current impl, it's not possible to checkpoint "stateful" callbacks, which could confuse our users. cc @ericl for API inputs. See "test_tuner_with_xgboost_trainer_driver_fail_and_resume" (search for hack).

The PR also cleans up some API docs.

Fixes some bugs in loading trial from checkpoint, namely get_default_resource (which probably is not necessary given self.placement_group_factory is already set anyways) is called with an empty config, as self.config is only loaded through __setstate__, which happens later than get_default_resource. Remove the call to get_default_resource when loading trials from checkpoint.
2022-03-24 14:54:21 +00:00
Philipp Moritz
1b0c667061
Make linkcheck less flaky (#23442)
The huggingface links have created a number of spurious linkcheck errors, this PR is fixing that by ignoring them.
2022-03-24 14:51:49 +00:00
Avnish Narayan
5134e0dc12
[RLlib] Change type to tensortype for cql policies. (#23438) 2022-03-24 12:32:29 +01:00
Avnish Narayan
9040f54060
[RLlib] Pin Gym Everywhere and turn off gpu for recsim tests (#23452) 2022-03-24 09:17:30 +01:00
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