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

[BUG] Can't use benchmark and jupyter notebook in the same python env as their dependency versions conflict #499

Closed
chishui opened this issue Apr 2, 2024 · 1 comment
Labels
1.5.0 bug Something isn't working

Comments

@chishui
Copy link
Contributor

chishui commented Apr 2, 2024

Describe the bug
As described in this feature request in OpenSearch, I'm writing a python script to call opensearch-benchmark with different parameters to see which parameter could lead to better ingestion performance. I also want to use jupyter notebook to visualize the parameters in the notebook and we can let user to run process step by step.

However, opensearch-benchmark has a very strict restriction on dependency version and most of the versions are stale https://github.com/opensearch-project/opensearch-benchmark/blob/main/setup.py#L58. So the version conflict with jupyter's dependency, for example, opensearch-benchmark needs jsonschema==3.1.1, but jupyter notebook needs jsonschema>=4.18.0 (code)

To Reproduce

  1. pip install opensearch-benchmark
  2. pip install notebook
  3. run opensearch-benchmark, will see error message:
Traceback (most recent call last):
  File "/Users/xiliyun/projects/opensearch-find-optimal/bin/opensearch-benchmark", line 5, in <module>
    from osbenchmark.benchmark import main
  File "/Users/xiliyun/projects/opensearch-find-optimal/lib/python3.11/site-packages/osbenchmark/__init__.py", line 31, in <module>
    __version__ = pkg_resources.require("opensearch-benchmark")[0].version
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xiliyun/projects/opensearch-find-optimal/lib/python3.11/site-packages/pkg_resources/__init__.py", line 937, in require
    needed = self.resolve(parse_requirements(requirements))
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/xiliyun/projects/opensearch-find-optimal/lib/python3.11/site-packages/pkg_resources/__init__.py", line 798, in resolve
    dist = self._resolve_dist(
           ^^^^^^^^^^^^^^^^^^^
  File "/Users/xiliyun/projects/opensearch-find-optimal/lib/python3.11/site-packages/pkg_resources/__init__.py", line 844, in _resolve_dist
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.ContextualVersionConflict: (MarkupSafe 2.1.5 (/Users/xiliyun/projects/opensearch-find-optimal/lib/python3.11/site-packages), Requirement.parse('markupsafe==2.0.1'), {'opensearch-benchmark'})

Expected behavior
opensearch-benchmark can loosen the version requirement for its dependencies. Instead of using a fixed version, it can set a minimal supported version like "markupsafe>=2.0.1"

Logs
If applicable, add logs to help explain your problem.

More Context (please complete the following information):

  • Workload(Share link for custom workloads)
  • Service(E.g OpenSearch)
  • Version (E.g. 1.0)

Additional context
Add any other context about the problem here.

@chishui chishui added bug Something isn't working untriaged labels Apr 2, 2024
@IanHoang IanHoang added 1.5.0 and removed untriaged labels Apr 3, 2024
@IanHoang
Copy link
Collaborator

IanHoang commented Apr 4, 2024

Thanks for bringing this to our attention @chishui! We'll get a fix out for this when we get a chance. If you'd like, you can contribute this quick change and tag us in the PR when it's ready.

chishui added a commit to chishui/opensearch-benchmark that referenced this issue Apr 7, 2024
chishui added a commit to chishui/opensearch-benchmark that referenced this issue Apr 9, 2024
chishui added a commit to chishui/opensearch-benchmark that referenced this issue Apr 9, 2024
chishui added a commit to chishui/opensearch-benchmark that referenced this issue Apr 9, 2024
Signed-off-by: Liyun Xiu <xiliyun@amazon.com>
chishui added a commit to chishui/opensearch-benchmark that referenced this issue Apr 9, 2024
Signed-off-by: Liyun Xiu <xiliyun@amazon.com>
IanHoang pushed a commit that referenced this issue Apr 9, 2024
Signed-off-by: Liyun Xiu <xiliyun@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.5.0 bug Something isn't working
Projects
Archived in project
Development

No branches or pull requests

2 participants