Skip to content

Commit 72ca468

Browse files
committed
Fixing annotations update in images composite
1 parent 96c14bc commit 72ca468

File tree

5 files changed

+10
-5
lines changed

5 files changed

+10
-5
lines changed

HISTORY.rst

+5
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@
33
History
44
-------
55

6+
9.8.1 (2025-01-14)
7+
------------------
8+
9+
- Fixing annotations update in images composite sources.
10+
611
9.8.0 (2024-10-02)
712
------------------
813

bigml/api_handlers/sourcehandler.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -553,8 +553,9 @@ def update_composite_annotations(self, source, images_file,
553553
pass
554554

555555
# we need to limit the amount of changes per update
556-
for offset in range(0, int(len(changes) / MAX_CHANGES) + 1):
557-
new_batch = changes[offset: offset + MAX_CHANGES]
556+
batches_number = int(len(changes) / MAX_CHANGES)
557+
for offset in range(0, batches_number + 1):
558+
new_batch = changes[offset * MAX_CHANGES: (offset + 1) * MAX_CHANGES]
558559
if new_batch:
559560
source = self.update_source(source,
560561
{"row_values": new_batch})

bigml/bigmlconnection.py

-1
Original file line numberDiff line numberDiff line change
@@ -650,7 +650,6 @@ def _update(self, url, body, organization=None, resource_id=None):
650650
location, resource, error)
651651
try:
652652
code = response.status_code
653-
654653
if code == HTTP_ACCEPTED:
655654
resource = json_load(response.content)
656655
resource_id = resource['resource']

bigml/version.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '9.8.0'
1+
__version__ = '9.8.1'

docs/index.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ This module is licensed under the `Apache License, Version
4444
.. toctree::
4545
:maxdepth: 2
4646
:hidden:
47-
:caption: Resouce Management
47+
:caption: Resource Management
4848

4949
ml_resources
5050
creating_resources

0 commit comments

Comments
 (0)