Commit graph

13229 commits

Author SHA1 Message Date
Kai Yang
ba642dd271
[Java] Make Java test more stable (#26282)
If compile Ray in debug mode,

* run `MetricsTest:: testAddHistogram` will crash with below error message:

```
BucketBoundaries::Explicit called with non-monotonic boundary list.
java: external/io_opencensus_cpp/opencensus/stats/internal/bucket_boundaries.cc:64: opencensus::stats::BucketBoundaries::Explicit(std::__debug::vector<double>)::<lambda()>: Assertion `false && "0"' failed.
```

*  run `NamespaceTest::testIsolationInTheSameNamespaces` can fail with great possibility with below error message:

```
java.util.NoSuchElementException: No value present
	at java.util.Optional.get(Optional.java:135)
	at io.ray.test.NamespaceTest.lambda$testIsolationInTheSameNamespaces$2(NamespaceTest.java:39)
	at io.ray.test.NamespaceTest.testIsolation(NamespaceTest.java:116)
	at io.ray.test.NamespaceTest.testIsolationInTheSameNamespaces(NamespaceTest.java:36)
```
2022-07-05 11:18:19 +08:00
xwjiang2010
b08a968b6b
[air] Do not warn of checkpoint_dir if it's coming from us (base_trainer). (#26259)
Currently, the following information will be printed even the user is not directly using a tune function. This is confusing and not actionable.

```
 "`checkpoint_dir` in `func(config, checkpoint_dir)` is "
                    "being deprecated. "
                    "To save and load checkpoint in trainable functions, "
                    "please use the `ray.air.session` API:\n\n"
                    "from ray.air import session\n\n"
                    "def train(config):\n"
                    "    # ...\n"
                    '    session.report({"metric": metric}, checkpoint=checkpoint)\n\n'
                    "For more information please see "
                    "https://docs.ray.io/en/master/ray-air/key-concepts.html#session\n"
```

The new logic check if `base_trainer` is in the call stack and only adds the warning message when it is not. The new logic will be removed once internally we migrate to use `session` API.
2022-07-03 20:29:15 -04:00
Cheng Su
11a24d6ef1
[Datasets] Support drop_columns API (#26200) 2022-07-03 14:41:54 -07:00
Cheng Su
7360452d2a
[Datasets] Fix max number of actors for default actor pool strategy (#26266) 2022-07-03 14:40:24 -07:00
Yi Cheng
818bb78542
[ci] Stop syncer staging tests (#26273)
The tests has been running for 1-2 months, and the overall observation is that it's not very useful to catch the actual regression. Basically, we didn't notice any regression. Stop this test for now to save some resources.
2022-07-03 11:17:10 -07:00
Yi Cheng
096c0cd668
[core][gcs] Add storage namespace to redis storage in GCS. (#25994)
To enable one storage be able to be shared by multiple ray clusters, a special prefix is added to isolate the data between clusters: "<EXTERNAL_STORAGE_NAMESPACE>@"

The namespace is given by an os environment: `RAY_external_storage_namespace` when start the head: `RAY_external_storage_namespace=1234 ray start --head`

This flag is very important in HA GCS environment. For example, in ray serve operator, when the operator tries to bring up a new one, it's hard to just start a new db, but it's relatively easy to generate a new cluster id.
Another example is that, the user might only be able to maintain one HA Redis DB, and the namespace enable the user to start multiple ray clusters which share the same db.

This config should be moved to storage config in the future once we build that.
2022-07-03 11:16:37 -07:00
Siyuan (Ryans) Zhuang
5a094f1d18
[workflow] Deprecate workflow.create (#26106) 2022-07-02 21:24:05 -07:00
Dmitri Gekhtman
7d3ceb222c
[kuberay][autoscaler] Improve CPU, GPU, and memory detection. (#26219)
This PR improves the autoscaler's resource detection logic
2022-07-02 11:32:05 -07:00
Jun Gong
34d1e580cb
[rllib/docs] Minor import doc fix. (#26269) 2022-07-02 06:52:38 -07:00
VeronikaPolakova
18439af1bf
[Tune] Fix sort by metric (#25853)
Sort-by-metric working on metrics passed by tune.run

Co-authored-by: Antoni Baum <antoni.baum@protonmail.com>
2022-07-02 06:48:30 -07:00
Clark Zinzow
2a4d22fbd2
[Core] Add retry exception allowlist for user-defined filtering of retryable application-level errors. (#25896)
This PR adds supported for specifying an exception allowlist (List[Exception]) as the retry_exceptions argument, such that an application-level exception will only be retried if it is in the allowlist.
2022-07-01 20:06:02 -07:00
Stephanie Wang
68b893369c
[dataset] Support push-based shuffle in groupby operations (#25910)
Allows option for push-based shuffle in groupby operations, to improve scalability to larger Datasets.
2022-07-01 17:36:58 -07:00
Stephanie Wang
a90e53b76f
[core] Add weekly test for 100TB random shuffle (#25908)
Adds a CI test for 100TB shuffle.

There is a custom config for this nightly test to: (1) make sure each node gets 4TB of storage, (2) head node has 0 CPUs, (3) worker nodes have half their actual vCPU count.

Related issue number

Closes #24480.
2022-07-01 13:30:07 -07:00
Guyang Song
b9ade079cb
Revert "[runtime env] plugin refactor[2/n]: support json schema validation (#26154)" (#26246)
This reverts commit 122ec5e52f.
2022-07-01 15:48:03 +08:00
Larry
c8a90e00ac
Hide other symbols in libray_api.so only keep ray* (#26069) 2022-07-01 11:51:40 +08:00
Siyuan (Ryans) Zhuang
ab44133fba
[Workflow] Replace StepID with TaskID (#26232) 2022-06-30 16:40:58 -07:00
Alex Wu
76c5122357
[ci/release] Fix wait_cluster (#26236)
Fixes a bug in wait_cluster where we count the total number of nodes ever in the cluster rather than the alive nodes. This has causes infra/autoscaler failures (e.g. #26138) to be mislabeled as test failures (and probably messes with timing too).

Co-authored-by: Alex Wu <alex@anyscale.com>
2022-06-30 16:37:32 -07:00
shrekris-anyscale
010a3566e6
[Serve] Allow and remove trailing slashes in Ray submission address (#26093) 2022-06-30 16:04:53 -07:00
Kai Fricke
ce0cc8ea53
[tune] Improve custom func checkpointing example (#26230)
Avoid using internal constants in this example.
2022-06-30 15:53:12 -07:00
Amog Kamsetty
60a9dc0a5c
[rllib] Add __init__.py file to rllib.conncectors (#26238)
__init__.py file is needed for this package to be included in the Ray wheels
2022-06-30 13:54:49 -07:00
Nikita Vemuri
8fc3409676
[dashboard] Add component_activities API (#25996)
Add /api/component_activities to the dashboard snapshot router which returns whether various Ray components are considered active
This currently only contains a response entry for drivers, but will add entries for other components on request as followups
2022-06-30 13:39:01 -07:00
Eric Liang
3b1948ed45
[air] Randomize block order by default to avoid hotspots (#25870)
Enable block order randomization by default to avoid ingest hotspots when running concurrent trials.
2022-06-30 13:38:03 -07:00
Kai Fricke
e2d8e7a6ae
[ci/release/ml] Run ML release tests on staging (#26168)
This moves all ML release tests to staging.

Signed-off-by: Kai Fricke <kai@anyscale.com>
2022-06-30 13:24:28 -07:00
xwjiang2010
ac831fded4
[air] update documentation to use session.report (#26051)
Update documentation to use `session.report`.

Next steps:
1. Update our internal caller to use `session.report`. Most importantly, CheckpointManager and DataParallelTrainer.
2. Update `get_trial_resources` to use PGF notions to incorporate the requirement of ResourceChangingScheduler. @Yard1 
3. After 2 is done, change all `tune.get_trial_resources` to `session.get_trial_resources`
4. [internal implementation] remove special checkpoint handling logic from huggingface trainer. Optimize the flow for checkpoint conversion with `session.report`.

Co-authored-by: Antoni Baum <antoni.baum@protonmail.com>
2022-06-30 10:37:31 -07:00
shrekris-anyscale
20c6c0725a
[Serve] Deprecate deployment's prev_version field (#26217) 2022-06-30 09:59:37 -07:00
xwjiang2010
3ffff53428
[tune] Fix stacktrace (#26220)
Reland the original change. But without changing the test_utils so that other tests are not affected...
2022-06-30 07:38:36 -07:00
Sven Mika
f8785c49df
[RLlib] Issue 25696: Output writers not working w/ multiple workers. (#25722) 2022-06-30 13:25:56 +02:00
Sven Mika
ca913ff6d6
[RLlib] Eval WorkerSet crashes when trying to re-add a failed worker (eval set does not have local worker). (#26134) 2022-06-30 13:25:22 +02:00
Jun Gong
d83bbda281
[RLlib] Save serialized PolicySpec. Extract num_gpus related logics into a util function. (#25954) 2022-06-30 11:38:21 +02:00
ZhuSenlin
c5de057d1d
[Core][Enable gcs scheduler 3/n] integrate placement group with gcs scheduler (#24842)
## Why are these changes needed?
1. Now, bundle resources are deducted from the cluster resources on the `GCS` side when all Commit requests sent by `GCS` to `Raylet` are returned. Actually, the bundle resources should be deducted before sending `PreprareResources` by `GCS` to `Raylet`, so that the scheduling of actor based on `GCS` could use more fresh resources. BTW, putting the deduction before `PrepareResources` or after reply of all `CommitResources` has no impact on `Raylet` scheduling.

2. The `GcsResourceManager::UpdateResources` and `GcsResourceManager::DeleteResources` could be deleted to simplify `GcsResourceManager`.
   - `GcsResourceManager::UpdateResources` is only used when `GcsPlacementGroupScheduler::CommitAllBundles`, we could update the node resources (commit bundle resources) in `GcsPlacementGroupScheduler` directly, and I think it's unnecessary to put these resources to storage (the resources could be replayed by placement group)
   - `GcsResourceManager::DeleteResources` is only used when `GcsPlacementGroupScheduler::CancelResourceReserve` which is invoked by `GcsPlacementGroupScheduler::DestroyPlacementGroupPreparedBundleResources` and `GcsPlacementGroupScheduler::DestroyPlacementGroupCommittedBundleResources`. in fact, the `GcsPlacementGroupScheduler::ReturnBundleResources` will be called wherever these two functions are used, so I think the `GcsResourceManager::DeleteResources` is redundant. BTW, I think it's unnecessary to put the change of resources to storage (the resources could be replayed by placement group).

3.  The `gcs_table_storage_` is useless as both `GcsResourceManager::UpdateResources` and `GcsResourceManager::DeleteResources` is removed, so it could be removed too.

4. The `ray_gcs_new_resource_creation_latency_ms_sum` could be removed too as the `GcsResourceManager::UpdateResources` is removed.

Co-authored-by: 黑驰 <senlin.zsl@antgroup.com>
2022-06-30 02:04:39 -07:00
Qing Wang
2d4663d0cd
[Java] Support getCurrentNodeId API for RuntimeContext (#26147)
Add an API to get the node id of this worker, see usage:
```java
UniqueId currNodeId = Ray.getRuntimeContext().getCurrentNodeId();
```
for the requirement from Ray Serve.
2022-06-30 16:19:32 +08:00
Guyang Song
122ec5e52f
[runtime env] plugin refactor[2/n]: support json schema validation (#26154) 2022-06-30 16:09:23 +08:00
Jun Gong
52bb8e47d4
[RLlib] EnvRunnerV2 and EpisodeV2 that support Connectors. (#25922) 2022-06-30 08:44:10 +02:00
Siyuan (Ryans) Zhuang
ddd63aba77
[workflow] Major refactoring - new async workflow executor (#25618)
* major workflow refactoring
2022-06-29 20:31:40 -07:00
Eric Liang
636a9c1291
[data] randomize_block_order() not compatible with stage fusion
Why are these changes needed?
Per the discussion in #26057, fix the stage fusion issue by re-ordering the randomize stage past any 1-1 stages.

Closes #26057
2022-06-29 18:16:03 -07:00
Clark Zinzow
e19a66fc83
[Datasets] [GitHub] Adds GitHub Action for adding Datasets-labeled issues to Data Team project (#26127)
This PR adds a GitHub Action that adds datasets-labeled issues (upon opening/labeling) to the Data Team's GitHub project. This should obviate the need for manual issue adding to the project before the start of each sprint.
2022-06-29 17:51:53 -07:00
Stephanie Wang
1a8fd8a72b
Revert "[tune] fix stacktrace. (#26135)" (#26216)
This reverts commit e85247b5dd.
2022-06-29 17:00:31 -07:00
shrekris-anyscale
d1c9aaad33
[Serve] Set num_cpus to 0 in run_graph() task (#26177) 2022-06-29 16:35:33 -07:00
Archit Kulkarni
84be085a5a
[Doc] Fix typo in Serve doc (#26211) 2022-06-29 16:15:26 -07:00
Christy Bergman
541e2ec14c
Add Environments to Key Concepts page (#25791) 2022-06-29 16:10:49 -07:00
Dmitri Gekhtman
66ea76da1b
[kuberay] Logging-related autoscaler stability improvement.
The autoscaler container writes logs to a directory set up by the Ray container.
This PR moves the logic that sets up autoscaler logging so that it is done after the Ray container is ready.

This PR also changes things so that the autoscaler process exits after hitting 5 total exceptions. Kubernetes will then restart the autoscaler. The idea here is to ensure the autoscaler is able to restart cleanly in long-running deployments of Ray.
2022-06-29 13:18:13 -07:00
Avnish Narayan
1f9282a496
[RLlib, Offline] Make the dataset and json readers batchable (#26055)
Make the dataset and json readers batchable.
2022-06-29 11:52:40 -07:00
Simon Mo
5043cc1a82
[Java] Bump jna to 5.8.0 to compile on M1 macs (#26180) 2022-06-29 11:47:07 -07:00
shrekris-anyscale
6e800cc2df
[Serve] Disable test_serve_head.py on OSX (#26178)
`test_serve_head.py` has been very flaky recently on OSX, so this change disables it there.
2022-06-29 11:21:53 -07:00
Kai Fricke
f9e787115f
[ci/release/core] Run many_nodes test on staging (#26164)
This moves many_nodes to anyscale staging.
2022-06-29 11:07:32 -07:00
xwjiang2010
e85247b5dd
[tune] fix stacktrace. (#26135)
explicitly pass in `exc_info` to `logger.exception` when it's outside of try-catch blob.
2022-06-29 11:06:43 -07:00
Artur Niederfahrenhorst
ecd6047e39
Revert "[RLlib] Small Ape-X deflake. (#26078)" (#26191)
This reverts commit 11a549d4bd.
2022-06-29 10:25:47 -07:00
Philipp Moritz
224ec2e45a
Add typing_extensions requirement to core requirements (#26169)
Since https://github.com/ray-project/ray/pull/25999 we need typing_extensions. It is a very light requirement (no transitive dependencies and small package) so that should be ok.

Considered alternative: Make it optional -- but that would make the typing code more brittle, and prevent us from using more typing in the future.
2022-06-29 09:37:02 -07:00
matthewdeng
4a21dc31ae
[air] update DummyTrainer to handle DatasetPipelines (#26175)
1. Update `DummyTrainer` to take `num_epochs` instead of `runtime_seconds`.
    1. Ray Train expects equal number of calls to `train.report()`. Different workers may run at different speeds and terminate after different epoch numbers, which causes an error.
2. Add `generate_epochs` to support `DatasetPipeline` when `use_stream_api` is True.
3. Update `__main__` code to support testing different configurations.
2022-06-29 09:32:57 -07:00
Antoni Baum
dc7ed086a5
[AIR] More checkpoint configurability, Result extension (#25943)
This PR:
* Allows the user to set `keep_checkpoints_num` and `checkpoint_score_attr` in `RunConfig` using the `CheckpointStrategy` dataclass
* Adds two new fields to the `Result` object - `best_checkpoints` - a list of saved best checkpoints as determined by `CheckpointingConfig`.
2022-06-29 08:23:29 -07:00