Ray 2.7.2

  • 欢迎来到 Ray !

Ray

  • 概述「100%」
  • 入门
  • 安装「100%」
  • 用例「100%」
  • 示例库「1%」
  • 生态「3%」
  • Ray 核心「100%」
  • Ray 数据「75%」
  • Ray 训练「0%」
  • Ray 调参「0%」
    • 入门
    • 关键概念
    • 用户指南
    • Ray Tune 示例
    • Ray Tune 问答
    • Ray Tune API
      • Tune Execution (tune.Tuner)
      • Tune Experiment Results (tune.ResultGrid)
      • Training in Tune (tune.Trainable, session.report)
      • Tune Search Space API
        • ray.tune.uniform
        • ray.tune.quniform
        • ray.tune.loguniform
        • ray.tune.qloguniform
        • ray.tune.randn
        • ray.tune.qrandn
        • ray.tune.randint
        • ray.tune.qrandint
        • ray.tune.lograndint
        • ray.tune.qlograndint
        • ray.tune.choice
        • ray.tune.grid_search
        • ray.tune.sample_from
      • Tune Search Algorithms (tune.search)
      • Tune Trial Schedulers (tune.schedulers)
      • Tune Stopping Mechanisms (tune.stopper)
      • Tune Console Output (Reporters)
      • Syncing in Tune (train.SyncConfig)
      • Tune Loggers (tune.logger)
      • Tune Callbacks (tune.Callback)
      • Environment variables used by Ray Tune
      • Tune Scikit-Learn API (tune.sklearn)
      • External library integrations for Ray Tune
      • Tune Internals
      • Tune Client API
      • Tune CLI (Experimental)
  • Ray Serve
  • Ray RLlib
  • 更多类库「40%」
  • Ray 集群「100%」
  • 监控调试「100%」
  • 参考「20%」
  • 开发者指引「30%」
  • 安全「100%」
Theme by the Executable Book Project
  • repository
  • open issue
  • suggest edit
  • .rst

ray.tune.grid_search

ray.tune.grid_search#

ray.tune.grid_search(values: Iterable) → Dict[str, Iterable][source]#

Specify a grid of values to search over.

Values specified in a grid search are guaranteed to be sampled.

If multiple grid search variables are defined, they are combined with the combinatorial product. This means every possible combination of values will be sampled.

Example

>>> from ray import tune
>>> param_space={
...   "x": tune.grid_search([10, 20]),
...   "y": tune.grid_search(["a", "b", "c"])
... }

This will create a grid of 6 samples: {"x": 10, "y": "a"}, {"x": 10, "y": "b"}, etc.

When specifying num_samples in the TuneConfig, this will specify the number of random samples per grid search combination.

For instance, in the example above, if num_samples=4, a total of 24 trials will be started - 4 trials for each of the 6 grid search combinations.

Parameters

values – An iterable whose parameters will be used for creating a trial grid.

PublicAPI (beta): This API is in beta and may change before becoming stable.

previous

ray.tune.choice

next

ray.tune.sample_from

谢谢你的反馈!
是否能帮助到你?
是
否
反馈
提交

By The Ray Team
© Copyright 2024, The Ray Team.