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

Unable to create tensorboard log file when passing parameters through Dictionary Unpacking #3412

Open
2 of 4 tasks
Zhuofeng-Li opened this issue Feb 25, 2025 · 3 comments
Open
2 of 4 tasks

Comments

@Zhuofeng-Li
Copy link

System Info

- **Accelerate Version:** 1.0.1  
- **OS:** Linux 4.18.0-2.4.3.3.kwai.x86_64  
- **Python Version:** 3.8.10 (default, May 26 2023, 14:05:08)  
  - Compiler: GCC 9.4.0  
- **NumPy Version:** 1.24.4  
- **Torch Version:** 2.4.1+cu121

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • One of the scripts in the examples/ folder of Accelerate or an officially supported no_trainer script in the examples folder of the transformers repo (such as run_no_trainer_glue.py)
  • My own task or dataset (give details below)

Reproduction

  • This code works.
from accelerate import Accelerator

accelerator = Accelerator(log_with="tensorboard", project_dir="./log")
  • This code fails to create tensorboard log.
from accelerate import Accelerator

accelerator_log_kwargs = {}
accelerator_log_kwargs["project_dir"] = args.output_dir
accelerator = Accelerator(log_with="tensorboard", **accelerator_log_kwargs)

Expected behavior

Create log file.

@BenjaminBossan
Copy link
Member

args.output_dir

What is the value of args.output_dir? If it's the same as in your first code snippet, "./log", the two snippets should be identical.

@Zhuofeng-Li
Copy link
Author

Zhuofeng-Li commented Feb 26, 2025

args.output_dir value is "./log".

But the second can not create log dir.

@BenjaminBossan
Copy link
Member

Can you show more code? Where exactly does the error occur? What is the full error message?

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