labelbox-python
labelbox-python copied to clipboard
User Group Management doesn't support `experimental_enabled` on Client
Describe the bug
The Client class has the enable_experimental argument, but the execute() method does not check the self.enable_experimental value.
This means that labelbox.schema.user_group.UserGroup class's methods ignore the enable_experimental even though it's defined as required by that class.
To reproduce
- Use method
labelbox.schema.user_group.UserGroup() - Pass parameters
client=labelbox.Client(api_key="...", enable_experimental=True) - See error:
labelbox.exceptions.NetworkError: HTTPSConnectionPool(host='api.labelbox.com', port=443): Max retries exceeded with url: /graphql
Expected behavior
The error should be indicating the experimental URL: /_gql
Screenshots / Videos
N/A
Environment (please complete the following information
- OS:
macOS - Python Version:
3.11.x - SDK + SDK Version:
[email protected] - Python Environment:
poetry.lock
Additional context
N/A
Proposed Fix
Every call to self.client.execute(...) like here:
https://github.com/Labelbox/labelbox-python/blob/45109d855c32796a309eae23a9dc53750c3ae9a5/libs/labelbox/src/labelbox/schema/user_group.py#L141
could be updated with self.client.execute(..., experimental=self.client.enable_experimental)