openlayer.OpenlayerClient.create_or_load_project#

OpenlayerClient.create_or_load_project(name, task_type, description=None)#

Helper function that returns a project given a name. Creates a new project if no project with the name exists.

Parameters
namestr

Name of your project.

Important

The project name must be unique in a user’s collection of projects.

task_typeTaskType

Type of ML task. E.g. TaskType.TabularClassification or TaskType.TextClassification.

descriptionstr

Project description.

Returns
Project

An object that is used to add models and datasets to the Openlayer platform that also contains information about the project.

Examples

Instantiate the client and create or load the project:

>>> import openlayer
>>> client = openlayer.OpenlayerClient('YOUR_API_KEY_HERE')
>>>
>>> from openlayer.tasks import TaskType
>>> project = client.create_or_load_project(
...     name="Churn prediction",
...     task_type=TaskType.TabularClassification,
...     description="My first error analysis playground",
... )

With the Project object, you are able to start adding models and datasets to it. Refer to add_model and add_dataset or add_dataframe for detailed examples.