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] ValidationApiError in collab example for SANDBOX #229

Open
A-n-d-r-e-w-y opened this issue Aug 23, 2023 · 3 comments
Open

[BUG] ValidationApiError in collab example for SANDBOX #229

A-n-d-r-e-w-y opened this issue Aug 23, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@A-n-d-r-e-w-y
Copy link

Observed behavior

I got error while run tutorial in collab https://colab.research.google.com/github/Toloka/toloka-kit/blob/main/examples/3.audio_analysis/audio_collection/audio_collection.ipynb
I choice "SANDBOX" and click all cells. All cells are success before uploading tasks:

tasks = [
toloka.Task(input_values={'text': text}, pool_id=new_pool.id)
for text in dataset['text'].values[:20]
]

toloka_client.create_tasks(tasks, allow_defaults=True)

new_pool = toloka_client.open_pool(new_pool.id)

Expected behavior

22.08.23 all works and all tasks were uploaded to pool

Python Version

3.8

Toloka-Kit Version

0.1.26

Other Packages Versions

No response

Example code

https://colab.research.google.com/github/Toloka/toloka-kit/blob/main/examples/3.audio_analysis/audio_collection/audio_collection.ipynb

SANDBOX is used

Relevant log output

ValidationApiError                        Traceback (most recent call last)
<ipython-input-24-3500c0c72b11> in <cell line: 6>()
      4 ]
      5 
----> 6 toloka_client.create_tasks(tasks, allow_defaults=True)
      7 
      8 new_pool = toloka_client.open_pool(new_pool.id)

3 frames
create_tasks_expanded_by_parameters_b78c00ecf9034a73a33a8233fe58069a in create_tasks_expanded_by_parameters(self, tasks, allow_defaults, open_pool, skip_invalid_items, operation_id, async_mode)
      2 
      3     parameters = CreateTasksParameters(allow_defaults=allow_defaults, open_pool=open_pool, skip_invalid_items=skip_invalid_items, operation_id=operation_id, async_mode=async_mode)
----> 4     return func(self, tasks, parameters)

/usr/local/lib/python3.10/dist-packages/toloka/client/__init__.py in _sync_via_async(self, objects, parameters, url, result_type, operation_type, output_id_field, get_method)
    374         # but no objects are created
    375         if not pools:
--> 376             raise ValidationApiError(
    377                 code='VALIDATION_ERROR',
    378                 message='Validation failed',

ValidationApiError: ValidationApiError(status_code=None, request_id=None, code='VALIDATION_ERROR', message='Validation failed', payload={})
@A-n-d-r-e-w-y A-n-d-r-e-w-y added the bug Something isn't working label Aug 23, 2023
@A-n-d-r-e-w-y A-n-d-r-e-w-y changed the title [BUG] [BUG] ValidationApiError in collab example for SANDBOX Aug 23, 2023
@Pocoder
Copy link
Contributor

Pocoder commented Aug 23, 2023

@A-n-d-r-e-w-y Hello! I could not reproduce the problem.
Please, upgrade version of toloka-kit from 0.1.26 to 1.1.4 and repeat all notebook steps from the start. If the problem will still be there text me.

@A-n-d-r-e-w-y
Copy link
Author

A-n-d-r-e-w-y commented Aug 24, 2023

Hello! I think problem that in SANDBOX mode requester has some limit to create tasks. It's not obviously!!!
And i get message when turn off async mode:

toloka.client.exceptions.ApiError: ApiError(status_code=400, request_id='1692879848820059-739373765838409776', code='TASKS_CREATION_DOES_NOT_FIT_QUOTA', message='Tasks creation does not fit quota', payload=None)
By default async mode is used to upload tasks and async mode don't show any message(

What does mean "Tasks creation does not fit quota" ? What is limit to create tasks for SANDBOX mode and can I delete my old projects with tasks from SANDBOX to create new tasks?

@Pocoder
Copy link
Contributor

Pocoder commented Sep 8, 2023

How many tasks do you try to create (more than 10k/5k)? You can find limits in create_tasks/create_tasks_async method docstring and here: https://toloka.ai/docs/api/api-reference/#overview--using-toloka-sdk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants