Commit graph

12326 commits

Author SHA1 Message Date
Kai Fricke
c775a1ed1f
[tune] Fix has_resources_for_trial, leading to trials stuck in PENDING mode (#24878) (#24933)
Tune resource bookkeeping was broken. Specifically, this is what happened in the repro provided in #24259:

- Only one PG can be scheduled per time
- We staged resources for trial 1
- We run trial 1
- We stage resources for trial 2
- We pause trial 1, caching the placement group
- This removes the staged PG for trial 2 (as we return the PG for trial 1)
- However, now we `reconcile_placement_groups`, which re-stages a PG
- both trial 1 and trial 2 are now not in `RayTrialExecutor._staged_trials`
- A staging future is still there because of the reconciliation

This PR fixes this problem in two ways. `has_resources_per_trial` will check a) also for staging futures for the specific trial, and b) will also consider cached placement groups.

Generally, resource management in Tune is convoluted and hard to debug, and several classes share bookkeeping responsibilities (runner, executor, pg manager). We should refactor this.
2022-05-19 08:36:07 +01:00
Chen Shen
002a2b865f
[Cherry-pick] Add necessary build changes to build python3.10 docker images (#24929)
* [python3.10] Build py310 images (#24859)

Build python 3.10 images so we can run release tests.

* [ci/py310] Fix docker image build/tag (#24922)

We're currently not building the 3.9/3.10 ray-ml docker images, but we're still trying to tag/push them.

Co-authored-by: Kai Fricke <krfricke@users.noreply.github.com>
2022-05-18 12:29:21 -07:00
Jian Xiao
096918b357 lower the utilization threshold in many tasks scheduling test by 5% (#24758)
Fix the failure to unbreak nightly and unblock 1.13 release.

The root cause is the upgrade of GRPC to 1.45.2 made it slightly slow; this is an acceptable regression which is needed to make this upgrade.

Co-authored-by: Ubuntu <ubuntu@ip-172-31-32-136.us-west-2.compute.internal>
2022-05-13 20:27:02 +00:00
Jiajun Yao
930ecfaf1c
Don't show usage stats prompt in dashboard if prompt is disabled (#24700) (#24735) 2022-05-13 09:36:10 -07:00
Jiajun Yao
677b5c33db
[Doc] Add doc for usage stats collection (#24522) (#24680) 2022-05-11 11:36:54 -07:00
Chen Shen
2d40a4f987
Fix check failure when DisconnectClient happens before AnnounceWorkerPort (#24403) (#24676)
We have several issues if DisconnectClient happens before AnnounceWorkerPort:

- Check failure for removing io worker from registered_io_workers since the io worker is only added to that set after AnnounceWorkerPort.
- num_starting_(io)_workers is not decremented.

Co-authored-by: Jiajun Yao <jeromeyjj@gmail.com>
2022-05-11 08:54:32 +02:00
Simon Mo
36f7d340b2
[Serve] Run health check in separate thread (#24560) (#24607) 2022-05-09 14:44:04 -04:00
Avnish Narayan
a20cdaf8f0
[RLlib] SlateQ + tf; release test fixes, related to TD-error not properly being formatted. (#24521) (#24542)
Co-authored-by: Sven Mika <svenmika1977@gmail.com>
2022-05-06 14:18:43 -04:00
Kai Fricke
01c99c0347
[release/1.13.0] update version number (#24505) 2022-05-05 19:34:59 +01:00
Dmitri Gekhtman
58545ee664 [Dashboard][K8s] Add toggle to enable showing node disk usage on K8s (#24416) (#24440)
This is the release branch PR for #24416 (Add toggle to enable showing node disk usage on K8s) which is a requirement for a high-profile Ray user.
2022-05-04 12:03:05 -04:00
Sven Mika
b0b4ed19e0 [RLlib] SlateQ fixes: Release learning tests wrong yaml structure + TD-error torch issue (#24429) 2022-05-04 12:01:47 -04:00
Jiajun Yao
e65f75bf95 Collect library usage (#24312)
Collect which libraries are used for usage stats purpose.
2022-05-02 17:41:12 -04:00
Kai Fricke
025e4b0182 [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 09:38:13 -07: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
Sven Mika
539832f2c5
[RLlib] SlateQ training iteration function. (#24151) 2022-04-29 18:38:17 +02:00
Antoni Baum
825a8b92c5
[AIR] Add Categorizer preprocessor (#24180)
Adds a Categorizer preprocessor to automatically set the Categorical dtype on a dataset. This is useful for eg. LightGBM, which has build-in support for features with that dtype.

Depends on #24144.
2022-04-29 09:37:18 -07:00
Guillaume Desforges
02ca3c34d2
[Datasets] Fix #24296 by limiting parallelism in FileBasedDatasource (#24298)
This prevents a MemoryError when a high value is provided to parallelism to ensure exactly one ReadTask is created per file.
2022-04-29 09:30:12 -07:00
Kai Fricke
6282090401
[ci] Fix GPU docker builds (#24336)
NVIDIA Docker builds are currently broken, e.g.: https://buildkite.com/ray-project/ray-builders-branch/builds/7239#e9dea1d6-7dea-4323-801c-b7efe917be03

Following this workaround: https://forums.developer.nvidia.com/t/invalid-public-key-for-cuda-apt-repository/212901/11
to hopefully fix this for now.
2022-04-29 17:10:18 +01:00
Kai Fricke
dd87e61808
[ci/release] Fix module import errors in release tests (#24334)
After https://github.com/ray-project/ray/pull/24066, some release tests are running into:

```
ModuleNotFoundError: No module named 'ray.train.impl'
```

This PR simply adds a `__init__.py` file to resolve this.

We also add a 5 wecond delay for client runners in release test to give clusters a bit of slack to come up (and avoid ray client connection errors)
2022-04-29 17:03:17 +01:00
Omar Sanseviero
94432d64c9
Fix Ray Serve example (#24276)
The current example in the `README.md` is broken, which is same issue as https://github.com/ray-project/ray/pull/22228. cc @simon-mo
2022-04-29 10:27:26 -05:00
shrekris-anyscale
caba3d44fd
[serve] Add test_update_num_replicas_anonymous_namespace (#24313)
#24311 added the `test_update_num_replicas_anonymous_namespace` unit test to check for replica leaks in anonymous namespaces. This change adds this test to the master branch.
2022-04-29 10:14:17 -05:00
Archit Kulkarni
1b67e6a8ae
[Jobs] [Dashboard] Add job submission id as field to job snapshot (#24303)
Closes https://github.com/ray-project/ray/issues/24300

Adds a field to the job submission snapshot that matches the job name in the existing snapshot.  Before this PR, the job submission name was camelcased because all snapshot keys are automatically camelcased.  This PR allows jobs from the old job field to be linked to ones in the new job submission snapshot.
2022-04-29 10:10:24 -05:00
Kai Fricke
242706922b
[rllib] Fix linting (#24335)
#24262 broke linting. This fixes this.
2022-04-29 15:21:11 +01:00
SangBin Cho
46cd7f1830
Make large multi tests to nightly + remove k8s tests (#24302)
As discussed, to reduce backlog for large tests, we will (1) remove k8s tests (2) make large multi daily tests to nightly tests
2022-04-29 03:40:12 -07:00
Jun Gong
ec636dcb29
[RLlib] Do not print warning message during env pre-checking, if there is nothing wrong with user envs. (#24289) 2022-04-29 10:41:19 +02:00
Xuehai Pan
377a522ce2
[RLlib] Fix time dimension shaping for PyTorch RNN models. (#21735) 2022-04-29 10:39:03 +02:00
Pavel C
de0c6f6132
[RLlib] Fix policy_map always loading all policies from disk due to (not always needed) global_vars update. (#22010) 2022-04-29 10:38:05 +02:00
Ishant Mrinal
0248c60387
[RLlib] Add additional return values to action_sampler_fn. (#22721) 2022-04-29 10:34:48 +02:00
Xuehai Pan
3c3dd5051f
[RLlib] Fix type hints for original_batches in callbacks. (#24214) 2022-04-29 10:33:53 +02:00
Xuehai Pan
9c76e21a5e
[RLlib] Ensure MultiCallbacks always implements all callback methods (#24254) 2022-04-29 10:30:24 +02:00
simonsays1980
ff575eeafc
[RLlib] Make actions sent by RLlib to the env immutable. (#24262) 2022-04-29 10:27:06 +02:00
HJasperson
5f12c62226
[RLlib] Fix "tf variable is unhashable" Error. (#24273) 2022-04-29 10:07:02 +02:00
ZhuSenlin
2c0f9d7e8f
improve redis connection backoff (#24168) 2022-04-29 14:36:13 +08:00
Jiajun Yao
8fdde12e9e
Delay 1 minutes for the first usage stats report (#24291)
Delay the first report for 1 minutes so the system is probably set up and we can get the information to report.
2022-04-28 22:53:33 -07:00
Clark Zinzow
14f2729b3a
[Datasets] Rename _experimental_lazy() --> experimental_lazy(). (#24321)
The experimental_ prefix should suffice, we shouldn't also need to make it a private method.
2022-04-28 19:40:03 -07:00
Clark Zinzow
0825078a20
[Datasets] Revert Spark-on-Ray test revert (#24317)
A bad merge/stale CI resulted in a fixture renaming not propagating to all uses. This PR reverts the recent revert, and fixes the test.
2022-04-28 18:22:15 -07:00