Daisi — Python cloud functions for scientists and engineers

JM Laigle
Daisi Technology
Published in
7 min readJun 7, 2022

Daisi (app.daisi.io) is a scientific Cloud Computing platform running Python serverless functions, named Daisies. It is the foremost destination for APIs for Python coders, scientists, researchers, engineers, analysts.

Daisi features a unique catalog of rapidly growing, ready-to-be-called, live cloud serverless functions developed by the community. Whatever your technical interest, you can find premium, already deployed, algorithms with an API that can be called with just two lines of Python. Most of them feature also a beautiful web interface to try them immediately.

Adding a new function to the catalog is incredibly easy and doesn’t require any code change or DevOps skills.

What are Daisies ?

Daisies are simply Python functions running in the cloud. You don’t need to update your regular Python code to turn it into a Daisi, you just simply link its Github repository in the platform.

Daisies can be called from any environment from which it is possible to send HTTP requests. From a Python code, the pydaisi package makes Daisies calls as straight forward as if they were local functions, passing arbitrary Python objects in argument and receiving whatever the function returns.

With pydaisi, no need to think about data serialization or writing HTTP requests, etc… it is entirely abstracted and the Daisi platform becomes a straight extension of your workspace !

The Daisi platform executes cloud functions

The Daisi catalog

The Daisi catalog is where you discover ready-to-be-called Daisies, either available publicly or shared privately with you and your team. Browse the categories to discover deployed functions ready to be called on app.daisi.io !

The Daisi catalog, with ready-to-be-called Daisies

Opening a Daisi card will bring you to a page like below containing all the relevant info to:

  1. Call the Daisi endpoints remotely, from various languages
  2. Access a visualization UI to test it interactively
Info page of a Daisi. The upper right button will open the visualization UI. The “Call it” tab contains the documentation to call the API.
Automatically generated documentation for a Daisi endpoints

Remote calls

Every Daisi can be called in Python using the same pattern:

The only package that you will need is pydaisi . It requires Python 3.8+ and can be installed with pip:

pip install -U pydaisi

Here below are a few examples to get started, picked from different technical areas. All these code examples can be pasted directly into your workspace, a Jupyter notebook, an iPython console…

Natural Language Processing

Question answering

Need to add a Question/Answering capability to your code or application ? The Bert language model developed by Google provides impressive results. It is deployed as a Daisi that you can call immediately (check “Awesome Bert”):

Text classification

Need to classify some sentences but you don’t have a trained classifier, nor the time / data to train it ? Try a Zero-Shot Text classification model developed by Facebook (Zero Shot Classification) :

Interface to test the Zero Shot Text classification function online

Translation

Need to translate some sentences from English to French, or German, or an other language ? Try the T5 model developed by Facebook (check also the Daisi page and its app : T5 language model demo)

PDF information extraction

What about extracting information from PDF documents ? The “PDF extraction” Daisi is ready to be called in your pipeline. It is powered under the hood by MuPDF and returns paragraphs or images, which can be processed downstream by other Daisies.

Interface to test the PDF extraction Daisi (Example of images extraction on this screen capture). Simply upload a PDF to see what the endpoints will return.

The data returned by “PDF extraction” can be immediately “daisi chained” with an other Daisi. For instance, classifying the content of the extracted paragraphs with “Zero-Shot text classification”:

Astrophysics

Gala stars survey

Many astronomical and astrophysical datasets and simulations results are available in the cloud. These data can be difficult to query and require some processing and transformation. Daisies are incredibly useful to make these transformations online and provide some visualization of the data.

For instance, query observations from the Gaia2 survey and compute the stars orbits (check also the Daisi page and its app : Gaia 2 Orbits Query)

Interface to test the Gaia 2 Orbits Query function and visualization some data

As you can see in the example above, the graphical interface to test a Daisi can be a very elaborated and fully functional web app which can be used on its own, while offering a programmatic access to its backend !

Finance

Financial news sentiment analysis

What about classifying the sentiment of financial news with a Language Model specifically trained for finance ? Try Finbert, the Bert language model fine-tuned by Prosus.

And this is an example of remixing Finbert along with other Daisies, to build a more complex Daisi and app, which combines querying Google News for a stock symbol, analyzing the sentiment for each headline, and plotting the stock price for a certain period of time

Interface to try the Finbert sentiment analysis Daisi, with data pulled from Google News by an other Daisi.

Geoscience

Geothermal gradients prediction

Energy industries commonly need to evaluate the subsurface temperature gradients, from oil and gas extraction, to geothermal hot spots identification or mineral resources assessment

Try a Neural Network trained to solved the transient Heat Equation PDE instantly in the Gulf of Mexico, given a geological column and boundary conditions (Interactive Heat Equation solver):

Interface to try the neural network based Heat Equation solver, deployed as a Daisi and returning results instantly

ETL and orchestrations

Since they are cloud functions, and because calling them is so simple, with no need to handle data serialization or writing HTTP requests, Daisies shine particularly for the orchestration of tasks and they plug in naturally with workflows frameworks such as Airflow or Prefect. Here is a simple orchestration of four tasks, executed by four Daisies and wrapped into an orchestration Daisi:

  1. Pulling customer reviews from Yelp for a given city/restaurant type. It uses the "Get Yelp Reviews" Daisi
  2. Analyzing the sentiment of each review using a Zero Shot Classification language model. It uses the "Classify Labels" Daisi
  3. Translating each review into a different language. It uses the "LanguageTranslator" Daisi
  4. Computing a Wordcloud with the reviews. It uses the "WordCloud" Daisi

These are just a few examples….

… using the pydaisi Python client. Other clients are currently or will soon be available for other programming languages or software, including R, Javascript, or even MS Excel. Making daisies one call away from any environment.

When the community and teams are populating a ready-to-be-called functions catalog like Daisi, there is a change of paradigm in cloud technology lifecycles and how software is conceived, built, and re-used.

Daisies return answers almost instantly, are immediately actionable on whatever hardware is best, can be discovered, shared, re-used and executed with ad-hoc privacy settings.

To create a Daisi takes only a few clicks without modifying the original Python code, making live iterations on the deployed service incredibly fast and efficient. Empowering any Python developer, scientist, engineer, to be her/his own Ops, without even thinking about it.

By making the cloud a seamless extension of everybody’s workspace, a platform like Daisi opens the door to a world of opportunities, at everyone’s fingertip, with zero knowledge required in cloud technologies.

And anyone can make it even better by simply publishing their own code, turning it into a Daisi.

And one more thing… 😉

It is free to create, share, discover and call public Daisies during the launch phase of the Daisi platform !

What’s next ? Contribute to the Daisi catalog !

As mentioned above, creating a new Daisi is incredibly easy and doesn’t require any knowledge in cloud deployment or any modification of your Python code.

Any regular Python code can be turned into a Daisi by simply linking its Github repository in the Daisi platform, with no need to write any specific code. The Daisi platform will automatically install all the packages required for the code to run in a virtual environment and will create endpoints and their documentation.

When the new Daisi will be called, a worker will be assigned for its execution. Coming soon, you will have the ability specify the type of hardware on which your code will run, and even parallelize it by distributing its execution on hundred or thousands of workers !

Try the Daisi platform now on app.daisi.io — and please help us spread the word to other Python coders you work with.

We would love your feedback on Daisi ! Check our docs and our community forum !

--

--