Skip to content

Commit

Permalink
Fixes in docs API section (#546)
Browse files Browse the repository at this point in the history
* Remove redundant information about the CLI

* Add missing `llm` key in example

* Reference `Learn` sections in API docs
  • Loading branch information
gabrielmbmb committed Apr 17, 2024
1 parent 23c5fe5 commit 2714b62
Show file tree
Hide file tree
Showing 8 changed files with 48 additions and 65 deletions.
41 changes: 1 addition & 40 deletions docs/api/cli.md
Original file line number Diff line number Diff line change
@@ -1,45 +1,6 @@
# Command Line Interface

This section contains the API reference for the command line interface.

## CLI commands

This section shows the CLI commands:

### distilabel pipeline run

```bash
$ distilabel pipeline info --help

Usage: distilabel pipeline info [OPTIONS]

Get information about a Distilabel pipeline.

╭─ Options ───────────────────────────────────────────────────────────────────────────╮
* --config TEXT Path or URL to the Distilabel pipeline configuration file. │
│ [default: None] │
│ [required] │
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────╯
```

### distilabel pipeline info

```bash
$ distilabel pipeline --help

Usage: distilabel pipeline [OPTIONS] COMMAND [ARGS]...

Commands to run and inspect Distilabel pipelines.

╭─ Options ───────────────────────────────────────────────────────────────────────────────╮
│ --help Show this message and exit. │
╰─────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ──────────────────────────────────────────────────────────────────────────────╮
│ info Get information about a Distilabel pipeline. │
│ run Run a Distilabel pipeline. │
╰─────────────────────────────────────────────────────────────────────────────────────────╯
```
This section contains the API reference for the command line interface. For more information on how to use the command line interface, see the [Tutorial - CLI](../sections/learn/cli.md).

## Utility functions for the pipeline commands

Expand Down
3 changes: 3 additions & 0 deletions docs/api/llms/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# LLMs

This section contains the API reference for the distilabel LLMs. For an example on how to implement and use an LLM, see the [Tutorial - LLMs](../../sections/learn/llms/index.md).
2 changes: 2 additions & 0 deletions docs/api/pipeline/pipeline.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Pipeline

This section contains the API reference for the distilabel pipelines. For an example on how to use the pipelines, see the [Tutorial - Pipelines](../../sections/learn/pipelines/index.md).

## Base Pipeline

::: distilabel.pipeline.base
Expand Down
5 changes: 5 additions & 0 deletions docs/api/steps/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Steps

This section contains the API reference for the distilabel steps. For an example on how to create and use a step, see the [Tutorial - Steps](../../sections/learn/steps/index.md).

::: distilabel.steps.base
3 changes: 0 additions & 3 deletions docs/api/steps/steps.md

This file was deleted.

2 changes: 2 additions & 0 deletions docs/api/steps/tasks/text_generation.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Tasks

This section contains the API reference for the distilabel tasks. For an example on how to create and use a task, see the [Tutorial - Tasks](../../../sections/learn/tasks/index.md).

::: distilabel.steps.tasks.base

## General Text Generation
Expand Down
54 changes: 33 additions & 21 deletions docs/sections/learn/pipelines/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,25 +111,31 @@ if __name__ == "__main__":
"repo_id": "distilabel-internal-testing/instruction-dataset-mini",
"split": "test",
},
"text_generation_with_openai-gpt-4-0125-preview": {
"generation_kwargs": {
"temperature": 0.7,
"max_new_tokens": 512,
"text_generation_with_gpt-4-0125-preview": {
"llm": {
"generation_kwargs": {
"temperature": 0.7,
"max_new_tokens": 512,
}
}
},
"text_generation_with_mistral-large-2402": {
"generation_kwargs": {
"temperature": 0.7,
"max_new_tokens": 512,
"llm": {
"generation_kwargs": {
"temperature": 0.7,
"max_new_tokens": 512,
}
}
},
"text_generation_with_vertexai-gemini-1.5-pro": {
"generation_kwargs": {
"temperature": 0.7,
"max_new_tokens": 512,
"text_generation_with_gemini-1.0-pro": {
"llm": {
"generation_kwargs": {
"temperature": 0.7,
"max_new_tokens": 512,
}
}
},
}
},
)
```

Expand Down Expand Up @@ -276,21 +282,27 @@ To sump up, here is the full code of the pipeline we have created in this sectio
"split": "test",
},
"text_generation_with_gpt-4-0125-preview": {
"generation_kwargs": {
"temperature": 0.7,
"max_new_tokens": 512,
"llm": {
"generation_kwargs": {
"temperature": 0.7,
"max_new_tokens": 512,
}
}
},
"text_generation_with_mistral-large-2402": {
"generation_kwargs": {
"temperature": 0.7,
"max_new_tokens": 512,
"llm": {
"generation_kwargs": {
"temperature": 0.7,
"max_new_tokens": 512,
}
}
},
"text_generation_with_gemini-1.0-pro": {
"generation_kwargs": {
"temperature": 0.7,
"max_new_tokens": 512,
"llm": {
"generation_kwargs": {
"temperature": 0.7,
"max_new_tokens": 512,
}
}
},
},
Expand Down
3 changes: 2 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ nav:
- Pipeline:
- "api/pipeline/pipeline.md"
- Steps:
- "api/steps/steps.md"
- "api/steps/index.md"
- Generator Steps: "api/steps/generator_steps/generator_steps.md"
- Global Steps: "api/steps/global_steps/global_steps.md"
- Tasks:
Expand All @@ -145,6 +145,7 @@ nav:
- "api/steps/tasks/embeddings.md"
- "api/steps/decorator.md"
- LLMs:
- "api/llms/index.md"
- "api/llms/anthropic.md"
- "api/llms/anyscale.md"
- "api/llms/huggingface.md"
Expand Down

0 comments on commit 2714b62

Please sign in to comment.