Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update docs #779

Merged
merged 3 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
58 changes: 58 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Generating the documentation

To generate the documentation, you have to build it. Several packages are necessary to build the doc.

First, you need to install the project itself by running the following command at the root of the code repository:

```bash
pip install -e .
```

You also need to install 2 extra packages:

```bash
# `hf-doc-builder` to build the docs
pip install git+https://github.com/huggingface/doc-builder@main
# `watchdog` for live reloads
pip install watchdog
```

---
**NOTE**

You only need to generate the documentation to inspect it locally (if you're planning changes and want to
check how they look before committing for instance). You don't have to commit the built documentation.

---

## Building the documentation

Once you have setup the `doc-builder` and additional packages with the pip install command above,
you can generate the documentation by typing the following command:

```bash
doc-builder build autotrain docs/source/ --build_dir ~/tmp/test-build
```

You can adapt the `--build_dir` to set any temporary folder that you prefer. This command will create it and generate
the MDX files that will be rendered as the documentation on the main website. You can inspect them in your favorite
Markdown editor.

## Previewing the documentation

To preview the docs, run the following command:

```bash
doc-builder preview autotrain docs/source/
```

The docs will be viewable at [http://localhost:5173](http://localhost:5173). You can also preview the docs once you
have opened a PR. You will see a bot add a comment to a link where the documentation with your changes lives.

---
**NOTE**

The `preview` command only works with existing doc files. When you add a completely new file, you need to update
`_toctree.yml` & restart `preview` command (`ctrl-c` to stop it & call `doc-builder preview ...` again).

---
44 changes: 22 additions & 22 deletions docs/source/_toctree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,50 +25,50 @@
title: AutoTrain API
title: Miscellaneous
- sections:
- local: text_classification
- local: tasks/text_classification
title: Text Classification
- local: extractive_qa
- local: tasks/extractive_qa
title: Extractive QA
- local: sentence_transformer
- local: tasks/sentence_transformer
title: Sentence Transformer
- local: text_regression
- local: tasks/text_regression
title: Text Regression
- local: llm_finetuning
- local: tasks/llm_finetuning
title: LLM Finetuning
- local: image_classification
- local: tasks/image_classification
title: Image Classification
- local: image_regression
- local: tasks/image_regression
title: Image Scoring/Regression
- local: object_detection
- local: tasks/object_detection
title: Object Detection
- local: dreambooth
- local: tasks/dreambooth
title: DreamBooth
- local: seq2seq
- local: tasks/seq2seq
title: Seq2Seq
- local: token_classification
- local: tasks/token_classification
title: Token Classification
- local: tabular
- local: tasks/tabular
title: Tabular
title: Data Formats
- sections:
- local: text_classification_params
- local: params/text_classification_params
title: Text Classification & Regression
- local: extractive_qa_params
- local: params/extractive_qa_params
title: Extractive QA
- local: llm_finetuning_params
- local: params/llm_finetuning_params
title: LLM Finetuning
- local: image_classification_params
- local: params/image_classification_params
title: Image Classification
- local: image_regression_params
- local: params/image_regression_params
title: Image Scoring/Regression
- local: object_detection_params
- local: params/object_detection_params
title: Object Detection
- local: dreambooth_params
- local: params/dreambooth_params
title: DreamBooth
- local: seq2seq_params
- local: params/seq2seq_params
title: Seq2Seq
- local: token_classification_params
- local: params/token_classification_params
title: Token Classification
- local: tabular_params
- local: params/tabular_params
title: Tabular
title: Parameters
81 changes: 0 additions & 81 deletions docs/source/dreambooth_params.mdx

This file was deleted.

57 changes: 0 additions & 57 deletions docs/source/extractive_qa_params.mdx

This file was deleted.

49 changes: 0 additions & 49 deletions docs/source/image_classification_params.mdx

This file was deleted.

52 changes: 0 additions & 52 deletions docs/source/object_detection_params.mdx

This file was deleted.

3 changes: 3 additions & 0 deletions docs/source/params/dreambooth_params.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# DreamBooth Parameters

[[autodoc]] trainers.dreambooth.params.DreamBoothTrainingParams
3 changes: 3 additions & 0 deletions docs/source/params/extractive_qa_params.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Extractive Question Answering Parameters

[[autodoc]] trainers.extractive_question_answering.params.ExtractiveQuestionAnsweringParams
3 changes: 3 additions & 0 deletions docs/source/params/image_classification_params.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Image Classification Parameters

[[autodoc]] trainers.image_classification.params.ImageClassificationParams
Loading
Loading