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

[Bug in win11] when I run "main.py" #5

Closed
PavelZhao opened this issue Nov 6, 2022 · 2 comments
Closed

[Bug in win11] when I run "main.py" #5

PavelZhao opened this issue Nov 6, 2022 · 2 comments

Comments

@PavelZhao
Copy link

PavelZhao commented Nov 6, 2022

Hi, thank you very much for providing such a good open source algorithm, but I am having the problems when running "main.py" on windows.

Warning: Flow failed to import. Set the environment variable D4RL_SUPPRESS_IMPORT_ERROR=1 to suppress this message.
No module named 'flow'
Warning: FrankaKitchen failed to import. Set the environment variable D4RL_SUPPRESS_IMPORT_ERROR=1 to suppress this message.
No module named 'mujoco'
Warning: CARLA failed to import. Set the environment variable D4RL_SUPPRESS_IMPORT_ERROR=1 to suppress this message.
No module named 'carla'
pybullet build time: Nov 5 2022 13:03:11
Traceback (most recent call last):
File "D:\Anacondazzp\envs\pavelzzp\lib\site-packages\tensorboardX\record_writer.py", line 58, in open_file
factory = REGISTERED_FACTORIES[prefix]
KeyError: '.\exp_data\OfflineATAC_hopper-medium-replay-v2\beta_16_discount_0.99_norm_constraint_100_policy_lr_5e-07_value_lr_0.0005_use_two_qfs_True_fixed_alpha_None_q_eval_mode_0.5_0.5_n_warmstart_steps_100000_seed_0\events.out.tfevents.1667737712.Pavelzzp'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\pythonproject\ATAC-master\scripts\main.py", line 234, in
run(**train_kwargs)
File "D:\pythonproject\ATAC-master\scripts\main.py", line 197, in run
full_score = train_agent(train_func,
File "c:\users\pavel\atac\src\atac\garage_tools\rl_utils.py", line 47, in train_agent
score = wrapped_train_func(**train_kwargs)
File "D:\Anacondazzp\envs\pavelzzp\lib\site-packages\garage\experiment\experiment.py", line 368, in call
ctxt = self._make_context(self._get_options(*args), **kwargs)
File "D:\Anacondazzp\envs\pavelzzp\lib\site-packages\garage\experiment\experiment.py", line 329, in _make_context
dowel.TensorBoardOutput(log_dir, x_axis=options['x_axis']))
File "D:\Anacondazzp\envs\pavelzzp\lib\site-packages\dowel\tensor_board_output.py", line 57, in init
self._writer = tbX.SummaryWriter(log_dir, flush_secs=flush_secs)
File "D:\Anacondazzp\envs\pavelzzp\lib\site-packages\tensorboardX\writer.py", line 301, in init
self._get_file_writer()
File "D:\Anacondazzp\envs\pavelzzp\lib\site-packages\tensorboardX\writer.py", line 349, in _get_file_writer
self.file_writer = FileWriter(logdir=self.logdir,
File "D:\Anacondazzp\envs\pavelzzp\lib\site-packages\tensorboardX\writer.py", line 105, in init
self.event_writer = EventFileWriter(
File "D:\Anacondazzp\envs\pavelzzp\lib\site-packages\tensorboardX\event_file_writer.py", line 106, in init
self._ev_writer = EventsWriter(os.path.join(
File "D:\Anacondazzp\envs\pavelzzp\lib\site-packages\tensorboardX\event_file_writer.py", line 43, in init
self._py_recordio_writer = RecordWriter(self._file_name)
File "D:\Anacondazzp\envs\pavelzzp\lib\site-packages\tensorboardX\record_writer.py", line 179, in init
self._writer = open_file(path)
File "D:\Anacondazzp\envs\pavelzzp\lib\site-packages\tensorboardX\record_writer.py", line 61, in open_file
return open(path, 'wb')
FileNotFoundError: [Errno 2] No such file or directory: '.\exp_data\OfflineATAC_hopper-medium-replay-v2\beta_16_discount_0.99_norm_constraint_100_policy_lr_5e-07_value_lr_0.0005_use_two_qfs_True_fixed_alpha_None_q_eval_mode_0.5_0.5_n_warmstart_steps_100000_seed_0\events.out.tfevents.1667737712.Pavelzzp'
Exception ignored in: <function LogOutput.del at 0x0000020BA6A3D9D0>

Traceback (most recent call last):
File "D:\Anacondazzp\envs\pavelzzp\lib\site-packages\dowel\logger.py", line 176, in del
self.close()
File "D:\Anacondazzp\envs\pavelzzp\lib\site-packages\dowel\tensor_board_output.py", line 156, in close
self._writer.close()
AttributeError: 'TensorBoardOutput' object has no attribute '_writer'

How can I solve the problems? Thank you very much.

@PavelZhao PavelZhao closed this as not planned Won't fix, can't repro, duplicate, stale Nov 6, 2022
@PavelZhao PavelZhao reopened this Nov 6, 2022
@PavelZhao PavelZhao changed the title [Bug in win11] when I run the code "run(**train_kwargs)" [Bug in win11] when I run "main.py" Nov 6, 2022
@chinganc
Copy link
Collaborator

chinganc commented Nov 7, 2022

The error seems to be related to the log directory. Can you verify if the log directory was created successfully? Windows might not support such a long string (the code has only been tested in ubuntu). Maybe you can change this line to use a different log directory name.

@PavelZhao
Copy link
Author

I solve the problems according your comments that I manual set the directory name of “log_dir”. Thank you very much.

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