I’m fetching a workflow from Flyte remote and find...
# ask-the-community
g
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
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
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
@Kevin Su revisit please!
k
@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
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
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
150 Views