Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@timeout(1)
def _fit_start(self, algo, X, y=None):
"""
starts fitting the model on a small subset of the data
to make sure the fit is legit, throws error if error happens before
1 sec raises or a TimeoutError if no other exception is raised
before used in the .time function
:param algo: algo used
:param X: inputs for the algo
:param y: outputs for the algo
"""
algo.verbose = 0
param_dic = self._fetch_algo_metadata(algo)
params = param_dic['config']
algo_type = params['type']