fix: check for http(s) prefix instead of bare string type for URL detection
This commit is contained in:
parent
657cdaa151
commit
c171573a8f
1 changed files with 2 additions and 1 deletions
|
|
@ -350,7 +350,8 @@ def convert_to_vlm_format(
|
|||
return {"messages": messages}
|
||||
|
||||
total = len(dataset)
|
||||
has_urls = isinstance(next(iter(dataset))[image_column], str)
|
||||
first_image = next(iter(dataset))[image_column]
|
||||
has_urls = isinstance(first_image, str) and first_image.startswith(("http://", "https://"))
|
||||
|
||||
# ── URL probe: 200 samples with parallel workers to estimate speed + failure rate ──
|
||||
PROBE_SIZE = 200
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue