Skip to content

Commit c831c47

Browse files
authored
test: skip checking llm tuning score labels (#1340)
1 parent 3e1fa99 commit c831c47

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

tests/system/small/ml/test_llm.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,6 @@ def test_llm_palm_score_params(llm_fine_tune_df_default_index):
868868
"label",
869869
"evaluation_status",
870870
],
871-
index=6,
872871
)
873872

874873

@@ -928,7 +927,6 @@ def test_llm_gemini_pro_score_params(llm_fine_tune_df_default_index, model_name)
928927
"label",
929928
"evaluation_status",
930929
],
931-
index=6,
932930
)
933931

934932

tests/system/utils.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -298,23 +298,25 @@ def assert_pandas_df_equal_pca(actual, expected, **kwargs):
298298
def check_pandas_df_schema_and_index(
299299
pd_df: pd.DataFrame,
300300
columns: Iterable,
301-
index: Union[int, Iterable],
301+
index: Optional[Union[int, Iterable]] = None,
302302
col_exact: bool = True,
303303
):
304304
"""Check pandas df schema and index. But not the values.
305305
306306
Args:
307307
pd_df: the input pandas df
308308
columns: target columns to check with
309-
index: int or Iterable. If int, only check the length (index size) of the df. If Iterable, check index values match
309+
index: int or Iterable or None, default None. If int, only check the length (index size) of the df. If Iterable, check index values match. If None, skip checking index.
310310
col_exact: If True, check the columns param are exact match. Otherwise only check the df contains all of those columns
311311
"""
312312
if col_exact:
313313
assert list(pd_df.columns) == list(columns)
314314
else:
315315
assert set(columns) <= set(pd_df.columns)
316316

317-
if isinstance(index, int):
317+
if index is None:
318+
pass
319+
elif isinstance(index, int):
318320
assert len(pd_df) == index
319321
elif isinstance(index, Iterable):
320322
assert list(pd_df.index) == list(index)

0 commit comments

Comments
 (0)