openlayer.OpenlayerClient#
- class openlayer.OpenlayerClient(api_key=None, verbose=True)#
Client class that interacts with the Openlayer Platform.
- Parameters:
- api_keystr
Your API key. You can find your workspace API key in your account settings settings page.
- verbosebool, default True
Whether to print out success messages to the console. E.g., when data is successfully uploaded, a resource is staged, etc.
Examples
Relevant guide: How to find your API keys.
Instantiate a client with your api key:
>>> import openlayer >>> >>> client = openlayer.OpenlayerClient('YOUR_API_KEY_HERE')
Methods
add_baseline_model
(project_id, task_type[, ...])Coming soon...
add_dataframe
(dataset_df, task_type[, ...])Adds a dataset to a project's staging area (from a pandas DataFrame).
add_dataset
(file_path, task_type[, ...])Adds a dataset to a project's staging area (from a csv).
add_model
(task_type[, model_config, ...])Adds a model to a project's staging area.
commit
(message, project_id[, force])Adds a commit message to staged resources.
create_inference_pipeline
(project_id, task_type)Creates an inference pipeline in an Openlayer project.
create_or_load_project
(name, task_type[, ...])Convenience function that either creates or loads a project.
create_project
(name, task_type[, description])Creates a project on the Openlayer platform.
export
(destination_dir, project_id, task_type)Exports the commited resources as a tarfile to the location specified by
destination_dir
.load_inference_pipeline
(project_id, task_type)Loads an existing inference pipeline from an Openlayer project.
load_project
(name)Loads an existing project from the Openlayer platform.
load_project_version
(version_id)Loads an existing project version from the Openlayer platform.
publish_batch_data
(inference_pipeline_id, ...)Publishes a batch of production data to the Openlayer platform.
publish_ground_truths
(inference_pipeline_id, ...)Publishes ground truths to the Openlayer platform.
push
(project_id, task_type)Pushes the commited resources to the platform.
restore
(*resource_names, project_id)Removes the resource specified by
resource_name
from the staging area.status
(project_id)Shows the state of the staging area.
stream_data
(inference_pipeline_id, ...[, ...])Streams production data to the Openlayer platform.
update_data
(inference_pipeline_id, df, ...)Updates data already on the Openlayer platform.
upload_reference_dataframe
(...[, ...])Uploads a reference dataset (a pandas dataframe) to an inference pipeline.
upload_reference_dataset
(...[, ...])Uploads a reference dataset saved as a csv file to an inference pipeline.