Coder Social home page Coder Social logo

respect time_limits better about autogluon HOT 7 CLOSED

autogluon avatar autogluon commented on May 19, 2024
respect time_limits better

from autogluon.

Comments (7)

zhanghang1989 avatar zhanghang1989 commented on May 19, 2024

Maybe we can do this

num_trials = max(get_cpu_count() // num_cpus, get_cpu_count() // num_gpus) if time_limits < THRESHOLD and num_gpus > 0 else num_trials

from autogluon.

jwmueller avatar jwmueller commented on May 19, 2024

I think we should try to primarily control everything based on time_limits (so assume most users do not specify num_trials). Something like this:

def task.fit(..., time_limits = None, num_trials=None):
   if num_trials is None: 
        if time_limits is None:
            time_limits = 10 * 60  # run for 10min by default
        elif time_limits <= THRESHOLD: # THRESHOLD = say 1 or 10 sec, too little time to do much
            num_trials = 1
       else:
            num_trials = np.inf  # run as many trials as you can within the given time_limits
   if time_limits is None:
      time_limits = np.inf # in this case, user only specified num_trials, so just run all of them regardless of time-limits

from autogluon.

jwmueller avatar jwmueller commented on May 19, 2024

Currently the user has to explicitly be aware of both time_limits and num_trials. When I don't specify num_trials, it seems to default to 2 beneath the hood. This is very confusing for me, since when I set time_limits = big number, I expect task.fit() to run lots of trials. Currently task.fit() is basically running for min{ num_trials, time_limits} which is not very intuitive behavior. I think the default behavior outlined in my code above would be much more natural, where whichever of num_trials or time_limits is specified is the one that dictates the behavior of task.fit()

from autogluon.

cgraywang avatar cgraywang commented on May 19, 2024

Why not leveraging soft time limits as previously implemented?

from autogluon.

jwmueller avatar jwmueller commented on May 19, 2024

can you explain soft time limits?
My point is that most users will not be aware of both time_limits and num_trials, and they should not have to specify both of these things to control the overall runtime of autogluon. When they only specify one of them, the other one still heavily affects runtimes underneath the hood, which may be very confusing for users (it was for me)

from autogluon.

cgraywang avatar cgraywang commented on May 19, 2024

Ok, I agree that the users only need to specify what they want and the remaining should stay as the default. Soft time limit is different, it means that for the trials already scheduled, we let them run to the end, similar to what we have.

from autogluon.

Innixma avatar Innixma commented on May 19, 2024

Resolved in current version

from autogluon.

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.