Xpdeep API Key Concepts#
Below you will find a set of key concepts to help you get started with learning explainable deep models using the Xpdeep APIs.
Any experimentation should begin with the creation of a project named Project
which is intended to contain all objects
such as trained models and various results obtained. Results related to a Project
are referred to as Artifact
.
The concepts of Project
and Artifact
are described below.
A Project
to Track all your Experiments#
Any experimentation using Xpdeep APIs should start with the creation of a Project
, and all operations and API calls
are linked to a Project
.
A Project
is the analog to a directory. It is used to track and store all your results during experimentation, these
results may include the trained models, their explanations or any other results.
from xpdeep import init
from xpdeep.project import Project, get_all_projects
init(api_key="api_key", api_url="api_url")
with Project(id="a unique id for your Project",name="MyProjectName") as project:
project.delete() # Delete the project if you want to remove your experiment.
available_projects = get_all_projects() # Retrieve the available projects.
Warning
Don't forget to set up your API credentials with xpdeep init
.
Tip
You can also use xpdeep.set_project
function to create a Project
for your session.
An Artifact
to Save your Results inside a Project#
API call results are saved as artifacts on the Xpdeep server. An Artifact
is automatically versioned and stored within
your project. Each Artifact
has at least an ID, an associated Project
, and a name. For example, an Artifact
can be
a trained model TrainedModelArtifact
, a set of explanations ExplanationArtifact
, or any file under a DirectoryArtifact
.
The Cache System#
Xpdeep cache system is a convenient way to avoid redundant operations and speed up your computation.
All artifacts are cached. A unique fingerprint is computed and associated to the artifact and its computation process. If you call again the same process with the same parameters, the same artifact will be returned without unnecessary computations.