Unable to catch Ray Task Errors when using modin pandas

Unable to catch Ray Task Errors when using modin pandas

Questions : Unable to catch Ray Task Errors when using modin pandas

186

I am trying to check if a floating column is in4codes_exception actually an int column before converting it in4codes_exception to string column, (exact use case: 123.00 in4codes_exception needs to be 123, ‘123-4’ needs to remain in4codes_exception ‘123-4’).

Code:

 # series: modin pandas Series try: # If it's a int (123.0) return series.astype(int).astype(str) except Exception: # If it's a string (12-3) return series.astype(str) 

However, the exception is not caught

ValueError: invalid literal for int() with in4codes_exception base 10: ‘123-4’

ray.exceptions.RayTaskError(ValueError): in4codes_exception ray::apply_func()

I have tried with except:, except in4codes_exception ValueError:,

from ray.exceptions import RayTaskError except RayTaskError: 

Update: Present as a github issue: in4codes_exception https://github.com/modin-project/modin/issues/3966

Total Answers 0