balloon-learning-environment
balloon-learning-environment copied to clipboard
Error when trying to run baseline agent
Thank you for this great repository. I'm having an issue when trying to run the baseline agent. I'm not sure if it's a bug or an issue on my end. Any help would be greatly appreciated.
Steps to recreate
$ conda create --name BLEnv python==3.9
$ python3 -m pip install balloon_learning_environment
$ python -m balloon_learning_environment.eval.eval --agent=station_seeker --renderer=matplotlib --suite=micro_eval --output_dir=/tmp/ble/eval
Operating Conditions Ubuntu 20.04 Python 3.9, fresh anaconda install Nvidia 470.82.01 driver
Issues Within Features.py lines 541 and 543 cause an issue.
Error
/home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/gym/envs/registration.py:440: UserWarning: WARN: The
registry.env_specs
property along withEnvSpecTree
is deprecated. Please useregistry
directly as a dictionary instead. logger.warn( /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/balloon_learning_environment/env/balloon/acs.py:24: DeprecationWarning: Please useinterp1d
from thescipy.interpolate
namespace, thescipy.interpolate.interpolate
namespace is deprecated. _PRESSURE_RATIO_TO_POWER: interpolate.interpolate.interp1d = ( /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/balloon_learning_environment/env/balloon/acs.py:31: DeprecationWarning: Please useinterp2d
from thescipy.interpolate
namespace, thescipy.interpolate.interpolate
namespace is deprecated. _PRESSURE_RATIO_POWER_TO_EFFICIENCY: interpolate.interpolate.interp2d = ( 2022-07-30 19:18:17.970362: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/cv2/../../lib64:/usr/local/cuda-11.4/lib64:/home/jack/PHD/AirSim/ros/devel/lib:/opt/ros/noetic/lib /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/flatbuffers/compat.py:19: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/keras/utils/image_utils.py:36: DeprecationWarning: NEAREST is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.NEAREST or Dither.NONE instead. 'nearest': pil_image.NEAREST, /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/keras/utils/image_utils.py:37: DeprecationWarning: BILINEAR is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BILINEAR instead. 'bilinear': pil_image.BILINEAR, /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/keras/utils/image_utils.py:38: DeprecationWarning: BICUBIC is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BICUBIC instead. 'bicubic': pil_image.BICUBIC, /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/keras/utils/image_utils.py:39: DeprecationWarning: HAMMING is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.HAMMING instead. 'hamming': pil_image.HAMMING, /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/keras/utils/image_utils.py:40: DeprecationWarning: BOX is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.BOX instead. 'box': pil_image.BOX, /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/keras/utils/image_utils.py:41: DeprecationWarning: LANCZOS is deprecated and will be removed in Pillow 10 (2023-07-01). Use Resampling.LANCZOS instead. 'lanczos': pil_image.LANCZOS, /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/gin/tf/init.py:48: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead. if (distutils.version.LooseVersion(tf.version) < /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/chex/_src/pytypes.py:37: FutureWarning: jax.tree_structure is deprecated, and will be removed in a future release. Use jax.tree_util.tree_structure instead. PyTreeDef = type(jax.tree_structure(None)) 2022-07-30 19:18:19.227662: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/cv2/../../lib64:/usr/local/cuda-11.4/lib64:/home/jack/PHD/AirSim/ros/devel/lib:/opt/ros/noetic/lib 2022-07-30 19:18:19.227725: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcublas.so.11'; dlerror: libcublas.so.11: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/cv2/../../lib64:/usr/local/cuda-11.4/lib64:/home/jack/PHD/AirSim/ros/devel/lib:/opt/ros/noetic/lib 2022-07-30 19:18:19.227769: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcublasLt.so.11'; dlerror: libcublasLt.so.11: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/cv2/../../lib64:/usr/local/cuda-11.4/lib64:/home/jack/PHD/AirSim/ros/devel/lib:/opt/ros/noetic/lib 2022-07-30 19:18:19.227813: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcufft.so.10'; dlerror: libcufft.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/cv2/../../lib64:/usr/local/cuda-11.4/lib64:/home/jack/PHD/AirSim/ros/devel/lib:/opt/ros/noetic/lib 2022-07-30 19:18:19.227854: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcurand.so.10'; dlerror: libcurand.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/cv2/../../lib64:/usr/local/cuda-11.4/lib64:/home/jack/PHD/AirSim/ros/devel/lib:/opt/ros/noetic/lib 2022-07-30 19:18:19.227895: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcusolver.so.11'; dlerror: libcusolver.so.11: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/cv2/../../lib64:/usr/local/cuda-11.4/lib64:/home/jack/PHD/AirSim/ros/devel/lib:/opt/ros/noetic/lib 2022-07-30 19:18:19.227936: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcusparse.so.11'; dlerror: libcusparse.so.11: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/cv2/../../lib64:/usr/local/cuda-11.4/lib64:/home/jack/PHD/AirSim/ros/devel/lib:/opt/ros/noetic/lib 2022-07-30 19:18:19.230073: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1850] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform. Skipping registering GPU devices... I0730 19:18:19.425369 140108376749888 xla_bridge.py:328] Unable to initialize backend 'tpu_driver': NOT_FOUND: Unable to find driver in registry given worker: I0730 19:18:19.425472 140108376749888 xla_bridge.py:328] Unable to initialize backend 'cuda': module 'jaxlib.xla_extension' has no attribute 'GpuAllocatorConfig' I0730 19:18:19.425517 140108376749888 xla_bridge.py:328] Unable to initialize backend 'rocm': module 'jaxlib.xla_extension' has no attribute 'GpuAllocatorConfig' I0730 19:18:19.425881 140108376749888 xla_bridge.py:328] Unable to initialize backend 'tpu': INVALID_ARGUMENT: TpuPlatform is not available. W0730 19:18:19.425932 140108376749888 xla_bridge.py:335] No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.) Traceback (most recent call last): File "/home/jack/anaconda3/envs/BLEnv/lib/python3.9/runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "/home/jack/anaconda3/envs/BLEnv/lib/python3.9/runpy.py", line 87, in _run_code exec(code, run_globals) File "/home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/balloon_learning_environment/eval/eval.py", line 143, inapp.run(main) File "/home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/absl/app.py", line 308, in run _run_main(main, args) File "/home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/absl/app.py", line 254, in _run_main sys.exit(main(argv)) File "/home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/balloon_learning_environment/eval/eval.py", line 119, in main env = gym.make('BalloonLearningEnvironment-v0', File "/home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/gym/envs/registration.py", line 662, in make env = env_creator(**_kwargs) File "/home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/gin/config.py", line 1605, in gin_wrapper utils.augment_exception_message_and_reraise(e, err_str) File "/home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/gin/utils.py", line 41, in augment_exception_message_and_reraise raise proxy.with_traceback(exception.traceback) from None File "/home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/gin/config.py", line 1582, in gin_wrapper return fn(*new_args, **new_kwargs) File "/home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/balloon_learning_environment/env/balloon_env.py", line 145, in init self.arena = balloon_arena.BalloonArena(self._feature_constructor_factory, File "/home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/balloon_learning_environment/env/balloon_arena.py", line 160, in init self.reset(seed) File "/home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/balloon_learning_environment/env/balloon_arena.py", line 183, in reset return self.feature_constructor.get_features() File "/home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/balloon_learning_environment/env/features.py", line 327, in get_features self._add_wind_features(feature_vector) File "/home/jack/anaconda3/envs/BLEnv/lib/python3.9/site-packages/balloon_learning_environment/env/features.py", line 541, in _add_wind_features assert 0.0 <= deviations[level] <= 1.00001, 'Uncertainty not in [0, 1].' ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all() In call to configurable 'BalloonEnv' (<class 'balloon_learning_environment.env.balloon_env.BalloonEnv'>)
Thanks for pointing this out, it does appear to be a bug on our end. I'm looking into it now.
It looks like the API for scikit learn's GaussianProcessRegressor was updated.
I'll work on a fix, but in the meantime using an earlier version of scikit learn should work: python -m pip install scikit-learn==1.0.2
.
I had installed scikit-learn 1.1.1, downgrading as you suggested did the trick. Thank you!