what does "/path/to/miniconda3/lib:/path/to/sw/lib:/path/to/sw/lib" refer to?
When performing disease classification, we should modify the paths in the codes:
os.environ["LD_LIBRARY_PATH"] = "/path/to/miniconda3/lib:/path/to/sw/lib:/path/to/sw/lib"
runtime_env = {"conda": "base",
"env_vars": {"LD_LIBRARY_PATH": "/path/to/miniconda3/lib:/path/to/sw/lib:/path/to/sw/lib"}}
However, when I use "anaconda3", how can I identify the "/path/to" and "sw/lib" in my own environment?
Besides, why was the "/path/to/sw/lib" repeated twice? Is this related to some specific configuration?
I'm still tortured by constant " Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False." from serialization.py and registry.py when running hyperparam_optimiz_for_disease_classifier.py, though "print(torch.cuda.is_available())" can return true separately. I wonder whether this problem can be caused by wrongly set runtime_env and os.environ.
Setting os.environ["LD_LIBRARY_PATH"] is for when a module uses shared object files (the library used until runtime, where it is needed) or static libraries; β this is a step used to set up Python runtimes on Linux. The goal with "env_vars" and "LD_LIBRARY_PATH" is to set paths in which the Python interpreter looks for libraries platform-independently during runtime; useful when interacting with compute clusters.
If this is not relevant to your system, a solution is to set up the conda environment you already have and activate it before running the script. Try instating a Python 3.10 conda environment before Ray 2.6.X installation. You can install Ray through PyPi channels in your conda environment with !pip install ray and !pip install ray[tune]. Then, you can alter the code for your runtime, assuming the conda environment is activated. This lets you comment out these lines:
os.environ["CONDA_OVERRIDE_GLIBC"] = "2.56" (12)
os.environ["LD_LIBRARY_PATH"] = "/path/to/miniconda3/lib:/path/to/sw/lib:/path/to/sw/lib" (13)
runtime_env = {"conda": "base", (22)
"env_vars": {"LD_LIBRARY_PATH": "/path/to/miniconda3/lib:/path/to/sw/lib:/path/to/sw/lib"}} (23)
ray.init(runtime_env=runtime_env) (24)
You can now use:
ray.init(); instead of ray.init(runtime_env=runtime_env)
If ray.init() works, you may also skip lines 26-50.