Skip to content

Commit

Permalink
fix(ci): Remove GitHub dependencies (#14)
Browse files Browse the repository at this point in the history
* fix(ci): Remove GitHub dependencies

* fix(ci): Remove GitHub dependencies from pyproject.toml

* feat(back): Rename segment_anything module to github

* chore: Update CHANGELOG.md
  • Loading branch information
cpvannier authored Feb 29, 2024
1 parent 18ff935 commit a295fb9
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 8 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,16 @@ jobs:
python-version: "3.10"

# Install PyTorch and TensorFlow CPU versions manually to prevent installing CUDA
# Install SAM and MobileSAM manually as they cannot be included in PyPI
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pylint
python -m pip install torch~=2.2.0 torchaudio~=2.2.0 torchvision~=0.17.0 --index-url https://download.pytorch.org/whl/cpu
python -m pip install tensorflow-cpu~=2.15.0
python -m pip install .[sam]
python -m pip install segment-anything@git+https://github.com/facebookresearch/segment-anything
python -m pip install mobile-sam@git+https://github.com/ChaoningZhang/MobileSAM
python -m pip install .
- name: Lint backend code with Pylint
run: |
Expand Down
3 changes: 1 addition & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ All notable changes to Pixano will be documented in this file.

### Changed

- **Breaking:** Make SAM and MobileSAM optional dependencies to allow publishing to PyPI
- Install those dependencies with `pip install pixano-inference[sam]`
- **Breaking:** Remove SAM and MobileSAM dependencies to allow publishing to PyPI
- **Breaking:** Update to Pixano 0.5.0
- **Breaking:** Update InferenceModel `id` attribute to `model_id` to stop redefining built-in `id`
- **Breaking:** Update submodule names to `pytorch` and `tensorflow`
Expand Down
2 changes: 1 addition & 1 deletion docs/api_reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
Here you will find the documentation for all of our implemented models.

- The **_pytorch_** module contains models from the PyTorch library.
- The **_segment_anything_** module contains the Segment Anything Model (SAM) for Meta.
- The **_github_** module contains the Segment Anything Model (SAM) for Meta.
- The **_tensorflow_** module contains models from the TensorFlow library.
- The **_transformers_** module contains models from the Hugging Face Transformers library.
7 changes: 7 additions & 0 deletions docs/getting_started/installing_pixano_inference.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,10 @@ Then, you can install the Pixano and Pixano Inference packages inside that envir
pip install pixano
pip install pixano-inference
```

To use the inference models available through GitHub, install the following additional packages:

```shell
python -m pip install segment-anything@git+https://github.com/facebookresearch/segment-anything
python -m pip install mobile-sam@git+https://github.com/ChaoningZhang/MobileSAM
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 0 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,6 @@ documentation = [
"mkdocs-literate-nav ~= 0.6.0",
"mkdocs-redirects ~= 1.2.1",
]
sam = [
"segment-anything@git+https://github.com/facebookresearch/segment-anything",
"mobile-sam@git+https://github.com/ChaoningZhang/MobileSAM",
]

[project.urls]
Documentation = "https://github.com/pixano/pixano-inference#readme"
Expand Down

0 comments on commit a295fb9

Please sign in to comment.