Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SDK - Lightweight - Added support for file outputs #2221

Commits on Sep 24, 2019

  1. SDK - Lightweight - Added support for file outputs

    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')
    ```
    Ark-kun committed Sep 24, 2019
    Configuration menu
    Copy the full SHA
    7e1fd7e View commit details
    Browse the repository at this point in the history