Closed HenryZhang-git closed 1 week ago
Hi @HenryZhang-git, wandb often integrates with Git to log the state of the repository, including the commit hash, branch, and sometimes changes made in the codebase. If Git is unable to determine the root directory or fails due to "dubious ownership," wandb might not be able to collect or log this information properly. This can cause errors or incomplete logs when you run python .\examples\train\train_cdt.py --task OfflineAntRun-v0
Sorry. Maybe I'm being ambiguous. As fig1. Note that I first closed wandb and executed python.\ examples\train\train_cdt.py --task OfflineAntRun-v0
. However, nothing is outputted. So, I think the issue may be caused by code rather than wandb?
If the Wandb logger is disabled, for example by commenting out lines 42 and 44 in train_cdt.py
, the training process will only be printed to the terminal, and no files will be saved.
Sorry,perhaps you still don't understand what I mean. When I run this code:python.\ examples\train\train_cdt.py --task OfflineAntRun-v0
, terminal output nothing. Just like:
The terminal will just pop up a new command line and ask me to enter a new command. In other words, it doesn't seem like the python process is running?
Thank you for the clarification. I was wondering which logger you used other than the wandb logger when you executed the first command. Besides, I would suggest fixing the issue I mentioned.
Hi @HenryZhang-git, I tested this on my Windows 10 setup, and it seems that bullet_safety_gym
isn’t installed correctly. Could you try cloning this repository: https://github.com/liuzuxin/Bullet-Safety-Gym, and then use pip install -e .
to check if it installs correctly? Additionally, if you’re using the safety_gymnasium
environments, the train_cdt.py
script should run without issues.
Thank you for your reply. First of all, I need to make it clear that I did not turn on any logger. The main reason I shut down logger is that I want to confirm if the python process is terminating due to logger issues. In fact, the termination of the process is not necessarily related to whether the logger is started.
The other issue: I tried using pip's offline installation and online installation, but it seems that I can't install safety-gym offline, but when pip installed online, I found that the libraries I needed to install already existed in my virtual environment.
I ran the code according to the README, but found that the problem may exist here. I don't know the code for OSRL, but I haven't had this problem before running code for offline RL, even with wandb logger. If it is convenient for you, I hope you can solve it for me. Or do I have to use a linux operating system to run OSRL successfully?
@HenryZhang-git. Since the bullet_safety_gym
isn’t properly installed, running python .\ examples\train\train_cdt.py --task OfflineAntRun-v0
just terminates without any output. As I mentioned, if you use the safety_gymnasium
environments (different from safety_gym
), the training scripts should work fine (you tried BCQL and CarCircle, which is still an environment in bullet_safety_gym
). For environment details, refer to DSRL, SafetyGymnasium, and BulletSafetyGym. I suggest using Linux to avoid these issues entirely.
Hi,bro,
Thank you so much for your contributions to offline safe reinforcement learning.
Firstly, I close the wandb logger. And when I run the code such as train_cdt by
python .\examples\train\train_cdt.py --task OfflineAntRun-v0
, nothing is outputted. Meanwhile, if I use wandb logger, the process is also terminated immediately after wandb is initialized.