Skip to content

Commit

Permalink
Update docs and Ci #120
Browse files Browse the repository at this point in the history
  • Loading branch information
surajpaib committed May 28, 2024
1 parent 6735e33 commit 23ac06d
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 35 deletions.
29 changes: 12 additions & 17 deletions .github/workflows/auto-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,37 +12,32 @@ jobs:
- name: Set up Python
uses: actions/[email protected]
with:
python-version: 3.8
python-version: 3.9

- name: Install poetry
run: make setup


- name: Install poeblix for version freezing
run: poetry self add poeblix@latest

- name: Bump version
run: |
poetry version prerelease
- name: Commit changes
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add .
git commit -m "Bump version" || echo "No changes to commit"

- name: Update diagram
uses: githubocto/repo-visualizer@main
with:
excluded_paths: "ignore,.github"
should_push: false

- name: Push changes
run: git push

- name: Build with lockfile versions
run: poetry blixbuild --only-lock

- name: Build and publish to pypi
uses: JRubics/poetry-publish@v1.16
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
python_version: 3.8
pypi_token: ${{ secrets.PYPI_TOKEN }}
allow_poetry_pre_release: "yes"
ignore_dev_requirements: "yes"
password: ${{ secrets.PYPI_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/greetings.yml

This file was deleted.

17 changes: 17 additions & 0 deletions docs/basics/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,13 @@ system:
- _target_: torchvision.transforms.Normalize
mean: [0.5, 0.5, 0.5]
std: [0.5, 0.5, 0.5]

postprocessing:
# Format the batch as required by Lighter as lighter
# takes a dictionary as input.
batch:
train: '$lambda x: {"input": x[0], "target": x[1]}'

```
For more information about each of the LighterSystem components and how to override them, see [here](./config.md)
Expand All @@ -79,6 +86,10 @@ We just combine the Trainer and LighterSystem into a single YAML and run the com
=== "cifar10.yaml"
```yaml
trainer:
_target_: pytorch_lightning.Trainer
max_epochs: 100

system:
_target_: lighter.LighterSystem
batch_size: 512
Expand Down Expand Up @@ -109,6 +120,12 @@ We just combine the Trainer and LighterSystem into a single YAML and run the com
mean: [0.5, 0.5, 0.5]
std: [0.5, 0.5, 0.5]

postprocessing:
# Format the batch as required by Lighter as lighter
# takes a dictionary as input.
batch:
train: '$lambda x: {"input": x[0], "target": x[1]}'

```
=== "Terminal"
```
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ classifiers = [ #! Update me


[tool.poetry.dependencies]
python = "^3.8"
python = "^3.9"
torch = "^2.1.2"
pandas = "^1.5.3"
pytorch-lightning = "^2.1.3"
Expand Down

0 comments on commit 23ac06d

Please sign in to comment.