https://flyte.org logo
#ask-the-community
Title
# ask-the-community
g

Greg Gydush

02/25/2023, 3:27 AM
I’m fetching a workflow from Flyte remote and find that the order of the inputs does not match the ordering of the original workflow. Is there any way to preserve this order, or somehow find the original order (from remote only)? Second question, I know the inputs/outputs have docstrings, but is it possible to fetch the workflow docstring? Will this only be possible with the new docs changes?
k

Kevin Su

02/25/2023, 9:31 AM
1. could you share your workflow code? 2. do you want to fetch it by flyte remote? if so, we can update flyte remote
g

Greg Gydush

02/25/2023, 5:54 PM
I'm afk but I believe all of our registered workflows have the input sorting issue (in both the console and when fetching from remote). I do want to fetch by remote! How would you know the original sort order from remote?
t

Tyler Su

03/20/2023, 9:23 PM
@Kevin Su revisit please!
k

Kevin Su

03/20/2023, 9:28 PM
@Greg Gydush could you say more about “the order of the inputs does not match the ordering of the original workflow”? the inputs and outputs should be a map or dict
g

Greg Gydush

03/20/2023, 9:30 PM
Pull up any workflow in the Flyte Console and you'll see that ordering of workflow inputs does not match order of the workflow function definition in code. Same with FlyteRemote calls
I was expecting them to match the order of the interface
Example:
Copy code
@workflow
def compute_average_workflow(
    seed: int = 1, count: int = 20, chunk_size: int = 5
) -> float:
    fake_data_output = generate_fake_data(count=count, seed=seed)
    chunked_blobs = chunk_from_file(file_path=fake_data_output, chunk_size=chunk_size)
    computed_averages, counts_list = compute_average_for_chunks(chunks=chunked_blobs)
    aggregated_average = aggregate(averages=computed_averages, counts=counts_list)

    return aggregated_average
The input order in the console is:
It's always alphabetical - from FlyteRemote, i'd like to somehow get that original order (seed, count, chunk_size, as is shown in the interface). Does that make sense?
k

Kevin Su

03/20/2023, 9:37 PM
i see. thanks for clarifying.
I think we don’t necessarily need to sort the inputs, looking at the code
unfortunately, protobuf will automatically sort the inputs. we can add a index field here to keep original order.
we will add it to our roadmap