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 args: Create workspace directory from API #1773

Merged
merged 52 commits into from
Feb 29, 2024

Conversation

samet-akcay
Copy link
Contributor

📝 Description

  • This PR creates the results directory from the Engine, not CLI.

Limitations

  • It is still not fully complete. We need to ensure that we correctly create this from the entry points.
  • Callbacks are to be created before trainer, see #1642

✨ Changes

Select what type of change your PR is:

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🔨 Refactor (non-breaking change which refactors the code base)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🔒 Security update

✅ Checklist

Before you submit your pull request, please make sure you have completed the following steps:

  • 📋 I have summarized my changes in the CHANGELOG and followed the guidelines for my type of change (skip for minor changes, documentation updates, and test enhancements).
  • 📚 I have made the necessary updates to the documentation (if applicable).
  • 🧪 I have written tests that support my changes and prove that my fix is effective or my feature works (if applicable).

For more information about code review checklists, see the Code Review Checklist.

@github-actions github-actions bot added the Tests label Feb 25, 2024
@djdameln
Copy link
Contributor

Something going wrong here. Can you investigate?

>>> from anomalib.engine import Engine
>>> from anomalib.models import Padim
>>> from anomalib.data import MVTec
>>>
>>> engine = Engine()
>>> model = Padim()
>>> data = MVTec()
>>>
>>> engine.train(model, datamodule=data)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/djameln/anomalib/src/anomalib/engine/engine.py", line 721, in train
    self._setup_workspace(model, train_dataloaders, val_dataloaders, test_dataloaders, datamodule)
  File "/home/djameln/anomalib/src/anomalib/engine/engine.py", line 299, in _setup_workspace
    root_dir = self._cache.args["default_root_dir"] / model.name / dataset_name / category
TypeError: unsupported operand type(s) for /: 'str' and 'str'

src/anomalib/data/base/datamodule.py Outdated Show resolved Hide resolved
src/anomalib/data/base/datamodule.py Show resolved Hide resolved
src/anomalib/engine/engine.py Outdated Show resolved Hide resolved
src/anomalib/engine/engine.py Show resolved Hide resolved
Copy link
Collaborator

@ashwinvaidya17 ashwinvaidya17 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Just a few comments

src/anomalib/callbacks/__init__.py Show resolved Hide resolved
src/anomalib/engine/engine.py Outdated Show resolved Hide resolved
src/anomalib/engine/engine.py Show resolved Hide resolved
@ashwinvaidya17 ashwinvaidya17 self-requested a review February 29, 2024 10:49
@samet-akcay samet-akcay merged commit 7c1e268 into openvinotoolkit:main Feb 29, 2024
6 of 7 checks passed
@samet-akcay samet-akcay deleted the refactor/engine-args branch February 29, 2024 20:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants