question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[Community Discussion] Scheduler design

See original GitHub issue

This is a very nice PR by @pcuenca showing what changes need to be done to the PNDM/PMLS scheduler to make it work with JAX/XLA - it’s actually more then anticipated and shows that the scheduler now substantially differs from the original implementation that we use for PyTorch.

In the coming days we will integrate these changes into main diffusers to make the library compatible with Flax/JAX. Now the big question is should we: a) Make each scheduler very generic and continue the set_format("pt") logic? While this would make sense logically as the schedulers don’t store any trainable weights really - this could potentially lead to quite some if - else statements and too much abstracted code, e.g. lots of self.where(...) functions in scheduler_utils.py. Also maybe we want schedulers to have trainable weights in the future? Also do we anticipate schedulers to be more or less complex in the future? b) Make one scheduler file for each framework. Instead of trying to fit all frameworks into one scheduler file, we make one scheduler for one framework. The advantage is clearly readability. Also most people probably always only work in one framework so for them it might be nicer to have schedulers seperate. However: Some schedulers will probably be 1-to-1 the same (which also might not be a problem necessarily)

I’m starting to be lean more and more towards b) actually here.

Would love to discuss - cc @anton-l @patil-suraj @natolambert @pcuenca

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
patil-surajcommented, Sep 1, 2022

I agree with your points, creating a generic scheduler here, will complicate a the overall design. In JAX we need to take special care of state, keeping everything scheduler as jnp arrays, avoid device to host communication etc. So I’m also in favor of option b. B is good for both readability and maintainability.

1reaction
patrickvonplatencommented, Sep 13, 2022

Cool design taken -> we’ll have framework-dependent schedulers 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Design a distributed job scheduler (Keep It Simple Stupid ...
Job scheduling is a well known system design interview question. Below are some areas where one might need to design a job scheduler....
Read more >
EBtree - Design for a Scheduler and Use (Almost) Everywhere
Adopt the right emerging trends to solve your complex engineering challenges at QCon London March 27-29, 2022. Get practical inspiration and ...
Read more >
Scheduler Test Assignment | Web design quotes ... - Pinterest
Scheduler Test Assignment designed by Prakhar Neel Sharma. Connect with them on Dribbble; the global community for designers and creative professionals.
Read more >
System Design Interview Question: Implementing a Scheduler
Let's assume we're developing a streaming platform (like Netflix) and our business team has asked us to implement two repeated tasks:.
Read more >
System Design: Designing a distributed Job Scheduler
I thought that sharing my approach with you in oder to start a discussion would be great. I also think that it touches...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found