From b0b8e6b977ce19645b929ce9887a5c5d46f66f54 Mon Sep 17 00:00:00 2001 From: Alan Bertl Date: Tue, 3 Jan 2023 22:17:22 -0600 Subject: [PATCH 1/4] Remove detectron from setup.py --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 6563e4fc..cb8e22d1 100644 --- a/setup.py +++ b/setup.py @@ -57,7 +57,6 @@ entry_points={}, install_requires=[ "fastapi", - "detectron2@git+https://github.com/facebookresearch/detectron2.git@v0.6#egg=detectron2", "layoutparser[layoutmodels,tesseract]", "python-multipart", "uvicorn", From 8fd5ad96784e9bb7d3b24fb44f71c8660fbaade3 Mon Sep 17 00:00:00 2001 From: Alan Bertl Date: Wed, 4 Jan 2023 00:12:18 -0600 Subject: [PATCH 2/4] Remove failing on no torch installation from setup.py. --- setup.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/setup.py b/setup.py index cb8e22d1..f06eda71 100644 --- a/setup.py +++ b/setup.py @@ -21,14 +21,6 @@ from unstructured_inference.__version__ import __version__ -try: - import torch - - torch_ver = [int(x) for x in torch.__version__.split(".")[:2]] - assert torch_ver >= [1, 8] -except (ImportError, AssertionError) as e: - raise Exception("Requires PyTorch >= 1.8") from e - setup( name="unstructured_inference", description="A library for performing inference using trained models.", From a6125ae3b3ccd3bfb80feb7b4d6c8f778ff28a52 Mon Sep 17 00:00:00 2001 From: Alan Bertl Date: Wed, 4 Jan 2023 00:12:35 -0600 Subject: [PATCH 3/4] Update readme with new install info. --- README.md | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f111c65b..f5bb5776 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,26 @@ These models are invoked via API as part of the partitioning bricks in the `unst ### Package -Requires [`torch>=1.8`](https://pytorch.org/get-started/locally/). Once this is satisfied, run -`pip install unstructured-inference`. +Run `pip install unstructured-inference`. + +### Detectron2 + +[Detectron2](https://github.com/facebookresearch/detectron2) is required for most inference tasks +but is not automatically installed with this package. +For MacOS and Linux, build from source with: +```shell +pip install 'git+https://github.com/facebookresearch/detectron2.git@v0.4#egg=detectron2' +``` +Other install options can be found in the +[Detectron2 installation guide](https://detectron2.readthedocs.io/en/latest/tutorials/install.html). + +Windows is not officially supported by Detectron2, but some users are able to install it anyway. +See discussion [here](https://layout-parser.github.io/tutorials/installation#for-windows-users) for +tips on installing Detectron2 on Windows. ### Repository -Clone the repo and run `make install` to install dependencies. +To install the repository for development, clone the repo and run `make install` to install dependencies. Run `make help` for a full list of install options. ## Getting Started From e5f1064ab556459424b55442af8e77db9b32dfff Mon Sep 17 00:00:00 2001 From: Alan Bertl Date: Wed, 4 Jan 2023 11:22:26 -0600 Subject: [PATCH 4/4] Move to release version --- CHANGELOG.md | 2 +- unstructured_inference/__version__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 684d9563..78599002 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -## 0.2.1-dev1 +## 0.2.1 * Refactor to facilitate local inference * Removes BasicConfig from logger configuration diff --git a/unstructured_inference/__version__.py b/unstructured_inference/__version__.py index 6aa693e8..9aa97038 100644 --- a/unstructured_inference/__version__.py +++ b/unstructured_inference/__version__.py @@ -1 +1 @@ -__version__ = "0.2.1-dev1" # pragma: no cover +__version__ = "0.2.1" # pragma: no cover