Jaf – Deploy Jupyter Notebook as an Azure Function

Overview of My Submission

jaf stands for Jupyter notebook as functions.
jaf skaffolds an Azure Duration Function project to enable a jupyter notebook be deployed as a web endpoint.

Jupyter notebooks are widely used as interactive programmin…


This content originally appeared on DEV Community and was authored by DEV Community

Overview of My Submission

jaf stands for Jupyter notebook as functions.
jaf skaffolds an Azure Duration Function project to enable a jupyter notebook be deployed as a web endpoint.

Jupyter notebooks are widely used as interactive programming environment to experiment data science and machine learning ideas. However, going from development to deployment once a notebook is drafted is extremely hard. The process usually involves an engineer to rewrite significant portion of the jupyter notebook as a web/rpc service in order to make the model/procedure written in the notebook to be callable to other services.

With jaf, you can quickly spin up a web service that makes the jupyter notebook as a callable function, thus expediting greatly the speed to come from dev to deployment for data science solutions.

Submission Category:

Wacky Wildcards

Link to Code on GitHub

GitHub logo yuhuishi-convect / jaf

Jupyter notebook as functions. Project for Azure trial hackathon

jaf

jaf stands for Jupyter notebook as functions. This is a project for Azure trial hackathon.

jaf skaffolds an Azure Duration Function project to enable a jupyter notebook be deployed as a web endpoint.

Usage

Prerequisites

  • Azure cli
  • Azure functions core tools

Skaffold a project

pip install cookiecutter

cookiecutter https://github.com/yuhuishi-convect/jaf

project_name [JupyterAsFunction]: HelloWorld
notebook_url [https://raw.githubusercontent.com/nteract/papermill/main/binder/cli-simple/simple_output.ipynb]: 

Test locally

# start the local runtime

$ func start 
Found Python version 3.8.5 (python3).

Azure Functions Core Tools
Core Tools Version:       4.0.3971 Commit hash: d0775d487c93ebd49e9c1166d5c3c01f3c76eaaf  (64-bit)
Function Runtime Version: 4.0.1.16815


Functions:

        PapermillTrigger: [POST] http://localhost:7071/api/HelloWorld

        PapermillDurableOrc: orchestrationTrigger

        PapermillRunnotebook: activityTrigger

For detailed output, run func with --verbose flag.
info: Microsoft.AspNetCore.Hosting.Diagnostics[1]
      Request starting HTTP/2 POST http://127.0.0.1:46327/AzureFunctionsRpcMessages.FunctionRpc/EventStream application/grpc -
info: Microsoft.AspNetCore.Routing.EndpointMiddleware[0]
      Executing endpoint 'gRPC - /AzureFunctionsRpcMessages.FunctionRpc/EventStream'
[2022-03-07T20:00:52.941Z] Worker process started and initialized.
[2022-03-07T20:00:58.149Z] Host lock lease acquired by instance ID '000000000000000000000000EBCD312A'.
Call the endpoint
# we can specify the parameters in the

Additional Resources / Info

[Note:] # Screenshots/demo videos are encouraged!

Demo video:



This content originally appeared on DEV Community and was authored by DEV Community


Print Share Comment Cite Upload Translate Updates
APA

DEV Community | Sciencx (2022-03-07T22:50:56+00:00) Jaf – Deploy Jupyter Notebook as an Azure Function. Retrieved from https://www.scien.cx/2022/03/07/jaf-deploy-jupyter-notebook-as-an-azure-function/

MLA
" » Jaf – Deploy Jupyter Notebook as an Azure Function." DEV Community | Sciencx - Monday March 7, 2022, https://www.scien.cx/2022/03/07/jaf-deploy-jupyter-notebook-as-an-azure-function/
HARVARD
DEV Community | Sciencx Monday March 7, 2022 » Jaf – Deploy Jupyter Notebook as an Azure Function., viewed ,<https://www.scien.cx/2022/03/07/jaf-deploy-jupyter-notebook-as-an-azure-function/>
VANCOUVER
DEV Community | Sciencx - » Jaf – Deploy Jupyter Notebook as an Azure Function. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2022/03/07/jaf-deploy-jupyter-notebook-as-an-azure-function/
CHICAGO
" » Jaf – Deploy Jupyter Notebook as an Azure Function." DEV Community | Sciencx - Accessed . https://www.scien.cx/2022/03/07/jaf-deploy-jupyter-notebook-as-an-azure-function/
IEEE
" » Jaf – Deploy Jupyter Notebook as an Azure Function." DEV Community | Sciencx [Online]. Available: https://www.scien.cx/2022/03/07/jaf-deploy-jupyter-notebook-as-an-azure-function/. [Accessed: ]
rf:citation
» Jaf – Deploy Jupyter Notebook as an Azure Function | DEV Community | Sciencx | https://www.scien.cx/2022/03/07/jaf-deploy-jupyter-notebook-as-an-azure-function/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.