AsyncFileSystem
and SyncFileSystem
for synchronous and asynchronous file operations. The app shows how Ray Remote Execution can be used for distributed file processing across multiple nodes.
InputFiles
for multiple file uploadsray.remote
: Decorator for Remote Functionsray.serve
: For service deploymentkodosumi.core
: Core components for Kodosumi appspptx.Presentation
: For PowerPoint file processing (example only)@remote
: Makes the function a Ray Remote Functiontracer.fs_sync()
: Uses SyncFileSystem since Ray Remote Functions are always synchronousfs.download(file)
: Downloads file from Kodosumi File Systemfs.upload(str(md_file))
: Uploads processed fileawait tracer.fs()
: Uses AsyncFileSystem for asynchronous operationsawait afs.ls("in")
: Asynchronous file listingprocess_file.remote()
: Starts Remote Functionsasyncio.gather(*futures)
: Waits for all Remote Functionsawait afs.close()
: Properly closes AsyncFileSystemF.InputFiles
: Multiple file uploadF.Checkbox
: Option to ignore errorsF.Submit/F.Cancel
: Action buttonsasync def
)await fs.ls()
, await fs.upload()
, await fs.close()
run()
fs.ls()
, fs.upload()
, fs.close()
process_file()
Remote Functionkodosumi-examples
repository.
data/config/upload_example.yaml
and a Ray serve deployment file data/config/config.yaml
: