-
Notifications
You must be signed in to change notification settings - Fork 703
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]: AnomalyScoreDistribution args, kwargs #2482
Comments
Update: I tried to override the class in the following way:
setattr(torchmetrics, "fixed_AnomalyScoreDistribution", fixed_AnomalyScoreDistribution) Along with from pytorch_lightning.loggers import CSVLogger csv_logger = CSVLogger(save_dir="logs", name="dfkde_metrics") model_dfkde = Dfkde(backbone='efficientnet_b1',layers=['blocks.2']) And I getValueError Traceback (most recent call last) 17 frames ValueError: The For the same code(noteworthy that the previous error disappears when I used my customized metric |
Describe the bug
In the metrics.py file, we have the line
On the other hand, for the update() method of anomalyScoreDistribution, the code is
Essentially, the args value is not empty and has the required scores and maps, which causes a bug whenever I tried to use this metric.
Dataset
Folder
Model
N/A
Steps to reproduce the behavior
The exact model does not seem to be relevant, at least for 'classification' learning types. I also used Ganomaly with the same results.
model_dfkde = Dfkde(backbone='efficientnet_b1',layers=['blocks.2'])
engine_dfkde = Engine(image_metrics=["AUROC","AUPR", "BinaryF1Score", "F1AdaptiveThreshold", "AnomalyScoreDistribution"],
task="classification", max_epochs=1, logger=csv_logger, log_every_n_steps=7)
engine_dfkde.fit(datamodule=datamodule, model=model_dfkde)
OS information
Expected behavior
I expected for the run to go smoothly. It is worth noting that when I remove the "AnomalyScoreDistribution" metric, all is fine.
Screenshots
No response
Pip/GitHub
pip
What version/branch did you use?
No response
Configuration YAML
I do not have one.
Logs
Code of Conduct
The text was updated successfully, but these errors were encountered: