Feat/new dataset class - #62
Merged
Merged
Conversation
…; deprecate legacy DatamintBaseDataset and DatamintDataset
…es; add AnnotationSpec model and enhance Dataset classes for improved annotation handling
…tationProcessor methods
… better dataset initialization and state management
…odelLoader and implement prediction routing with PredictionRouter - Moved model lifecycle management logic from DatamintModel to LinkedModelLoader for better separation of concerns. - Introduced PredictionRouter to handle prediction mode dispatching, replacing the previous hardcoded method. - Updated DatamintModel to utilize the new LinkedModelLoader and PredictionRouter for improved maintainability and clarity.
… redundant explanations
- Introduced BaseDatamintModel to encapsulate common functionality for MLflow models. - Added PredictionMode enumeration for better management of prediction modes. - Enhanced LinkedModelLoader to separate device management from model loading. - Updated DatamintModel to utilize the new base class and improved loading context. - Implemented a new prediction router for dynamic dispatching based on prediction modes. - Refactored MLFlowModelCheckpoint to support multiple flavors and improved signature inference. - Added MLFlowDatamintModelCheckpoint for specific integration with Datamint models. - Updated version to 2.12.0a0 in pyproject.toml.
…; enhance entity creation handling
…nd in-place updates; refactor wait method
…t with Datamint Trainer API
…nction; remove base dataset import test
- Added MLflow project context management in BaseTrainer. - Implemented experiment name generation based on user project. - Introduced per-sample metrics logging in DatamintLightningModule for classification and segmentation tasks. - Enhanced loss computation methods to support per-sample loss for better metric accuracy. - Updated model checkpointing to log additional metadata and support retrieval of logged models. - Improved dataset logging during training and testing phases. - Refactored callback structure to streamline MLflow integration and metrics logging. - Added validation for class names and number of classes in SegmentationModule. - Enhanced logging and error handling throughout the training and logging processes.
…and adding dataset association
…gging and logging messages
- Add persistent workers to DataModule for improved performance. - Introduce logging for training and testing phases in BaseTrainer. - Implement deferred sample metrics collection in DatamintLightningModule. - Update classification and segmentation modules to check for loss function reduction support. - Improve model logging in MLFlow with thread-safe handling and CPU copies.
…and enhance BaseSegmentationAnnotation constructor for better mask handling
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces several enhancements and refactorings across the
datamintpackage, focusing on improved API usability, modular dataset support, and better error handling. The most significant changes include new convenience methods for working with annotation specs, improved project creation logic, and enhancements to dataset modularity and serialization.API Improvements and Annotation Handling:
AnnotationSetsApiandProjectsApifor retrieving annotation specifications directly from annotation sets or projects, streamlining workflows that require annotation metadata. [1] [2]ProjectsApi.create()to support anexists_okparameter, allowing the method to return an existing project instead of raising an error if a project with the same name already exists. [1] [2] [3] [4] [5]Dataset Modularity and API Initialization:
datamint/__init__.pyto support modular dataset classes (ImageDataset,VolumeDataset) and clarified legacy vs. new exports for easier future maintenance and usage.Inference and Model Deployment Enhancements:
DeployModelApi.get_by_id()by validating UUIDs and providing more informative exceptions.InferenceApi.wait()to update the providedInferenceJobin-place and improved the notification mechanism for job status updates. Also, aliasedpredicttosubmitfor consistency. [1] [2] [3]Serialization and DTO Clean-up:
__getstate__and__setstate__methods toApifor improved serialization and deserialization support, which is useful for pickling or distributed settings.Format Detection:
These changes collectively improve the robustness, usability, and maintainability of the
datamintcodebase.