Add workspace and project
How to create monitoring workspaces and projects.
To visualize data in the Evidently ML monitoring user interface, you must capture data and model metrics as Evidently JSON snapshots
.
To simplify log organization, you can create a Workspace
. Practically, it defines a directory to store the snapshots
. This directory will serve as a data source for the Evidently Monitoring UI service. By adding a project
to the workspace
, you can organize data for individual models.
Snapshots. The next section explains how the Evidently snapshots work.
Code example
Refer to the ML Monitoring QuickStart for a complete Python script that shows how to create a workspace and a project and populate it with toy data.
pageSelf-host ML MonitoringLocal workspace
This section explains how to create a local workspace. In this scenario, you generate and store the snapshots on the same machine.
Create a workspace
To create a workspace
and assign a name:
You can pass a path
parameter to specify the path to a local directory.
Create a project
You can add a project
to a workspace
. A project
helps gather all Reports and Test Suites associated with the same task in one place.
Each project
will have its dedicated dashboard in the monitoring interface.
To create a project and assign a name:
What to group into one project? If snapshots belong to the same project, you can visualize the data from multiple snapshots on the same dashboard panel. You can create one project per ML model, but this is not a strict rule. For example, you can log the performance of a model deployed in shadow mode to the same project as an active model. Or, you can store data on multiple related models together. In this case, you can use tags to organize them.
Project parameters
You can pass the following parameters to a project:
Parameter | Description |
---|---|
| Project name. |
| Unique identifier of the project. Assigned automatically. |
| Optional description. It will be visible in the interface when you browse projects. |
| Configuration of the project dashboard. It describes the monitoring panels which will appear on the dashboard.
Note: Explore the Dashboard Design section for details. There is no need to explicitly pass |
| Start DateTime of the monitoring dashboard. By default, Evidently will show all available periods based on the snapshot timestamps.
You can set a specific date or a relative DateTime. For example, to refer to the last 30 days:
|
| End datetime of the monitoring dashboard. Works the same as above. |
Save project
To save changes made to a project, you must use the method save()
.
For instance, after you create a project, add a name and description, and define monitoring panels, you must save the project to record the changes in the workspace.
Designing monitoring panels. To understand how to design monitoring panels, head to this section in the docs.
Log snapshots
Once you create a project within a workspace, you can add Reports, Test Suites, or snapshots
to a project.
Here is how you add a Report and Test Suite to an earlier created project.
When you add a Report or a Test Suite to a project, Evidently will automatically save a snapshot
. There is no need to generate a snapshot explicitly.
If you already generated a snapshot, you can add it as well:
[DANGER] Delete workspace
If you want to delete an existing workspace, run the command from the Terminal:
Use this command to delete an empty workspace from the interface or a test project.
Note: this command will delete the snapshots stored in the folder. To maintain access to the generated snapshots, you must store them elsewhere.
Workspace API Reference
All available methods in the class Workspace:
Remote Workspace
You can also use a remote workspace
. In this scenario, you can generate the snapshots
locally and (using the add_snapshot
, add_test_suite
, add_report
commands) send it to the remote server where you run the Monitoring UI. You can use the remote workspace API to create and manage projects.
To create a remote workspace (UI should be running at this address):
You can pass the following parameters:
Parameter | Description |
---|---|
| URL for the remote UI service. |
| String with secret, None by default. Use it if access to the URL is protected by a password. |
The rest of the workdpace functionality and methods are the same.
Remote snapshot storage
You can also save snapshots
in a remote data store and access it from the UI service. 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](https://filesystem-spec.readthedocs.io/en/latest/api.html#built-in-implementations](https://filesystem-spec.readthedocs.io/en/latest/api.html#other-known-implementations ).
For example, to read snapshots from an S3 bucket (in this example we have MinIO running on localhost:9000), you must specify environment variables:
Code example
Refer to the service example:
Last updated