SIENTIAPDE-1273

Update sientia-mlops-library dependency to version 0.40.6 and refactor get_prediction_data method calls for improved readability in model_repository.py and test_model_repository.py.
This commit is contained in:
vitor-aignosi
2025-11-19 14:54:50 -03:00
parent 684bc9fb31
commit 3311409885
3 changed files with 13 additions and 4 deletions

View File

@@ -705,7 +705,11 @@ class MLFlowRepository(SientiaMonitoring):
""" """
def get_prediction_data( def get_prediction_data(
self, prediction_model: Any, retrain_dataset: pd.DataFrame, target_name: str, predict_flavor: str self,
prediction_model: Any,
retrain_dataset: pd.DataFrame,
target_name: str,
predict_flavor: str,
) -> pd.DataFrame: ) -> pd.DataFrame:
""" """
Get prediction data from prediction model. Get prediction data from prediction model.
@@ -861,7 +865,9 @@ class MLFlowRepository(SientiaMonitoring):
prediction_model.fit(retrain_dataset) prediction_model.fit(retrain_dataset)
# get prediction data # get prediction data
prediction_data = self.get_prediction_data(prediction_model, retrain_dataset, target_name, predict_flavor) prediction_data = self.get_prediction_data(
prediction_model, retrain_dataset, target_name, predict_flavor
)
self.info(f'Model experiment creation completed successfully for {model_name}', metadata) self.info(f'Model experiment creation completed successfully for {model_name}', metadata)

View File

@@ -4,7 +4,7 @@ sqlalchemy
asyncua asyncua
redis redis
git+ssh://git@github.com/Aignosi/sientia-dataops-library.git@1.6.1 git+ssh://git@github.com/Aignosi/sientia-dataops-library.git@1.6.1
git+ssh://git@github.com/Aignosi/sientia-mlops-library.git@0.40.5 git+ssh://git@github.com/Aignosi/sientia-mlops-library.git@0.40.6
prometheus-client prometheus-client
botocore botocore
boto3 boto3

View File

@@ -865,7 +865,10 @@ async def test_fit_models_not_df_target_name_none_and_not_in_model(
prediction_model.fit.assert_called_once_with(pd_merge.return_value) prediction_model.fit.assert_called_once_with(pd_merge.return_value)
mlflow_repository.get_prediction_data.assert_called_once_with( mlflow_repository.get_prediction_data.assert_called_once_with(
prediction_model, pd_merge.return_value, data_model.fit.return_value.target_variable, 'pyfunc' prediction_model,
pd_merge.return_value,
data_model.fit.return_value.target_variable,
'pyfunc',
) )
assert output == { assert output == {