openvinotoolkit / anomalib

An anomaly detection library comprising state-of-the-art algorithms and features such as experiment management, hyper-parameter optimization, and edge inference.

Home Page:https://anomalib.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Bug]: Logs not showing in tensorboard

shanmugamani1023 opened this issue · comments

Describe the bug

I tried to create a model using patch core and custom dataset,

Import the datamodule

from anomalib.data import Folder
from anomalib.data.utils import TestSplitMode

Create the datamodule

datamodule = Folder(
name="toy",
root="datasets/hazelnut_toy",
normal_dir="good",
test_split_mode=TestSplitMode.SYNTHETIC,
task="classification",
image_size=(512,512)
)

Setup the datamodule

datamodule.setup()

# Import the model and engine
from anomalib.models import Patchcore
from anomalib.engine import Engine
from anomalib.callbacks import ModelCheckpoint
from anomalib.loggers import AnomalibCometLogger
from anomalib.loggers import AnomalibTensorBoardLogger

i used tensord board logger,
Tenlogger = AnomalibTensorBoardLogger("tb_logs", name="my_model",log_graph=True)
callbacks = [ModelCheckpoint()]

Create the model and engine

model = Patchcore()
engine = Engine(task="classification",
accelerator="auto",
check_val_every_n_epoch=1,
max_epochs=2,
num_sanity_val_steps=0,
val_check_interval=1.0,
callbacks=callbacks,
logger=Tenlogger)

after

Train a Patchcore model on the given datamodule

engine.train(datamodule=datamodule, model=model)

after training i got ,events files,

events

but when i run this tensorboard using following command ,

tensorboard --logdir="tb_logs/my_model/version_0" --bind_all

i didnt get any graphs or results,

no_dash

so,i thought i gave wrong directory so ,i tried with full path version_0/events.out.tfevents.1712825887.DESKTOP-0JKHALG.8636.4
but it didnt give results??

Dataset

Other (please specify in the text field below)

Model

PatchCore

Steps to reproduce the behavior

Try same above

OS information

OS information:

  • OS: [e.g. Ubuntu 20.04]
  • Python version: [e.g. 3.10.0]
  • Anomalib version: [e.g. 0.3.6]
  • PyTorch version: [e.g. 1.9.0]
  • CUDA/cuDNN version: [e.g. 11.1]
  • GPU models and configuration: [e.g. 2x GeForce RTX 3090]
  • Any other relevant information: [e.g. I'm using a custom dataset]

Expected behavior

results need to show

Screenshots

No response

Pip/GitHub

pip

What version/branch did you use?

No response

Configuration YAML

null

Logs

null

Code of Conduct

  • I agree to follow this project's Code of Conduct

Hi, I am facing similar problem.Hope to get it solved soon.