# ScalingConfig with Ray Tune

**URL:** <https://discuss.ray.io/t/scalingconfig-with-ray-tune/13700>\
**Category:** Ray Tune\
**Created:** [February 12, 2024, 2:30pm UTC](https://discuss.ray.io/t/scalingconfig-with-ray-tune/13700 "2024-02-12T14:30:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![EthanMarx](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/ethanmarx/32/5357_2.png) [@EthanMarx](https://discuss.ray.io/u/EthanMarx)\
**Post date:** [February 12, 2024, 2:30pm UTC](https://discuss.ray.io/t/scalingconfig-with-ray-tune/13700/1 "2024-02-12T14:30:42Z")

</div>

Hello,

I am using `TorchTrainer` to wrap a pytorch Lightning training script to use with `RayTune`

I am wondering what the difference is between these two `ScalingConfig`s:

```auto
scaling_config = ScalingConfig(
    trainer_resources={"CPU": 0},
    resources_per_worker={"CPU": 8, "GPU": 2},
    num_workers=1,
    use_gpu=True,
)

```

and

```auto
scaling_config = ScalingConfig(
    trainer_resources={"CPU": 0},
    resources_per_worker={"CPU": 4, "GPU": 1},
    num_workers=2,
    use_gpu=True,
)

```

If my ray cluster, say, has 4 GPUs and 16 CPUs, will both of these configurations launch 2 concurrent trials, each trial utilizing 2 GPUs and 8 CPUs? Will both of these trials use lightning DDP under the hood? thank you!
