How to fix TypeError: Folder.__init__() got an unexpected keyword argument 'task' #2691
-
https://anomalib.readthedocs.io/en/latest/markdown/guides/how_to/data/custom_data.html We will use our hazelnut_toy dataset to show the capabilities of the Folder dataset https://anomalib.readthedocs.io/en/latest/markdown/guides/reference/data/datamodules/image/folder.html Describe the bug# Import the datamodule
from anomalib.data import Folder
# Create the datamodule
datamodule = Folder(
name="hazelnut_toy",
root=r"I:\anomalib_Data\hazelnut_toy",
normal_dir="good",
abnormal_dir="crack",
task="classification",
)
# Setup the datamodule
datamodule.setup()
DatasetFolder ModelN/A Steps to reproduce the behavior... OS informationOS information: Expected behavior.. ScreenshotsNo response Pip/GitHubpip What version/branch did you use?No response Configuration YAML.. Logs.. Code of Conduct
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
In version 2.0.0 and above, the |
Beta Was this translation helpful? Give feedback.
In version 2.0.0 and above, the
task
param is not need anymore as it's deduced automatically. Removing it will solve the issue.