Open sonaalKant opened 3 months ago
I encountered an Assertion error in parsing the signature:
Traceback (most recent call last):
File "/usr/lib/python3.9/unittest/case.py", line 59, in testPartExecutor
yield
File "/usr/lib/python3.9/unittest/case.py", line 593, in run
self._callTestMethod(testMethod)
File "/usr/lib/python3.9/unittest/case.py", line 550, in _callTestMethod
method()
File "/app/im_v2/common/data/client/test/test_im_raw_data_client.py", line 1158, in test1
actual = imvcdcimrdc.get_bid_ask_realtime_raw_data_reader(
File "/app/im_v2/common/data/client/im_raw_data_client.py", line 391, in get_bid_ask_realtime_raw_data_reader
bid_ask_raw_data_reader = RawDataReader(bid_ask_db_signature, stage=stage)
File "/app/im_v2/common/data/client/im_raw_data_client.py", line 45, in __init__
self.args = dsdascut.parse_dataset_signature_to_args(
File "/app/data_schema/dataset_schema_utils.py", line 258, in parse_dataset_signature_to_args
hdbg.dassert_eq(validate_dataset_signature(signature, dataset_schema), True)
File "/app/helpers/hdbg.py", line 172, in dassert_eq
_dfatal(txt, msg, *args, only_warning=only_warning)
File "/app/helpers/hdbg.py", line 142, in _dfatal
dfatal(dfatal_txt)
File "/app/helpers/hdbg.py", line 71, in dfatal
raise assertion_type(ret)
AssertionError:
################################################################################
* Failed assertion *
'False'
==
'True'
################################################################################
@smitpatel49 did you try to debug why the assertion was raised?
I tried and I think that validate_dataset_signature()
does not produce the schema we need. I tried using 'CCXT' as input parameter but I don't think I have the aws credentials.
For the input parameters:
stage = 'preprod'
data_vendor = 'MOCK_VENDOR'
universe_version = 'v7_5'
exchange_id = 'binance'
I'm getting the following error:
____ ERROR collecting research_amp/soccer_prediction/paired_ttest.py ____
Traceback (most recent call last):
File "/venv/lib/python3.9/site-packages/_pytest/runner.py", line 341, in from_call
result: Optional[TResult] = func()
File "/venv/lib/python3.9/site-packages/_pytest/runner.py", line 372, in
The test accesses the AWS credentials that don't exist in the specified path. @sonaalKant any suggestions on how this can be handled?
@sonaalKant as I don't have the file '/home/.aws/credentials', am I supposed to use a library like moto
to mock AWS services for testing purposes?
Lets add unit test for this method https://github.com/kaizen-ai/kaizenflow/blob/423470c58122af11b12a1b9c3ea889abcad52342/im_v2/common/data/client/im_raw_data_client.py#L373
Test if
bid_ask_db_signature
is correctly built from the params.Input params: stage = 'preprod', data_vendor = 'MOCK_VENDOR', universe_version = 'v7_5`
FYI @samarth9008