Coder Social home page Coder Social logo

Comments (5)

gmittal avatar gmittal commented on May 16, 2024

Another way to go about doing this is to sync file artifacts across nodes/locally, and then the user can either launch tensorboard locally or from a cpunode/gpunode. Services like tensorboard/jupyter should be launched interactively rather than as a part of the training task, imo.

from skypilot.

concretevitamin avatar concretevitamin commented on May 16, 2024

ParTask should be the best solution, if the base tasks are all single-node:

train = sky.Task(run='python train.py').set_resources(sky.Resources('V100'))
tensorboard = sky.Task(run='tensorboard --logdir .')
par_task = sky.ParTask([train, tensorboard]).set_resources(sky.Resources('V100'))

Any reason you wouldn't want to use this @Michaelvll?

Another way to go about doing this is to sync file artifacts across nodes/locally, and then the user can either launch tensorboard locally or from a cpunode/gpunode.

The default mode should be serving those remotely. Sync-to-local should be the optional mode. Event files/logs can be large and syncing to local is not always desirable.

Services like tensorboard/jupyter should be launched interactively rather than as a part of the training task, imo.

Agreed.

from skypilot.

concretevitamin avatar concretevitamin commented on May 16, 2024

BTW: This is a very good example to have!

from skypilot.

Michaelvll avatar Michaelvll commented on May 16, 2024

ParTask should be the best solution, if the base tasks are all single-node:

train = sky.Task(run='python train.py').set_resources(sky.Resources('V100'))
tensorboard = sky.Task(run='tensorboard --logdir .')
par_task = sky.ParTask([train, tensorboard]).set_resources(sky.Resources('V100'))

Any reason you wouldn't want to use this @Michaelvll?

Another way to go about doing this is to sync file artifacts across nodes/locally, and then the user can either launch tensorboard locally or from a cpunode/gpunode.

The default mode should be serving those remotely. Sync-to-local should be the optional mode. Event files/logs can be large and syncing to local is not always desirable.

Services like tensorboard/jupyter should be launched interactively rather than as a part of the training task, imo.

Agreed.

In my understanding, the ParTask may implicitly run the two tasks sequentially as it shows in multi-echo example when the resources are not enough. Will it guarantee the two task runs at the same time? Also, I found it not possible to specify the tensorboard to be run on the head node (not the workers) when we have num_node > 1 with ParTask.

from skypilot.

concretevitamin avatar concretevitamin commented on May 16, 2024

Will it guarantee the two task runs at the same time?

Yes, if the resource demands of both tasks are smaller than the VM resources. It is the same with Ray's semantics.

For example, train will use {V100:1, CPU:1} and tensorboard will use {CPU:1} (Ray semantics), while the ParTask grabbed a VM with n CPUs and {V100:1}. So they definitely should be run in parallel.

Also, I found it not possible to specify the tensorboard to be run on the head node (not the workers) when we have num_node > 1 with ParTask.

Actually, the ParTask backend doesn't support any base task with num_nodes > 1 at the moment. You should have run into an assert for that.

from skypilot.

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.