From 54fc4616e8928d4f3c30314909a82569310d4a7f Mon Sep 17 00:00:00 2001 From: Takafumi Iju Date: Sat, 4 Dec 2021 10:20:32 +0900 Subject: [PATCH 1/3] Add check of image file count. --- fastlabel/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fastlabel/__init__.py b/fastlabel/__init__.py index 1f6cf1a..f19a83a 100644 --- a/fastlabel/__init__.py +++ b/fastlabel/__init__.py @@ -481,6 +481,11 @@ def create_multi_image_task( if not utils.is_image_supported_ext(file_path): raise FastLabelInvalidException( "Supported extensions are png, jpg, jpeg.", 422) + + if len(contents) == 250: + raise FastLabelInvalidException( + "The count of files should be under 250", 422) + file = utils.base64_encode(file_path) contents.append({ "name": os.path.basename(file_path), @@ -639,7 +644,7 @@ def update_image_task( status: str = None, external_status: str = None, tags: list = [], - annotations: list[dict] = [], + annotations: List[dict] = [], **kwargs, ) -> str: """ From 607827762658d159de3cc7b8edb885beb2702b51 Mon Sep 17 00:00:00 2001 From: Takafumi Iju Date: Wed, 8 Dec 2021 19:47:17 +0900 Subject: [PATCH 2/3] Add limitation to README.md. --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 28ccca2..e542211 100644 --- a/README.md +++ b/README.md @@ -432,6 +432,10 @@ task = client.create_multi_image_task( ) ``` +##### Limitation + +* You allow uploading 250 files in maximum. + #### Find Task Find a single task. From 8fc8803d4247fce03acf0c18bf02a89e264e98ca Mon Sep 17 00:00:00 2001 From: Takafumi Iju Date: Thu, 9 Dec 2021 08:38:58 +0900 Subject: [PATCH 3/3] Change description. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e542211..d71d322 100644 --- a/README.md +++ b/README.md @@ -434,7 +434,7 @@ task = client.create_multi_image_task( ##### Limitation -* You allow uploading 250 files in maximum. +* You can upload up to 250 files in total. #### Find Task