mirror of
https://github.com/placeholder-soft/chroma.git
synced 2026-01-12 22:44:55 +08:00
major refactorings WIP
This commit is contained in:
@@ -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"))
|
||||
|
||||
Reference in New Issue
Block a user