-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SDK - Lightweight - Added support for file outputs (#2221)
Lightweight components now allow function to mark some outputs that it wants to produce by writing data to files, not returning it as in-memory data objects. This is useful when the data is expected to be big. Example 1 (writing big amount of data to output file with provided path): ```python @func_to_container_op def write_big_data(big_file_path: OutputPath(str)): with open(big_file_path) as big_file: for i in range(1000000): big_file.write('Hello world\n') ``` Example 2 (writing big amount of data to provided output file stream): ```python @func_to_container_op def write_big_data(big_file: OutputTextFile(str)): for i in range(1000000): big_file.write('Hello world\n') ```
- Loading branch information
1 parent
1914fa2
commit 3caba4e
Showing
2 changed files
with
130 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters