SIENTIAPDE-994
Implement new get_last_timestamp method in Gates class, refactor MLFlow activity methods to return only transformed data, and update PredictionsBatch and PredictionProcess workflows to utilize Activities module. Add detailed docstrings for new methods and enhance test coverage for get_last_timestamp functionality.
This commit is contained in:
@@ -585,3 +585,19 @@ async def test_format_default_prediction(
|
||||
|
||||
result = await gates.format_default_prediction(input_data)
|
||||
assert result == expected_output.to_dict()
|
||||
|
||||
|
||||
@mark.asyncio
|
||||
async def test_get_last_timestamp(
|
||||
gates
|
||||
):
|
||||
input_data = {
|
||||
'data': {
|
||||
'variable': ['variable1', 'variable2'],
|
||||
'value': [1, 2],
|
||||
'timestamp': ['2021-01-01', '2021-01-02']
|
||||
}
|
||||
}
|
||||
|
||||
result = await gates.get_last_timestamp(input_data)
|
||||
assert result == '2021-01-02'
|
||||
|
||||
Reference in New Issue
Block a user