Skip to content

Commit

Permalink
added version
Browse files Browse the repository at this point in the history
  • Loading branch information
philschmid committed Mar 29, 2023
1 parent 6e7d563 commit 8985059
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/doc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ jobs:
uses: huggingface/doc-builder/.github/workflows/build_main_documentation.yml@main
with:
commit_sha: ${{ github.sha }}
package: optimum-neuron
package: optimum.neuron
package_name: optimum-neuron
secrets:
token: ${{ secrets.HUGGINGFACE_PUSH }}
3 changes: 2 additions & 1 deletion .github/workflows/doc-pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
with:
commit_sha: ${{ github.event.pull_request.head.sha }}
pr_number: ${{ github.event.number }}
package: optimum-neuron
package: optimum.neuron
package_name: optimum-neuron
secrets:
token: ${{ secrets.HUGGINGFACE_PUSH }}
14 changes: 0 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,6 @@ build_dist:
pypi_upload: build_dist
python -m twine upload dist/*

build_doc_docker_image:
docker build -t doc_maker --build-arg commit_sha=$(COMMIT_SHA_SUBPACKAGE) --build-arg clone_url=$(REAL_CLONE_URL) ./docs

doc: build_doc_docker_image
@test -n "$(BUILD_DIR)" || (echo "BUILD_DIR is empty." ; exit 1)
@test -n "$(VERSION)" || (echo "VERSION is empty." ; exit 1)
docker run -v $(CURRENT_DIR):/doc_folder --workdir=/doc_folder doc_maker \
doc-builder build optimum.neuron /optimum-neuron/docs/source/ \
--build_dir $(BUILD_DIR) \
--version $(VERSION) \
--version_tag_suffix "" \
--html \
--clean

test_installs:
python -m pip install .[tests]
python -m pip install git+https://github.com/huggingface/transformers.git
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ pip install hf-doc-builder==0.4.0 watchdog --upgrade

2. Local Development
```bash
doc-builder preview optimum docs/source/
doc-builder preview optimum.neuron docs/source/
```
3. Build Docs
```bash
doc-builder build optimum docs/source/ --build_dir build/
doc-builder build optimum.neuron docs/source/ --build_dir build/
```

## Add assets/Images
Expand Down
4 changes: 2 additions & 2 deletions docs/source/package_reference/trainer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@ Another way to customize the training loop behavior for the PyTorch [`TrainiumTr

## TrainiumTrainer

[[autodoc]] optimum.neuron.trainers.TrainiumTrainer
[[autodoc]] trainers.TrainiumTrainer

[[autodoc]] optimum.neuron.trainers.Seq2SeqTrainiumTrainer
[[autodoc]] trainers.Seq2SeqTrainiumTrainer
1 change: 1 addition & 0 deletions optimum/neuron/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

from .trainers import Seq2SeqTrainiumTrainer, TrainiumTrainer
from .utils import patch_transformers_for_neuron_sdk
from .version import __version__


if not os.environ.get("DISABLE_TRANSFORMERS_PATCHING", False):
Expand Down
3 changes: 2 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@
QUALITY_REQUIRES = [
"black",
"ruff",
"hf_doc_builder @ git+https://github.com/huggingface/doc-builder.git",
"isort",
"hf-doc-builder==0.4.0",
]

EXTRAS_REQUIRE = {
Expand Down

0 comments on commit 8985059

Please sign in to comment.