Coder Social home page Coder Social logo

Comments (11)

johnugeorge avatar johnugeorge commented on July 18, 2024 1

Yes. It is based on HPA. You can use scale metric as well for HPA to pick up automatically.

eg:
https://github.com/kubeflow/training-operator/blob/master/examples/pytorch/elastic/imagenet/imagenet.yaml

from training-operator.

panowo avatar panowo commented on July 18, 2024 1

@erictanjn The problem in GPU is that the resource metrics are CPU related which do not capture the GPU utilization, how can we adjust replicas then ?

Some custom GPU metrics can be used for HPA, such as DCGM

from training-operator.

erictanjn avatar erictanjn commented on July 18, 2024

hi,
I noticed HPA use crd's spec.replicas as currentReplicas but there is not .Spec.Replicas in pytorchjob crd. So I'm a little bit confused how it works. How HPA controller get the currentReplicas of a pytorchjob?

the code in HPA controller as following:
currentReplicas := scale.Spec.Replicas

from training-operator.

tenzen-y avatar tenzen-y commented on July 18, 2024

The HPA controller will obtain the PyTorchJob replicas from .spec.pytorchReplicaSpecs.Worker.replicas:

specReplicasPath: .spec.pytorchReplicaSpecs.Worker.replicas

from training-operator.

kuizhiqing avatar kuizhiqing commented on July 18, 2024

Hi @erictanjn , can you share some detail about your user case in detail plz, AFAK, HPA is more like CPU oriented, do you work in GPU case and how you expect it works in production ?

Thanks in advance.

from training-operator.

erictanjn avatar erictanjn commented on July 18, 2024

The HPA controller will obtain the PyTorchJob replicas from .spec.pytorchReplicaSpecs.Worker.replicas:

specReplicasPath: .spec.pytorchReplicaSpecs.Worker.replicas

do I need to do some work in HPA controller? Or it will obtain the PyTorchJob replicas from .spec.pytorchReplicaSpecs.Worker.replicas automatically?

from training-operator.

erictanjn avatar erictanjn commented on July 18, 2024

Hi @erictanjn , can you share some detail about your user case in detail plz, AFAK, HPA is more like CPU oriented, do you work in GPU case and how you expect it works in production ?

Thanks in advance.

I use it in GPU case. So I am a little bit worried it cannot get the PyTorchJob replicas automatically.

from training-operator.

kuizhiqing avatar kuizhiqing commented on July 18, 2024

@erictanjn The problem in GPU is that the resource metrics are CPU related which do not capture the GPU utilization, how can we adjust replicas then ?

from training-operator.

tenzen-y avatar tenzen-y commented on July 18, 2024

The HPA controller will obtain the PyTorchJob replicas from .spec.pytorchReplicaSpecs.Worker.replicas:

specReplicasPath: .spec.pytorchReplicaSpecs.Worker.replicas

do I need to do some work in HPA controller? Or it will obtain the PyTorchJob replicas from .spec.pytorchReplicaSpecs.Worker.replicas automatically?

It's automatically.

from training-operator.

github-actions avatar github-actions commented on July 18, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

from training-operator.

github-actions avatar github-actions commented on July 18, 2024

This issue has been automatically closed because it has not had recent activity. Please comment "/reopen" to reopen it.

from training-operator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.