Singeleton pattern for the task API
See original GitHub issueCurrently, in AutoGluon, we will do the following, in which TabularPrediction
is used as a singeleton.
from autogluon import TabularPrediction as task
predictor = task.fit(...)
A more natural design choice is to create a new class object and call fit as a method.
from autogluon import TabularPrediction
task = TabularPrediction(SOME_ARGS)
predictor = task.fit()
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (2 by maintainers)
Top Results From Across the Web
Java Singleton Design Pattern Best Practices with Examples
Singleton pattern restricts the instantiation of a class and ensures that only one instance of the class exists in the Java Virtual Machine....
Read more >C# Design Patterns - Singleton - Code Maze
The Singleton is a creational design pattern that allows us to create a single instance of an object and to share that instance...
Read more >Is it a good idea to use Singleton pattern for an API manager?
I am trying to find a good design pattern for this purpose, it seems Singleton Design Pattern is the only choice here. Without...
Read more >Android Design Patterns: The Singleton Pattern - Code
The Singleton Pattern is a software design pattern that guarantees a class has one instance only and a global point of access to...
Read more >Singleton Design Pattern | Introduction - GeeksforGeeks
Singleton pattern is a design pattern which restricts a class to instantiate its multiple objects. It is nothing but a way of defining...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@Innixma I think
.fit()
will still take the data as the input parameter. The difference is that we can pass some specific requirements like time budget and inference latency when constructing thetask
, e.g.Then, we will automatically learn a predictor that obeys the budget constraint.
Closing as resolved, we have implemented the singleton pattern for v0.1.