Hey all! I’m trying to get up and running w/ Argilla for labeling, in the default setup in HuggingFace Spaces, with an Organization-owned Space.
I got this working easily in a Space in my personal account. I was able to create the dataset, add records, curate using the UI, etc.
However, I’m running into a permissions issue when calling database.create() for a Space that I created in my Organization. I’ve pasted the full stack trace below.
My Organization (Intertru) doesn’t yet have an Enterprise subscription, so I’m using the Argilla URL and key for the Organization with my access key from my personal account which is linked to the Organization. Is this expected to work? If not, must the Organization be an Enterprise account so I can use Argilla in it? I want this dataset to be private and to be available to labelers in my company.
Thanks!
HTTPStatusError Traceback (most recent call last)
File /opt/conda/lib/python3.10/site-packages/argilla/_exceptions/_api.py:91, in api_error_handler.<locals>._handler_wrapper(*args, **kwargs)
90 try:
---> 91 return func(*args, **kwargs)
92 except HTTPStatusError as e:
File /opt/conda/lib/python3.10/site-packages/argilla/_api/_datasets.py:45, in DatasetsAPI.create(self, dataset)
41 response = self.http_client.post(
42 url=self.url_stub,
43 json=json_body,
44 )
---> 45 response.raise_for_status()
46 response_json = response.json()
File /opt/conda/lib/python3.10/site-packages/httpx/_models.py:761, in Response.raise_for_status(self)
760 message = message.format(self, error_type=error_type)
--> 761 raise HTTPStatusError(message, request=request, response=self)
HTTPStatusError: Client error '403 Forbidden' for url 'https://intertru-argilla.hf.space/api/v1/datasets'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403
During handling of the above exception, another exception occurred:
ForbiddenError Traceback (most recent call last)
Cell In[31], line 7
1 dataset = rg.Dataset(
2 name=f"my_first_dataset",
3 settings=settings,
4 client=rg_client,
5 workspace="argilla"
6 )
----> 7 dataset.create()
File /opt/conda/lib/python3.10/site-packages/argilla/datasets/_resource.py:160, in Dataset.create(self)
154 def create(self) -> "Dataset":
155 """Creates the dataset on the server with the `Settings` configuration.
156
157 Returns:
158 Dataset: The created dataset object.
159 """
--> 160 super().create()
161 try:
162 return self._publish()
File /opt/conda/lib/python3.10/site-packages/argilla/_resource.py:86, in Resource.create(self)
85 def create(self) -> "Resource":
---> 86 response_model = self._api.create(self.api_model())
87 self._model = response_model
88 self._update_last_api_call()
File /opt/conda/lib/python3.10/site-packages/argilla/_exceptions/_api.py:93, in api_error_handler.<locals>._handler_wrapper(*args, **kwargs)
91 return func(*args, **kwargs)
92 except HTTPStatusError as e:
---> 93 _error_switch(status_code=e.response.status_code, error_detail=e.response.text)
File /opt/conda/lib/python3.10/site-packages/argilla/_exceptions/_api.py:87, in api_error_handler.<locals>._error_switch(status_code, error_detail)
77 switch = {
78 400: BadRequestError,
79 401: UnauthorizedError,
(...)
84 500: InternalServerError,
85 }
86 exception_class = switch.get(status_code, ArgillaAPIError)
---> 87 raise exception_class(f"{exception_class.message}. Details: {error_detail}", status_code=status_code)
ForbiddenError: Argilla SDK error: ForbiddenError: Forbidden request to the server. Details: {"detail":{"code":"argilla.api.errors::ForbiddenOperationError","params":{"detail":"Operation not allowed"}}}