Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 92 additions & 31 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pytest = ">=7,<10"
pytest-asyncio = "^0.21"
pytest-cov = "^4.0"
fakeredis = "^2.0"
black = "23.12.1"
black = "26.3.1"
mypy = "^1.0"
types-redis = "^4.6.0"

Expand Down
6 changes: 3 additions & 3 deletions src/deepiri_modelkit/contracts/contract.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class ModelContract(BaseModel):
input_schema: Dict[str, Any]
output_schema: Dict[str, Any]
validation_tests: Optional[list] = None
model_path: Optional[
str
] = None # Path/reference to where the model can be loaded from
model_path: Optional[str] = (
None # Path/reference to where the model can be loaded from
)
model_id: Optional[str] = None # Unique identifier for the model instance
6 changes: 3 additions & 3 deletions src/deepiri_modelkit/data/monitoring.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,9 @@ def _load_metrics(self):
)

self.current_metrics["total_versions_created"] = version_count
self.current_metrics[
"validation_errors_today"
] = validation_count
self.current_metrics["validation_errors_today"] = (
validation_count
)
except Exception as e:
logger.warning("Failed to load metrics from log", error=str(e))

Expand Down
12 changes: 6 additions & 6 deletions src/deepiri_modelkit/ml/confidence.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,9 @@ def calculate_confidence(
if training_coverage is not None:
sources[ConfidenceSource.TRAINING_DATA_COVERAGE.value] = training_coverage
else:
sources[
ConfidenceSource.TRAINING_DATA_COVERAGE.value
] = 0.7 # Default moderate
sources[ConfidenceSource.TRAINING_DATA_COVERAGE.value] = (
0.7 # Default moderate
)

# Feature quality
if feature_quality is not None:
Expand All @@ -161,9 +161,9 @@ def calculate_confidence(
hist_acc = historical_accuracy.get(predicted_class, 0.7)
sources[ConfidenceSource.HISTORICAL_ACCURACY.value] = hist_acc
else:
sources[
ConfidenceSource.HISTORICAL_ACCURACY.value
] = 0.7 # Default moderate
sources[ConfidenceSource.HISTORICAL_ACCURACY.value] = (
0.7 # Default moderate
)

# Ensemble agreement (if top_k_probs provided)
if top_k_probs:
Expand Down
Loading