ray-project / lightgbm_ray

LightGBM on Ray
Apache License 2.0
46 stars 7 forks source link

Unintuitive naming of RayDMatrix class #37

Open mirekphd opened 2 years ago

mirekphd commented 2 years ago

I've just realized that RayDMatrix class in lightgbm_ray is named xgboost_ray.matrix.RayDMatrix, rather than lightgbm_ray.matrix.RayDMatrix.

I understand code re-use, but name re-use? It is apparently by design (as per docs), but in my opinion it violates the principle of least astonishment and thus should be changed to a more intuitive lightgbm_ray.matrix.RayDMatrix.

To reproduce:

from lightgbm_ray import RayParams as test1, RayDMatrix as test2
print([test1, test2])

Output:

[<class 'lightgbm_ray.main.RayParams'>, <class 'xgboost_ray.matrix.RayDMatrix'>]

matthewdeng commented 2 years ago

@Yard1 would aliasing the class work?