As an triage adoption spike today, I'm going to at...
# ask-the-community
a
As an triage adoption spike today, I'm going to attempt to recreate the "Hello World" task and workflow demo via a Scala client that I'll generate against the gRPC interfaces? I'm wondering how much of the Flyte IDL do I need in order to do that? Do I need more that core? e.g. core & service? Do I need
admin
?
@Blake Jackson I don't recall if we covered this in our chat on Friday... do you know which parts I would start with simply to reproduce the demo?
b
The demo link is the flyteidl link. Can you update that link?
a
oops... fixed
Specifically, I have two success criteria: 1. Write the task and workflow in Scala 2. Trigger the workflow from code, not using the
pyflye
CLI
and am using core, admin and service
a
By
started here
, that's what you used to know what parts to get, but you generated your own client, yes?
b
yes
you can see in flyte-java, they chose to write AutoValue classes that represent the core objects, but I chose to get them from the proto
a
I assume you chose that route because you get the full type vs just an ID?
b
I wanted the latest version of the proto to go with the latest version of the API
a
I'm assuming that's a pretty stable API
b
yes, it's the same API they use for flytekit
a
How does Flyte take care of the encoding of passing data to a task? and then decoding results?
b
What kind of data do you mean?
a
In the demo, it's a simple string that's passed in, but in general, it could be any complex data structure... e.g. could be a trained model and the task is to generate candidates
E.g. the demo hello world signatiure is
Copy code
@task
def say_hello(name: str) -> str:
    return f"Hello, {name}!"
but let's say something more complex like
Copy code
@task
def prediction(model: trained_model) -> prediction
b
There's a LiteralMap construct that you'd use to pass input params to create the execution
k
the data is sent through protobuf
a
so I have to create protobufs for each parameter?
k
Wdym, it is a literalmap, which is protobuf
Much of this is already done in flytekit-java