SynapseML icon indicating copy to clipboard operation
SynapseML copied to clipboard

Connection refused when using LightGBMRegressor

Open jaraujoduarte opened this issue 8 years ago • 5 comments

When using the LightGBMRegressor on a small EMR cluster most of our jobs are failing getting a java.net.ConnectException: Connection refused.

We have re-compiled the java lightgbmlib for mmlspark v0.13 to be able to run it with the EMR provided GLIBC, but for the rest our code is quite simple as we are trying the framework.

Would you be able to point us in the right direction to solve this?

Here are the EMR logs and what our Notebook looks like:

https://gist.github.com/jaraujoduarte/11919c8544063e3111984b85638d3c66

On another note, how are we able to tweak other lightgbm related values such as min_data_in_bin , we also see in the logs a Cannot construct Dataset since there are not useful features. It should be at least two unique rows. which suggests changing this parameters.

Thanks in advance!

jaraujoduarte avatar Sep 11 '18 11:09 jaraujoduarte

hi @jaraujoduarte sorry about the trouble you are having. the error "Cannot construct Dataset since there are not useful features. It should be at least two unique rows" indicates that the data per partition is too small for distributed lightgbm, I encountered the same error when playing with some toy datasets - there are several options: 1.) increase the dataset size 2.) decrease the number of partitions in the dataset (eg in the extreme case you can repartition to just 1 partition by dataframe.repartition(1)) Also, if the dataset is that small it would usually be faster to just run lightgbm locally instead of via spark. The connection refused error is usually a red herring, it's just one of the errors from one of the workers. The real error is like that "Cannot construct..." error message that you saw on one of the other workers. Spark just propagates one of the errors randomly and it's usually not the real issue. I will try to look into improving that error message in the future.

imatiach-msft avatar Sep 11 '18 15:09 imatiach-msft

Thanks for the quick response @imatiach-msft, i will give it a shot.

jaraujoduarte avatar Sep 12 '18 13:09 jaraujoduarte

@imatiach-msft i have verified your suggestion and it's working fine now. Indeed would be nice to get the "right" error poping up. Thanks a lot for the help.

jaraujoduarte avatar Sep 14 '18 12:09 jaraujoduarte

Closing this issue, feel free to re-open if you need!

mhamilton723 avatar Sep 20 '18 18:09 mhamilton723

I am also encountering this error with mmlspark 0.17 but do not see another error that could be the real one. Most of the time the training step hangs indefinitely without completing or generating any errors, even with numIterations=1, but occasionally it returns this "connection refused" error. Could this issue be reopened?

mcb0035 avatar Jul 17 '19 17:07 mcb0035