Skip to content

Commit bd15066

Browse files
authored
Merge 'parent' and 'name' columns into 'path' (#101)
* Merge `File.parent` and `File.name` into `File.path` * Add back `File.name` and `File.parent` as properties * Update file cache key * Merge `parent` and `name` columns in internal tables * Merge `parent` and `name` attributes into `path` for internal classes `UniqueId`, `Entry` and `Node` * Update all examples
1 parent ff4f3b1 commit bd15066

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+2843
-2923
lines changed

examples/computer_vision/blip2_image_desc_lib.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def process(self, file):
8686
if __name__ == "__main__":
8787
(
8888
DataChain.from_storage(source, type="image")
89-
.filter(C("file.name").glob("cat*.jpg"))
89+
.filter(C("file.path").glob("*/cat*.jpg"))
9090
.map(
9191
desc=BLIP2Describe(
9292
# device=device,
@@ -95,8 +95,6 @@ def process(self, file):
9595
params=["file"],
9696
output={"description": str, "error": str},
9797
)
98-
.select(
99-
"file.source", "file.parent", "file.name", "desc.description", "desc.error"
100-
)
98+
.select("file.source", "file.path", "desc.description", "desc.error")
10199
.show(5)
102100
)

0 commit comments

Comments
 (0)