Does anybody else run into errors when trying to u...
# ask-the-community
t
Does anybody else run into errors when trying to use map task workflows with Papermill/Jupyter NotebookTasks? Running the example from the docs (https://docs.flyte.org/projects/cookbook/en/latest/auto/core/control_flow/map_task.html#map-a-task-with-multiple-inputs), and a plain @task decorated function works fine - but the moment I attempt to run a map task with NotebookTasks, I get this error:
Copy code
ValueError: Error encountered while executing 'run_map_task_workflow':
  Map tasks can only compose of Python Functon Tasks currently
Is
flytekitplugins.papermill.NotebookTask
currently incompatible with map_tasks?
k
Great point. this is not supported, but actually is very easy to support. can you share how you are wanting to run the notebook task, are you using
functools.partial
We should be able to add support for this pretty rapidly
cc @Kevin Su / @Evan Sadler can either of you add support?
k
looking
we should support python_instance_task too
@Kevin Su maybe you cannot use functools.partial with instance tasks. I do not know that, if that is the case, this is just handling instance task separately and we are good
t
@Ketan (kumare3) I'm not too sure about functools.partial, but we are using the flytekit plugin for Jupyter.
*from* flytekitplugins.papermill *import* NotebookTask
And then we are passing in this NotebookTask into something like this:
Copy code
# Example

@workflow
def map_workflow():
   map_output = map_task(notebook_task_here)(inputs=input_list)
   return map_output
k
Cool, ya this is a miss on my end when I wrote map task
We will fix it soon
t
Cool, thank you for the quick response!
k
150 Views