Commit graph

12448 commits

Author SHA1 Message Date
Kai Fricke
c339f19b0f
[tune] Always sync down trial after completion (#24389)
As a follow-up from #12590, we should also always sync down after a trial terminated and clean up the trial syncer object after closing.
2022-05-03 15:32:44 +01:00
Eric Liang
d178645f18
[docs] Add documentation on how to handle read-only arrays and actor reprs (#24410) 2022-05-02 23:52:54 -07:00
Sven Mika
1bc6419e0e
[RLlib] R2D2 training iteration fn AND switch off execution_plan API by default. (#24165) 2022-05-03 07:59:26 +02:00
Linsong Chu
e8fc66af34
[Workflow]Make workflow logs publish to the correct driver. (#24089)
All workflow tasks are executed as remote functions that submitted from WorkflowManagmentActor. WorkflowManagmentActor is a detached long-running actor whose owner is the first driver in the cluster that runs the very first workflow execution. Therefore, for new drivers that run workflows, the loggings won't be properly published back to the driver because loggings are saved and published based on job_id and the job_id is always the first driver's job_id as the ownership goes like: first_driver -> WorkflowManagmentActor -> workflow executions using remote functions.

To solve this, during workflow execution, we pass the actual driver's job_id along with execution, and re-configure the logging files on each worker that runs the remote functions. Notice that we need to do this in multiple places as a workflow task is executed with more than one remote functions that are running in different workers.
2022-05-02 19:53:57 -07:00
Yi Cheng
0b03e4f549
[core] Fix the bug in task cancel hang. (#24369)
This PR fixes a bug: when the task is pushed to a core worker but hasn't been scheduled to run cancel is not called which will lead to the get request hanging forever.

The fix is to call the `Cancel`.
2022-05-02 19:51:40 -07:00
Antoni Baum
292dcad7dd
[AIR] Improve reporting in HuggingFaceTrainer (#24397)
The previous implementation of the reporting logic in HuggingFaceTrainer had a few edge cases that caused the training iterations and measured epochs to diverge. This new implementation should ensure that reporting is consistent.
2022-05-02 19:46:15 -07:00
Siyuan (Ryans) Zhuang
1282ae15d9
[workflow] Enable workflow storage test with cluster (#24401)
* update
2022-05-02 16:19:50 -07:00
xwjiang2010
3c9e704e83
[tuner] Integrate with serialize_lineage. (#24229)
Also add back the test to tune dataset.
2022-05-02 23:01:49 +01:00
SangBin Cho
2bce07d4ce
[State API] List runtime env API (#24126)
This PR supports list runtime env API
2022-05-02 14:01:00 -07:00
Sven Mika
7cca7782f1
[RLlib] OPE (off policy estimator) API. (#24384) 2022-05-02 21:15:50 +02:00
Sven Mika
0c5ac3b9e8
[RLlib] Issue 24075: Better error message for Bandit MultiDiscrete (suggest using our wrapper). (#24385) 2022-05-02 21:14:08 +02:00
Stephanie Wang
fbbc9c33d6
Add nightly tests for push-based shuffle (#24352)
Adds 1TB tests for push-based random shuffle and sort. Initially marked unstable.
2022-05-02 11:35:14 -07:00
Sihan Wang
59debac670
[Serve] Move deployment clean up under serve.run() api (#24306)
On the ServeHead level, it is talking to serve api and controller to do deployment and clean up now. With this pr, it hides the  deployment clean up logic into server.run() for code cleanness and easy to refactor in the future.
2022-05-02 12:10:11 -05:00
Dmitri Gekhtman
2aee537f92
[kuberay] Add a test of the Ray Job Submission API to the KubeRay e2e tests. (#24319)
This PR modifies the KubeRay e2e autoscaling test so that one of its scaling commands is sent via the Ray Job Submission API.

This validates that the Ray Job Submission API works with KubeRay and, in particular, that the Ray Dashboard is correctly exposed.
2022-05-02 10:04:16 -07:00
Sven Mika
296e2ebc46
[RLlib] Issue 24082: WorkerSet.policies_to_train (deprecated) - if still used - returns wrong values. (#24386) 2022-05-02 18:33:52 +02:00
Sven Mika
924adcf402
[RLlib] Issue 24074: multi-GPU learner thread key error in MA-scenarios. (#24382) 2022-05-02 18:30:46 +02:00
Sven Mika
d4a906e177
Issue 24143: Some f-strings missing f. (#24383) 2022-05-02 17:12:38 +02:00
Sven Mika
f53ca1cacb
[RLlib] ES + ARS TrainerConfig objects. (#24374) 2022-05-02 16:55:28 +02:00
Adrish Dey
d02b4cb2d6
Adding support to wandb service (#24017)
Updating W&B Ray Tune Integration with new standards. Adding support to wandb service, the soon to be default way for multiprocessing + wandb run logging.

Co-authored-by: Kai Fricke <krfricke@users.noreply.github.com>
2022-05-02 15:47:08 +01:00
Antoni Baum
cf1c5f2ccf
[docs] Restore external markdown stubs (#24357)
This PR introduces a modification to the external markdown logic in doc build to restore the original file content after build is finished. This ensures that the files are not accidentally committed.
2022-05-02 15:37:40 +01:00
Edward Oakes
11954e6798
Issue 24143: Fix a few f-strings missing the f. (#24232) 2022-05-02 16:11:33 +02:00
Chong-Li
f3767131cb
[Enable gcs actor scheduler 1/n] Raylet and GCS schedulers share cluster_task_manager (#23829) 2022-05-02 21:45:23 +08:00
Sven Mika
026849cd27
[RLlib] APPO TrainerConfig objects. (#24376) 2022-05-02 15:06:23 +02:00
SangBin Cho
6f192b6e17
[Metrics] Allow to completely disable metrics collection (#24333)
This PR allows for Ray to disable metrics collection. It was possible with RAY_enable_metrics_collection, but it didn't fully disable collection because there was a metrics collection happening from agent that wasn't properly disabled. This PR also adds tests.
2022-05-02 05:33:03 -07:00
Sven Mika
f066180ed5
[RLlib] Deprecate timesteps_per_iteration config key (in favor of min_[sample|train]_timesteps_per_reporting. (#24372) 2022-05-02 12:51:14 +02:00
Sven Mika
950bd3fc3f
[RLlib] IMPALA TrainerConfig objects. (#24375) 2022-05-02 12:05:30 +02:00
fede
9a6e0538ea
Pythonic assert for initialization (#24378) 2022-05-01 22:01:10 -07:00
Eric Liang
38a46b71de
Add a hook that runs at the beginning of ray start (#24368) 2022-05-01 11:32:33 -07:00
Kai Fricke
8a578c191f
[ci/release] Re-install anyscale package after local env setup (#24373)
The local environment setup of release tests (in client tests) can sometimes update dependencies of the `anyscale` package to an unsupported version. By re-installing the `anyscale` package after local env setup, we make sure that we can connect to the cluster. Note that this may lead to incompatibilities of the test script, however.
2022-05-01 16:51:55 +01:00
Kai Fricke
c01681cf34
[ci] Exclude flaky test headers from pytest summaries (#24365)
Failing pytest summaries for flaky tests that eventually succeed are not always cleaned up properly: https://buildkite.com/ray-project/ray-builders-branch/builds/7292#_
This PR ensures we only print summaries when we have at least one summary file (and not just the header file).
2022-05-01 12:51:22 +01:00
Chris K. W
29ecffe805
[client] set log level to debug for actor errors (#24308)
Users get error messages from client/server on actor failures, even if they already try-except'd the error. For example:

```
import ray
ray.init("ray://localhost:10001")
try:
   ray.get_actor("doesnotexist")
except ValueError:
   pass
```

Will still generate the log `Caught schedule exception` and `Exception from actor creation is ignored in destructor. To receive this exception in application code, call a method on the actor reference before its destructor is run.`. Reduce the level of these logs to debug by default.
2022-04-30 21:30:54 -07:00
Philipp Moritz
27917f570d
[runtime_env] Extend runtime_env hook to also cover jobs (#24328)
This extends https://github.com/ray-project/ray/pull/24036 to also cover job submission.

Co-authored-by: Eric Liang <ekhliang@gmail.com>
2022-04-30 09:15:51 -07:00
Jiajun Yao
cfc192ebc4
Collect library usage (#24312)
Collect which libraries are used for usage stats purpose.
2022-04-30 07:51:01 -07:00
Antoni Baum
87eaf55d82
[tune] Fix checkpoint manager with nan checkpoints (#24349)
Fixes checkpoints not being recorded in Tune's checkpoint manager if the first checkpoint has None value. This also deflakes `test_checkpoint_manager.py::CheckpointManagerTest`.
2022-04-30 09:23:57 +01:00
Sven Mika
b2b1c95aa5
[RLlib] A2/3C Config objects (A2CConfig and A3CConfig). (#24332) 2022-04-30 09:51:09 +02:00
Clark Zinzow
f72555262a
[Datasets] Provide more efficient + intuitive block clearing semantics for different execution modes (#24127)
**TL;DR:** Don't clear for eager, clear all but non-lazy input blocks if lazy, clear everything if pipelining.
 
This PR provides more efficient and intuitive block clearing semantics for eager mode, lazy mode, and pipelining, while still supporting multiple operations applied to the same base dataset, i.e. fan-out. For example, two different map operations are applied to the same base `ds` in this example:

```python
ds = ray.data.range(10).map(lambda x: x+1)
ds1 = ds.map(lambda x: 2*x)
ds2 = ds.map(lambda x: 3*x)
```

If naively clear the blocks when executing the map to produce `ds1`, the map producing `ds2` will fail.

### Desired Semantics

- **Eager mode** - don’t clear input blocks, thereby supporting fan-out from cached data at any point in the stage chain without triggering unexpected recomputation.
- **Lazy mode** - if lazy datasource, clear the input blocks for every stage, relying on recomputing via stage lineage if fan-out occurs; if non-lazy datasource, do not clear source blocks for execution plan when executing first stage, but do clear input blocks for every subsequent stage.
- **Pipelines** - Same as lazy mode, although the only fan-out that can occur is from the pipeline source blocks when repeating a dataset/pipeline, so unintended intermediate recomputation will never happen.
2022-04-29 18:12:48 -07:00
Jonathan Giannuzzi
9f88031d4f
Fix bogus warning about excess queuing for async actors (#22386)
#17581 introduced a warning about excess queuing for actors. Unfortunately since Ray 1.10.0, the metric used became wrong for async actors, resulting in bogus warnings when they are called more than 5000 times, even though there are not 5000 pending tasks.

The difference between 1.9.2 and 1.10.0 is that async actors tasks skip the queue in CoreWorkerClient::PushActorTask. However CoreWorkerClient::ClientProcessedUpToSeqno uses max_finished_seq_no_ which is never updated when the queue is skipped.

I think that a better metric for the amount of tasks that are pending submissions is the size of the internal queue CoreWorkerDirectActorTaskSubmitter::inflight_task_callbacks.
2022-04-29 17:19:43 -07:00
Jiao
ba7cc1803a
[Deployment Graph] Add release test for long chain & wide fanout pattern (#24246) 2022-04-29 17:03:33 -07:00
Simon Mo
3378e1924e
[Serve] Rename input_schema to http_adapter and clarify it in doc (#24353) 2022-04-29 16:14:04 -07:00
Antoni Baum
ff0ced1a64
[AIR] HuggingFaceTrainer&Predictor implementation (#23876)
Implements HuggingFaceTrainer & HuggingFacePredictor.
2022-04-29 14:31:54 -07:00
mwtian
02fda97c86
[CI] Re-balance concurrency groups to allow more quota for large tests (#24344)
Currently nightly tests are unable to finish in a day because of concurrency group limit on `large` tests. This is an attempt to adjust the limits so buildkite can run / finish more tests. I will observe which tests fall into the `enormous` group and adjust the test resource / concurrency group limits again.
2022-04-29 22:26:16 +01:00
Sven Mika
3052193c9e
[RLlib] Fix CQL getting stuck when deprecated timesteps_per_iteration is used (use min_train_timesteps_per_reporting instead). (#24345)
Fix CQL getting stuck when deprecated timesteps_per_iteration is used (use min_train_timesteps_per_reporting instead).

CQL does not perform sampling timesteps and the deprecated timesteps_per_iteration is automatically translated into the new min_sample_timesteps_per_reporting, but should be translated (only for CQL and other purely offline RL algos) into min_train_timesteps_per_reporting.

If timesteps_per_iteration, CQL lever leaves the first iteration as it thinks it's not done yet (sample timesteps always remain at 0).
2022-04-29 21:02:34 +01:00
Kai Fricke
ac036e4fe8
[ci/release] Print local environment information (#24346)
For debugging client environments, it is helpful to print the installed pip packages.
Additionally, a fix for the environment of the ml_user_tune_rllib_connect_test is added. Additionally, anyscale import errors are reported verbosely to help debug missing packages.
2022-04-29 21:01:50 +01:00
Patrick Ames
f337f04084
[Datasets] Add bulk Parquet file reader API (#23179)
Adds a reader suitable for quickly reading a large number (e.g. 1-100K+) of Parquet files into a Ray Dataset from either local disk or cloud storage.
2022-04-29 12:47:41 -07:00
Balaji Veeramani
2190f7ff25
[Datsets] Add SimpleTensorFlowDatasource (#24022)
This PR makes it easier to use TensorFlow datasets with Ray Datasets.
2022-04-29 12:15:30 -07:00
Chen Shen
f375200acd
[Datasets] Fix prefetching with actor-based prefetcher. (#23952)
The prefetch_blocks implementation doesn't work as expected. Due to ray.wait() doesn't given us fine grained control, today we block waiting any of the block returns. As I read the code, it may or may not actually fetching all the blocks.

A better way to ensure prefetching not blocking is to use ray remote function call, which is not blocking and ensures the blocks are fetched eventually.
2022-04-29 11:50:00 -07:00
Kai Fricke
7a4d58d80f
[rllib] Fix doctest failure (#24343)
Lint was still failing (but only caught with doctest):

```
File "../../python/ray/rllib/utils/numpy.py", line ?, in default

Failed example:

    tree.traverse(make_action_immutable, d, top_down=False)

Exception raised:

    Traceback (most recent call last):

      File "/opt/miniconda/lib/python3.6/doctest.py", line 1330, in __run

        compileflags, 1), test.globs)

      File "<doctest default[4]>", line 1, in <module>

        tree.traverse(make_action_immutable, d, top_down=False)

    NameError: name 'make_action_immutable' is not defined

```
2022-04-29 19:13:24 +01:00
Siyuan (Ryans) Zhuang
3c3b5390d6
[workflow] Use internal storage (#24120)
* use internal storage

* rename

* fix examples

* try fixing storage

* fix storage

* reuse upstream test utils

* break down tests

* down size the array to avoid timeout
2022-04-29 10:11:07 -07:00
Shawn
43ed78f6fd
[Datasets] Integrate Mars-on-Ray with Datasets; improve docs and add tests (#23402)
Add Mars-on-Ray + Datasets integration; improve Mars-on-Ray docs and add tests.
2022-04-29 09:43:52 -07:00
Patrick Ames
4691d2d339
[Datasets] Add fast file metadata provider and refactor Parquet datasource (#24094)
Adds a fast file metadata provider that trades comprehensive file metadata collection for speed of metadata collection, and which also disabled directory path expansion which can be very slow on some cloud storage service providers. This PR also refactors the Parquet datasource to be able to take advantage of both these changes and the content-type agnostic partitioning support from #23624.

This is the second PR of a series originally proposed in #23179.
2022-04-29 09:39:13 -07:00