Skip to content
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

🔨 Refactor Engine's predict method #1768

Closed
ashwinvaidya17 opened this issue Feb 21, 2024 · 0 comments
Closed

🔨 Refactor Engine's predict method #1768

ashwinvaidya17 opened this issue Feb 21, 2024 · 0 comments
Milestone

Comments

@ashwinvaidya17
Copy link
Collaborator

What is the motivation for this task?

The predict method has the following signature

def predict(
        self,
        model: AnomalyModule | None = None,
        dataloaders: EVAL_DATALOADERS | AnomalibDataModule | None = None,
        datamodule: AnomalibDataModule | Dataset | PredictDataset | None = None,
        return_predictions: bool | None = None,
        ckpt_path: str | None = None,
    ) -> _PREDICT_OUTPUT | None:

This is confusing as data loader and data module accept data module and dataset as parameters interchangeably.
Ideally dataset can be another parameter that contains only PredictDataset as input.

Describe the solution you'd like

The solution will require changes to cli.py as well.

Additional context

No response

@ashwinvaidya17 ashwinvaidya17 added this to the v1.0.0 milestone Feb 21, 2024
@samet-akcay samet-akcay changed the title [Task]: Refactor Engine's predict method 🔨 Refactor Engine's predict method Feb 22, 2024
@github-project-automation github-project-automation bot moved this to 📝 To Do in Anomalib Feb 22, 2024
@github-project-automation github-project-automation bot moved this from 📝 To Do to ✅ Done in Anomalib Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

1 participant