6cd0cd3bd99ec2df47bb571a18e0b70819134504,rllib/agents/impala/impala.py,OverrideDefaultResourceRequest,default_resource_request,#Any#Any#,101
Before Change
def default_resource_request(cls, config):
cf = dict(cls._default_config, **config)
Trainer._validate_config(cf)
return Resources(
cpu=cf["num_cpus_for_driver"],
gpu=cf["num_gpus"],
memory=cf["memory"],
object_store_memory=cf["object_store_memory"],
extra_cpu=cf["num_cpus_per_worker"] * cf["num_workers"] +
cf["num_aggregation_workers"],
extra_gpu=cf["num_gpus_per_worker"] * cf["num_workers"],
extra_memory=cf["memory_per_worker"] * cf["num_workers"],
extra_object_store_memory=cf["object_store_memory_per_worker"] *
cf["num_workers"])
def make_learner_thread(local_worker, config):
if config["num_gpus"] > 1 or config["num_data_loader_buffers"] > 1:
After Change
// Return PlacementGroupFactory containing all needed resources
// (already properly defined as device bundles).
return PlacementGroupFactory(
bundles=[{
// Driver + Aggregation Workers:
// Force to be on same node to maximize data bandwidth
// between aggregation workers and the learner (driver).
// Aggregation workers tree-aggregate experiences collected
// from RolloutWorkers (n rollout workers map to m
// aggregation workers, where m < n) and always use 1 CPU
// each.
"CPU": cf["num_cpus_for_driver"] +
cf["num_aggregation_workers"],
"GPU": cf["num_gpus"]
}] + [
{
// RolloutWorkers.
"CPU": cf["num_cpus_per_worker"],
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 2
Instances
Project Name: ray-project/ray
Commit Name: 6cd0cd3bd99ec2df47bb571a18e0b70819134504
Time: 2021-02-25
Author: sven@anyscale.io
File Name: rllib/agents/impala/impala.py
Class Name: OverrideDefaultResourceRequest
Method Name: default_resource_request
Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: cc1f10a38b4c0a37a87039fa4e9a7fd84b090e8b
Time: 2019-11-01
Author: 6719667+leahecole@users.noreply.github.com
File Name: composer/workflows/kubernetes_pod_operator.py
Class Name:
Method Name:
Project Name: ray-project/ray
Commit Name: ef944bc5f0d7764cd99d50500e470eac005a3d01
Time: 2021-03-04
Author: sven@anyscale.io
File Name: rllib/agents/impala/impala.py
Class Name: OverrideDefaultResourceRequest
Method Name: default_resource_request