-
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 inputs (#2207)
Lightweight components now allow function to mark some inputs that it wants to consume as files, not as in-memory data objects. This is useful when the data is expected to be big. Example 1: ```python def consume_big_file_path(big_file_path: InputPath(str)) -> int: line_count = 0 with open(big_file_path) as f: while f.readline(): line_count = line_count + 1 return line_count ``` Example 2: ```python def consume_big_file(big_file: InputTextFile(str)) -> int: line_count = 0 while big_file.readline(): line_count = line_count + 1 return line_count ```
- Loading branch information
1 parent
7dab300
commit 2510a69
Showing
2 changed files
with
128 additions
and
10 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