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

"fast" output returned for "hi_res" #188

Closed
cragwolfe opened this issue Aug 18, 2023 · 1 comment
Closed

"fast" output returned for "hi_res" #188

cragwolfe opened this issue Aug 18, 2023 · 1 comment
Assignees

Comments

@cragwolfe
Copy link
Contributor

cragwolfe commented Aug 18, 2023

Per this gist: https://gist.github.com/cragwolfe/7789a3653c1dad2178c65014f0132233
the unstructured library is returning "auto" results for "fast" and something different for "hi_res" (which is good).

However, requesting "hi_res" from the API is currently also returning fast results, as documented in
Unstructured-IO/unstructured#1150 .

cragwolfe added a commit to Unstructured-IO/unstructured that referenced this issue Aug 18, 2023
The reason this test is failing is the API is returning "fast" results
when "hi_res" is requested, which is being tracked in this ticket:
Unstructured-IO/unstructured-api#188 .

This failure was only showing up on the `main` branch, per the commented
out `pytest` skips.
Coniferish pushed a commit to Unstructured-IO/unstructured that referenced this issue Aug 22, 2023
The reason this test is failing is the API is returning "fast" results
when "hi_res" is requested, which is being tracked in this ticket:
Unstructured-IO/unstructured-api#188 .

This failure was only showing up on the `main` branch, per the commented
out `pytest` skips.
@Coniferish Coniferish self-assigned this Oct 20, 2023
@Coniferish
Copy link
Collaborator

Addressed in the unstructured repo here: Unstructured-IO/unstructured#1840

github-merge-queue bot pushed a commit to Unstructured-IO/unstructured that referenced this issue Oct 24, 2023
### Summary 
Closes unstructured-api issue
[188](Unstructured-IO/unstructured-api#188)
The test and gist were using different versions of the same file
(jpg/pdf), creating what looked like a bug when there wasn't one. The
api is correctly using the `strategy` kwarg.

### Testing
#### Checkout to `main`
- Comment out the `@pytest.mark.skip` decorators for the
`test_partition_via_api_with_no_strategy` test
- Add an API key to your env:
- Add `from dotenv import load_dotenv; load_dotenv()` to the top of the
file and have `UNS_API_KEY` defined in `.env`

- Run `pytest test_unstructured/partition/test_api.py -k
"test_partition_via_api_with_no_strategy"`
^the test will fail

#### Checkout to this branch 
- (make the same changes as above)
- Run `pytest test_unstructured/partition/test_api.py -k
"test_partition_via_api_with_no_strategy"`

### Other
`make tidy` and `make check` made linting changes to additional files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants