mirror of
https://github.com/NicolasBohn/NexQuant.git
synced 2026-07-28 16:07:46 +00:00
add the none check for data loader & feature output (#577)
This commit is contained in:
@@ -38,6 +38,10 @@ def get_column_list(data):
|
||||
return data.columns.tolist() if isinstance(data, pd.DataFrame) else None
|
||||
|
||||
|
||||
assert X is not None, "The feature engineering function returned None for X."
|
||||
assert y is not None, "The feature engineering function returned None for y."
|
||||
assert X_test is not None, "The feature engineering function returned None for X_test."
|
||||
|
||||
assert get_length(X_test) == get_length(
|
||||
test_ids
|
||||
), f"Mismatch in length of test images and test IDs: X_test ({get_length(X_test)}) and test_ids ({get_length(test_ids)})"
|
||||
|
||||
@@ -26,6 +26,10 @@ def get_width(data):
|
||||
def get_column_list(data):
|
||||
return data.columns.tolist() if isinstance(data, pd.DataFrame) else None
|
||||
|
||||
assert X is not None, "Training data (X) is None."
|
||||
assert y is not None, "Training labels (y) are None."
|
||||
assert X_test is not None, "Test data (X_test) is None."
|
||||
assert test_ids is not None, "Test IDs (test_ids) are None."
|
||||
|
||||
assert get_length(X_test) == get_length(
|
||||
test_ids
|
||||
|
||||
Reference in New Issue
Block a user