Skip to content

Feat/mlflow inference - #58

Merged
Lucashsmello merged 26 commits into
mainfrom
feat/mlflow-inference
Dec 1, 2025
Merged

Feat/mlflow inference#58
Lucashsmello merged 26 commits into
mainfrom
feat/mlflow-inference

Conversation

@Lucashsmello

Copy link
Copy Markdown
Collaborator

This pull request introduces several improvements and refactorings to the annotation entity structure, configuration handling, and resource management in the DataMint codebase. The main objective is to enable deployment and model inference on our MLFlow server.

Annotation entity refactor and improvements:

  • The Annotation class has been moved to datamint/entities/annotations/annotation.py and split into a minimal AnnotationBase class (for creation) and a full Annotation class (for general use). The new structure allows for easier extension and creation of specific annotation types, such as ImageClassification. Optional fields in Annotation now have default values, improving robustness when handling partial data. [1] [2] [3] [4]
  • All imports and references to the annotation entity have been updated to reflect the new module structure, improving consistency and clarity. [1] [2] [3] [4] [5]

Entity base class and missing field handling:

  • The BaseEntity class now automatically removes attributes set to the MISSING_FIELD sentinel during initialization and when converting to a dictionary, ensuring cleaner entity representations and preventing accidental use of placeholder values. The method for checking missing attributes has been improved, and a new has_missing_attrs() method has been added. [1] [2] [3]

Resource entity and file handling:

  • The Resource class has been updated to set more fields as optional with default values, and logic has been added to instantiate a LocalResource when appropriate. The fetch_file_data method now uses the static BaseApi methods for determining mimetype and converting file formats, improving maintainability and clarity. [1] [2] [3] [4]

Configuration system improvements:

  • Default configuration values (such as the API URL) are now provided if no config file is present, and the type annotations for config reading have been updated for clarity. Unused imports have been removed. [1] [2] [3]

API and documentation enhancements:

  • The AnnotationsApi.create method documentation has been expanded to clarify its intended (internal) use and to guide users toward the appropriate public methods for annotation creation.
  • Minor improvements to error handling and type hinting in API base modules, including more robust exception chaining and type annotations for dynamic imports. [1] [2] [3] [4] [5]

Additionally, these changes improve modularity, clarity, and robustness of the DataMint codebase, especially around annotation handling and entity management.

…tract.

- Implemented LocalResource and model deployment contract
…on for JSON bytes and allow initialization from raw data or local file paths in LocalResource
…upport multiple resources; add detailed docstring for set_project function in fluent.py
- Expanded introduction to outline key steps in the pipeline.
- Added detailed sections for dataset overview, structure, and annotation creation.
- Improved clarity in code comments and markdown explanations.
- Introduced a Datamint model adapter for deployment.
- Included model testing and serving instructions with example requests.
- Enhanced experiment tracking and logging details.
@Lucashsmello
Lucashsmello merged commit a99f2b5 into main Dec 1, 2025
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant