Skip to content

Commit

Permalink
Merge pull request #1096 from gchq/feature/using-a-model-documentation
Browse files Browse the repository at this point in the history
Feature/using a model documentation
  • Loading branch information
ARADDCC002 authored Feb 20, 2024
2 parents 35de704 + 66fafe3 commit dc4743f
Show file tree
Hide file tree
Showing 15 changed files with 107 additions and 15 deletions.
3 changes: 3 additions & 0 deletions frontend/pages/docs/directory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ export const flatDirectory: Array<DirectoryEntry> = [
{ title: 'Uploading Images', slug: 'users/managing-models-and-releases/upload-to-bailo/images' },

{ title: 'Using a Model', slug: 'users/using-a-model', header: true },
{ title: 'Requesting Access', slug: 'users/using-a-model/requesting-access' },
{ title: 'Personal Access Tokens', slug: 'users/using-a-model/personal-access-tokens' },
{ title: 'Using a a Pushed Docker Image', slug: 'users/using-a-model/using-a-pushed-docker-image' },
{ title: 'Downloading files', slug: 'users/using-a-model/downloading-files' },

{ title: 'Reviews', slug: 'users/reviews', header: true },
{ title: 'Reviewing Releases and Access Requests', slug: 'users/reviews/reviewing', header: true },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ Bailo to build and use your prepared models.

## Adding files to a new release

Files are unique for each release. Therefore if you decide to create a new release you can use the same file name, with
the updated parameters or information. In this example we'll be adding `yolov4.onnx` to a new release.
Files are unique for each release. Therefore, if you decide to create a new release you can use the same file name, with
the updated parameters or information. In this example we will be adding `yolov4.onnx` to a new release.

<br />

Expand All @@ -23,7 +23,7 @@ the updated parameters or information. In this example we'll be adding `yolov4.o

## Adding files to an existing release

Similarly you can upload and delete a file to an existing release by clicking edit release.
Similarly, you can upload and delete a file to an existing release by editing an existing release.

<Box sx={{ maxWidth: '75%', margin: 'auto' }}>
<Image src={bailoUploadedFile} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ import bailoImageRelease from 'public/docs/bailo_add_image_to_release.png'

# Uploading docker images

Bailo uses a docker registry to store images of models. Unlike files docker images are model specific meaning you upload
them to a model and then add them to a release.
Bailo uses a docker registry to store images of models. Unlike files, docker images are model specific; meaning that you
upload them to a model and then add them to a release.

## Pushing a model to Bailo

You can push a model to Bailo by following the instructions in registry tab of your model.
You can push a model to Bailo by following the instructions in the registry tab of your model.

<Box sx={{ maxWidth: '75%', margin: 'auto' }}>
<Image src={bailoPushImage} />
Expand All @@ -28,7 +28,7 @@ Once your image has been pushed to Bailo's registry you can now add it to one of

## What is a docker container?

In the context of bailo a docker container is an isolated application or service that can be used to run your models
In the context of bailo, a docker container is an isolated application or service that can be used to run your models
from. This makes models easier to work with as models can just be 'spun-up' and inferenced from.

export default ({ children }) => <DocsWrapper>{children}</DocsWrapper>
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ Client("http://127.0.0.1:8080", cert="path/to/cert.pem", key="path/to/key.pem",

## Token Agents

If not using PKI Bailo allows the usage of access tokens to allow for fine-grained access Tokens are used to grant
access to models within bailo to specific models and specific actions. These can be found in
If you are not using PKI then Bailo allows the usage of access tokens to allow for fine-grained access. Tokens are used
to grant access to models within Bailo to specific models and specific actions. These can be found in
`Settings > Authentication`.

<Box sx={{ maxWidth: '75%', margin: 'auto' }}>
<Image src={bailoSettingsAuth} />
</Box>

To create a new access token, press `Add token` and select the options from bellow.
To create a new access token, press `Add token` and select the options from below.

- `image:read` Allows you to download images from Bailo
- `file:read` Allows you to download files from Bailo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import DocsWrapper from 'src/docs/DocsWrapper'
# Python Client

Bailo also provides a wrapper for all endpoints in the form of a Python Client. It is now avalible on the Python Package
Index!
Index.

**You can find the full Python documentation [here](/docs/python/index.html)!**
**You can find the full Python documentation [here](/docs/python/index.html)**

Install the Python Client with:

Expand All @@ -17,9 +17,8 @@ Install the Python Client with:
## Why would I want to use this instead of the Webpage?
Bailo itself is great for managing the lifecycle of models. This python package is specifically designed to integrate
with Python's tools and packages. This is ideal for using pretrained models in your notebooks, data analysis, automation
or scripting.
This python package is specifically designed to integrate with Python's tools and packages. This is ideal for using
pretrained models in your notebooks, data analysis, automation or scripting.
### Scripting and Automation
Expand Down
23 changes: 23 additions & 0 deletions frontend/pages/docs/users/using-a-model/downloading-files.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import DocsWrapper from 'src/docs/DocsWrapper'
import Image from 'next/legacy/image'
import Box from '@mui/material/Box'

import releases from 'public/docs/bailo_releases.png'
import release from 'public/docs/bailo_release.png'

## How to download files

Files are attached to model releases. You can download files from a release in one of two ways - by either finding the
release in the `Releases` tab and clicking the file download link:

<Box sx={{ maxWidth: '75%', margin: 'auto' }}>
<Image src={releases} />
</Box>

or alternatively, visiting the page for a specific release and clicking the file download link:

<Box sx={{ maxWidth: '75%', margin: 'auto' }}>
<Image src={release} />
</Box>

export default ({ children }) => <DocsWrapper>{children}</DocsWrapper>
28 changes: 28 additions & 0 deletions frontend/pages/docs/users/using-a-model/personal-access-tokens.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import DocsWrapper from 'src/docs/DocsWrapper'
import Image from 'next/legacy/image'
import Box from '@mui/material/Box'

import personalAccessTokens from 'public/docs/bailo_personal_access_tokens.png'
import createPersonalAccessToken from 'public/docs/bailo_create_personal_access_token.png'

## What are Personal Access Tokens?

Personal Access Tokens are used to authenticate users when interacting with the registry. When creating a token you will
be asked to specify which models the token can be used with and which actions the token is able to authenticate.

## How to create a Personal Access Token

Visit the personal access tokens page. From here you can click the `Add Token` button to create a new personal access
token:

<Box sx={{ maxWidth: '75%', margin: 'auto' }}>
<Image src={personalAccessTokens} />
</Box>

Finally, fill out the form and click `Generate Token`:

<Box sx={{ maxWidth: '75%', margin: 'auto' }}>
<Image src={createPersonalAccessToken} />
</Box>

export default ({ children }) => <DocsWrapper>{children}</DocsWrapper>
39 changes: 39 additions & 0 deletions frontend/pages/docs/users/using-a-model/requesting-access.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import DocsWrapper from 'src/docs/DocsWrapper'
import Image from 'next/legacy/image'
import Box from '@mui/material/Box'

import modelOverview from 'public/docs/bailo_model_overview.png'
import selectAccessRequestSchema from 'public/docs/bailo_select_access_request_schema.png'
import createAccessRequest from 'public/docs/bailo_create_access_request.png'

## What is an Access Request?

In order to use a model you must first request access to the model. This is so that those managing the model can
authorise and keep tracking of anyone who wants to request access.

## How to make an Access Request

Visit the model overview page. From here you can click the "Request Access" button to create a new access request:

<Box sx={{ maxWidth: '75%', margin: 'auto' }}>
<Image src={modelOverview} />
</Box>

Much like creating a model, access requests forms require a schema, this can be selected like so:

<Box sx={{ maxWidth: '75%', margin: 'auto' }}>
<Image src={selectAccessRequestSchema} />
</Box>

Finally, fill out the form and submit your access request:

<Box sx={{ maxWidth: '75%', margin: 'auto' }}>
<Image src={createAccessRequest} />
</Box>

## Review Process

Once this request has been approved by the necessary role you will be able to download Release artefacts and push docker
images.

export default ({ children }) => <DocsWrapper>{children}</DocsWrapper>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/docs/bailo_model_overview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/docs/bailo_release.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/docs/bailo_releases.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit dc4743f

Please sign in to comment.