You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using a mamba environment with the provided minimal environment file below in the code section. Any virtual environment will work, I'm using mamba as it is one of the tools I use most often.
I wanted to see the state of tests for each of the inference packages in the repo, so I was selectively installing the requirements using pip in my mamba environment with the following command.
After installation completed, I ran tests using the following command. I created an HTML coverage output so I could inspect tests that I might be able to contribute to.
pytest --cov-report html --cov=inference_sdk/ tests/inference_sdk/
The error show above was thrown, indicating that requests-mock was missing in the environment. I'm not sure if each requirement file is supposed to be self contained for running the different packages in the repo, but I did make this assumption and I couldn't easily see in the documentation a spot where it said this was not the case. So, I may have made a terrible assumption...
Nonetheless, I inspected the requirements.sdk.http.txt file and saw that requests-mock was not in the list. After adding it, and rerunning the tests, the tests completed successfully. If each requirements file is supposed to be self contained for a specific package in the repo, then requests-mock is missing as a requirement. If not, then I need to read the documentation more closely to figure out the correct order of operations for installing inference in a development environment.
Search before asking
Bug
Environment
main
)Minimal Reproducible Example
I am using a
mamba
environment with the provided minimal environment file below in thecode
section. Any virtual environment will work, I'm usingmamba
as it is one of the tools I use most often.I wanted to see the state of tests for each of the inference packages in the repo, so I was selectively installing the requirements using
pip
in mymamba
environment with the following command.# SDK requirements pip install -r requirements/requirements.sdk.http.txt
After installation completed, I ran tests using the following command. I created an HTML coverage output so I could inspect tests that I might be able to contribute to.
The error show above was thrown, indicating that
requests-mock
was missing in the environment. I'm not sure if each requirement file is supposed to be self contained for running the different packages in the repo, but I did make this assumption and I couldn't easily see in the documentation a spot where it said this was not the case. So, I may have made a terrible assumption...Nonetheless, I inspected the
requirements.sdk.http.txt
file and saw thatrequests-mock
was not in the list. After adding it, and rerunning the tests, the tests completed successfully. If each requirements file is supposed to be self contained for a specific package in the repo, thenrequests-mock
is missing as a requirement. If not, then I need to read the documentation more closely to figure out the correct order of operations for installing inference in a development environment.code
Additional
During my inspection of the
requirements.sdk.http.txt
file I noticed thatrequests
is listed twice. I figured this out by sorting the requirements.Are you willing to submit a PR?
The text was updated successfully, but these errors were encountered: