Skip to content

Commit f48ed41

Browse files
gustavocidornelaswhoseoyster
authored andcommitted
Improve API reference organization, copy, and appearance
1 parent 054a4db commit f48ed41

File tree

16 files changed

+1208
-1172
lines changed

16 files changed

+1208
-1172
lines changed

docs/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
numpydoc
2-
pydata-sphinx-theme==0.8.1
3-
sphinx>=4.5.0
2+
pydata-sphinx-theme==0.14.1
3+
sphinx>=7.2.6
44
# These packages cause 'make' to break
55
protobuf==3.20.2
66
pygments>=2.7.0
Lines changed: 14 additions & 0 deletions
Loading

docs/source/conf.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
# -- Project information -----------------------------------------------------
2222

2323
project = "Openlayer Python API reference"
24-
copyright = "2022, Unbox Inc."
24+
copyright = "2023, Openlayer"
2525
author = "Openlayer"
2626

2727
# The short X.Y version
@@ -57,7 +57,7 @@
5757
# You can specify multiple suffix as a list of string:
5858
#
5959
# source_suffix = ['.rst', '.md']
60-
source_suffix = ".rst"
60+
source_suffix = [".rst", ".md"]
6161

6262
# The master toctree document.
6363
master_doc = "index"
@@ -101,17 +101,17 @@
101101
"github_url": "https://github.com/openlayer-ai/examples-gallery",
102102
"twitter_url": "https://twitter.com/openlayerco",
103103
# "google_analytics_id": "UA-27880019-2",
104-
"navbar_end": ["version-switcher", "navbar-icon-links"],
105-
"switcher": {
106-
# "json_url": "https://pandas.pydata.org/versions.json",
107-
"url_template": "https://openlayer.com/docs/{version}/",
108-
"version_match": switcher_version,
109-
},
104+
"navbar_end": ["navbar-icon-links"],
105+
# "switcher": {
106+
# # "json_url": "https://pandas.pydata.org/versions.json",
107+
# # "url_template": "https://openlayer.com/docs/{version}/",
108+
# # "version_match": switcher_version,
109+
# },
110110
}
111111

112112
# The name of an image file (relative to this directory) to place at the top
113113
# of the sidebar.
114-
html_logo = "_static/img/openlayer.svg"
114+
html_logo = "_static/img/openlayer-white.svg"
115115

116116
# Add any paths that contain custom static files (such as style sheets) here,
117117
# relative to this directory. They are copied after the builtin static files,

docs/source/index.rst

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,16 @@
55
66
.. module:: openlayer
77

8-
***********************
9-
Openlayer Documentation
10-
***********************
8+
*********************************
9+
Openlayer Python Client reference
10+
*********************************
1111

1212
**Date**: |today| **Version**: |version|
1313

1414
Welcome to the API documentation for `Openlayer <https://openlayer.com>`__!
1515

1616
These docs cover our official Python library, which you may use to interact with the Openlayer platform.
1717

18-
If you are new to Openlayer, or looking for more general documentation, including an introduction to the platform and in-depth tutorials,
19-
please navigate `here <https://docs.openlayer.com>`__.
20-
2118
Installation
2219
============
2320

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.. _api.authentication:
2+
3+
==============
4+
Authentication
5+
==============
6+
.. currentmodule:: openlayer
7+
8+
Openlayer uses API keys for client authentication. You can find your workspace API key on
9+
your `Account settings <https://docs.openlayer.com/docs/find-your-api-keys>`_.
10+
11+
The authentication step happens when the ``OpenlayerClient`` is instantiated.
12+
13+
Client
14+
------
15+
.. autosummary::
16+
:toctree: api/
17+
:template: class.rst
18+
19+
OpenlayerClient
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
.. _api.development:
2+
3+
===========
4+
Development
5+
===========
6+
.. currentmodule:: openlayer
7+
8+
The development mode of a project helps you as you iterate on your models and datasets.
9+
You will use the methods described on this page to add models and datasets to your
10+
development project,
11+
12+
To use these methods, you must have:
13+
14+
1. Authenticated, using :obj:`openlayer.OpenlayerClient`
15+
16+
2. Created a project, using :obj:`openlayer.OpenlayerClient.create_project`
17+
18+
**Related guide**: `How to upload datasets and models for development <https://docs.openlayer.com/docs/upload-datasets-and-models>`_.
19+
20+
21+
Staging area
22+
------------
23+
The upload of models and datasets to a project on Openlayer follows a similar flow
24+
to the one for uploading files to a version control system like Git.
25+
26+
The ``add_*`` methods, add models and datasets to the local staging area.
27+
As you add resources to the staging area, you can check its status using the
28+
``status`` method.
29+
30+
31+
Finally, the resources on the staging area are committed and pushed to the Openlayer
32+
platform using the ``commit`` and ``push`` methods.
33+
34+
35+
Datasets
36+
--------
37+
Datasets stored as Pandas dataframes or csv files can be easily added to a project's
38+
staging area with the methods below.
39+
40+
.. autosummary::
41+
:toctree: api/
42+
:template: class.rst
43+
44+
Project.add_dataset
45+
Project.add_dataframe
46+
47+
Models
48+
------
49+
Models are added to the staging area using the ``add_model`` method.
50+
51+
.. autosummary::
52+
:toctree: api/
53+
:template: class.rst
54+
55+
Project.add_model
56+
57+
Committing and pushing
58+
----------------------
59+
After adding resources to the staging area, you can commit and push them to Openlayer.
60+
61+
.. autosummary::
62+
:toctree: api/
63+
:template: class.rst
64+
65+
Project.commit
66+
Project.push
67+
68+
Other methods to interact with the staging area
69+
-----------------------------------------------
70+
Additional methods used to interact with the staging area.
71+
72+
.. autosummary::
73+
:toctree: api/
74+
:template: class.rst
75+
76+
Project.status
77+
Project.restore
78+
Project.export
79+
80+
Checking a project version's goal statuses
81+
------------------------------------------
82+
To programatically check the status of a project version's goals, use the
83+
``ProjectVersion`` object, which can be obtained using the ``load_project_version`` method.
84+
85+
.. autosummary::
86+
:toctree: api/
87+
:template: class.rst
88+
89+
ProjectVersion
90+
OpenlayerClient.load_project_version
91+
92+
93+
94+
95+

docs/source/reference/evaluation.rst

Lines changed: 0 additions & 42 deletions
This file was deleted.

docs/source/reference/index.rst

Lines changed: 27 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,40 @@
44
API reference
55
=============
66

7-
This page gives an overview of all public ``openlayer`` objects, functions and methods.
7+
This API reference has the technical description of the ``openlayer`` Python client API
8+
and shows how to operate it.
89

10+
If you are new to Openlayer, or looking for the full product documentation, including
11+
an introduction to the platform and in-depth tutorials, please navigate
12+
`here <https://docs.openlayer.com>`_.
13+
14+
Installation
15+
============
16+
17+
The :mod:`openlayer` library is available on PyPI and conda-forge, and can be installed
18+
with:
19+
20+
.. code:: console
21+
22+
$ pip install openlayer
23+
24+
.. code:: console
25+
26+
$ conda install openlayer --channel conda-forge
27+
28+
29+
Section Navigation
30+
==================
931

1032
.. toctree::
1133
:maxdepth: 2
1234

35+
authentication
1336
projects
14-
evaluation
37+
development
1538
monitoring
16-
validate
17-
objects
39+
.. validate
40+
.. objects
1841
1942
.. meta::
2043
:description lang=en:

docs/source/reference/monitoring.rst

Lines changed: 32 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,30 +5,54 @@ Monitoring
55
==========
66
.. currentmodule:: openlayer
77

8+
The monitoring mode of a project helps you keep track of model health in production and
9+
set up alert for when your model is not performing as expected.
10+
You will use the methods described on this page to create an inference pipeline, publish
11+
production data, and upload reference datasets.
12+
13+
To use these methods, you must have:
14+
15+
1. Authenticated, using :obj:`openlayer.OpenlayerClient`
16+
17+
2. Created a project, using :obj:`openlayer.OpenlayerClient.create_project`
18+
19+
**Related guide**: `How to set up monitoring <https://docs.openlayer.com/docs/set-up-monitoring>`_.
20+
821

922
Creating and loading inference pipelines
1023
----------------------------------------
24+
The inference pipeline represents a model deployed in production. It is part of an
25+
Openlayer project is what enables the monitoring mode.
26+
1127
.. autosummary::
1228
:toctree: api/
1329
:template: class.rst
1430

15-
OpenlayerClient.create_inference_pipeline
16-
OpenlayerClient.load_inference_pipeline
31+
Project.create_inference_pipeline
32+
Project.load_inference_pipeline
1733

18-
Uploading reference datasets
34+
Publishing production data
1935
----------------------------
36+
Production data is published to an inference pipeline on the Openlayer platform using
37+
the methods below.
38+
2039
.. autosummary::
2140
:toctree: api/
2241
:template: class.rst
2342

24-
OpenlayerClient.upload_reference_dataset
25-
OpenlayerClient.upload_reference_dataframe
43+
InferencePipeline.publish_batch_data
44+
InferencePipeline.publish_ground_truths
2645

27-
Publishing production data
46+
Uploading reference datasets
2847
----------------------------
48+
Reference datasets can be uploaded to an inference pipeline to enable data drift goals.
49+
The production data will be compared to the reference dataset to measure
50+
drift.
51+
2952
.. autosummary::
3053
:toctree: api/
3154
:template: class.rst
3255

33-
OpenlayerClient.publish_batch_data
34-
OpenlayerClient.publish_ground_truths
56+
InferencePipeline.upload_reference_dataset
57+
InferencePipeline.upload_reference_dataframe
58+

docs/source/reference/objects.rst

Lines changed: 0 additions & 27 deletions
This file was deleted.

0 commit comments

Comments
 (0)