input
stringlengths
1
18.7k
output
stringlengths
1
18.7k
thanks!
no problem
jburns good job with the article. if you want i can tweet it
Absolutely. Tyty!
Absolutely. Tyty!
Done
Are Flyte workflows appropriate for long-running tasks? Example: if you have security camera video streams and want to sample X frames a second, do object detection, then log results. • Should each frame be an execution in this case? You have something outside of Flyte sampling frames and creating an execution for each? • Or should it be a long-running execution per camera with the input being the video stream? (first task would decode/sample frames)
Hey Zach :wave: While Flyte supports fairly long running tasks, (we have some Flyte tasks run for multiple days), the system does assume the amount of work is finite (it expects the task to finish at some point). While there isn't anything stopping you from creating one execution per-frame, I would lean toward submitting frames in batches, since there is some overhead involved with each execution. You might have a cron that runs on your machine once per minute, and submits a batch of frames to Flyte. Your Flyte workflow can output a list of objects found in each frame.
Hey Zach :wave: While Flyte supports fairly long running tasks, (we have some Flyte tasks run for multiple days), the system does assume the amount of work is finite (it expects the task to finish at some point). While there isn't anything stopping you from creating one execution per-frame, I would lean toward submitting frames in batches, since there is some overhead involved with each execution. You might have a cron that runs on your machine once per minute, and submits a batch of frames to Flyte. Your Flyte workflow can output a list of objects found in each frame.
Hi Zach Hobbs welcome to Flyte. Johnny has explained a solution. Let me provide some background. So the workflows execute tasks. Tasks are execute for some finite time. The duration can be very small or very large, but there are caveats and overheads. For example very short duration like milliseconds is not recommended as to launch a container it takes longer (even if cached). But this is very interesting to us an we would love to come up with a solution
Hi Zach Hobbs welcome to Flyte. Johnny has explained a solution. Let me provide some background. So the workflows execute tasks. Tasks are execute for some finite time. The duration can be very small or very large, but there are caveats and overheads. For example very short duration like milliseconds is not recommended as to launch a container it takes longer (even if cached). But this is very interesting to us an we would love to come up with a solution
Thanks for the info Ketan and Johnny! As I think about it more, since a given task can only emit output once during an execution it makes sense that I can't treat it as a pipeline to continuously stream data into. I'll keep digging into the architecture to see if it would make sense to extend Flyte to support this. Looking for a solution to do async inference on content streams (video stream, new photos/video/audio in S3, etc). BTW, do you guys use Flyte for inference much?
Thanks for the info Ketan and Johnny! As I think about it more, since a given task can only emit output once during an execution it makes sense that I can't treat it as a pipeline to continuously stream data into. I'll keep digging into the architecture to see if it would make sense to extend Flyte to support this. Looking for a solution to do async inference on content streams (video stream, new photos/video/audio in S3, etc). BTW, do you guys use Flyte for inference much?
Hey Zach Hobbs, this is definitely an interesting use-case. If it's desired to process each frame as they come, it seems more appropriate to consider a streaming solution (Flink maybe?) <https://github.com/lyft/flinkk8soperator> We are looking for ways to integrate Flyte with Flink, as you learn more about the architecture, please keep that in mind. And as always, contributions are most welcomed!
Hello, could someone direct me to the right channel to discuss setting up Flyte locally with Minikube on MacOS? Thanks!
i think <#CP2HDHKE1|onboarding> could be a good place to chat. Johnny Burns and Yee are pretty experienced with this and might be able to help
i think <#CP2HDHKE1|onboarding> could be a good place to chat. Johnny Burns and Yee are pretty experienced with this and might be able to help
<#CP2HDHKE1|onboarding>
<#CP2HDHKE1|onboarding>
jinx
jinx
oh you beat me to it :slightly_smiling_face:
oh you beat me to it :slightly_smiling_face:
thanks :+1:
Hello
Hello Sergio! thank you for joining
Hello Sergio! thank you for joining
Hi Sergio
Hello everyone, I just started playing with Flyte and I'm very excited, it looks like a very promising project
glad to hear it! welcome and please don’t hesitate to ask any questions!!
glad to hear it! welcome and please don’t hesitate to ask any questions!!
Thank you Matt, as a matter of fact I do have a few…what would be the best channel to discuss them?
Thank you Matt, as a matter of fact I do have a few…what would be the best channel to discuss them?
I think you can ask here and if it’s better to be in another channel, we can help re-route it for you Though i’m about to head off to bed so someone will have to pick it up tomorrow morning.
ok I got a couple of questions: 1) I followed the examples in the flytesnacks repository and created a simple workflow with a few tasks, now I am trying to schedule it to run every 5 minutes by using this code that I found in the docs (<https://lyft.github.io/flyte/user/features/lanuchplans.html>) which I added after the workflow definition ```my_fixed_rate_launch_plan = myworkflow.create_launch_plan( default_inputs={'string_in': Input(Types.String, default="aaaa")}, schedule=schedules.FixedRate(datetime.timedelta(minutes=5)), )``` when I rebuild the container and re-register the workflow i see that the launchplan gets registered ```Flyte Admin URL 127.0.0.1:30081 Running task, workflow, and launch plan registration for flytedemo, development, ['fk_tasks'] with version 62ffc8b36883d18f4cf424f8d09510a5dd3db46d Registering Task: fk_tasks.workflows.download_dataset Registering Task: fk_tasks.workflows.read_pickle Registering Workflow: fk_tasks.workflows.myworkflow Registering Launch Plan: fk_tasks.workflows.my_fixed_rate_launch_plan Registering Launch Plan: fk_tasks.workflows.myworkflow Registering Task: fk_tasks.workflows.reverse_task Registering Task: fk_tasks.workflows.uppercase_task``` unfortunately in the gui I get a “This workflow has no schedules.” What am I missing?
Hi Giordano sorry for the late reply. So in the local sandbox cluster mode we do not have a scheduler today. When you deploy to a cloud environment we use either AWS cloud watch schedules or on GCP cloud scheduler. This is an area of active interest and we prefer to write a simple one using k8s operator or better option work with our partner Spotify to use Styx scheduler to run the cron schedules So to understand, we just don’t have the cron runner, the runner just triggers Flyte control plane and we do the rest. - let me know if you would love to contribute or have any other questions Let me know if you need help with anything else
Hi Giordano sorry for the late reply. So in the local sandbox cluster mode we do not have a scheduler today. When you deploy to a cloud environment we use either AWS cloud watch schedules or on GCP cloud scheduler. This is an area of active interest and we prefer to write a simple one using k8s operator or better option work with our partner Spotify to use Styx scheduler to run the cron schedules So to understand, we just don’t have the cron runner, the runner just triggers Flyte control plane and we do the rest. - let me know if you would love to contribute or have any other questions Let me know if you need help with anything else
Hi Ketan Umare thanks for the info, i was looking at flyte to replace airflow running on a barematal k8s cluster so I guess I’ll have to manage without the scheduling part
Hi Ketan Umare thanks for the info, i was looking at flyte to replace airflow running on a barematal k8s cluster so I guess I’ll have to manage without the scheduling part
Giordano we would love to work with you on a replacement for the cloud scheduler Try out the other features and e See is you like everything else The reason for not packaging a scheduler is reinvention of wheel And building a scheduler for our scale will take sometime 100ks execution per day
2) are there any examples on how to connect to flyteadmin and launch/manage and query workflow results via the flytesdk?
There is documentation for this, will share a link. It’s as simple as importing the workflow and there are bunch of API’s on them Also you can use Flyte-cli
There is documentation for this, will share a link. It’s as simple as importing the workflow and there are bunch of API’s on them Also you can use Flyte-cli
great thanks looking forward to the link.
great thanks looking forward to the link.
<https://lyft.github.io/flyte/user/features/flytecli.html|https://lyft.github.io/flyte/user/features/flytecli.html> Flyte cli <https://lyft.github.io/flyte/flytekit/flytekit.common.html#module-flytekit.common.workflow_execution|https://lyft.github.io/flyte/flytekit/flytekit.common.html#module-flytekit.common.workflow_execution> We don’t have better docs on the interactive part yet
ok one more question, I was trying to create a workflow that would call some tasks aready defined in another workflow using an example that I found on the kubecon 19 presentation ```from flytekit.models.launch_plan import LaunchPlanState from flytekit.common import utils, schedules, tasks from flytekit.sdk.tasks import python_task, outputs, inputs from flytekit.sdk.types import Types from flytekit.sdk.workflow import workflow_class, Output, Input from flytekit.common.tasks.task import SdkTask @workflow_class class myworkflow(object): string_in = Input(Types.String, required=True, help="input string") dataset = Input(Types.CSV, default=Types.CSV.create_at_known_location( "<http://172.16.140.171:8000/label_summary.csv>"), help="A CSV File") return_dataset = SdkTask.fetch("flytedemo","development","fk_tasks.tasks.download_dataset","470cae526836f7a05d41ef81faa07a3b275b9de9")(dataset=dataset) return_pickle = SdkTask.fetch("flytedemo","development","fk_tasks.tasks.read_pickle","470cae526836f7a05d41ef81faa07a3b275b9de9")(dataset=return_dataset.outputs.out) myoutput = Output(return_pickle.outputs.csv_head, sdk_type=Types.String)``` unfortunately when I register I get an error ```flytekit.common.exceptions.user.FlyteAssertion: An entity was not found in modules accessible from the workflow packages configuration. Please ensure that entities in 'fk_workflow.workflow' are moved to a configured packaged, or adjust the configuration.``` Does my code look ok? am I missing something? What I am trying to achieve is to de-couple the tasks from the workflow so that I can dynamically create a workflow from pre-existing tasks. my use case would be some kind of application where a user can choose different pre-built tasks, build a workflow definition through some kind of gui and then run a script that would dynamically create the workflow with those tasks. I understand that the tasks need to be created inside a container, but from what I understand a workflow does not need to be related to a specific container build, is my assumption correct?
is your code pushed anywhere we can take a look?
is your code pushed anywhere we can take a look?
No but i can create a quick repo
No but i can create a quick repo
sure, if you don’t mind. always helpful
sure, if you don’t mind. always helpful
hmm yeh, i’m not seeing where `fk_workflow.workflow` is referenced (the code you copied originally looks great!)
hmm yeh, i’m not seeing where `fk_workflow.workflow` is referenced (the code you copied originally looks great!)
hi Matt thanks, i just pushed to the repo my example <https://github.com/giordyb/flyte_demo> the workflow inside the fk_tasks folder works just fine (it’s 4 tasks and 1 workflow) in the workflow inside the fk_workflow folder I’m trying fetch the tasks created with the previous workflow but doesn’t work
hi Matt thanks, i just pushed to the repo my example <https://github.com/giordyb/flyte_demo> the workflow inside the fk_tasks folder works just fine (it’s 4 tasks and 1 workflow) in the workflow inside the fk_workflow folder I’m trying fetch the tasks created with the previous workflow but doesn’t work
what happens if you run `flyte-cli -h &lt;your-url&gt; list-task-names -p flytedemo -d development`
what happens if you run `flyte-cli -h &lt;your-url&gt; list-task-names -p flytedemo -d development`
Welcome to Flyte CLI! Version: 0.4.4 Task Names Found in flytedemo:development fk_tasks.tasks_and_workflow.download_dataset fk_tasks.tasks_and_workflow.read_pickle fk_tasks.tasks_and_workflow.reverse_task fk_tasks.tasks_and_workflow.uppercase_task btw I also tried fetch_latest without the version number but i get a ```AttributeError: type object 'SdkTask' has no attribute 'fetch_latest'```
Welcome to Flyte CLI! Version: 0.4.4 Task Names Found in flytedemo:development fk_tasks.tasks_and_workflow.download_dataset fk_tasks.tasks_and_workflow.read_pickle fk_tasks.tasks_and_workflow.reverse_task fk_tasks.tasks_and_workflow.uppercase_task btw I also tried fetch_latest without the version number but i get a ```AttributeError: type object 'SdkTask' has no attribute 'fetch_latest'```
cool and also: `flyte-cli -h &lt;your-url&gt; list-task-versions -p flytedemo -d development -n fk_tasks.tasks_and_workflow.download_dataset`
cool and also: `flyte-cli -h &lt;your-url&gt; list-task-versions -p flytedemo -d development -n fk_tasks.tasks_and_workflow.download_dataset`
Welcome to Flyte CLI! Version: 0.4.4 Task Versions Found for flytedemo:development:fk_tasks.tasks_and_workflow.download_dataset Version Urn 1e0d95cc82b85cdd96feab3c6f9b6e2f7baba216 tsk:flytedemo:development:fk_tasks.tasks_and_workflow.download_dataset:1e0d95cc82b85cdd96feab3c6f9b6e2f7baba216
Welcome to Flyte CLI! Version: 0.4.4 Task Versions Found for flytedemo:development:fk_tasks.tasks_and_workflow.download_dataset Version Urn 1e0d95cc82b85cdd96feab3c6f9b6e2f7baba216 tsk:flytedemo:development:fk_tasks.tasks_and_workflow.download_dataset:1e0d95cc82b85cdd96feab3c6f9b6e2f7baba216
ok cool, the SHA `470cae526836f7a05d41ef81faa07a3b275b9de9` doesn’t look like it was ever registered if you swapped that with `1e0d95cc82b85cdd96feab3c6f9b6e2f7baba216`, it should work
ok cool, the SHA `470cae526836f7a05d41ef81faa07a3b275b9de9` doesn’t look like it was ever registered if you swapped that with `1e0d95cc82b85cdd96feab3c6f9b6e2f7baba216`, it should work
sorry i had rebuilt the deployment in the meantime just tried with that version and it still throws ```flytekit.common.exceptions.user.FlyteAssertion: An entity was not found in modules accessible from the workflow packages configuration. Please ensure that entities in 'fk_workflow.workflow' are moved to a configured packaged, or adjust the configuration.```
sorry i had rebuilt the deployment in the meantime just tried with that version and it still throws ```flytekit.common.exceptions.user.FlyteAssertion: An entity was not found in modules accessible from the workflow packages configuration. Please ensure that entities in 'fk_workflow.workflow' are moved to a configured packaged, or adjust the configuration.```
```read_task = SdkTask.fetch("flytedemo","development","fk_tasks.tasks.read_pickle","1e0d95cc82b85cdd96feab3c6f9b6e2f7baba216") download_task = SdkTask.fetch("flytedemo","development","fk_tasks.tasks.download_dataset","1e0d95cc82b85cdd96feab3c6f9b6e2f7baba216") @workflow_class class myworkflow(object): string_in = Input(Types.String, required=True, help="input string") dataset = Input(Types.CSV, default=Types.CSV.create_at_known_location( "<http://172.16.140.171:8000/label_summary.csv>"), help="A CSV File") return_dataset = download_task(dataset=dataset) return_pickle = read_task(dataset=return_dataset.outputs.out) myoutput = Output(return_pickle.outputs.csv_head, sdk_type=Types.String)``` hmm that might be a bug in the registration tool. …sorry still typing can you try above? i think there is a bug which incorrectly triggers a sanity-check mechanism anyway, this is actually easier in a ‘pure client’ case. The case where you have a service that is dynamically generating workflows, you can use the client to find task versions, weave them into a workflow, and then simply call register in a pure script like: ```t = SdkTask.fetch(...) wf = workflow(nodes={'n1': t()}, inputs=...) lp = wf.create_launch_plan() wf.register(..) lp.register(..)```
```read_task = SdkTask.fetch("flytedemo","development","fk_tasks.tasks.read_pickle","1e0d95cc82b85cdd96feab3c6f9b6e2f7baba216") download_task = SdkTask.fetch("flytedemo","development","fk_tasks.tasks.download_dataset","1e0d95cc82b85cdd96feab3c6f9b6e2f7baba216") @workflow_class class myworkflow(object): string_in = Input(Types.String, required=True, help="input string") dataset = Input(Types.CSV, default=Types.CSV.create_at_known_location( "<http://172.16.140.171:8000/label_summary.csv>"), help="A CSV File") return_dataset = download_task(dataset=dataset) return_pickle = read_task(dataset=return_dataset.outputs.out) myoutput = Output(return_pickle.outputs.csv_head, sdk_type=Types.String)``` hmm that might be a bug in the registration tool. …sorry still typing can you try above? i think there is a bug which incorrectly triggers a sanity-check mechanism anyway, this is actually easier in a ‘pure client’ case. The case where you have a service that is dynamically generating workflows, you can use the client to find task versions, weave them into a workflow, and then simply call register in a pure script like: ```t = SdkTask.fetch(...) wf = workflow(nodes={'n1': t()}, inputs=...) lp = wf.create_launch_plan() wf.register(..) lp.register(..)```
```Running task, workflow, and launch plan registration for flytedemo, development, ['fk_workflow'] with version 1e0d95cc82b85cdd96feab3c6f9b6e2f7baba216 Traceback (most recent call last): File "/app/venv/bin/pyflyte", line 11, in &lt;module&gt; sys.exit(main()) File "/app/venv/lib/python3.6/site-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/app/venv/lib/python3.6/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/app/venv/lib/python3.6/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/app/venv/lib/python3.6/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/app/venv/lib/python3.6/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/app/venv/lib/python3.6/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/app/venv/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/app/venv/lib/python3.6/site-packages/flytekit/clis/sdk_in_container/register.py", line 97, in workflows register_all(project, domain, pkgs, test, version) File "/app/venv/lib/python3.6/site-packages/flytekit/clis/sdk_in_container/register.py", line 21, in register_all for m, k, o in iterate_registerable_entities_in_order(pkgs): File "/app/venv/lib/python3.6/site-packages/flytekit/tools/module_loader.py", line 112, in iterate_registerable_entities_in_order for m in iterate_modules(pkgs): File "/app/venv/lib/python3.6/site-packages/flytekit/tools/module_loader.py", line 16, in iterate_modules yield importlib.import_module(name) File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "&lt;frozen importlib._bootstrap&gt;", line 994, in _gcd_import File "&lt;frozen importlib._bootstrap&gt;", line 971, in _find_and_load File "&lt;frozen importlib._bootstrap&gt;", line 955, in _find_and_load_unlocked File "&lt;frozen importlib._bootstrap&gt;", line 665, in _load_unlocked File "&lt;frozen importlib._bootstrap_external&gt;", line 678, in exec_module File "&lt;frozen importlib._bootstrap&gt;", line 219, in _call_with_frames_removed File "/app/fk_workflow/workflow.py", line 9, in &lt;module&gt; read_task = SdkTask.fetch("flytedemo","development","fk_tasks.tasks.read_pickle","1e0d95cc82b85cdd96feab3c6f9b6e2f7baba216") File "/app/venv/lib/python3.6/site-packages/flytekit/common/exceptions/scopes.py", line 161, in system_entry_point return wrapped(*args, **kwargs) File "/app/venv/lib/python3.6/site-packages/flytekit/common/tasks/task.py", line 159, in fetch admin_task = _engine_loader.get_engine().fetch_task(task_id=task_id) File "/app/venv/lib/python3.6/site-packages/flytekit/engines/flyte/engine.py", line 108, in fetch_task ).client.get_task(task_id) File "/app/venv/lib/python3.6/site-packages/flytekit/clients/friendly.py", line 162, in get_task id=id.to_flyte_idl() File "/app/venv/lib/python3.6/site-packages/flytekit/clients/raw.py", line 12, in handler return fn(*args, **kwargs) File "/app/venv/lib/python3.6/site-packages/flytekit/clients/raw.py", line 136, in get_task return self._stub.GetTask(get_object_request) File "/app/venv/lib/python3.6/site-packages/grpc/_channel.py", line 824, in __call__ return _end_unary_response_blocking(state, call, False, None) File "/app/venv/lib/python3.6/site-packages/grpc/_channel.py", line 726, in _end_unary_response_blocking raise _InactiveRpcError(state) grpc._channel._InactiveRpcError: &lt;_InactiveRpcError of RPC that terminated with: status = StatusCode.NOT_FOUND details = "entry not found" debug_error_string = "{"created":"@1579804960.139722800","description":"Error received from peer ipv4:127.0.0.1:30081","file":"src/core/lib/surface/call.cc","file_line":1056,"grpc_message":"entry not found","grpc_status":5}" &gt; make: *** [register_workflow] Error 1``` nope still throws an error the pure client solution would be even better i think there is something that I haven’t quite understood yet, maybe you could shed some light I understand that in order to register a task i need to do it from a container (or at least set an env variable that points to the container that will run it) do I still need to reference a container when creating a workflow?
```Running task, workflow, and launch plan registration for flytedemo, development, ['fk_workflow'] with version 1e0d95cc82b85cdd96feab3c6f9b6e2f7baba216 Traceback (most recent call last): File "/app/venv/bin/pyflyte", line 11, in &lt;module&gt; sys.exit(main()) File "/app/venv/lib/python3.6/site-packages/click/core.py", line 764, in __call__ return self.main(*args, **kwargs) File "/app/venv/lib/python3.6/site-packages/click/core.py", line 717, in main rv = self.invoke(ctx) File "/app/venv/lib/python3.6/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/app/venv/lib/python3.6/site-packages/click/core.py", line 1137, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/app/venv/lib/python3.6/site-packages/click/core.py", line 956, in invoke return ctx.invoke(self.callback, **ctx.params) File "/app/venv/lib/python3.6/site-packages/click/core.py", line 555, in invoke return callback(*args, **kwargs) File "/app/venv/lib/python3.6/site-packages/click/decorators.py", line 17, in new_func return f(get_current_context(), *args, **kwargs) File "/app/venv/lib/python3.6/site-packages/flytekit/clis/sdk_in_container/register.py", line 97, in workflows register_all(project, domain, pkgs, test, version) File "/app/venv/lib/python3.6/site-packages/flytekit/clis/sdk_in_container/register.py", line 21, in register_all for m, k, o in iterate_registerable_entities_in_order(pkgs): File "/app/venv/lib/python3.6/site-packages/flytekit/tools/module_loader.py", line 112, in iterate_registerable_entities_in_order for m in iterate_modules(pkgs): File "/app/venv/lib/python3.6/site-packages/flytekit/tools/module_loader.py", line 16, in iterate_modules yield importlib.import_module(name) File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "&lt;frozen importlib._bootstrap&gt;", line 994, in _gcd_import File "&lt;frozen importlib._bootstrap&gt;", line 971, in _find_and_load File "&lt;frozen importlib._bootstrap&gt;", line 955, in _find_and_load_unlocked File "&lt;frozen importlib._bootstrap&gt;", line 665, in _load_unlocked File "&lt;frozen importlib._bootstrap_external&gt;", line 678, in exec_module File "&lt;frozen importlib._bootstrap&gt;", line 219, in _call_with_frames_removed File "/app/fk_workflow/workflow.py", line 9, in &lt;module&gt; read_task = SdkTask.fetch("flytedemo","development","fk_tasks.tasks.read_pickle","1e0d95cc82b85cdd96feab3c6f9b6e2f7baba216") File "/app/venv/lib/python3.6/site-packages/flytekit/common/exceptions/scopes.py", line 161, in system_entry_point return wrapped(*args, **kwargs) File "/app/venv/lib/python3.6/site-packages/flytekit/common/tasks/task.py", line 159, in fetch admin_task = _engine_loader.get_engine().fetch_task(task_id=task_id) File "/app/venv/lib/python3.6/site-packages/flytekit/engines/flyte/engine.py", line 108, in fetch_task ).client.get_task(task_id) File "/app/venv/lib/python3.6/site-packages/flytekit/clients/friendly.py", line 162, in get_task id=id.to_flyte_idl() File "/app/venv/lib/python3.6/site-packages/flytekit/clients/raw.py", line 12, in handler return fn(*args, **kwargs) File "/app/venv/lib/python3.6/site-packages/flytekit/clients/raw.py", line 136, in get_task return self._stub.GetTask(get_object_request) File "/app/venv/lib/python3.6/site-packages/grpc/_channel.py", line 824, in __call__ return _end_unary_response_blocking(state, call, False, None) File "/app/venv/lib/python3.6/site-packages/grpc/_channel.py", line 726, in _end_unary_response_blocking raise _InactiveRpcError(state) grpc._channel._InactiveRpcError: &lt;_InactiveRpcError of RPC that terminated with: status = StatusCode.NOT_FOUND details = "entry not found" debug_error_string = "{"created":"@1579804960.139722800","description":"Error received from peer ipv4:127.0.0.1:30081","file":"src/core/lib/surface/call.cc","file_line":1056,"grpc_message":"entry not found","grpc_status":5}" &gt; make: *** [register_workflow] Error 1``` nope still throws an error the pure client solution would be even better i think there is something that I haven’t quite understood yet, maybe you could shed some light I understand that in order to register a task i need to do it from a container (or at least set an env variable that points to the container that will run it) do I still need to reference a container when creating a workflow?
no, definitely not for a workflow…and you don’t actually technically need to be in a container for a task either. Being in a container that is configured in a certain way just makes it easy to auto-fill in information when creating tasks.
no, definitely not for a workflow…and you don’t actually technically need to be in a container for a task either. Being in a container that is configured in a certain way just makes it easy to auto-fill in information when creating tasks.
right that’s what I figured if you could provide some simple example of a workflow created with the pure client I would appreciate it another thing that’s not very clear from the flytekit documentation is how to connect to the admin service i know that with flyte-cli I can just pass the host parameters but I couldn’t find the equivalent for the flytekit i think it’s looking for some kind of configuration file because I get an error similar to this ```FlyteAssertion: No configuration set for [platform] url. This is a required configuration.```
right that’s what I figured if you could provide some simple example of a workflow created with the pure client I would appreciate it another thing that’s not very clear from the flytekit documentation is how to connect to the admin service i know that with flyte-cli I can just pass the host parameters but I couldn’t find the equivalent for the flytekit i think it’s looking for some kind of configuration file because I get an error similar to this ```FlyteAssertion: No configuration set for [platform] url. This is a required configuration.```
do you get this error when using the pyflyte tool? or just when writing a script yourself? if the latter, take a look at this method: <https://github.com/lyft/flytekit/blob/master/flytekit/configuration/__init__.py#L11>
do you get this error when using the pyflyte tool? or just when writing a script yourself? if the latter, take a look at this method: <https://github.com/lyft/flytekit/blob/master/flytekit/configuration/__init__.py#L11>
when creating a script myself
when creating a script myself
alternatively, you can set env vars that follow the format: `FLYTE_{SECTION}_{KEY}` . so in this case FLYTE_PLATFORM_URL, but i recommend creating a `flytekit.conf` file and i will find an example of a pure client use case
alternatively, you can set env vars that follow the format: `FLYTE_{SECTION}_{KEY}` . so in this case FLYTE_PLATFORM_URL, but i recommend creating a `flytekit.conf` file and i will find an example of a pure client use case
is the flytekit.config supposed to be created when running flyte-cli setup-config?
is the flytekit.config supposed to be created when running flyte-cli setup-config?
it is the same config file format, so it can be.
it is the same config file format, so it can be.
because I tried running ```flyte-cli setup-config -h localhost:30081 -i``` but I got a jsondecode error…should I open an issue about that?
because I tried running ```flyte-cli setup-config -h localhost:30081 -i``` but I got a jsondecode error…should I open an issue about that?
yes please. cc: Yee
yes please. cc: Yee
:+1:
:+1:
there should be a barebones config in the demo repository you can copy
there should be a barebones config in the demo repository you can copy
ok thanks I’ll take a look
ok thanks I’ll take a look
here is an example script for a pure client approach. note: i copy-pasted different elements so there _might_ be a copy-paste error (and the interface definitions for your tasks/workflows will be different): ```my_task = SdkTask.fetch("flytedemo","development","fk_tasks.tasks.download_dataset", "1e0d95cc82b85cdd96feab3c6f9b6e2f7baba216") input_dict = { 'input_1': Input(Types.Integer, default=10, help='Not required input.'), 'input_2': Input(Types.Integer, help='Required.') } nodes = { 'a': my_task(a=input_dict['input_1']), 'b': my_task(a=input_dict['input_2']), 'c': my_task(a=1000) } outputs = { 'wf_out': Output( [ nodes['a'].outputs.b, nodes['b'].outputs.b, nodes['c'].outputs.b, ], sdk_type=[Types.Integer] ) } w = workflow(inputs=input_dict, outputs=outputs, nodes=nodes) w.register('flytedemo', 'development', 'simple_functional', version))) lp = w.create_launch_plan( fixed_inputs={'input_2': 100}, schedule=schedules.CronSchedule("0/15 * * * ? *") lp.register('flytedemo', 'development', 'simple_functional', version))) ex = lp.execute('flytedemo', 'development', inputs={'input_1': 500}) print(("Execution URN: {}".format(ex.id))) # wait for execution to complete, then check out the status, inputs, and outputs. ex.wait_for_completion(timeout=datetime.timedelta(minutes=10)) assert ex.closure.phase == _core_execution.WorkflowExecutionPhase.SUCCEEDED assert ex.error is None assert len(ex.inputs) == 2 assert len(ex.outputs) == 1 assert ex.inputs['input_1'] == 500 assert ex.inputs['input_2'] == 100 assert ex.outputs['wf_out'] == [501, 101, 1001] for k, ne in six.iteritems(ex.node_executions): if k in {'start-node', 'end-node'}: continue ne.sync() assert ne.closure.phase == _core_execution.NodeExecutionPhase.SUCCEEDED assert len(ne.inputs) == 1 assert len(ne.outputs) == 1 assert len(ne.executions) == 1 assert len(ne.task_executions) == 1 assert ne.error is None ne.executions[0].sync() assert ne.executions[0].error is None assert len(ne.executions[0].inputs) == 1 assert len(ne.executions[0].outputs) == 1 assert ne.task_executions[0].closure.phase == _core_execution.TaskExecutionPhase.SUCCEEDED assert len(ne.task_executions[0].inputs) == 1 assert len(ne.task_executions[0].outputs) == 1 assert ne.task_executions[0].error is None assert ex.node_executions['a'].inputs['a'] == 500 assert ex.node_executions['a'].outputs['b'] == 501 assert ex.node_executions['b'].inputs['a'] == 100 assert ex.node_executions['b'].outputs['b'] == 101 assert ex.node_executions['c'].inputs['a'] == 1000 assert ex.node_executions['c'].outputs['b'] == 1001``` important imports: ```from flytekit.sdk.types import Types from flytekit.sdk.workflow import workflow, Input, Output from flytekit.common import schedules from flytekit.configuration import TemporaryConfiguration from flytekit.models import launch_plan as _launch_plan from flytekit.models.core import execution as _core_execution``` and you’ll want to set the config somewhere beforehand too
here is an example script for a pure client approach. note: i copy-pasted different elements so there _might_ be a copy-paste error (and the interface definitions for your tasks/workflows will be different): ```my_task = SdkTask.fetch("flytedemo","development","fk_tasks.tasks.download_dataset", "1e0d95cc82b85cdd96feab3c6f9b6e2f7baba216") input_dict = { 'input_1': Input(Types.Integer, default=10, help='Not required input.'), 'input_2': Input(Types.Integer, help='Required.') } nodes = { 'a': my_task(a=input_dict['input_1']), 'b': my_task(a=input_dict['input_2']), 'c': my_task(a=1000) } outputs = { 'wf_out': Output( [ nodes['a'].outputs.b, nodes['b'].outputs.b, nodes['c'].outputs.b, ], sdk_type=[Types.Integer] ) } w = workflow(inputs=input_dict, outputs=outputs, nodes=nodes) w.register('flytedemo', 'development', 'simple_functional', version))) lp = w.create_launch_plan( fixed_inputs={'input_2': 100}, schedule=schedules.CronSchedule("0/15 * * * ? *") lp.register('flytedemo', 'development', 'simple_functional', version))) ex = lp.execute('flytedemo', 'development', inputs={'input_1': 500}) print(("Execution URN: {}".format(ex.id))) # wait for execution to complete, then check out the status, inputs, and outputs. ex.wait_for_completion(timeout=datetime.timedelta(minutes=10)) assert ex.closure.phase == _core_execution.WorkflowExecutionPhase.SUCCEEDED assert ex.error is None assert len(ex.inputs) == 2 assert len(ex.outputs) == 1 assert ex.inputs['input_1'] == 500 assert ex.inputs['input_2'] == 100 assert ex.outputs['wf_out'] == [501, 101, 1001] for k, ne in six.iteritems(ex.node_executions): if k in {'start-node', 'end-node'}: continue ne.sync() assert ne.closure.phase == _core_execution.NodeExecutionPhase.SUCCEEDED assert len(ne.inputs) == 1 assert len(ne.outputs) == 1 assert len(ne.executions) == 1 assert len(ne.task_executions) == 1 assert ne.error is None ne.executions[0].sync() assert ne.executions[0].error is None assert len(ne.executions[0].inputs) == 1 assert len(ne.executions[0].outputs) == 1 assert ne.task_executions[0].closure.phase == _core_execution.TaskExecutionPhase.SUCCEEDED assert len(ne.task_executions[0].inputs) == 1 assert len(ne.task_executions[0].outputs) == 1 assert ne.task_executions[0].error is None assert ex.node_executions['a'].inputs['a'] == 500 assert ex.node_executions['a'].outputs['b'] == 501 assert ex.node_executions['b'].inputs['a'] == 100 assert ex.node_executions['b'].outputs['b'] == 101 assert ex.node_executions['c'].inputs['a'] == 1000 assert ex.node_executions['c'].outputs['b'] == 1001``` important imports: ```from flytekit.sdk.types import Types from flytekit.sdk.workflow import workflow, Input, Output from flytekit.common import schedules from flytekit.configuration import TemporaryConfiguration from flytekit.models import launch_plan as _launch_plan from flytekit.models.core import execution as _core_execution``` and you’ll want to set the config somewhere beforehand too
hi matt I got it to work after all one of the issues was that I renamed the task names but didn’t rename them in the code the other issue is that the docker image has the flytekit pinned to an older version in the flytesnacks example that’s why I got the error with fetch_latest thank you for your help!
hi matt I got it to work after all one of the issues was that I renamed the task names but didn’t rename them in the code the other issue is that the docker image has the flytekit pinned to an older version in the flytesnacks example that’s why I got the error with fetch_latest thank you for your help!
awesome! glad to hear it!!
Hongxin Liang and Haytham Abuelfutuh I’ve merged the boilerplate change and updated the idl pr <https://github.com/lyft/flyteidl/pull/27> thanks honnix for adding me as a collab mind taking a look one last time before we merge?
Awesome!!! thank you both
Awesome!!! thank you both
I will take care of the rest repos. Thanks.
I will take care of the rest repos. Thanks.
good morning thank you! i’ll approve everything tomorrow morning. will then test, and then post an annoucement to the issue and this channel
good morning thank you! i’ll approve everything tomorrow morning. will then test, and then post an annoucement to the issue and this channel
I have updated all the rest repos accordingly and poked you in those PRs. Please take a look. Thanks.
Hello everyone… are there any known issues with running a script that uses the “hyperopt” python library under flyte?
None that we know off is not playing well with flytekit
None that we know off is not playing well with flytekit
I have been trying to run a script that uses it under a workflow
I have been trying to run a script that uses it under a workflow
hmmm and but you are using the python bindings (flytekit) right?
hmmm and but you are using the python bindings (flytekit) right?
i don’t even have to actually use the library, as soon as I import it in the script i get this
i don’t even have to actually use the library, as soon as I import it in the script i get this
are you pasting the error?
are you pasting the error?
```ERROR:root:Error from command '['aws', '--endpoint-url', '<http://minio.yolotrainframework.svc.cluster.local:9000>', 's3', 'cp', '<s3://my-s3-bucket/metadata/propeller/flytedemo-d> │ │ b'' │ │ Traceback (most recent call last): │ │ File "/app/venv/lib/python3.6/site-packages/flytekit/interfaces/data/data_proxy.py", line 127, in get_data │ │ proxy.download(remote_path, local_path) │ │ File "/app/venv/lib/python3.6/site-packages/flytekit/interfaces/data/s3/s3proxy.py", line 109, in download │ │ return _update_cmd_config_and_execute(cmd) │ │ File "/app/venv/lib/python3.6/site-packages/flytekit/interfaces/data/s3/s3proxy.py", line 36, in _update_cmd_config_and_execute │ │ return _subprocess.check_call(cmd, env=env) │ │ File "/app/venv/lib/python3.6/site-packages/flytekit/tools/subprocess.py", line 34, in check_call │ │ "Called process exited with error code: {}. Stderr dump:\n\n{}".format(ret_code, err_str) │ │ Exception: Called process exited with error code: -9. Stderr dump: │ │ b'' │ │ During handling of the above exception, another exception occurred: │ │ Traceback (most recent call last): │ │ File "/app/venv/bin/pyflyte-execute", line 11, in &lt;module&gt; │ │ sys.exit(execute_task_cmd()) │ │ File "/app/venv/lib/python3.6/site-packages/click/core.py", line 764, in __call__ │ │ return self.main(*args, **kwargs) │ │ File "/app/venv/lib/python3.6/site-packages/click/core.py", line 717, in main │ │ rv = self.invoke(ctx) │ │ File "/app/venv/lib/python3.6/site-packages/click/core.py", line 956, in invoke │ │ return ctx.invoke(self.callback, **ctx.params) │ │ File "/app/venv/lib/python3.6/site-packages/click/core.py", line 555, in invoke │ │ return callback(*args, **kwargs) │ │ File "/app/venv/lib/python3.6/site-packages/flytekit/bin/entrypoint.py", line 104, in execute_task_cmd │ │ _execute_task(task_module, task_name, inputs, output_prefix, test) │ │ File "/app/venv/lib/python3.6/site-packages/flytekit/common/exceptions/scopes.py", line 161, in system_entry_point │ │ return wrapped(*args, **kwargs) │ │ File "/app/venv/lib/python3.6/site-packages/flytekit/bin/entrypoint.py", line 83, in _execute_task │ │ _data_proxy.Data.get_data(inputs, local_inputs_file)``` this is from inside the container if I take out the hyperopt import everything works
```ERROR:root:Error from command '['aws', '--endpoint-url', '<http://minio.yolotrainframework.svc.cluster.local:9000>', 's3', 'cp', '<s3://my-s3-bucket/metadata/propeller/flytedemo-d> │ │ b'' │ │ Traceback (most recent call last): │ │ File "/app/venv/lib/python3.6/site-packages/flytekit/interfaces/data/data_proxy.py", line 127, in get_data │ │ proxy.download(remote_path, local_path) │ │ File "/app/venv/lib/python3.6/site-packages/flytekit/interfaces/data/s3/s3proxy.py", line 109, in download │ │ return _update_cmd_config_and_execute(cmd) │ │ File "/app/venv/lib/python3.6/site-packages/flytekit/interfaces/data/s3/s3proxy.py", line 36, in _update_cmd_config_and_execute │ │ return _subprocess.check_call(cmd, env=env) │ │ File "/app/venv/lib/python3.6/site-packages/flytekit/tools/subprocess.py", line 34, in check_call │ │ "Called process exited with error code: {}. Stderr dump:\n\n{}".format(ret_code, err_str) │ │ Exception: Called process exited with error code: -9. Stderr dump: │ │ b'' │ │ During handling of the above exception, another exception occurred: │ │ Traceback (most recent call last): │ │ File "/app/venv/bin/pyflyte-execute", line 11, in &lt;module&gt; │ │ sys.exit(execute_task_cmd()) │ │ File "/app/venv/lib/python3.6/site-packages/click/core.py", line 764, in __call__ │ │ return self.main(*args, **kwargs) │ │ File "/app/venv/lib/python3.6/site-packages/click/core.py", line 717, in main │ │ rv = self.invoke(ctx) │ │ File "/app/venv/lib/python3.6/site-packages/click/core.py", line 956, in invoke │ │ return ctx.invoke(self.callback, **ctx.params) │ │ File "/app/venv/lib/python3.6/site-packages/click/core.py", line 555, in invoke │ │ return callback(*args, **kwargs) │ │ File "/app/venv/lib/python3.6/site-packages/flytekit/bin/entrypoint.py", line 104, in execute_task_cmd │ │ _execute_task(task_module, task_name, inputs, output_prefix, test) │ │ File "/app/venv/lib/python3.6/site-packages/flytekit/common/exceptions/scopes.py", line 161, in system_entry_point │ │ return wrapped(*args, **kwargs) │ │ File "/app/venv/lib/python3.6/site-packages/flytekit/bin/entrypoint.py", line 83, in _execute_task │ │ _data_proxy.Data.get_data(inputs, local_inputs_file)``` this is from inside the container if I take out the hyperopt import everything works
hmmm Exit code -9 let me check Giordano can you share your code if you dont mind?
hmmm Exit code -9 let me check Giordano can you share your code if you dont mind?
it seems like importing hyperopt createss some issues with connecting to s3 sure gimme a sec
it seems like importing hyperopt createss some issues with connecting to s3 sure gimme a sec
ya this is actually connecting to minio in your sandbox cluster
ya this is actually connecting to minio in your sandbox cluster
Looks like the subprocess which was trying to copy from s3 got a SIGKILL signal. The most common reason for that would be OOM. `aws s3 cp` shouldn't take too much memory, but it might be worth trying to bump the memory in your container using something like: ```@python_task(cpu_limit="10000m", memory_limit="10000Mi")```
Looks like the subprocess which was trying to copy from s3 got a SIGKILL signal. The most common reason for that would be OOM. `aws s3 cp` shouldn't take too much memory, but it might be worth trying to bump the memory in your container using something like: ```@python_task(cpu_limit="10000m", memory_limit="10000Mi")```
Johnny Burns Ketan Umare just tried what you suggested and it's working now, thanks! It was indeed a resource issue
Johnny Burns Ketan Umare just tried what you suggested and it's working now, thanks! It was indeed a resource issue
Woot woot :tada:
As of today, we have migrated all golang Flyte repos to use go mod. Thanks to Hongxin Liang for driving this change. Boilerplate changes: <https://github.com/lyft/boilerplate/pull/4> The boilerplate code will now default to go.mod. <https://github.com/lyft/flytestdlib/releases/tag/v0.3.0> (was already on go mod as of v0.2.29) <https://github.com/lyft/flyteidl/releases/tag/v0.17.0> <https://github.com/lyft/flyteplugins/releases/tag/v0.3.0> <https://github.com/lyft/flytepropeller/releases/tag/v0.2.0> <https://github.com/lyft/flyteadmin/releases/tag/v0.2.0> <https://github.com/lyft/datacatalog/releases/tag/0.2.0> We’ve introduced a minor workaround to the boilerplate repo (and hence to all other go repos).  Please read through the thorough background discussion that Hongxin Liang posted around go modules in the GitHub issue (<https://github.com/lyft/flyte/issues/129>). In order to persist and standardize on a version of the common golang tools, we’ve added a second set of go.mod/sum files. These are listed in the boilerplate PR and basically separate your code from these tools. That is, your code likely uses golangci-lint but that doesn’t mean it should be part of your project’s go.mod files. Honnix’s comment has more information. This dual go.mod approach is also slated to be introduced more formally and rigorously in go 1.14. This is a good overview of the new commands: <https://github.com/golang/go/wiki/Modules#daily-workflow> Note also that in most repos, we’re now pinning the version of client-go to something compatible with the Lyft fork of K8s (see <https://github.com/lyft/datacatalog/pull/21#issuecomment-579411660> for more information).
Wow awesome!! Way to finish it off—I know it wasn’t easy! :p
Wow awesome!! Way to finish it off—I know it wasn’t easy! :p
Thank you both! this not only aligns Flyte Repos with what's becoming the standards but also improves our tooling in the process (consistent build tools' versions). Big shout out to Hongxin Liang for going above and beyond to deliver that across all Flyte repos.
Thank you both! this not only aligns Flyte Repos with what's becoming the standards but also improves our tooling in the process (consistent build tools' versions). Big shout out to Hongxin Liang for going above and beyond to deliver that across all Flyte repos.
Great job everyone! It was a good learning process for me to get better understanding of go ecosystem, and I enjoyed working on this. Super excited to see everything in place. :thumbsup:
I want to understand: • Flyte's Monitoring • Logging • Alerting • Integeration with Slack or something: Say this job is started by user X, job X is finished etc..
This is a good place to start learning about notifications: <https://lyft.github.io/flyte/user/features/notifications.html> As far as logging/monitoring, there are two "stories" there: 1. As an administrator of the "Flyte" system, you want logging monitoring about the heath of your Flyte cluster. 2. As a user (workflow writer), you want logs showing what your workflow is doing, so you can debug your workflow code.
This is a good place to start learning about notifications: <https://lyft.github.io/flyte/user/features/notifications.html> As far as logging/monitoring, there are two "stories" there: 1. As an administrator of the "Flyte" system, you want logging monitoring about the heath of your Flyte cluster. 2. As a user (workflow writer), you want logs showing what your workflow is doing, so you can debug your workflow code.
Email and Slack is good enough So What about Logging and Monitoring?
Email and Slack is good enough So What about Logging and Monitoring?
<https://lyft.github.io/flyte/user/features/observability.html> Flyte system components use Prometheus (they expose metrics through prometheus port). We found that prometheus can be a hit or a miss for user containers (since it's a pull model, it can miss data points). So for metrics emitted from user containers, you will need to setup <https://github.com/statsd/statsd> in the cluster and configure this : this (default env vars): <https://github.com/lyft/flyte/blob/master/deployment/sandbox/flyte_generated.yaml#L636> Add something like this: `- FLYTE_STATSD_HOST: stats.statsagent` where stats.statsagent is the DNS for where you deployed statsd within the cluster... having said that, I think there is an obvious gap in documentation in how to set this up :slightly_smiling_face:
<https://lyft.github.io/flyte/user/features/notifications.html#howto-slack> link is broken?
Hmmmm.... Looks like the docs for that are missing :disappointed: The notification code should look something like this: ```@workflow(notify=[Email(when=[States.FAILED, States.TIMED_OUT], who=["<mailto:me@email.com|me@email.com>"], service_instances=["staging", "production"]), Email(when=[States.SUCCESS], who=["<mailto:myteam@email.com|myteam@email.com>", "<mailto:me@email.com|me@email.com>"])])```
<!here> Ketan Umare and myself on TWIML, talking about Flyte, giving a bit more history about how it all started, where it's going and key differentiators: <https://twimlai.com/twiml-talk-343-scalable-and-maintainable-workflows-at-lyft-with-flyte-w-haytham-abuelfutuh-and-ketan-umare/>
Nice! TWiML is my favorite podcast! (went to Twimlcon recently too). Will listen to it this evening. Great interview!
Nice! TWiML is my favorite podcast! (went to Twimlcon recently too). Will listen to it this evening. Great interview!
Thank you Richard
Thank you Richard
Awesome! Congrats!
Awesome! Congrats!
Good listen :+1:. Wish you got more time to talk about the caching and cataloguing stuff though as I think that’s a big differentiator from say Argo and Airflow.
Good listen :+1:. Wish you got more time to talk about the caching and cataloguing stuff though as I think that’s a big differentiator from say Argo and Airflow.
Thank you Jonathon, that's certainly true. Stay tuned for more :wink:
Thank you Jonathon, that's certainly true. Stay tuned for more :wink:
Memoization part sounded really exciting !
Memoization part sounded really exciting !
Adhita Selvaraj how’s the tf operator stuff going
Adhita Selvaraj how’s the tf operator stuff going
Slowly :disappointed: I haven't had time to work on it with the Kubeflow 1.0 sprints After this week, I'll have more time on my hands
Hi guys, I've been working the past few days to implement some DL pipelines that I use at work on Flyte and I've been spending a lot of time debugging...right now i'm working locally on my docker-desktop k8s environment and the workflow is as follows: edit code -&gt; build container -&gt; register workflow -&gt; launch workflow -&gt; check errors -&gt; repeat Some code I can debug locally but for example the actual task code needs to run inside flyte. Is there a way to "mock" the inputs and outputs or some way to debug it with an editor (I'm using VSCode). Perhaps there is a way to attach to the task &amp; workflow processes with ptvsd?
Are you able to run just the raw container that contains the task in question?
Are you able to run just the raw container that contains the task in question?
Yes, of course
Yes, of course
what are the types of these inputs? the command that is passed to the container is in the task spec. it’ll look something like this. the braces are filled in by Propeller before execution to be the location of the s3 inputs file and the path that the outputs should be written to.
what are the types of these inputs? the command that is passed to the container is in the task spec. it’ll look something like this. the braces are filled in by Propeller before execution to be the location of the s3 inputs file and the path that the outputs should be written to.
Ok thanks I'll try that I didn't think I could run the command directly
Ok thanks I'll try that I didn't think I could run the command directly
yup you absolutely can…. this is probably the most black-box way of debugging. you can also run the task outside of the container entirely, just in a virtualenv (assuming this is python). this isn’t yet sanitized for outside lyft so i’m gonna copy paste some
yup you absolutely can…. this is probably the most black-box way of debugging. you can also run the task outside of the container entirely, just in a virtualenv (assuming this is python). this isn’t yet sanitized for outside lyft so i’m gonna copy paste some
Thank you for your help I'll look into that
Hello Everyone! :hand: I am interested in a small part of `flytepropeller` in `flyte`. Default, Propeller container is started with the command `flytepropeller --config "/etc/flyte/config*/config.yaml"` Source: <https://github.com/lyft/flyte/blob/master/kustomize/base/propeller/deployment.yaml#L35-L39> It works great! In the next step, I just removed the `access-key` and `secret-key` from `config.yam` and changed the command as follows: ```flytepropeller \ --config "/etc/flyte/config*/config.yaml" \ --storage.connection.access-key 'minio' \ --storage.connection.secret-key 'miniostorage'``` In my opinion, these flags should update the configuration for propeller. (then, I’d like use keys from environment vars) At least, this approach works for `flyteadmin` and `datacatalog`. But, using this approach with `flytepropeller`, I have the error below: ```{"json":{"src":"root.go:221"},"level":"fatal","msg":"Failed to start Controller - [Failed to create Metadata storage: unable to configure the storage for s3. Error: missing Access Key ID]","ts":"2020-02-05T12:19:16Z"}``` Looks like my flags were ignored. Could you advise what is my mistake? Thanks in advance and have a great day! :slightly_smiling_face: sorry if I use wrong channel for this question :pray:
Nice catch. Yeah, my impression is that this is a bug. My best guess is that it's related to this: <https://github.com/lyft/flyteadmin/blob/master/cmd/entrypoints/root.go#L80> Both Flyteadmin and Datacatalog do this, flytepropeller does not. Haytham Abuelfutuh, can you confirm?
Nice catch. Yeah, my impression is that this is a bug. My best guess is that it's related to this: <https://github.com/lyft/flyteadmin/blob/master/cmd/entrypoints/root.go#L80> Both Flyteadmin and Datacatalog do this, flytepropeller does not. Haytham Abuelfutuh, can you confirm?
Can you show me the storage section in config?
Can you show me the storage section in config?
Thank you for quick response! I did only these small changes in comparison with sandbox example <https://github.com/lyft/flyte/blob/master/kustomize/overlays/sandbox/propeller/config.yaml#L40-L49> just commented two lines with creds:
Thank you for quick response! I did only these small changes in comparison with sandbox example <https://github.com/lyft/flyte/blob/master/kustomize/overlays/sandbox/propeller/config.yaml#L40-L49> just commented two lines with creds:
I also reproduced the issue locally (removed the `endpoint` config from the file, added it as a command line arg).
I also reproduced the issue locally (removed the `endpoint` config from the file, added it as a command line arg).
Awesome!. This should work. I agree this is a bug, mind filing an issue on <http://github.com/lyft/flyte|github.com/lyft/flyte> and assign it to me (@enghabu), Ruslan Stanevich?
Awesome!. This should work. I agree this is a bug, mind filing an issue on <http://github.com/lyft/flyte|github.com/lyft/flyte> and assign it to me (@enghabu), Ruslan Stanevich?
oh of course! thanks for your responsiveness
oh of course! thanks for your responsiveness
Haytham Abuelfutuh haven't tested this yet, but if you like how it looks, I can give it a whirl. <https://github.com/lyft/flytepropeller/pull/63/files> ^ Guess it's never that simple. Looks like this results in a whole new problem: ```* '' has invalid keys: qubolelimit, quboletokenpath, redishostkey, redishostpath, resourcemanagertype 1 error(s) decoding:```
Haytham Abuelfutuh haven't tested this yet, but if you like how it looks, I can give it a whirl. <https://github.com/lyft/flytepropeller/pull/63/files> ^ Guess it's never that simple. Looks like this results in a whole new problem: ```* '' has invalid keys: qubolelimit, quboletokenpath, redishostkey, redishostpath, resourcemanagertype 1 error(s) decoding:```
<https://github.com/lyft/flyte/issues/167> hope I missed nothing Johnny, I don’t know exactly, but from my expirience, at least this error: ```1 error(s) decoding: * '' has invalid keys: qubolelimit``` can be related to using flytepropeller:v0.2* with old plugin configs <https://github.com/lyft/flyte/commit/b6c38aed5019677e4fc83b4c160fa3daca29cbc0#diff-9587455136ef88535397e7e8006e0dde>
<https://github.com/lyft/flyte/issues/167> hope I missed nothing Johnny, I don’t know exactly, but from my expirience, at least this error: ```1 error(s) decoding: * '' has invalid keys: qubolelimit``` can be related to using flytepropeller:v0.2* with old plugin configs <https://github.com/lyft/flyte/commit/b6c38aed5019677e4fc83b4c160fa3daca29cbc0#diff-9587455136ef88535397e7e8006e0dde>
Ah, you might be right! Maybe my fix is working. Let me look. That helps, but doesn't totally fix the issue. Seems some work will need to go into fixing it
Ah, you might be right! Maybe my fix is working. Let me look. That helps, but doesn't totally fix the issue. Seems some work will need to go into fixing it
oh, as I see there is `secrets` section in pfopeller’s config <https://github.com/lyft/flytepropeller/blob/b1595306d38404c41eb3e6bf7dbabd8c8978544b/pkg/controller/nodes/task/secretmanager/config.go> does it mean we are able to use it in the workflow task? Sorry, maybe silly question, I didn’t manage to find it in doc ) A few use cases would be extremely useful Thanks in advance!
oh, as I see there is `secrets` section in pfopeller’s config <https://github.com/lyft/flytepropeller/blob/b1595306d38404c41eb3e6bf7dbabd8c8978544b/pkg/controller/nodes/task/secretmanager/config.go> does it mean we are able to use it in the workflow task? Sorry, maybe silly question, I didn’t manage to find it in doc ) A few use cases would be extremely useful Thanks in advance!
Great question. The secret manager in propeller is designed for the secrets of `flytepropeller` (and its plugins). Not so much for individual tasks. That might be a bit confusing, so I can elaborate a bit. Flytepropeller launches tasks based on their task "type". In order to launch those tasks, propeller might need access to secrets. For example, one of our task types can launch hive queries in a remote (3rd party) cluster. In order for flytepropeller to access that remote cluster (to launch the query), propeller needs a secret "access" token. All tasks of this type need that token. This plugin uses the secret manager to retrieve the token, and uses that token to make the query. <https://github.com/lyft/flyteplugins/blob/e5ab7319502a0a69d4825b5abe08764d24133811/go/tasks/plugins/hive/executor.go#L79>
Great question. The secret manager in propeller is designed for the secrets of `flytepropeller` (and its plugins). Not so much for individual tasks. That might be a bit confusing, so I can elaborate a bit. Flytepropeller launches tasks based on their task "type". In order to launch those tasks, propeller might need access to secrets. For example, one of our task types can launch hive queries in a remote (3rd party) cluster. In order for flytepropeller to access that remote cluster (to launch the query), propeller needs a secret "access" token. All tasks of this type need that token. This plugin uses the secret manager to retrieve the token, and uses that token to make the query. <https://github.com/lyft/flyteplugins/blob/e5ab7319502a0a69d4825b5abe08764d24133811/go/tasks/plugins/hive/executor.go#L79>
Oh, cool It makes sense! Thank you!