|
61 | 61 | HTTP_CREATED, HTTP_BAD_REQUEST, |
62 | 62 | HTTP_UNAUTHORIZED, HTTP_PAYMENT_REQUIRED, HTTP_NOT_FOUND, |
63 | 63 | HTTP_TOO_MANY_REQUESTS, |
64 | | - HTTP_INTERNAL_SERVER_ERROR, GAE_ENABLED, SEND_JSON) |
| 64 | + HTTP_INTERNAL_SERVER_ERROR, GAE_ENABLED, SEND_JSON, LOGGER) |
65 | 65 | from bigml.bigmlconnection import json_load |
66 | 66 | from bigml.api_handlers.resourcehandler import check_resource_type, \ |
67 | 67 | resource_is_ready, get_source_id, get_id |
68 | 68 | from bigml.constants import SOURCE_PATH, IMAGE_EXTENSIONS |
69 | | -from bigml.api_handlers.resourcehandler import ResourceHandlerMixin, LOGGER |
| 69 | +from bigml.api_handlers.resourcehandler import ResourceHandlerMixin |
70 | 70 | from bigml.fields import Fields |
71 | 71 |
|
72 | | -LOG_FORMAT = '%(asctime)-15s: %(message)s' |
73 | | -LOGGER = logging.getLogger('BigML') |
74 | | -CONSOLE = logging.StreamHandler() |
75 | | -CONSOLE.setLevel(logging.WARNING) |
76 | | -LOGGER.addHandler(CONSOLE) |
77 | 72 |
|
78 | 73 | MAX_CHANGES = 5 |
79 | 74 | MAX_RETRIES = 5 |
@@ -548,7 +543,7 @@ def update_composite_annotations(self, source, images_file, |
548 | 543 | "components": source_ids}) |
549 | 544 | elif optype == "regions": |
550 | 545 | for value, source_id in values: |
551 | | - if isinstance(value, dict): |
| 546 | + if isinstance(value, list): |
552 | 547 | # dictionary should contain the bigml-coco format |
553 | 548 | value = compact_regions(value) |
554 | 549 | changes.append( |
|
0 commit comments