Repository navigation
Feature/datawizard - #131
Conversation
3391ac8 to
7a42bcc
Compare
7832d2e to
db2f2ee
Compare
db2f2ee to
f0589ea
Compare
| for k in req: | ||
| # Ref to https://docs.aperturedata.io/parameters/blobs.html | ||
| blobs_where_default_true = \ | ||
| k in ["FindImage", "FindBlob", "FindBlobs"] and ( |
There was a problem hiding this comment.
| k in ["FindImage", "FindBlob", "FindBlobs"] and ( | |
| k in ["FindImage", "FindBlob"] and ( |
There is no "FindBlobs" command.
b849af8 to
5d53419
Compare
It addresses a bug in reponse handler that called a batch with partial objects with empty values, as it was based on batchsize value. Added tests for the same. Incorporated review comments.
Also includes changes for making response handler more robust. Introduces pytest fixtures (using conftest.py) to write more mantainable code for tests. Adrresses the parallelizer's logic to take into account the batchsize while making queries.
Co-authored-by: luisremis <[email protected]>
7ed5d63 to
b266a56
Compare
| { | ||
| self.find_command: { | ||
| "_ref": 1, | ||
| "constraints": { | ||
| "_uniqueid": ["==", entity["_uniqueid"]] | ||
| } | ||
| } | ||
| }, { | ||
| self.update_command: { | ||
| "ref": 1, | ||
| "properties": properties | ||
| } | ||
| } |
There was a problem hiding this comment.
| { | |
| self.find_command: { | |
| "_ref": 1, | |
| "constraints": { | |
| "_uniqueid": ["==", entity["_uniqueid"]] | |
| } | |
| } | |
| }, { | |
| self.update_command: { | |
| "ref": 1, | |
| "properties": properties | |
| } | |
| } | |
| { | |
| self.update_command: { | |
| "constraints": { | |
| "_uniqueid": ["==", entity["_uniqueid"]] | |
| }, | |
| "properties": properties | |
| } | |
| } |
because we update only based on constraints, we don't need to do a find, we can just constraint on update_command
| assert images != None | ||
|
|
There was a problem hiding this comment.
| assert images != None | |
| assert images != None | |
| assert len(images) <= 10 | |
| assert blobs != None | ||
|
|
There was a problem hiding this comment.
| assert blobs != None | |
| assert blobs != None | |
| assert len(blobs) <= 10 | |
| assert isinstance( | ||
| bboxes, BoundingBoxes), f"bboxes is not an instance of BoundingBoxes = {bboxes}" | ||
| logger.info(f"\n{bboxes.inspect()}") | ||
| assert bboxes != None |
There was a problem hiding this comment.
| assert bboxes != None | |
| assert bboxes != None | |
| assert len(bboxes) <= 10 |
|
|
||
| loader = ParallelLoader.ParallelLoader(dbinfo.create_connector()) | ||
| loader.ingest(dataset, stats=True) | ||
| loader.ingest(dataset, stats=True, numthreads=1, batchsize=1) |
There was a problem hiding this comment.
why this? we should be able to run ingestion in parallel, it should be much faster.
There was a problem hiding this comment.
you are right . will revert.
|
|
||
| query["FindImage"]["results"]["list"] = [] | ||
| query["FindImage"]["results"]["list"].append(self.img_id_prop) | ||
| # query["FindImage"]["results"]["list"].append("image_size") |
There was a problem hiding this comment.
| # query["FindImage"]["results"]["list"].append("image_size") |
|
|
||
| for ent in entities: | ||
| self.images_ids.append(ent[self.img_id_prop]) | ||
| # self.images_sizes.append(int(ent["image_size"])) |
There was a problem hiding this comment.
| # self.images_sizes.append(int(ent["image_size"])) |
|
|
||
| if index >= len(self.images_ids): | ||
| print("Index is incorrect") | ||
| # print("Index is incorrect") |
There was a problem hiding this comment.
| # print("Index is incorrect") |
or throw?
There was a problem hiding this comment.
will leave print for now. will address it on need basis.
| "from aperturedb import Connector\n", | ||
| "from aperturedb.Images import Images\n", | ||
| "\n", | ||
| "db = Connector.Connector(user=\"admin\", password=\"admin\", port=55557)\n", |
There was a problem hiding this comment.
I think we should always use dbinfo.create_connector() in the examples, so that people follow that convention.
we would need to add a link to dbinfo.py here, like in the other example folders.
There was a problem hiding this comment.
this comment is applicable to all cells in the notebook.
| @@ -0,0 +1,758 @@ | |||
| { | |||
There was a problem hiding this comment.
I checked this file as a notebook, and it does not have the results for each cell. do you think we should add the results so that people can see them? I think we do that on other example notebooks.
No description provided.