Hi there, I ran into the same issue and just solved it. The file you mentioned (https://github.com/ray-project/ray/blob/ca0e04994edcbbced2a2b18215b7ebf8d47c7bce/src/ray/common/ray_config_def.h#L318) contains all environment variables. You can change it by calling this at the start of your script.
import os
os.environ["RAY_worker_niceness"] = str(0)
For more infos on niceness values (maybe not you personally, but other readers), see e.g. here : UNIX / Linux : How to change the niceness (priority) of a process – The Geek Diary. In the above case, I set niceness to 0, which would be the lowest possible niceness value without sudo rights (the lower, the more important the process).
Same logic for all other variables mentioned in the ray_config_def.h file. E.g.the out of memory threshold (default 0.95) is called “memory_usage_threshold”. So to change it you have to call os.environ[“RAY_memory_usage_threshold”].
Hope this helps !
Best, Lasse