openvinotoolkit / anomalib

An anomaly detection library comprising state-of-the-art algorithms and features such as experiment management, hyper-parameter optimization, and edge inference.
https://anomalib.readthedocs.io/en/latest/
Apache License 2.0
3.4k stars 615 forks source link

[Bug]: Logs not showing in tensorboard #1982

Open shanmugamani1023 opened 2 months ago

shanmugamani1023 commented 2 months ago

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:

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

rohitpotdukhe01 commented 2 months ago

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