fix(python): add the missing f prefix to the permutation split error (#4709)

This commit is contained in:
alexcastgonz
2026-10-29 13:03:32 -07:00
committed by GitHub
parent 301ccad3aa
commit 03c7d1f199
2 changed files with 8 additions and 1 deletions
+1 -1
View File
@@ -641,7 +641,7 @@ class Permutation:
if split is not None:
if permutation_table is None:
raise ValueError(
"Cannot create a permutation on split `{split}`"
f"Cannot create a permutation on split `{split}`"
" because no permutation table is provided"
)
if isinstance(split, str):
+7
View File
@@ -1404,3 +1404,10 @@ def test_permutation_over_remote_table():
]
assert_server_safe_row_id_requests(server)
def test_from_tables_split_without_permutation_table(mem_db):
tbl = mem_db.create_table("test_table", pa.table({"id": range(10)}))
with pytest.raises(ValueError, match="permutation on split `train` because no"):
Permutation.from_tables(tbl, split="train")