-
Notifications
You must be signed in to change notification settings - Fork 16
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
ENH: Convert post-processing to Transform classes that can be specified in config #537
Comments
I think something like this will be necessary to achieve #472 without adding a ton of very specific logic to the Basically the def _eval():
self.metrics.reinit()
for batch in loader:
output = self.model(input)
self.metrics.add(output)
return self.metrics.vals One way to achieve this would be to have Networks return an Output class with attributes, and to have metrics look for those attributes. But that starts to also feel very constrained, i.e. we might regret what we chose for the expected attributes down the road |
- Factor all functions out of labeled_timebins except has_unlabeled - Only test has_unlabeled in test_labeled_timebins, parametrize the unit test - Add 'multi_char_labels_to_single_char' to vak.labels - and add type annotations and clean up docstrings - Clean up / add tests to tests/test_labels.py - Add src/vak/transforms/labeled_timebins/functional.py - Add src/vak/transforms/labeled_timebins/transforms.py - Fix imports in vak/transforms/ __init__.py files - Import labeled_timebins transforms in transforms/__init__.py - Fix other imports - Import classes from transforms in src/vak/transforms/labeled_timebins/__init__.py - TST: Move paths outside fixtures in fixtures/annot.py to be able to import directly in test modules to parametrize there. - TST: Move path to constant outside fixture in fixtures/config.py - Add tests/test_transforms/__init__.py so we can do relative import from tests/fixtures - Add tests/test_transforms/test_labeled_timebins/test_functional.py - Add tests/test_transforms/test_labeled_timebins/test_transforms.py
- Factor all functions out of labeled_timebins except has_unlabeled - Only test has_unlabeled in test_labeled_timebins, parametrize the unit test - Add 'multi_char_labels_to_single_char' to vak.labels - and add type annotations and clean up docstrings - Clean up / add tests to tests/test_labels.py - Add src/vak/transforms/labeled_timebins/functional.py - Add src/vak/transforms/labeled_timebins/transforms.py - Fix imports in vak/transforms/ __init__.py files - Import labeled_timebins transforms in transforms/__init__.py - Fix other imports - Import classes from transforms in src/vak/transforms/labeled_timebins/__init__.py - TST: Move paths outside fixtures in fixtures/annot.py to be able to import directly in test modules to parametrize there. - TST: Move path to constant outside fixture in fixtures/config.py - Add tests/test_transforms/__init__.py so we can do relative import from tests/fixtures - Add tests/test_transforms/test_labeled_timebins/test_functional.py - Add tests/test_transforms/test_labeled_timebins/test_transforms.py - Use `vak.transforms.labeled_timebins.from_segments` in vocal_dataset.py - Use vak.transforms.labeled_timebins in engine/model.py - Use transforms.labeled_timebins.from_segments in datasets/window_dataset.py - Use transforms.labeled_timebins.to_segments in core/predict.py - Use labeled_timebins transforms 'postprocess' and 'to_segments' in core/predict.py
- Factor all functions out of labeled_timebins except has_unlabeled - Only test has_unlabeled in test_labeled_timebins, parametrize the unit test - Add 'multi_char_labels_to_single_char' to vak.labels - and add type annotations and clean up docstrings - Clean up / add tests to tests/test_labels.py - Add src/vak/transforms/labeled_timebins/functional.py - Add src/vak/transforms/labeled_timebins/transforms.py - Fix imports in vak/transforms/ __init__.py files - Import labeled_timebins transforms in transforms/__init__.py - Fix other imports - Import classes from transforms in src/vak/transforms/labeled_timebins/__init__.py - TST: Move paths outside fixtures in fixtures/annot.py to be able to import directly in test modules to parametrize there. - TST: Move path to constant outside fixture in fixtures/config.py - Add tests/test_transforms/__init__.py so we can do relative import from tests/fixtures - Add tests/test_transforms/test_labeled_timebins/test_functional.py - Add tests/test_transforms/test_labeled_timebins/test_transforms.py - Use `vak.transforms.labeled_timebins.from_segments` in vocal_dataset.py - Use vak.transforms.labeled_timebins in engine/model.py - Use transforms.labeled_timebins.from_segments in datasets/window_dataset.py - Use transforms.labeled_timebins.to_segments in core/predict.py - Use labeled_timebins transforms 'postprocess' and 'to_segments' in core/predict.py
- Factor all functions out of labeled_timebins except has_unlabeled - Only test has_unlabeled in test_labeled_timebins, parametrize the unit test - Add 'multi_char_labels_to_single_char' to vak.labels - and add type annotations and clean up docstrings - Clean up / add tests to tests/test_labels.py - Add src/vak/transforms/labeled_timebins/functional.py - Add src/vak/transforms/labeled_timebins/transforms.py - Fix imports in vak/transforms/ __init__.py files - Import labeled_timebins transforms in transforms/__init__.py - Fix other imports - Import classes from transforms in src/vak/transforms/labeled_timebins/__init__.py - TST: Move paths outside fixtures in fixtures/annot.py to be able to import directly in test modules to parametrize there. - TST: Move path to constant outside fixture in fixtures/config.py - Add tests/test_transforms/__init__.py so we can do relative import from tests/fixtures - Add tests/test_transforms/test_labeled_timebins/test_functional.py - Add tests/test_transforms/test_labeled_timebins/test_transforms.py - Use `vak.transforms.labeled_timebins.from_segments` in vocal_dataset.py - Use vak.transforms.labeled_timebins in engine/model.py - Use transforms.labeled_timebins.from_segments in datasets/window_dataset.py - Use transforms.labeled_timebins.to_segments in core/predict.py - Use labeled_timebins transforms 'postprocess' and 'to_segments' in core/predict.py
e.g. MajorityVote
🤔 not sure if this is valid TOML, but ... something like this
The text was updated successfully, but these errors were encountered: