Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when trying to run baseline agent #1

Open
SaundersJE97 opened this issue Jul 30, 2022 · 3 comments
Open

Error when trying to run baseline agent #1

SaundersJE97 opened this issue Jul 30, 2022 · 3 comments

Comments

@SaundersJE97
Copy link

SaundersJE97 commented Jul 30, 2022

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 with EnvSpecTree is deprecated. Please use registry 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 use interp1d from the scipy.interpolate namespace, the scipy.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 use interp2d from the scipy.interpolate namespace, the scipy.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, in
app.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'>)

@joshgreaves
Copy link
Collaborator

Thanks for pointing this out, it does appear to be a bug on our end. I'm looking into it now.

@joshgreaves
Copy link
Collaborator

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.

@SaundersJE97
Copy link
Author

I had installed scikit-learn 1.1.1, downgrading as you suggested did the trick. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants