Repository navigation
Replies: 3 comments
|
I prefer keeping The same idea applies to native operators. Reading a folder or a set of files matching a pattern is definitely needed, and I don't think it should only work on clusters that have mounting enabled. If listing files can be done without mounting, I'd build the user-facing part on that first and treat mounting as a faster way to read the files when it's available. For which operators come first, I think extending our current scan operators is the best direction. Would we enforce or check the user-defined patterns, or allow them to specify whatever they want? On question 3, one thing I'd like to understand as a user: if someone loses access to a dataset, how long until they actually can't read it anymore? I understand the proxy checks access on every request, but with the disk cache, files that were already read could still be readable afterward. Mounts living until the pod is deleted seems to make that window longer than it needs to be. Is there a reason mounts can't end when the execution ends? |
|
@aicam These are three related but different topics. To make the communication efficient, I suggest we create a new discussion just to talk about the user experience for datasets that can be mounted. After we finish that discussion, we can talk about other related topics. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Background
Since #6866, #6896 and #6897, a Python UDF can take a dataset or model version as a parameter (
value=Resource.DATASETorvalue=Resource.MODEL) and read it as a local, read-only directory. When an execution starts, the engine asks access-control-service to mount each version the workflow names. A mounter DaemonSet on each node then runs GeeseFS against file-service's read-only S3 proxy, which checks the user's read access on every request. The mount reaches the computing unit through mount propagation. Files are fetched on demand, so a UDF can load a multi-GB model or walk a folder of many files without downloading anything first.I'd like the community's input on three questions about where this goes next.
1. Do we still need the Python library for reading dataset files?
A Python UDF can also read a file with
pytexera.DatasetFileDocument("/dataset/<owner>/<name>/<version>/<file>").read_file(). It gets a presigned URL from file-service and downloads the whole file into memory. It handles one file at a time and cannot list a folder. A mounted version covers the same need with plainopen()andos.listdir(), and works with any library that takes a path (pandas, torch, PIL, ...).However, mounting is Kubernetes-only and off by default, so single-node deployments and clusters that enforce the
baselineorrestrictedPod Security Standards can't use it. Should we keepDatasetFileDocumentas the fallback, deprecate it once mounting can be on everywhere, or do something else?2. What should mounting look like for native operators?
We have wanted operators that work on many files at once for a long time: a folder of images, a sharded CSV, a directory of documents. Today the native scan operators (CSV, JSONL, Arrow, File Scan, ...) each take a single file path and read it through a presigned URL. None of them accepts a folder or a pattern, and none uses mounting. File Scan can read many files only when another operator feeds it file names, or by unpacking a zip. The infrastructure for reading a whole folder now exists, but only Python UDFs use it.
Some possible directions:
*.csv, and either concatenate the matching files or emit one row per file.What would you want the experience to be, and which operators should come first?
3. Is the current design secure enough?
How it works today:
Things I'm unsure about:
Is this an acceptable trade-off? Would an alternative be better, for example a CSI driver, a FUSE sidecar in each computing unit, or no FUSE at all with a streaming client?
@parshimers @chenlica Let me know if the questions are complete or you want to add anything to them.
@bobbai00 your feedback is welcome here since you developed the library.
All reactions