Skip to content
This repository has been archived by the owner on Oct 16, 2024. It is now read-only.

New docs structure #188

Merged
merged 109 commits into from
Oct 27, 2022
Merged
Show file tree
Hide file tree
Changes from 61 commits
Commits
Show all changes
109 commits
Select commit Hold shift + click to select a range
1f50a51
initial commit
mike0sv Sep 16, 2022
9ee436c
linting
mike0sv Sep 16, 2022
2c0b544
linting
mike0sv Sep 16, 2022
b34b321
some examples
mike0sv Sep 16, 2022
bab1679
descriptions
mike0sv Sep 16, 2022
3d346d3
add kubernetes
mike0sv Sep 16, 2022
ea9a9d6
sagemaker docs
mike0sv Sep 19, 2022
dabcdd1
fix sidebar
mike0sv Oct 4, 2022
1753e78
move advanced
mike0sv Oct 4, 2022
5e264c0
general structure
mike0sv Oct 4, 2022
4617f12
object reference re-do
mike0sv Oct 4, 2022
08c36f1
Merge branch 'release/0.3.0' into new-docs-structure
aguschin Oct 5, 2022
fdcb741
builders
mike0sv Oct 5, 2022
577eea9
mlem-abc links
mike0sv Oct 5, 2022
95c6fb8
sidebar fixes and object ref sorting
mike0sv Oct 5, 2022
3a6ac9a
smore sidebar fixes
mike0sv Oct 5, 2022
3296581
add to ignore
mike0sv Oct 5, 2022
4cc2fc9
smol sidebar fix
mike0sv Oct 5, 2022
5a4509c
Merge remote-tracking branch 'origin/new-docs-structure' into new-doc…
mike0sv Oct 5, 2022
16eba0f
smol lint fix
mike0sv Oct 5, 2022
91dae68
rewriting GS WIP
aguschin Oct 5, 2022
b9356fc
Merge branch 'new-docs-structure' of github.com:iterative/mlem.ai int…
aguschin Oct 5, 2022
387d553
fix lint
aguschin Oct 5, 2022
c4133bb
update serving.md
aguschin Oct 6, 2022
3f40d45
fix typos
aguschin Oct 6, 2022
4d444a9
sorting user guide sidebar
aguschin Oct 6, 2022
d216f6b
simplify get-started/building
aguschin Oct 7, 2022
6e30635
update gs/building
aguschin Oct 7, 2022
5887340
updating user-guide/serving
aguschin Oct 7, 2022
1c44fd6
user-guide/{building, serving}
aguschin Oct 7, 2022
4e96078
user-guide/{building,deploying,models}
aguschin Oct 10, 2022
e1abc9c
remove ls from api and cli
aguschin Oct 10, 2022
b3e3f5e
remove ls from api and cli
aguschin Oct 10, 2022
1e8b46d
update gs using Jorge's feedback
aguschin Oct 11, 2022
2c96f1d
object-reference: updating index pages
aguschin Oct 11, 2022
86a9ace
object-reference/index
aguschin Oct 12, 2022
db3a161
object-reference/index
aguschin Oct 13, 2022
22ad698
get-started
aguschin Oct 16, 2022
75851c1
remove extra part
aguschin Oct 16, 2022
c472436
use-cases: changing page locations
aguschin Oct 16, 2022
3c517f9
get-started/deploying
aguschin Oct 17, 2022
5856a37
fix index get-started snippet
mike0sv Oct 17, 2022
a7749bc
deployments docs
mike0sv Oct 17, 2022
edc1931
Update content/docs/get-started/index.md
aguschin Oct 18, 2022
d4b6230
Update content/docs/get-started/index.md
aguschin Oct 18, 2022
58c6e00
Update content/docs/get-started/index.md
aguschin Oct 18, 2022
4ae9318
Update content/docs/get-started/index.md
aguschin Oct 18, 2022
71e0edd
Update content/docs/get-started/index.md
aguschin Oct 18, 2022
a171a85
object-reference: re-generate, add serving/sagemaker page
aguschin Oct 18, 2022
35bae87
format code with black
aguschin Oct 18, 2022
3e994a0
remove .mlem/ dir mentions, rename .mlem/config.yaml to .mlem.yaml
aguschin Oct 18, 2022
8447773
fix linting
aguschin Oct 18, 2022
f4c489d
command-reference: re-generate it
aguschin Oct 18, 2022
a3ae71b
remove mlem list mentions
aguschin Oct 18, 2022
7d76ec1
remove --conf and -c options
aguschin Oct 18, 2022
ff46362
use-cases: update
aguschin Oct 18, 2022
e09104c
API ref bootstrap WIP
mike0sv Oct 19, 2022
d6cae58
update bootstrap_api.py
aguschin Oct 19, 2022
d9d0e1e
improve scripts
aguschin Oct 19, 2022
44e7413
regenerate API and fix CLI reference
aguschin Oct 19, 2022
9da5477
Apply suggestions from code review
aguschin Oct 20, 2022
02942c8
get-started/new changes
aguschin Oct 20, 2022
15b2062
merging
aguschin Oct 20, 2022
1498d66
remove dvc/s3/gh/gl/bb from the sidebar
aguschin Oct 20, 2022
0079da1
return user-guide/heroku, update user-guide/sagemaker
aguschin Oct 20, 2022
8d95062
remove outdated examples and replace them with link to GS and UG
aguschin Oct 20, 2022
98a6361
Merge pull request #197 from iterative/api-reference-script
aguschin Oct 21, 2022
fcd25d4
update sagemaker
aguschin Oct 21, 2022
706947b
add deployment to k8s docs
madhur-tandon Sep 20, 2022
b94d888
fix lint
madhur-tandon Sep 20, 2022
f8236a0
move to user guides
madhur-tandon Oct 13, 2022
e8bdc45
suggested fixes
madhur-tandon Oct 21, 2022
a033b1e
fix linting
madhur-tandon Oct 21, 2022
fb0f477
remove usage of --conf
madhur-tandon Oct 21, 2022
9926b74
remove newline between cmd and output
madhur-tandon Oct 21, 2022
7c1b8d2
adjustments due to refactor of deployments
madhur-tandon Oct 21, 2022
f6c94e0
Merge pull request #183 from iterative/k8s-docs
madhur-tandon Oct 21, 2022
b277052
Update index.md
aguschin Oct 24, 2022
8479856
sagemaker declare examples
mike0sv Oct 25, 2022
20e0074
fix broken links
madhur-tandon Oct 25, 2022
02870a2
remove unneeded stuff
madhur-tandon Oct 25, 2022
fd4e742
fix one more link
madhur-tandon Oct 25, 2022
ddefa30
fix lint
madhur-tandon Oct 25, 2022
6498369
Update content/docs/get-started/deploying.md
aguschin Oct 25, 2022
4a965d2
Merge pull request #201 from iterative/fix/broken-links
madhur-tandon Oct 25, 2022
13ca5a7
add UG for docker
madhur-tandon Oct 25, 2022
c9d3ecb
suggested changes
madhur-tandon Oct 26, 2022
56797e3
Merge pull request #202 from iterative/user-guide-docker
madhur-tandon Oct 26, 2022
3db2ad2
add docs for requirement, venv, conda builders
madhur-tandon Oct 13, 2022
715292a
change titles
madhur-tandon Oct 13, 2022
c05631e
move to user guide
madhur-tandon Oct 13, 2022
de66408
address minor feedback
madhur-tandon Oct 17, 2022
991ce65
fix requirements.md
madhur-tandon Oct 25, 2022
cb30fb0
fix venv
madhur-tandon Oct 25, 2022
37846af
update custom reqs
madhur-tandon Oct 25, 2022
c13d140
minor fixes
madhur-tandon Oct 25, 2022
b2bc7f3
fix conda reqs docs
madhur-tandon Oct 25, 2022
3042586
suggested changes
madhur-tandon Oct 25, 2022
46534e3
suggested changes
madhur-tandon Oct 26, 2022
d2be41a
add object-refs
madhur-tandon Oct 26, 2022
04e2c5d
update sidebar
madhur-tandon Oct 26, 2022
501b7ed
import f from another file for custom reqs
madhur-tandon Oct 27, 2022
d5987c6
change filename to func
madhur-tandon Oct 27, 2022
c9565a7
add a note about pip builder
madhur-tandon Oct 27, 2022
2d34fec
comment our file reqs section
madhur-tandon Oct 27, 2022
d39200e
Merge pull request #191 from iterative/requirement-builder-docs
madhur-tandon Oct 27, 2022
e9a4c5f
Update sidebar.json
aguschin Oct 27, 2022
4262403
Update sidebar.json
aguschin Oct 27, 2022
2422c20
Update sidebar.json
aguschin Oct 27, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions content/docs/api-reference/build.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# mlem.api.build()

Build a [MLEM model](/doc/user-guide/mlem-abcs#modeltype) in pip-ready format, a
built package using whl, docker-build-ready folder or directly build a docker
image.
Build a [MLEM model](/doc/object-reference/mlem-abcs#modeltype) in pip-ready
format, a built package using whl, docker-build-ready folder or directly build a
docker image.

```py
def build(
Expand Down
6 changes: 3 additions & 3 deletions content/docs/api-reference/init.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# mlem.api.init()

Creates and populates the `.mlem/` directory in `path`.
Creates `.mlem.yaml` config file in `path`. See
[User Guide](/doc/user-guide/configuration) for more details.

```py
def init(path: str = ".") -> None
Expand All @@ -16,8 +17,7 @@ init(path)

## Description

Initializes a MLEM project by creating a `.mlem/` directory inside the given
path. A new and empty `config.yaml` is also created inside it.
Initializes a MLEM project by creating a new and empty `.mlem.yaml` file.

## Parameters

Expand Down
53 changes: 0 additions & 53 deletions content/docs/api-reference/ls.md

This file was deleted.

9 changes: 4 additions & 5 deletions content/docs/command-reference/apply-remote.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# apply-remote

Apply a deployed-model (possibly remotely) to data. The results will be saved as
a MLEM object to `output` if provided. Otherwise, it will be printed to
`stdout`.
a [MLEM Object](/doc/user-guide/basic-concepts) to `output` if provided.
Otherwise, it will be printed to `stdout`.

## Synopsis

```usage
usage: mlem apply-remote [-d <path>] [-p <path>] [--rev <commitish>]
[-o <path>] [--tp <path>] [-m <text>]
[--index] [--json] [-f <text>] [-h]
[--json] [-f <text>] [-h]
[<client> [client options] | --load <declaration>]

Builtin clients:
Expand Down Expand Up @@ -39,7 +39,6 @@ clients are `http` and `rmq` - which are used to launch requests against the
(none)]
- `-m <text>`, `--method <text>` - Which model method is to be applied [default:
predict]
- `--index` / `--no-index` - Whether to index output in .mlem directory
- `--json` - Output as json
- `-f <text>`, `--file_conf <text>` - File with options for client in format
`field.name=path_to_config`
Expand All @@ -53,5 +52,5 @@ this) and a local MLEM dataset `mydataset`, run the following command to infer
the entire dataset with the model and save the output result to `myprediction`

```cli
$ mlem apply-remote http mydataset --conf host="127.0.0.1" --conf port=3000 --output myprediction
$ mlem apply-remote http mydataset --host="127.0.0.1" --port=3000 --output myprediction
```
17 changes: 8 additions & 9 deletions content/docs/command-reference/apply.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# apply

Apply a model to data. The result will be saved as a MLEM object to `output` if
provided. Otherwise, it will be printed to `stdout`.
Apply a model to data. The result will be saved as a
[MLEM Object](/doc/user-guide/basic-concepts) to `output` if provided.
Otherwise, it will be printed to `stdout`.

## Synopsis

```usage
usage: mlem apply [-p <path>] [--rev <commitish>] [-o <path>]
[-m <text>] [--dr <path>]
[--data-rev <commitish>] [-i] [--it <text>]
[-b <integer>] [--index] [-e] [--json] [-h]
[-m <text>] [--dp <path>] [--dr <commitish>]
[-i] [--it <text>] [-b <integer>] [--json]
[-h]
model data

arguments:
Expand Down Expand Up @@ -38,15 +39,13 @@ datasets.
- `-o <path>`, `--output <path>` - Where to save model outputs
- `-m <text>`, `--method <text>` - Which model method is to be applied [default:
predict]
- `--dr <path>`, `--data-project <path>` - Project with data
- `--data-rev <commitish>` - Revision of data
- `--dp <path>`, `--data-project <path>` - Project with data
- `--dr <commitish>`, `--data-rev <commitish>` - Revision of data
- `-i`, `--import` - Try to import data on-the-fly
- `--it <text>`, `--import-type <text>` - Specify how to read data file for
import. Available types: ['pandas', 'pickle', 'torch']
- `-b <integer>`, `--batch_size <integer>` - Batch size for reading data in
batches
- `--index` / `--no-index` - Whether to index output in .mlem directory
- `-e`, `--external` - Save result not in .mlem, but directly in project
- `--json` - Output as json
- `-h`, `--help` - Show this message and exit.

Expand Down
5 changes: 2 additions & 3 deletions content/docs/command-reference/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ usage: mlem build [-m <path>] [-p <path>] [--rev <commitish>]
Builtin builders:
- docker
- docker_dir
- kubernetes
- pip
- whl
```
Expand All @@ -38,14 +37,14 @@ images.
Build a Docker image from a model

```cli
$ mlem build mymodel docker --conf server.type=fastapi --conf image.name=myimage
$ mlem build mymodel docker --server.type=fastapi --image.name=myimage
```

Create a `docker_dir` builder config called `build_dock`, and use it to package
a model

```cli
$ mlem declare builder docker_dir --conf server=fastapi --conf target=build build_dock
$ mlem declare builder docker_dir --server=fastapi --target=build build_dock
...

$ mlem build mymodel --load build_dock
Expand Down
6 changes: 6 additions & 0 deletions content/docs/command-reference/checkenv.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,9 @@ arguments:
- `-h`, `--help` - Show this message and exit.

## Examples

```cli
$ mlem checkenv rf
⏳️ Loading meta from rf.mlem
✅ Requirements are satisfied!
```
8 changes: 3 additions & 5 deletions content/docs/command-reference/clone.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# clone

Copy a [MLEM Object](/doc/user-guide/basic-concepts#mlem-objects) from `uri` and
saves a copy of it to `target` path.
Copy a [MLEM Object](/doc/user-guide/basic-concepts) from `uri` and saves a copy
of it to `target` path.

## Synopsis

```usage
usage: mlem clone [-p <path>] [--rev <commitish>]
[--tp <path>] [-e] [--index] [-h]
[--tp <path>] [-h]
uri target

arguments:
Expand All @@ -28,8 +28,6 @@ repository.
- `--rev <commitish>` - Repo revision to use [default: (none)]
- `--tp <path>`, `--target-project <path>` - Project to save target to [default:
(none)]
- `-e`, `--external` - Save result not in .mlem, but directly in project
- `--index` / `--no-index` - Whether to index output in .mlem directory
- `-h`, `--help` - Show this message and exit.

## Examples
Expand Down
8 changes: 4 additions & 4 deletions content/docs/command-reference/declare.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# declare

Declares a new [MLEM Object](/doc/user-guide/basic-concepts#mlem-objects)
metafile from config args and config files.
Declares a new [MLEM Object](/doc/user-guide/basic-concepts)
[MLEM Object](/doc/user-guide/basic-concepts) from config args and config files.

## Synopsis

Expand Down Expand Up @@ -45,10 +45,10 @@ $ mlem types env heroku

# Declare the heroku env
$ mlem declare env heroku production --api_key mlem_heroku_staging
💾 Saving env to .mlem/env/staging.mlem
💾 Saving env to staging.mlem

# Print the contents of the new heroku env metafile
$ cat .mlem/env/staging.mlem
$ cat staging.mlem
api_key: mlem_heroku_staging
object_type: env
type: heroku
Expand Down
10 changes: 4 additions & 6 deletions content/docs/command-reference/deployment/apply.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@ Apply a deployed model to data.

```usage
usage: mlem deployment apply [-p <path>] [--rev <commitish>]
[--dr <path>] [--data-rev <commitish>]
[-o <text>] [--tp <path>] [-m <text>]
[--index] [--json] [-h]
[--dp <path>] [--dr <commitish>] [-o <text>]
[--tp <path>] [-m <text>] [--json] [-h]
path data

arguments:
Expand All @@ -27,14 +26,13 @@ gathered and returned, also as a MLEM Object.

- `-p <path>`, `--project <path>` - Path to MLEM project [default: (none)]
- `--rev <commitish>` - Repo revision to use [default: (none)]
- `--dr <path>`, `--data-project <path>` - Project with data
- `--data-rev <commitish>` - Revision of data
- `--dp <path>`, `--data-project <path>` - Project with data
- `--dr <commitish>`, `--data-rev <commitish>` - Revision of data
- `-o <text>`, `--output <text>` - Where to store the outputs.
- `--tp <path>`, `--target-project <path>` - Project to save target to [default:
(none)]
- `-m <text>`, `--method <text>` - Which model method is to be applied [default:
predict]
- `--index` / `--no-index` - Whether to index output in .mlem directory
- `--json` - Output as json
- `-h`, `--help` - Show this message and exit.

Expand Down
2 changes: 1 addition & 1 deletion content/docs/command-reference/deployment/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ usage: mlem deployment [-h]
command

subcommands:
run Deploy a model to a target environment.
remove Stop and destroy deployed instance.
status Print status of deployed service.
wait Wait for status of deployed service
apply Apply a deployed model to data.
run Deploy a model to a target environment.
```

## Description
Expand Down
28 changes: 12 additions & 16 deletions content/docs/command-reference/deployment/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@ declaration or create a new one on-the-fly.
## Synopsis

```usage
usage: mlem deployment run [-m <text>] [-t <text>] [-p <path>] [-e]
[--index] [-c <text>] [-h]
path

arguments:
path Path to deployment meta (will be created if it does not
exist)
usage: mlem deployment run [-l <path>] [-m <path>] [--mp <path>]
[--mr <commitish>] [-p <path>]
[--rev <commitish>] [-h]
```

## Description
Expand All @@ -24,12 +20,12 @@ options (see below).

## Options

- `-m <text>`, `--model <text>` - Path to model
- `-t <text>`, `--env <text>` - Path to target environment
- `-l <path>`, `--load <path>` - File to load deployment config from
- `-m <path>`, `--model <path>` - Path to MLEM model
- `--mp <path>`, `--model-project <path>` - Project with model
- `--mr <commitish>`, `--model-rev <commitish>` - Revision of model
- `-p <path>`, `--project <path>` - Path to MLEM project [default: (none)]
- `-e`, `--external` - Save result not in .mlem, but directly in project
- `--index` / `--no-index` - Whether to index output in .mlem directory
- `-c <text>`, `--conf <text>` - Options in format `field.name=value`
- `--rev <commitish>` - Repo revision to use [default: (none)]
- `-h`, `--help` - Show this message and exit.

## Example: Create a new deployment from scratch
Expand All @@ -38,10 +34,10 @@ Here, we define an environment and then run a deployment on it, providing the
deployment configuration on-the-fly

```cli
$ mlem declare env heroku staging --conf api_key=...
$ mlem declare env heroku staging --api_key=...
...

$ mlem deployment run service_name --model model --env staging --conf name=my_service
$ mlem deployment run service_name --model model --env staging --name=my_service
...
```

Expand All @@ -53,10 +49,10 @@ deployment with a simple concise command which uses the existing pre-configured
deployment declaration

```cli
$ mlem declare env heroku staging --conf api_key=...
$ mlem declare env heroku staging --api_key=...
...

$ mlem declare deployment heroku service_name --conf app_name=my_service --conf model=model --conf env=staging
$ mlem declare deployment heroku service_name --app_name=my_service --model=model --env=staging
...

$ mlem deploy run service_name
Expand Down
16 changes: 9 additions & 7 deletions content/docs/command-reference/import.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# import

Create a `.mlem` metafile for a model or data in any file or directory.
Create a `.mlem` [MLEM Object](/doc/user-guide/basic-concepts) for a model or
data in any file or directory.

## Synopsis

```usage
usage: mlem import [-p <path>] [--rev <commitish>]
[--tp <path>] [--copy] [--type <text>]
[--index] [-e] [-h]
[--tp <path>] [--copy] [--type <text>] [-h]
uri target

arguments:
Expand Down Expand Up @@ -35,8 +35,6 @@ load those models/datasets into object for subsequent usage in MLEM context.
or just link existing file [default: copy]
- `--type <text>` - Specify how to read file Available types: ['pandas',
'pickle', 'torch'] [default: (auto infer)]
- `--index` / `--no-index` - Whether to index output in .mlem directory
- `-e`, `--external` - Save result not in .mlem, but directly in project
- `-h`, `--help` - Show this message and exit.

## Examples
Expand All @@ -58,6 +56,10 @@ $ mlem import data/model.pkl data/imported_model
Create a MLEM model from remote `.pkl` (pickle) file

```cli
$ mlem import .mlem/model/rf --project https://github.com/iterative/example-mlem-get-started --rev main data/imported_model --type pickle
💾 Saving model to .mlem/model/data/imported_model.mlem
$ mlem import models/rf \
--project https://github.com/iterative/example-mlem-get-started \
--rev main \
data/imported_model \
--type pickle
💾 Saving model to data/imported_model.mlem
```
6 changes: 3 additions & 3 deletions content/docs/command-reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ For a list of all commands, type `mlem -h`

## Typical MLEM workflow

- Initialize a MLEM project in a Git Repo with
[mlem init](/doc/command-reference/init).
- Save Models and Data with MLEM.
First, save models with MLEM using [mlem.api.save](/doc/api-reference/save).
Second, productionize them as you want:

- Load and Apply models with [mlem apply](/doc/command-reference/apply).
- Build models into Python packages or Docker images with
[mlem build](/doc/command-reference/build).
Expand Down
Loading