major refactorings WIP

This commit is contained in:
Luke VanderHart
2022-11-24 00:17:24 -05:00
parent bbfde39cd3
commit d9dfd089fb
77 changed files with 1074 additions and 1524 deletions

View File

@@ -7,22 +7,23 @@ chroma.set_model_space("sample_1_1")
print(chroma.heartbeat())
chroma.add([[1,2,3,4,5]], ["/images/1"], ["training"], ['spoon'])
chroma.add([[1,2,3,4,5]], ["/images/2"], ["training"], ['spoon'])
chroma.add([[1,2,3,4,5]], ["/images/3"], ["training"], ['spoon'])
chroma.add([[1,2,3,4,5]], ["/images/1"], ["training"], ['knife'])
chroma.add([[1,2,3,4,5]], ["/images/4"], ["training"], ['knife'])
chroma.add([[1,2,3,4,5]], ["/prod/2"], ["test"], ['knife'])
chroma.add([[1, 2, 3, 4, 5]], ["/images/1"], ["training"], ["spoon"])
chroma.add([[1, 2, 3, 4, 5]], ["/images/2"], ["training"], ["spoon"])
chroma.add([[1, 2, 3, 4, 5]], ["/images/3"], ["training"], ["spoon"])
chroma.add([[1, 2, 3, 4, 5]], ["/images/1"], ["training"], ["knife"])
chroma.add([[1, 2, 3, 4, 5]], ["/images/4"], ["training"], ["knife"])
chroma.add([[1, 2, 3, 4, 5]], ["/prod/2"], ["test"], ["knife"])
process_task = chroma.process()
print(process_task)
print(chroma.get_task_status(process_task['task_id']))
print(chroma.get_task_status(process_task["task_id"]))
print("sleeping for 10s to wait for task to complete")
import time
time.sleep(10)
print(chroma.get_task_status(process_task['task_id']))
print(chroma.get_task_status(process_task["task_id"]))
print(chroma.get_results())
# print(chroma.raw_sql("SELECT * FROM results WHERE space_key = 'yolov3_1_1'"))
@@ -64,4 +65,4 @@ print(chroma.get_results())
# print(chroma.process())
# print(chroma.get_nearest_neighbors([1,2,3,4,5], 2))
# print(chroma.get_nearest_neighbors([1,2,3,4,5], 2, space_key="yolov3_5_1"))
# print(chroma.get_nearest_neighbors([1,2,3,4,5], 2, space_key="yolov3_5_1"))