def _fit(self, X, y, time_limit=None, sample_weight=None, **kwargs):
    time_start = time.time()
    X = self.preprocess(X)
    self._validate_fit_memory_usage(X=X)
    if (sample_weight is not None):
        logger.log(15, 'sample_weight not yet supported for KNNModel, this model will ignore them in training.')
    num_rows_max = len(X)
    if ((time_limit is None) or (num_rows_max <= 10000)):
        self.model = self._get_model_type()(**self._get_model_params()).fit(X, y)
    else:
        self.model = self._fit_with_samples(X=X, y=y, time_limit=(time_limit - (time.time() - time_start)))
def _fit(self, X, y, time_limit=None, sample_weight=None, **kwargs):
    time_start = time.time()
    X = self.preprocess(X)
    self._validate_fit_memory_usage(X=X)
    if (sample_weight is not None):
        logger.log(15, 'sample_weight not yet supported for KNNModel, this model will ignore them in training.')
    num_rows_max = len(X)
    if ((time_limit is None) or (num_rows_max <= 10000)):
        self.model = self._get_model_type()(**self._get_model_params()).fit(X, y)
    else:
        self.model = self._fit_with_samples(X=X, y=y, time_limit=(time_limit - (time.time() - time_start)))