mirror of
https://github.com/lancedb/lancedb.git
synced 2026-11-13 14:16:54 +00:00
fix(python): add the missing f prefix to the permutation split error (#4709)
This commit is contained in:
@@ -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):
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user