ray-project / tune-sklearn

A drop-in replacement for Scikit-Learn’s GridSearchCV / RandomizedSearchCV -- but with cutting edge hyperparameter tuning techniques.
https://docs.ray.io/en/master/tune/api_docs/sklearn.html
Apache License 2.0
465 stars 52 forks source link

[Question] Logging ray errors #244

Closed umutcakan closed 2 years ago

umutcakan commented 2 years ago

Hello,

I observed there is a CLI logger that outputs information regarding trial processes, even if worker dies before it even starts it gives some information regarding to that. In my case, I want to use a logger to see logs in a separate place, so I tried to create one class that inherits from ray.tune.logger.loggerCallback, and sent it as an argument to 'loggers' parameters and can use different methods to log trial processes and it was successful so far.

My question is, is there a way to log ray tune errors with this loggerCallback or should I use another approach? (e.g. I want to log if there is an error with worker initialization). I prefer to use a custom logger since the process will mostly work remotely, and accessing files one by one is not feasible in the future.

Thanks in advance.

Yard1 commented 2 years ago

Do you have an example of the messages you would want to log?

umutcakan commented 2 years ago

Hey again,

Unfortunately, I could not replicate the error I was getting before, previously one of the errors was "Worker died unexpectedly while executing this task." Right now I can manage to make it work on local runs, but there is a problem when it is deployed and basically I want to see the problem in the remote server to debug the problem or understand if it is related to ray workers

Yard1 commented 2 years ago

Those sort of logs should be written by Ray Core and saved in the session logs on the node. See https://docs.ray.io/en/latest/ray-observability/ray-logging.html

umutcakan commented 2 years ago

Thank you, I will look into that!