TensorBoardLogger: AttributeError: module 'tensorflow' has no attribute 'io' #2090
Open
Description
DiskLogger works corectly
tensorboard 2.18.0
tensorboard-data-server 0.7.2
torch 2.5.1+cu121
torchao 0.6.1+cu121
torchtune 0.4.0
torchvision 0.20.1+cu121
# Logging
metric_logger:
_component_: torchtune.training.metric_logging.TensorBoardLogger
log_dir: ${output_dir}
output_dir: ${env:ARTIFACT_LOCATION}/full-llama3.1-finetune/
log_every_n_steps: 10
log_peak_memory_stats: True
# Profiler (disabled)
profiler:
_component_: torchtune.training.setup_torch_profiler
enabled: True
#Output directory of trace artifacts
output_dir: ${output_dir}/profiling_outputs
#`torch.profiler.ProfilerActivity` types to trace
cpu: True
cuda: True
#trace options passed to `torch.profiler.profile`
profile_memory: True
with_stack: False
record_shapes: True
with_flops: False
# `torch.profiler.schedule` options:
# wait_steps -> wait, warmup_steps -> warmup, active_steps -> active, num_cycles -> repeat
wait_steps: 5
warmup_steps: 3
active_steps: 2
num_cycles: 1
AttributeError: module 'tensorflow' has no attribute 'io'
Exception ignored in: <function TensorBoardLogger.__del__ at 0x1524dcb2b2e0>
Traceback (most recent call last):
File "/software/isg/users/fg12/envs/virtualenvs/mlflow-torchtune-31tjdLhK-py3.11/lib/python3.11/site-packages/torchtune/training/metric_logging.py", line 314, in __del__
if self._writer:
^^^^^^^^^^^^
AttributeError: 'TensorBoardLogger' object has no attribute '_writer'