uoe-agents / epymarl

An extension of the PyMARL codebase that includes additional algorithms and environment support
Apache License 2.0
518 stars 140 forks source link

How to get the Episodic return graph #48

Closed FADEAWAY114 closed 1 year ago

FADEAWAY114 commented 1 year ago

After running the command, I get the following file, but I don't see any files about tensorboard, how do I get the Episodic return graph? 1 2 3

abdulghani91 commented 1 year ago

You need to enable the tensorboard from the default.yaml in the config file.

FADEAWAY114 commented 1 year ago

您需要从配置文件中启用张量板。default.yaml

When I change it, run tensorboard, I get the following error:

`(parking2) vmware@vmware-virtual-machine:~/epymarl/results/tb_logs/qmix_seed694755480_rware:rware-tiny-2ag-v1_2023-03-25 12:10:14.135647$ tensorboard --logdir=/home/vmware/epymarl/results/tb_logs/qmix_seed694755480_rware:rware-tiny-2ag-v1_2023-03-25 12:10:14.135647 2023-03-25 16:40:41.393997: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory 2023-03-25 16:40:41.394213: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine. Traceback (most recent call last): File "/usr/local/lib/python3.8/dist-packages/tensorboard/compat/init.py", line 42, in tf from tensorboard.compat import notf # noqa: F401 ImportError: cannot import name 'notf' from 'tensorboard.compat' (/usr/local/lib/python3.8/dist-packages/tensorboard/compat/init.py)

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/usr/local/bin/tensorboard", line 8, in sys.exit(run_main()) File "/usr/local/lib/python3.8/dist-packages/tensorboard/main.py", line 39, in run_main main_lib.global_init() File "/usr/local/lib/python3.8/dist-packages/tensorboard/main_lib.py", line 40, in global_init if getattr(tf, "version", "stub") == "stub": File "/usr/local/lib/python3.8/dist-packages/tensorboard/lazy.py", line 65, in getattr return getattr(load_once(self), attr_name) File "/usr/local/lib/python3.8/dist-packages/tensorboard/lazy.py", line 97, in wrapper cache[arg] = f(arg) File "/usr/local/lib/python3.8/dist-packages/tensorboard/lazy.py", line 50, in load_once module = load_fn() File "/usr/local/lib/python3.8/dist-packages/tensorboard/compat/init.py", line 45, in tf import tensorflow File "/usr/local/lib/python3.8/dist-packages/tensorflow/init.py", line 41, in from tensorflow.python.tools import module_util as _module_util File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/init.py", line 41, in from tensorflow.python.eager import context File "/usr/local/lib/python3.8/dist-packages/tensorflow/python/eager/context.py", line 32, in from tensorflow.core.framework import function_pb2 File "/usr/local/lib/python3.8/dist-packages/tensorflow/core/framework/function_pb2.py", line 16, in from tensorflow.core.framework import attr_value_pb2 as tensorflow_dot_core_dot_framework_dot_attrvaluepb2 File "/usr/local/lib/python3.8/dist-packages/tensorflow/core/framework/attr_value_pb2.py", line 16, in from tensorflow.core.framework import tensor_pb2 as tensorflow_dot_core_dot_framework_dot_tensorpb2 File "/usr/local/lib/python3.8/dist-packages/tensorflow/core/framework/tensor_pb2.py", line 16, in from tensorflow.core.framework import resource_handle_pb2 as tensorflow_dot_core_dot_framework_dot_resourcehandlepb2 File "/usr/local/lib/python3.8/dist-packages/tensorflow/core/framework/resource_handle_pb2.py", line 16, in from tensorflow.core.framework import tensor_shape_pb2 as tensorflow_dot_core_dot_framework_dot_tensorshapepb2 File "/usr/local/lib/python3.8/dist-packages/tensorflow/core/framework/tensor_shape_pb2.py", line 36, in _descriptor.FieldDescriptor( File "/usr/local/lib/python3.8/dist-packages/google/protobuf/descriptor.py", line 561, in new__ _message.Message._CheckCalledFromGeneratedFile() TypeError: Descriptors cannot not be created directly. If this call came from a _pb2.py file, your generated code is out of date and must be regenerated with protoc >= 3.19.0. If you cannot immediately regenerate your protos, some other possible workarounds are:

  1. Downgrade the protobuf package to 3.20.x or lower.
  2. Set PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python (but this will use pure-Python parsing and will be much slower).

More information: https://developers.google.com/protocol-buffers/docs/news/2022-05-06#python-updates `

abdulghani91 commented 1 year ago

I got the same error. Unfortunately, you can run it without tensorboard only.

you can check my issues for more info: https://github.com/uoe-agents/epymarl/issues/45

FADEAWAY114 commented 1 year ago

When I run tensordoard, the following is displayed, but after opening the web page, nothing is displayed.

`(parking2) vmware@vmware-virtual-machine:~/epymarl/results/tb_logs/qmix_seed694755480_rware:rware-tiny-2ag-v1_2023-03-25 12:10:14.135647$ tensorboard --logdir="/home/vmware/epymarl/results/tb_logs/qmix_seed694iny-2ag-v1_2023-03-25 12:10:14.135647" 2023-03-26 12:17:20.887915: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations: AVX2 FMA To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.

NOTE: Using experimental fast data loading logic. To disable, pass "--load_fast=false" and report issues on GitHub. More details: https://github.com/tensorflow/tensorboard/issues/4784

Serving TensorBoard on localhost; to expose to the network, use a proxy or pass --bind_all TensorBoard 2.11.2 at http://localhost:6006/ (Press CTRL+C to quit) ` 51529264252ac18b5d5bcd7f5546e5b

abdulghani91 commented 1 year ago

@FADEAWAY114 Try to use the root file with the logdir results/tb_logs

FADEAWAY114 commented 1 year ago

@FADEAWAY114 Try to use the root file with the logdir results/tb_logs

Thank you very much, I have successfully plotted, thanks again.

abdulghani91 commented 1 year ago

@FADEAWAY114 what environment did you use?

FADEAWAY114 commented 1 year ago

@FADEAWAY114您使用什么环境?

ubuntu20.04