Getting started
Installation¶
The OpenML website runs on Flask, React, and Dash. You need to install these first.
-
Download or clone the source code for the OpenML website from GitHub. Then, go into that folder (it should have the
requirements.txt
andpackage.json
files). -
Install Flask, Dash, and dependencies using PIP
-
Install React and dependencies using NPM (8 or higher)
Building and running¶
Go back to the home directory. Build a production version of the website with:
Start the server by running:
You should now see the app running in your browser at localhost:5000
Note: If you run the app using HTTPS, add the SSL context or use 'adhoc' to use on-the-fly certificates or you can specify your own certificates.
As flask server is not suitable for production we recommend you to use some other server if you want to deploy your openml installation in production. We currently use gunicorn for production server. You can install the gunicorn server and run it:
Development¶
To start the React frontend in developer mode, go to server/src/client/app
and run:
The app should automatically open at localhost:3000
and any changes made to
the code will automatically reload the website (hot loading).
For the new Next.js frontend, install and run like this:
Structure¶
The website is built on the following components:
- A Flask backend. Written in Python, the backend takes care of all communication with the OpenML server. It builds on top of the OpenML Python API. It also takes care of user authentication and keeps the search engine (ElasticSearch) up to date with the latest information from the server. Files are located in the
server
folder. - A React frontend. Written in JavaScript, this takes care of rendering the website. It pulls in information from the search engine, and shows plots rendered by Dash. It also contains forms (e.g. for logging in or uploading new datasets), which will be sent off to the backend for processing. Files are located in
server/src/client/app
. - Dash dashboards. Written in Python, Dash is used for writing interactive plots. It pulls in data from the Python API, and renders the plots as React components. Files are located in
server/src/dashboard
.