diff --git a/cookbook/recipes/notebook_tasks/spark_notebook_wf.py b/cookbook/recipes/notebook_tasks/spark_notebook_wf.py index 63a3d24c4..84f98ef28 100644 --- a/cookbook/recipes/notebook_tasks/spark_notebook_wf.py +++ b/cookbook/recipes/notebook_tasks/spark_notebook_wf.py @@ -1,19 +1,17 @@ -from __future__ import absolute_import -from __future__ import division -from __future__ import print_function +import os -from flytekit.sdk.types import Types +from flytekit.contrib.notebook.tasks import spark_notebook from flytekit.sdk.tasks import inputs, outputs - +from flytekit.sdk.types import Types from flytekit.sdk.workflow import workflow_class, Input -from flytekit.contrib.notebook.tasks import spark_notebook -from flytekit.models.task import Container, Resources -interactive_spark = spark_notebook(notebook_path="./notebook-task-examples/spark-notebook.ipynb", - inputs=inputs(partitions=Types.Integer), - outputs=outputs(pi=Types.Float), - ) +interactive_spark = spark_notebook( + notebook_path=os.path.join(os.path.dirname(os.path.abspath(__file__)), "spark-notebook.ipynb"), + inputs=inputs(partitions=Types.Integer), + outputs=outputs(pi=Types.Float), + ) + @workflow_class class FlyteNotebookSparkWorkflow(object): diff --git a/cookbook/requirements.txt b/cookbook/requirements.txt index c2e53a7f5..7f7bd92cd 100644 --- a/cookbook/requirements.txt +++ b/cookbook/requirements.txt @@ -1,4 +1,4 @@ -flytekit[sidecar,schema]==0.10.4 +flytekit[sidecar,schema]==0.11.6 pytest statsd opencv-python==3.4.4.19