mattdeitke
commited on
Commit
•
eb02d6d
1
Parent(s):
3dc86cc
docstrings
Browse files- objaverse_xl/objaverse_v1.py +40 -2
objaverse_xl/objaverse_v1.py
CHANGED
@@ -333,11 +333,49 @@ class Sketchfab(ObjaverseSource):
|
|
333 |
objects (pd.DataFrame): Objects to download. Must have columns for
|
334 |
the object "fileIdentifier" and "sha256". Use the `load_annotations`
|
335 |
function to get the metadata.
|
336 |
-
processes (int, optional): The number of processes to use to download
|
337 |
-
the objects. Defaults to 1.
|
338 |
download_dir (Optional[str], optional): The base directory to download the
|
339 |
object to. Supports all file systems supported by fsspec. If None, the
|
340 |
objects will be removed after downloading. Defaults to "~/.objaverse".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
341 |
|
342 |
Returns:
|
343 |
A dictionary mapping the object fileIdentifier to the local path of where
|
|
|
333 |
objects (pd.DataFrame): Objects to download. Must have columns for
|
334 |
the object "fileIdentifier" and "sha256". Use the `load_annotations`
|
335 |
function to get the metadata.
|
|
|
|
|
336 |
download_dir (Optional[str], optional): The base directory to download the
|
337 |
object to. Supports all file systems supported by fsspec. If None, the
|
338 |
objects will be removed after downloading. Defaults to "~/.objaverse".
|
339 |
+
processes (int, optional): The number of processes to use to download
|
340 |
+
the objects. Defaults to 1.
|
341 |
+
handle_found_object (Optional[Callable], optional): Called when an object is
|
342 |
+
successfully found and downloaded. Here, the object has the same sha256
|
343 |
+
as the one that was downloaded with Objaverse-XL. If None, the object
|
344 |
+
will be downloaded, but nothing will be done with it. Args for the
|
345 |
+
function include:
|
346 |
+
- local_path (str): Local path to the downloaded 3D object.
|
347 |
+
- file_identifier (str): File identifier of the 3D object.
|
348 |
+
- sha256 (str): SHA256 of the contents of the 3D object.
|
349 |
+
- metadata (Dict[Hashable, Any]): Metadata about the 3D object,
|
350 |
+
including the GitHub organization and repo names.
|
351 |
+
Return is not used. Defaults to None.
|
352 |
+
handle_modified_object (Optional[Callable], optional): Called when a
|
353 |
+
modified object is found and downloaded. Here, the object is
|
354 |
+
successfully downloaded, but it has a different sha256 than the one that
|
355 |
+
was downloaded with Objaverse-XL. This is not expected to happen very
|
356 |
+
often, because the same commit hash is used for each repo. If None, the
|
357 |
+
object will be downloaded, but nothing will be done with it. Args for
|
358 |
+
the function include:
|
359 |
+
- local_path (str): Local path to the downloaded 3D object.
|
360 |
+
- file_identifier (str): File identifier of the 3D object.
|
361 |
+
- new_sha256 (str): SHA256 of the contents of the newly downloaded 3D
|
362 |
+
object.
|
363 |
+
- old_sha256 (str): Expected SHA256 of the contents of the 3D object as
|
364 |
+
it was when it was downloaded with Objaverse-XL.
|
365 |
+
- metadata (Dict[Hashable, Any]): Metadata about the 3D object, which is
|
366 |
+
particular to the souce.
|
367 |
+
Return is not used. Defaults to None.
|
368 |
+
handle_missing_object (Optional[Callable], optional): Called when an object
|
369 |
+
that is in Objaverse-XL is not found. Here, it is likely that the
|
370 |
+
repository was deleted or renamed. If None, nothing will be done with
|
371 |
+
the missing object.
|
372 |
+
Args for the function include:
|
373 |
+
- file_identifier (str): File identifier of the 3D object.
|
374 |
+
- sha256 (str): SHA256 of the contents of the original 3D object.
|
375 |
+
- metadata (Dict[Hashable, Any]): Metadata about the 3D object, which is
|
376 |
+
particular to the source.
|
377 |
+
Return is not used. Defaults to None.
|
378 |
+
|
379 |
|
380 |
Returns:
|
381 |
A dictionary mapping the object fileIdentifier to the local path of where
|