feat: update training workflow and repository management

- Replaced synchronous MinIO repository calls with asynchronous counterparts in the Training class for improved performance.
- Enhanced logging throughout the training process to provide better insights into model metadata loading, parameter validation, and training execution.
- Updated the train_test_split function to enforce DataFrame input type, ensuring consistency in data handling.
- Removed the deprecated model_repository.py file to streamline the codebase.
- Adjusted cleanup schedule logic to improve error handling and logging during schedule reconciliation.
- Updated tests to reflect changes in the training workflow and repository interactions.
This commit is contained in:
vitor-aignosi
2026-04-09 12:09:52 -03:00
parent 0ae03b246f
commit 526edcb50e
14 changed files with 114 additions and 503 deletions

View File

@@ -27,9 +27,11 @@ def test_train_test_split_dataframe_no_shuffle():
assert list(tr['a']) == [0, 1, 2, 3, 4]
def test_train_test_split_ndarray():
arr = np.arange(20).reshape(10, 2)
tr, te = dmr.train_test_split(arr, train_size=0.5, shuffle=False, random_state=None)
def test_train_test_split_dataframe_returns_dataframes():
df = pd.DataFrame(np.arange(20).reshape(10, 2), columns=['a', 'b'])
tr, te = dmr.train_test_split(df, train_size=0.5, shuffle=False, random_state=None)
assert isinstance(tr, pd.DataFrame)
assert isinstance(te, pd.DataFrame)
assert tr.shape[0] == 5 and te.shape[0] == 5