Skip to content

Temp workaround for Cuid loading issue #1754

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

Merged
merged 1 commit into from
Jul 29, 2024
Merged

Temp workaround for Cuid loading issue #1754

merged 1 commit into from
Jul 29, 2024

Conversation

vbrodsky
Copy link
Contributor

@vbrodsky vbrodsky commented Jul 29, 2024

Description

Original code used Cuid type defined libs/labelbox/src/labelbox/data/annotation_types/types.py. While this had no problem for integration tests on staging, production integration tests failed, for example see https://github.com/Labelbox/labelbox-python/actions/runs/10152094005/job/28072753651

The error is because numpy was required (?) but not loaded.
Production is a different github action and different code. However I am not sure whether the problem is with the github action or with our code that requires numpy which should be an optional package? Out of abundance of caution and due to other project commitments, I have made this fix.

I will make a separate story to investigate further

More info

ImportError while loading conftest '/home/runner/work/labelbox-python/labelbox-python/libs/labelbox/tests/conftest.py'.
tests/conftest.py:17: in <module>
    from labelbox import Dataset, DataRow
../../.venv/lib/python3.10/site-packages/labelbox/__init__.py:5: in <module>
    from labelbox.client import Client
../../.venv/lib/python3.10/site-packages/labelbox/client.py:26: in <module>
    from labelbox.schema import role
../../.venv/lib/python3.10/site-packages/labelbox/schema/__init__.py:14: in <module>
    import labelbox.schema.project
../../.venv/lib/python3.10/site-packages/labelbox/schema/project.py:12: in <module>
    from labelbox.schema.labeling_service import LabelingService, LabelingServiceStatus
../../.venv/lib/python3.10/site-packages/labelbox/schema/labeling_service.py:7: in <module>
    from labelbox.data.annotation_types.types import Cuid
../../.venv/lib/python3.10/site-packages/labelbox/data/annotation_types/__init__.py:1: in <module>
    from .geometry import Line
../../.venv/lib/python3.10/site-packages/labelbox/data/annotation_types/geometry/__init__.py:1: in <module>
    from .line import Line
../../.venv/lib/python3.10/site-packages/labelbox/data/annotation_types/geometry/line.py:4: in <module>
    import numpy as np
E   ModuleNotFoundError: No module named 'numpy'

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Document change (fix typo or modifying any markdown files, code comments or anything in the examples folder only)

All Submissions

  • Have you followed the guidelines in our Contributing document?
  • Have you provided a description?
  • Are your changes properly formatted?

New Feature Submissions

  • Does your submission pass tests?
  • Have you added thorough tests for your new feature?
  • Have you commented your code, particularly in hard-to-understand areas?
  • Have you added a Docstring?

Changes to Core Features

  • Have you written new tests for your core changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you updated any code comments, as applicable?

@vbrodsky vbrodsky requested a review from a team as a code owner July 29, 2024 21:48
@vbrodsky vbrodsky merged commit ce38800 into develop Jul 29, 2024
22 of 27 checks passed
@vbrodsky vbrodsky deleted the VB/temp-fix-cuid branch July 29, 2024 22:03
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

Successfully merging this pull request may close these issues.

2 participants