Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the num of estimators in random forest test is hard coded . #370

Open
johnnyzhon opened this issue Aug 15, 2023 · 0 comments
Open

the num of estimators in random forest test is hard coded . #370

johnnyzhon opened this issue Aug 15, 2023 · 0 comments

Comments

@johnnyzhon
Copy link

test environment:
there are 4 V100 gpu

detail:
tests/test_random_forest.py:499:


/root/miniconda3/lib/python3.9/site-packages/pyspark/ml/base.py:205: in fit
return self._fit(dataset)
src/spark_rapids_ml/core.py:812: in _fit
return self._fit_internal(dataset, None)[0]
src/spark_rapids_ml/core.py:781: in _fit_internal
pipelined_rdd = self._call_cuml_fit_func(
src/spark_rapids_ml/core.py:487: in _call_cuml_fit_func
cuml_fit_func = self._get_cuml_fit_func(
src/spark_rapids_ml/tree.py:287: in _get_cuml_fit_func
n_estimators_of_all_params.append(self._estimators_per_worker(num_trees))


self = RandomForestRegressor_5def7d11920a, n_estimators = 3

def _estimators_per_worker(self, n_estimators: int) -> List[int]:
    """Calculate the number of trees each task should train according to n_estimators"""
    n_workers = self.num_workers
    if n_estimators < n_workers:
      raise ValueError("n_estimators cannot be lower than number of spark tasks.")

E ValueError: n_estimators cannot be lower than number of spark tasks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant