Self-hosting
How to self-host the open-source Evidently UI service.
In addition to using Evidently Python library, you can self-host the UI Service to get a monitoring Dashboard and organize the results of your evaluations. This is optional: you can also run evaluations and render results directly in Python or export them elsewhere.
Evidently Cloud. Sign up for a free Evidently Cloud account to get a managed version with extra features.
Evidently Enterprise. This page explains how to self-host the open-source platform. For the Enterprise version with extra features and support, contact us. Host it in your cloud or on-premises.
To get a self-hostable Dashboard, you must:
Create a Workspace (local or remote) to store your data.
Launch the UI service.
1. Create a Workspace
Once you install Evidently, you will need to create a workspace
. This designates a remote or local directory where you will store the evaluation results (as JSON snapshots
of the Evidently Reports
or Test Suites
). The UI Service will read the data from this source.
There are three scenarios, based on where you run the UI Service and store data.
Local Workspace. Both the UI Service and data storage are local.
Remote Workspace. Both the UI Service and data storage are remote.
Workspace with remote data storage. You run the UI Service and store data on different servers.
Local Workspace
In this scenario, you generate, store the snapshots and run the monitoring UI on the same machine.
Imports:
To create a local Workspace and assign a name:
You can pass a path
parameter to specify the path to a local directory.
Code example. Self-hosting tutorial shows a complete Python script to create and populate a local Workspace.
Remote Workspace
In this scenario, you send the snapshots to a remote server. You must run the Monitoring UI on the same remote server. It will directly interface with the filesystem where the snapshots are stored.
Imports:
To create a remote Workspace (UI should be running at this address):
You can pass the following parameters:
self.base_url = base_url
URL for the remote UI service.
self.secret = secret
String with secret, None by default. Use it if access to the URL is protected by a password.
Code example. See the remote service example.
Remote snapshot storage
In the examples above, you store the snapshots and run the UI on the same server. Alternatively, you can store snapshots in a remote data store (such as an S3 bucket). The Monitoring UI service will interface with the designated data store to read the snapshot data.
To connect to data stores Evidently uses fsspec
that allows accessing data on remote file systems via a standard Python interface.
You can verify supported data stores in the Fsspec documentation: built-in implementations and other implementations.
For example, to read snapshots from an S3 bucket (with MinIO running on localhost:9000), you must specify environment variables:
[DANGER] Delete Workspace
To delete a Workspace (for example, an empty or a test Workspace), run the command from the Terminal:
You are deleting all the data. This command will delete the snapshots stored in the folder. To maintain access to the generated snapshots, you must store them elsewhere.
2. Launch the UI service
To launch the Evidently UI service, you must run a command in the Terminal.
Option 1. If you log snapshots to a local Workspace directory, you run Evidently UI over it. Run the following command from the directory where the Workspace folder is located.
Option 2. If you have your Project in a different Workspace, specify the path:
Option 3. If you have your Project in a specified Workspace and run the UI service at the specific port (if the default port 8000 is occupied).
To view the Evidently interface, go to URL http://localhost:8000 or a specified port in your web browser.
Last updated