Update dependencies and refactor MLFlow activities - Replaced direct GitHub dependencies in `requirements.txt` with specific versioned packages for `sientia_do` and `sientia_model`. - Refactored imports in `activities.py` to streamline the code structure. - Enhanced the `MLFlow` class in `mlflow.py` by introducing a method to resolve model aliases, improving flexibility in model lookups. - Simplified shutdown logic in `worker.py` for better readability. - Added new tests for MLFlow activities and improved existing test coverage for data handling and model retraining processes.
13 lines
362 B
Python
13 lines
362 B
Python
from pandas import DataFrame
|
|
|
|
from laborious.utils.dataframe_debug import build_dataframe_debug_message
|
|
|
|
|
|
def test_build_dataframe_debug_message_skips_large_dataframe():
|
|
df = DataFrame({'a': [1, 2, 3]})
|
|
|
|
msg = build_dataframe_debug_message('payload', df, max_rows=1)
|
|
|
|
assert 'skipped because dataframe has 3 rows' in msg
|
|
assert '(max: 1)' in msg
|