Commit graph

12267 commits

Author SHA1 Message Date
Sven Mika
2f5eb96ad9
[RLlib] Make Max and Kourosh RLlib code owners. (#24299) 2022-04-28 22:24:24 +02:00
Zhi Lin
024eafb5f4
[Datasets] Re-enable raydp test & Support to_spark while using ray client (#22852)
RayDP has updated their code and tests can be re-enabled now.

In addition, we want to support ray client in raydp dataset operation. Right now, if users want to do dataset.to_spark(spark) while using ray client, it will immediately fail because the local ray worker is not connected. By wrapping it in a function decorated with @client_mode_wrap, It works well no matter ray client is used or not.
2022-04-28 12:20:58 -07:00
Balaji Veeramani
2fdea6e24f
[Datasets] Add SimpleTorchDatasource (#23926)
It's difficult to use torchvision datasets with Ray ML. This PR makes it easier to use Torch datasets with Ray Data.
2022-04-28 11:56:45 -07:00
Yi Cheng
38c15e734f
[scheduler][5.3] Remove upward functionality in ray syncer. (#24284)
Since we have moved loads reporting to other places, upward is not that useful. Remove this one in ray syncer to simplify the API.
2022-04-28 11:29:53 -07:00
Chen Shen
3bc690228c
[GCS][Storage unification 3/n] Deprecate MemoryInternalKV, use StoreClientInternalKV<MemoryStoreClient> instead (#24211)
In this PR, we deprecated MemoryInternalKV. Instead, we use a wrapper that wraps around MemoryStoreClient. This PR is build upon #23754 and #23725
2022-04-28 10:08:19 -07:00
Clark Zinzow
2f4cb1256f
[Datasets] Clean up lineage serialization support for fan-in operations. (#24190)
Lineage-based serialization isn't supported for fan-in operations such as unions and zips. This PR adds documentation indicating as much, and ensures that a good error message is raised.
2022-04-28 09:45:37 -07:00
Clark Zinzow
d7c4a2477b
[Datasets] Pipeline task dependency prefetching with actor compute via customizable max tasks in flight per worker. (#24194)
When using the actor compute model for batch mapping (e.g. in batch inference), map tasks are often blocked waiting for their dependencies to be fetched since we submit one actor task at a time. This commit changes the default behavior of the actor compute model to have up to two actor tasks in flight for each actor in order to better pipeline task dependency fetching with the actual compute.

This "max tasks in flight per actor worker" is also made configurable, in case a particular use case warrants more aggressive pipelining (e.g. big blocks and/or fast maps) or more conservative pipelining (e.g. small data or slow maps).
2022-04-28 09:42:30 -07:00
Sven Mika
6551922c21
[RLlib] Fix AlphaStar for tf2+tracing; smaller cleanups around avoiding to wrap a TFPolicy as_eager() or with_tracing more than once. (#24271) 2022-04-28 13:43:21 +02:00
xwjiang2010
576addf9ca
[tune] hyperopt searcher to support tune.choice([[1,2],[3,4]]). (#24181)
Have Hyperopt Searcher to support tune.choice([1,2],[3,4]) type search space.
2022-04-28 09:37:13 +01:00
Amog Kamsetty
629424f489
[AIR/Train] Make Dataset ingest configurable (#24066)
Refactors Dataset splitting to make it less hacky and address the TODO. Also makes Dataset ingest in general configurable for Ray Train. This is an internal only change for now, but will set the stage for the proposed ingest API

Customizable ingest for GBDT Trainers is out of scope for this PR.
2022-04-27 21:41:44 -07:00
Jiajun Yao
abba263f4e
Revert "[Datasets] Implement push-based shuffle (#23758)" (#24279)
This reverts commit c1054a0baa.
2022-04-27 18:36:59 -07:00
Dmitri Gekhtman
d68c1ecaf9
[kuberay] Test Ray client and update autoscaler image (#24195)
This PR adds KubeRay e2e testing for Ray client and updates the suggested autoscaler image to one running the merge commit of PR #23883 .
2022-04-27 18:02:12 -07:00
Archit Kulkarni
cc864401fb
[Dashboard] Add environment variable flag to skip dashboard log processing (#24263) 2022-04-27 15:33:08 -07:00
Simon Mo
ee528957c7
[Serve][Doc] Update docs about input schema, and json_request adapter (#24191) 2022-04-27 14:51:07 -07:00
Kai Fricke
f3857b7aa1
[ci/release] Fix concurrency group calculation for smoke tests (#24269)
Currently concurrency groups are always calculated based on the full test cluster compute. Instead, smoke tests should use the smoke test cluster compute.
2022-04-27 22:13:25 +01:00
Simon Mo
b4d9fcdbf8
[Serve] Fix surprious __call__ invocation in Deployment DAG's exec_impl (#24199) 2022-04-27 13:59:31 -07:00
Clark Zinzow
5dbcedbbf4
[Datasets] Expose DatasetPipeline in ray.data module (#24261)
Referencing the DatasetPipeline class currently requires ray.data.dataset_pipeline.DatasetPipeline; we should expose it directly in the ray.data module, as we do for Dataset.
2022-04-27 13:06:57 -07:00
Sven Mika
c95dd79953
[RLlib] APPO eager fix (APPOTFPolicy gets wrapped as_eager() twice by mistake). (#24268) 2022-04-27 21:27:34 +02:00
Stephanie Wang
c1054a0baa
[Datasets] Implement push-based shuffle (#23758)
The simple shuffle currently implemented in Datasets does not reliably scale past 1000+ partitions due to metadata and I/O overhead.

This PR adds an experimental shuffle implementation for a "push-based shuffle", as described in this paper draft. This algorithm should see better performance at larger data scales. The algorithm works by merging intermediate map outputs at the reducer side while other map tasks are executing. Then, a final reduce task merges these merged outputs.

Currently, the PR exposes this option through the DatasetContext. It can also be set through a hidden OS environment variable (RAY_DATASET_PUSH_BASED_SHUFFLE). Once we have more comprehensive benchmarks, we can better document this option and allow the algorithm to be chosen at run time.

Related issue number

Closes #23758.
2022-04-27 11:59:41 -07:00
mwtian
afdfd20a5b
[Release tests] Create compute config for new dataset shuffle tests (#24239)
Use a separate compute config that uses smaller instance types and no object store memory limit for the new shuffle implementation. I verified that the config works on master for dataset_shuffle_* tests.

Related issue number

#24176: the added tests would verify the instance types which support the new shuffle implementations.
2022-04-27 11:50:12 -07:00
Yi Cheng
6560a2bf5d
[scheduler][5.2] Move loads report away from resource report. (#24146)
Resource load has different pattern compared with resource reporting. It's a simple rpc to gcs and gcs will do aggregation and later autoscaler will call gcs rpc to get the aggregated result.
This PR moves the load to another rpc which will simplify the syncer api.
2022-04-27 10:49:14 -07:00
Max Pumperla
553c8a85b6
[docs] [serve] Extended Gradio notebook example for Ray Serve deployments (#23494) 2022-04-27 10:03:28 -07:00
Siyuan (Ryans) Zhuang
309fef68c5
[core] Fix internal storage S3 bugs (#24167)
* fix storage

* fix windows
2022-04-27 09:57:14 -07:00
Siyuan (Ryans) Zhuang
895fdb5a4f
[workflow] Enable setting workflow options on Ray DAGs (#24210)
* workflow options
2022-04-27 09:51:45 -07:00
Kai Fricke
4a30ae0ab6
[tune] De-clutter log outputs in trial runner (#24257)
There are currently some debug logs left logging to INFO scope. This PR demotes them to DEBUG and cleans up the messages.
2022-04-27 17:13:09 +01:00
Simon Tindemans
77d79f9e32
IMapIterator fix when using iterator inputs (#24117)
In the current code base, `multiprocessing.Pool.imap_unordered` fails when it is called with an iterator (for which the length is not known on the first call). For example, the following code would fail:
```
import ray.util.multiprocessing as raymp

# test function
def func(input):
    print('run func [{}]'.format(input))
    return input

with raymp.Pool() as pool:
    
    # this fails with a TypeError (could not serialize)
    print('use an iterator')
    for x in pool.imap_unordered(func, iter(range(5))):
        print('Finished [{}]'.format(x))
```

## Summary of changes

* I made changes to the `ResultThread` class that enable it to work with argument `total_object_refs=0`. This will let it run until a call to `stop()` is received.
* I have adapted the `IMapIterator` class to better check input arguments and distinguish between iterables and iterators.
* The super classes `OrderedIMapIterator` and `UnorderedIMapIterator` have been updated to stop appropriately when iterators are used, and explicitly stop the `_result_thread`.

Co-authored-by: shrekris-anyscale <92341594+shrekris-anyscale@users.noreply.github.com>
2022-04-27 09:31:15 -05:00
Sven Mika
627b9f2e88
[RLlib] QMIX training iteration function and new replay buffer API. (#24164) 2022-04-27 14:24:20 +02:00
Sven Mika
29388fb25b
[RLlib] Reinstate flakey AlphaStar learning CI test (flakey due to 2 changed, bad config default values). (#24256) 2022-04-27 14:01:52 +02:00
Kai Fricke
b138bab85a
[air/rllib] Add RLPredictor class (#24172)
This adds the RLPredictor implementation as the counter part for the RLTrainer. An evaluation using the predictor was added to the rl trainer end to end example.
2022-04-27 12:03:12 +01:00
Kai Fricke
772b9abbcb
[tune] Enable AsyncHyperband to continue training for last trials after max_t (#24222)
Adds a new flag `stop_last_trials` to AsyncHyperband that allows the last trials of each bracket to continue training after `max_t`. This feature existed for synchronous hyperband before, and the extension had been requested in #14235.
2022-04-27 11:45:23 +01:00
Kai Fricke
0d123ba90d
[ci/hotfix] Fix race condition in pytest reporting (#24253)
The AWS test seems to try to create the directory multiple times.
2022-04-27 09:06:55 +01:00
xwjiang2010
d9d9fbb044
[ci] try fixing ensure pip by down pinning cryptography. (#24238)
cryptography had a major release (7 hours ago): https://pypi.org/project/cryptography/#history. Suspecting that it's breaking our docker build step in ci.
2022-04-26 17:48:29 -07:00
Sihan Wang
c8bf650826
[Serve] [CI] Update the test_pipeline_ingress_deployment size to small (#24236) 2022-04-26 16:56:07 -07:00
Yi Cheng
f112b521b2
[core] move function and actor importer away from pubsub (#24132)
This PR moves function import to a lazy way. Several benefits of this:
- worker start up is faster since it doesn't need to go through all functions exported
- gcs pressure is smaller since 1) we don't need to export key and 2) all loads are done when needed.
- get rid of function table channel
2022-04-26 15:07:29 -07:00
Kai Fricke
61a9de732f
[docs/tune] Small fixes to tune-distributed for new restore modes (#24220)
We've updated restore modes, so we should reflect that in the docs.
2022-04-26 22:19:49 +01:00
Kai Fricke
8a46001b14
[tune] Make Timeout stopper work after restoring in the future (#24217)
Previously, the `TimeoutStopper` did not work after recovery from checkpoints in the future, as the start time + budget was exceeded. Instead, we're now tracking a timeout budget that gets decreased and properly saved in checkpoints, so that recovery in the future works.
2022-04-26 22:18:50 +01:00
Kai Fricke
fc1cd89020
[ci] Add short failing test summary for pytests (#24104)
It is sometimes hard to find all failing tests in buildkite output logs - even filtering for "FAILED" is cumbersome as the output can be overloaded. This PR adds a small utility to add a short summary log in a separate output section at the end of the buildkite job.

The only shared directory between the Buildkite host machine and the test docker container is `/tmp/artifacts:/artifact-mount`. Thus, we write the summary file to this directory, and delete it before actually uploading it as an artifact in the `post-commands` hook.
2022-04-26 22:18:07 +01:00
Amog Kamsetty
c3cea7ad5d
[Train/Tune] Warn pending deprecation for ray.train.Trainer and ray.tune DistributedTrainableCreators (#24056)
ray.train.Trainer and ray.tune.integration.*.DistributedTrainableCreator will be deprecated in Ray 2.0 in favor of Ray AIR. In Ray 1.13, we should warn about this pending deprecation.

First step towards #23014
2022-04-26 13:38:34 -07:00
Archit Kulkarni
12b9383d52
[Jobs] Reenable test_backwards_compatibility using Ray 1.12 (#24124)
Closes https://github.com/ray-project/ray/issues/23258
2022-04-26 13:53:51 -05:00
Yi Cheng
d6b0b9a209
Revert "Revert "[grpc] Upgrade grpc to 1.45.2"" (#24201)
* Revert "Revert "[grpc] Upgrade grpc to 1.45.2 (#24064)" (#24145)"

This reverts commit f1a1f97992.
2022-04-26 10:49:54 -07:00
Clark Zinzow
07112b4146
[Datasets] Add basic stats instrumentation of split_at_indices(). (#24179)
This PR adds basic stats instrumentation of split_at_indices(), the first stage in fully instrumenting split operations. See https://github.com/ray-project/ray/issues/24178 for future steps.
2022-04-26 09:49:48 -07:00
Archit Kulkarni
27e7c284ee
[Jobs] Change jobs start_time end_time from seconds to ms for consistency (#24123)
In the snapshot, all timestamps are given in ms except for Jobs:

```
wget -q -O - http://127.0.0.1:8265/api/snapshot

{
   "result":true,
   "msg":"hello",
   "data":{
      "snapshot":{
         "jobs":{
            "01000000":{
               "status":null,
               "statusMessage":null,
               "isDead":false,
               "startTime":1650315791249,
               "endTime":0,
               "config":{
                  "namespace":"_ray_internal_dashboard",
                  "metadata":{
                     
                  },
                  "runtimeEnv":{
                     
                  }
               }
            }
         },
         "jobSubmission":{
            "raysubmit9Bsej1Rtxqqetxup":{
               "status":"SUCCEEDED",
               "message":"Job finished successfully.",
               "errorType":null,
               "startTime":1650315925,
               "endTime":1650315926,
               "metadata":{
                  "creatorId":"usr_f6tgCaaFBJC6tZz1ZVzzAVf4"
               },
               "runtimeEnv":{
                  "workingDir":"gcs://_ray_pkg_6068c19fb3b8530f.zip"
               },
               "entrypoint":"ls"
            },
            "raysubmitEibragqkyg16Hpcj":{
               "status":"SUCCEEDED",
               "message":"Job finished successfully.",
               "errorType":null,
               "startTime":1650316039,
               "endTime":1650316041,
               "metadata":{
                  "creatorId":"usr_f6tgCaaFBJC6tZz1ZVzzAVf4"
               },
               "runtimeEnv":{
                  "workingDir":"gcs://_ray_pkg_6068c19fb3b8530f.zip"
               },
               "entrypoint":"echo hi"
            },
            "raysubmitSh1U7Grdsbqrf6Je":{
               "status":"SUCCEEDED",
               "message":"Job finished successfully.",
               "errorType":null,
               "startTime":1650316354,
               "endTime":1650316355,
               "metadata":{
                  "creatorId":"usr_f6tgCaaFBJC6tZz1ZVzzAVf4"
               },
               "runtimeEnv":{
                  "workingDir":"gcs://_ray_pkg_6068c19fb3b8530f.zip"
               },
               "entrypoint":"echo hi"
            }
         },
         "actors":{
            "8c8e28e642ba2cfd0457d45e01000000":{
               "jobId":"01000000",
               "state":"DEAD",
               "name":"_ray_internal_job_actor_raysubmit_9BSeJ1rTXQqEtXuP",
               "namespace":"_ray_internal_dashboard",
               "runtimeEnv":{
                  "uris":{
                     "workingDirUri":"gcs://_ray_pkg_6068c19fb3b8530f.zip"
                  },
                  "workingDir":"gcs://_ray_pkg_6068c19fb3b8530f.zip"
               },
               "startTime":1650315926620,
               "endTime":1650315927499,
               "isDetached":true,
               "resources":{
                  "node:172.31.73.39":0.001
               },
               "actorClass":"JobSupervisor",
               "currentWorkerId":"9628b5eb54e98353601413845fbca0a8c4e5379d1469ce95f3dfbace",
               "currentRayletId":"61ab3958258c82266b222f4691a53e71b6315e312408a21cb3350bc7",
               "ipAddress":"172.31.73.39",
               "port":10003,
               "metadata":{
                  
               }
            },
            "a7fd8354567129910c44298401000000":{
               "jobId":"01000000",
               "state":"DEAD",
               "name":"_ray_internal_job_actor_raysubmit_sh1u7grDsBQRf6je",
               "namespace":"_ray_internal_dashboard",
               "runtimeEnv":{
                  "uris":{
                     "workingDirUri":"gcs://_ray_pkg_6068c19fb3b8530f.zip"
                  },
                  "workingDir":"gcs://_ray_pkg_6068c19fb3b8530f.zip"
               },
               "startTime":1650316355718,
               "endTime":1650316356620,
               "isDetached":true,
               "resources":{
                  "node:172.31.73.39":0.001
               },
               "actorClass":"JobSupervisor",
               "currentWorkerId":"f07fd7a393898bf7d9027a5de0b0f566bb64ae80c0fcbcc107185505",
               "currentRayletId":"61ab3958258c82266b222f4691a53e71b6315e312408a21cb3350bc7",
               "ipAddress":"172.31.73.39",
               "port":10005,
               "metadata":{
                  
               }
            },
            "19ca9ad190f47bae963592d601000000":{
               "jobId":"01000000",
               "state":"DEAD",
               "name":"_ray_internal_job_actor_raysubmit_eibRAGqKyG16HpCj",
               "namespace":"_ray_internal_dashboard",
               "runtimeEnv":{
                  "uris":{
                     "workingDirUri":"gcs://_ray_pkg_6068c19fb3b8530f.zip"
                  },
                  "workingDir":"gcs://_ray_pkg_6068c19fb3b8530f.zip"
               },
               "startTime":1650316041089,
               "endTime":1650316041978,
               "isDetached":true,
               "resources":{
                  "node:172.31.73.39":0.001
               },
               "actorClass":"JobSupervisor",
               "currentWorkerId":"50b8e7e9a6981fe0270afd7f6387bc93788356822c9a664c2988f5ba",
               "currentRayletId":"61ab3958258c82266b222f4691a53e71b6315e312408a21cb3350bc7",
               "ipAddress":"172.31.73.39",
               "port":10004,
               "metadata":{
                  
               }
            }
         },
         "deployments":{
            
         },
         "sessionName":"session_2022-04-18_13-49-44_814862_139",
         "rayVersion":"1.12.0",
         "rayCommit":"f18fc31c7562990955556899090f8e8656b48d2d"
      }
   }
}
```

 This PR fixes the inconsistency by changing Jobs start/end timestamps to ms.
2022-04-26 08:37:41 -07:00
Noon van der Silk
38a028de2d
[RLlib] Don't add elements to _agent_ids during env pre-checking. (#24136) 2022-04-26 15:55:15 +02:00
Sven Mika
bb4e5cb70a
[RLlib] CQL: training iteration function. (#24166) 2022-04-26 14:28:39 +02:00
Kai Fricke
4b6e79d713
[ci/serve] Fix Serve minimal install silent failure (#24183)
Previously `sys.exit()` wasn't called, so bazel wouldn't fail because of the faulty match pattern.

Uncovered here: https://buildkite.com/ray-project/ray-builders-pr/builds/30291#_
2022-04-26 13:16:48 +01:00
Artur Niederfahrenhorst
f7be409462
[RLlib] Training Iteration Function for SAC (#24157) 2022-04-26 12:37:54 +02:00
Kai Fricke
c0ec20dc3a
[tune] Next deprecation cycle (#24076)
Rolling out next deprecation cycle:

- DeprecationWarnings that were `warnings.warn` or `logger.warn` before are now raised errors
- Raised Deprecation warnings are now removed
- Notably, this involves deprecating the TrialCheckpoint functionality and associated cloud tests
- Added annotations to deprecation warning for when to fully remove
2022-04-26 09:30:15 +01:00
Chen Shen
2c772a421f
[GCS][Storage unification 2/n] unify InternalKvInterface with StoreClient (#23725)
This PR depends on #23754.

#23754 removes the need for index in the StoreClient interface.

This PR unifies InternalKVInterface and StoreClient. Specifically, we implement an InternalKVInterface which wraps around StoreClient.
2022-04-25 19:56:03 -07:00
Tao Wang
af839247bd
[Tiny]remove missing log (#24204) 2022-04-26 10:34:52 +08:00
Chen Shen
5c461519f3
Revert "[core] Use cheaper AWS m5 instances for shuffle tests (#23781)"
This reverts commit 717e60c and 4aa854a
2022-04-25 17:56:08 -07:00