Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RLlib] Add separate learning rates for policy and alpha to SAC. #47078

Merged

Commits on Aug 12, 2024

  1. Added spearate learnign rates for policy, critic, and alpha to SAC. T…

    …his imrpoves learning a bit.
    
    Signed-off-by: simonsays1980 <[email protected]>
    simonsays1980 committed Aug 12, 2024
    Configuration menu
    Copy the full SHA
    ffe5048 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3fc16cf View commit details
    Browse the repository at this point in the history

Commits on Aug 13, 2024

  1. Added an additional 'ciritc_lr', change 'policy_lr' to 'actor_lr', an…

    …d set 'lr' to 'None' as requested in @sven1977's review. Furthermore, changed all examples and tuning scripts.
    
    Signed-off-by: simonsays1980 <[email protected]>
    simonsays1980 committed Aug 13, 2024
    Configuration menu
    Copy the full SHA
    cd5450c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    38cac91 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    8f64c7c View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2024

  1. Apply suggestions from code review

    Signed-off-by: Sven Mika <[email protected]>
    sven1977 authored Aug 14, 2024
    Configuration menu
    Copy the full SHA
    15e2898 View commit details
    Browse the repository at this point in the history

Commits on Aug 15, 2024

  1. Configuration menu
    Copy the full SHA
    d0679b7 View commit details
    Browse the repository at this point in the history
  2. [core] remove unused GcsAio(Publisher|Subscriber) methods and subclas…

    …ses. (ray-project#47057)
    
    They were used to fetch / publish logs and errors, but now they are
    replaced by PythonGcsSubscriber cython binded classes.
    
    Signed-off-by: Ruiyang Wang <[email protected]>
    Signed-off-by: Ruiyang Wang <[email protected]>
    rynewang authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    e15ef64 View commit details
    Browse the repository at this point in the history
  3. [Core] Fix a bug where we submit the actor creation task to the wrong…

    … submitter (ray-project#47109)
    
    Signed-off-by: Jiajun Yao <[email protected]>
    jjyao authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    fc0f1fe View commit details
    Browse the repository at this point in the history
  4. [doc][build] Update all changed files timestamp to latest (ray-projec…

    …t#47115)
    
    So these source files serving as dependency for doc files always get
    rebuilt correctly.
    
    ---------
    
    Signed-off-by: khluu <[email protected]>
    khluu authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    387a083 View commit details
    Browse the repository at this point in the history
  5. [serve] split test_proxy.py into unit and e2e tests (ray-project#47112

    )
    
    Split out `TestHTTPProxy` and `TestgRPCProxy` into a unit test file.
    
    Signed-off-by: Cindy Zhang <[email protected]>
    zcin authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    326eaae View commit details
    Browse the repository at this point in the history
  6. [Utility] add env_float utility into ray._private.ray_constants (r…

    …ay-project#47117)
    
    The current codebase includes `env_bool` and `env_integer` functions
    that directly convert environment variable strings into their respective
    types. To extend this functionality, we also need an `env_float`
    function to safely convert strings representing floating-point numbers
    into the `float` type."
    
    Signed-off-by: Hongpeng Guo <[email protected]>
    hongpeng-guo authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    33d574a View commit details
    Browse the repository at this point in the history
  7. [Data] Fix progress bars not showing % progress (ray-project#47120)

    <!-- Thank you for your contribution! Please review
    https://github.com/ray-project/ray/blob/master/CONTRIBUTING.rst before
    opening a pull request. -->
    
    <!-- Please add a reviewer to the assignee section when you create a PR.
    If you don't have the access to it, we will shortly find a reviewer and
    assign them to your PR. -->
    
    ## Why are these changes needed?
    
    <!-- Please give a short summary of the change and the problem this
    solves. -->
    Fix a wrong variable name for a feature introduced in
    ray-project#46699, which caused progress
    bars to not show % progress / render the bar itself.
    
    After the changes in this PR, the progress bar shows % progress as
    desired:
    ![Screenshot at Aug 13
    14-48-08](https://github.com/user-attachments/assets/f5fc5188-f33e-468c-a460-d3f115293e36)
    
    
    ## Related issue number
    
    <!-- For example: "Closes ray-project#1234" -->
    
    ## Checks
    
    - [ ] I've signed off every commit(by using the -s flag, i.e., `git
    commit -s`) in this PR.
    - [ ] I've run `scripts/format.sh` to lint the changes in this PR.
    - [ ] I've included any doc changes needed for
    https://docs.ray.io/en/master/.
    - [ ] I've added any new APIs to the API Reference. For example, if I
    added a
    method in Tune, I've added it in `doc/source/tune/api/` under the
               corresponding `.rst` file.
    - [ ] I've made sure the tests are passing. Note that there might be a
    few flaky tests, see the recent failures at https://flakey-tests.ray.io/
    - Testing Strategy
       - [ ] Unit tests
       - [ ] Release tests
       - [ ] This PR is not tested :(
    
    Signed-off-by: Scott Lee <[email protected]>
    scottjlee authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    eff647b View commit details
    Browse the repository at this point in the history
  8. [data] change data17 to datal (ray-project#47082)

    meaning it is tracking the latest version, so that we do not need to
    update the names of this one when we want to update the pyarrow version
    we are using.
    
    Signed-off-by: Lonnie Liu <[email protected]>
    aslonnie authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    ca98c7f View commit details
    Browse the repository at this point in the history
  9. [ci] change data build for all python versions to arrow 17 (ray-proje…

    …ct#47121)
    
    Following up from ray-project#47082, we
    actually have 6 different data builds, with this matrix
    
    ```
                                      python 3.9           python 3.12
    arrow 6                            X                            X   
    arrow 17                           X                            X    
    arrow nightly                      X                            X
    ```
    
    They all share the same build environment
    (https://github.com/ray-project/ray/blob/master/ci/docker/data.build.Dockerfile),
    but we have 6 configurations of these build environments given the above
    matrix
    
    This PR updates other flavors to use arrow 17 as well
    
    Test:
    - CI
    
    Signed-off-by: can <[email protected]>
    can-anyscale authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    530f511 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    cbaad59 View commit details
    Browse the repository at this point in the history
  11. [Core] Clarify docstring for get_gpu_ids() that it is only called ins…

    …ide a task or actor
    
    Signed-off-by: Peter Nguyen <[email protected]>
    petern48 authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    ce283ad View commit details
    Browse the repository at this point in the history
  12. [doc][rllib] the rest of missing api references + lint checker (ray-p…

    …roject#47114)
    
    Add the rest of missing API references for rllib. We can also now enable
    the API policy lint checker for rllib, now that all missing references
    are documented
    
    Test:
    - CI
    
    <img width="1351" alt="Screenshot 2024-08-13 at 12 15 08 PM"
    src="https://github.com/user-attachments/assets/cc1d1c8e-763e-4d2e-a7d1-28243a7fdbab">
    
    Signed-off-by: can <[email protected]>
    can-anyscale authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    88031fe View commit details
    Browse the repository at this point in the history
  13. Light up Ask AI button When Seach is Open (ray-project#47054)

    ## Why are these changes needed?
    
    Lights up and adds a bounce animation when the search input is open
    - used css sibling selector to target the ask AI button when the search
    input and overlay is open, to add a bounce and brighten the button by
    50% as well as raise the z index so it is visible over the overlay
    - JS to ensure that search is closed when ask AI is clicked
    
    https://www.loom.com/share/c84653be0b4a42debaa71f361c11dc42?sid=58e13baf-30bc-4524-a569-9d26af2d7175
    
    Signed-off-by: cristianjd <[email protected]>
    cristianjd authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    a137979 View commit details
    Browse the repository at this point in the history
  14. [serve] immediately send ping in router when receiving new replica set (

    ray-project#47053)
    
    When a new set of `RunningReplicaInfos` are broadcasted to a router, the
    nested actor handles are "empty" and don't hold the necessary actor info
    (e.g. actor address) to send a request to that replica. Upon first
    request, the handle fetches that info from the GCS. If the GCS goes down
    immediately after a replica set change is broadcasted to a router, requests
    will all be blocked until the GCS recovers.
    
    Fix:
    - Upon receiving a new replica set, the router actively probes the queue
    lengths for each replica.
    - On proxies, also push its self actor handle to replicas upon replica set
    change, else proxy requests to new replicas will hang when GCS is down.
    
    Signed-off-by: Cindy Zhang <[email protected]>
    zcin authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    aac0a6e View commit details
    Browse the repository at this point in the history
  15. [data] Add label to indicate if operator is backpressured (ray-projec…

    …t#47095)
    
    ## Why are these changes needed?
    During the execution of an operator, display whether or not an operator
    is backpressured. This will more easily surface to the viewer if there
    are portions of their dataset execution that are bottlenecking the other
    operations.
    
    When backpressured the display will change from `Map(g): 3 active, 22
    queued, [cpu: 0.3, objects: 768.0MB]: : 0.00 row [02:14, ? row/s` to
    `Map(g): 3 active, 22 queued, BACKPRESSURED, [cpu: 0.3, objects:
    768.0MB]: : 0.00 row [02:14, ? row/s`.
    
    ### Examples:
    #### Typical example
    
    ```python
    import ray
    import time
    
    def f(x):
        time.sleep(0.1)
        return x
    
    ray.data.range(1000).map(f).map(f, num_cpus=0.1).materialize()
    ```
    
    
    https://github.com/user-attachments/assets/8283fdff-d94f-43c3-a9f0-c929924c441f
    
    #### Backpressure example
    ```python
    import ray
    import time
    
    def f(x):
        time.sleep(0.1)
        return x
    
    def g(x):
        time.sleep(10000000)
        return x
    
    ray.data.range(1000).map(f).map(g, num_cpus=0.1).materialize()
    ```
    
    
    https://github.com/user-attachments/assets/d263b8ee-8dd2-4ec6-bd45-c55941c45253
    
    ---------
    
    Signed-off-by: Matthew Owen <[email protected]>
    omatthew98 authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    d560f3e View commit details
    Browse the repository at this point in the history
  16. [Core] Add ray[adag] option to pip install (ray-project#47009)

    Add ray[adag] option to pip install
    ruisearch42 authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    2626ea7 View commit details
    Browse the repository at this point in the history
  17. [Doc] Run pre-commit on tune docs (ray-project#47108)

    Currently we have no linting on any part of the docs code. This PR runs
    pre-commit on the train docs.
    
    This PR fixes the following issues:
    
    ```
    trim trailing whitespace.................................................Failed
    - hook id: trailing-whitespace
    - exit code: 1
    - files were modified by this hook
    
    Fixing doc/source/tune/api/doc/ray.air.integrations.mlflow.MLflowLoggerCallback.rst
    Fixing doc/source/tune/api/suggestion.rst
    Fixing doc/source/tune/faq.rst
    Fixing doc/source/tune/tutorials/tune-resources.rst
    Fixing doc/source/tune/api/doc/ray.air.integrations.comet.CometLoggerCallback.rst
    Fixing doc/source/tune/tutorials/tune-lifecycle.rst
    Fixing doc/source/tune/api/doc/ray.air.integrations.wandb.WandbLoggerCallback.rst
    
    fix end of files.........................................................Failed
    - hook id: end-of-file-fixer
    - exit code: 1
    - files were modified by this hook
    
    Fixing doc/source/tune/api/doc/ray.air.integrations.mlflow.MLflowLoggerCallback.rst
    Fixing doc/source/tune/examples/includes/pb2_example.rst
    Fixing doc/source/tune/examples/includes/async_hyperband_example.rst
    Fixing doc/source/tune/tutorials/tune-trial-checkpoints.rst
    Fixing doc/source/tune/api/doc/ray.air.integrations.wandb.setup_wandb.rst
    Fixing doc/source/tune/api/reporters.rst
    Fixing doc/source/tune/examples/includes/mnist_pytorch.rst
    Fixing doc/source/tune/examples/includes/hyperband_example.rst
    Fixing doc/source/tune/api/trainable.rst
    Fixing doc/source/tune/examples/includes/nevergrad_example.rst
    Fixing doc/source/tune/api/doc/ray.air.integrations.comet.CometLoggerCallback.rst
    Fixing doc/source/tune/examples/includes/logging_example.rst
    Fixing doc/source/tune/api/doc/ray.air.integrations.mlflow.setup_mlflow.rst
    Fixing doc/source/tune/examples/includes/pbt_tune_cifar10_with_keras.rst
    Fixing doc/source/tune/examples/ml-frameworks.rst
    Fixing doc/source/tune/examples/includes/xgboost_dynamic_resources_example.rst
    Fixing doc/source/tune/api/doc/ray.air.integrations.wandb.WandbLoggerCallback.rst
    
    check for added large files..............................................Passed
    check python ast.........................................................Passed
    check json...............................................................Passed
    check toml...........................................(no files to check)Skipped
    black....................................................................Passed
    flake8...................................................................Passed
    prettier.............................................(no files to check)Skipped
    mypy.................................................(no files to check)Skipped
    isort (python)...........................................................Passed
    rst directives end with two colons.......................................Passed
    rst ``inline code`` next to normal text..................................Passed
    use logger.warning(......................................................Passed
    check for not-real mock methods..........................................Passed
    ShellCheck v0.9.0....................................(no files to check)Skipped
    clang-format.........................................(no files to check)Skipped
    Google Java Formatter................................(no files to check)Skipped
    Check for Ray docstyle violations........................................Passed
    Check for Ray import order violations....................................Passed
    ```
    
    Signed-off-by: pdmurray <[email protected]>
    peytondmurray authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    bb5c322 View commit details
    Browse the repository at this point in the history
  18. [release tests] update anyscale service utils (ray-project#46397)

    Update `start_service` to allow configuration of `image_uri` instead of
    `cluster_env`.
    Also allow configuring `working_dir`.
    
    Signed-off-by: Cindy Zhang <[email protected]>
    zcin authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    7ae5621 View commit details
    Browse the repository at this point in the history
  19. [core][experimental] Build an operation-based execution schedule for …

    …each actor to avoid deadlocks caused by NCCL operations (ray-project#46911)
    
    Generate an execution schedule for each actor. The schedule is a list of DAGNodeOperation.
    Step 1: Generate a graph based on the following rules:
    
    Divide a DAG node into three GraphNodes: READ, COMPUTE, and WRITE. Each GraphNode has a DAGNodeOperation.
    Add edges between READ and COMPUTE, and between COMPUTE and WRITE, which belong to the same task.
    Add an edge between COMPUTE with bind_index i and COMPUTE with bind_index i+1 if they belong to the same actor.
    Add an edge between WRITE of the writer task and READ of the reader task.
    Step 2: Topological sort: If there are multiple GraphNodes with zero in-degree, select one based on the following rules:
    
    (1) If the nodes are not NCCL write nodes, select the one with the smallest bind_index. If there are multiple candidate nodes with the smallest bind_index of the actors that they belong to, any one of them is acceptable. For the implementation details, we maintain a priority queue for each actor, where the peek of the priority queue is the node with the smallest bind_index.
    (2) If the node is an NCCL write node, select it only if all of its downstream nodes are also the peeks of their priority queues.
    (3) If (1) and (2) cannot be satisfied, it means that all candidate nodes are NCCL write nodes. In this case, select the one that is the peek of the priority queue and its downstream nodes, regardless of whether the downstream nodes are peeks of their priority queues or not.
    Then, put the selected nodes into the corresponding actors' schedules.
    kevin85421 authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    2f77ddd View commit details
    Browse the repository at this point in the history
  20. [serve] remove warnings about ongoing requests default change (ray-pr…

    …oject#47085)
    
    The defaults were changed in 2.32, and the warnings have been around
    since 2.32 too. The warnings have been around for 4 releases now, we can
    remove them.
    
    Signed-off-by: Cindy Zhang <[email protected]>
    zcin authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    9c17e13 View commit details
    Browse the repository at this point in the history
  21. [serve] __init__ functions have no return values (ray-project#47144)

    even for serve deployments
    
    Signed-off-by: Lonnie Liu <[email protected]>
    aslonnie authored and simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    7cc321a View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    8e6f9cc View commit details
    Browse the repository at this point in the history
  23. Configuration menu
    Copy the full SHA
    8d98825 View commit details
    Browse the repository at this point in the history
  24. Turned off test 'self_play_with_policy_checkpoint' b/c it was failing…

    … constantly with TF in CI tests. This is old stack.
    
    Signed-off-by: simonsays1980 <[email protected]>
    simonsays1980 committed Aug 15, 2024
    Configuration menu
    Copy the full SHA
    6808cbb View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2024

  1. Uncommented 'pretrain_bc_single_agent_evaluate_as_multi_agent' b/c hy…

    …brid stack is no longer supported.
    
    Signed-off-by: simonsays1980 <[email protected]>
    simonsays1980 committed Aug 16, 2024
    Configuration menu
    Copy the full SHA
    3a75d15 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f1dde3e View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2024

  1. Configuration menu
    Copy the full SHA
    39f90a6 View commit details
    Browse the repository at this point in the history
  2. Switched test for old stack CQL to 'torch-only' b/c 'tf2' fails perma…

    …nently.
    
    Signed-off-by: simonsays1980 <[email protected]>
    simonsays1980 committed Aug 19, 2024
    Configuration menu
    Copy the full SHA
    79f34ff View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    3944b31 View commit details
    Browse the repository at this point in the history

Commits on Aug 20, 2024

  1. Merged master.

    Signed-off-by: simonsays1980 <[email protected]>
    simonsays1980 committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    0a7aaa5 View commit details
    Browse the repository at this point in the history
  2. Added actor- and critic-specific learning rates to HalfCheetah tests …

    …and set 'lr' to 'None'. Furthermore, modified all learning rates to adapt to the number of learners.
    
    Signed-off-by: simonsays1980 <[email protected]>
    simonsays1980 committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    3d670c5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    380e8e6 View commit details
    Browse the repository at this point in the history
  4. Fixed error in 'test_worker_failures' due to the base 'lr' not set to…

    … 'None' as needed for new stack SAC.
    
    Signed-off-by: simonsays1980 <[email protected]>
    simonsays1980 committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    179fce4 View commit details
    Browse the repository at this point in the history
  5. Fixed error in doc codes not implementing 'lr=None' and adapted learn…

    …ing rates in multi-agent SAC Pendulum tuned example to number of GPUs.
    
    Signed-off-by: simonsays1980 <[email protected]>
    simonsays1980 committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    d6d4d5a View commit details
    Browse the repository at this point in the history
  6. Tuned learning rates on multi-agent SAC example.

    Signed-off-by: simonsays1980 <[email protected]>
    simonsays1980 committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    44336ae View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    2dbb93d View commit details
    Browse the repository at this point in the history
  8. Added tuned learning rates to single agent SAC tuned example and Half…

    …Cheetah example.
    
    Signed-off-by: simonsays1980 <[email protected]>
    simonsays1980 committed Aug 20, 2024
    Configuration menu
    Copy the full SHA
    351b0a8 View commit details
    Browse the repository at this point in the history