Skip to content
This repository was archived by the owner on Nov 13, 2025. It is now read-only.

Conversation

@RohanKatreddy
Copy link
Contributor

No description provided.

@RohanKatreddy RohanKatreddy self-assigned this Feb 7, 2025
Copy link
Contributor

@HermanG05 HermanG05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed

Comment on lines 5 to 11
import time
import multiprocessing as mp
from typing import List
import numpy as np
from utilities.workers import queue_proxy_wrapper, worker_controller
from modules.detection_in_world import DetectionInWorld
from modules.cluster_estimation.cluster_estimation_worker import cluster_estimation_worker
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 28 to 32
args=(
3,
0,
3,
0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to store numerical constants like these at the top (ie RANDOM_STATE = 0, see other integration tests as an example).

worker_process.start()
time.sleep(1)

output_results: List[List[DetectionInWorld]] = output_queue.queue.get()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We want to check to see if the output result is a list of ObjectInWorld, otherwise the worker wouldnt be doing anything

input_queue.queue.put(test_data_2)
time.sleep(1)

output_results: List[List[DetectionInWorld]] = output_queue.queue.get()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Contributor

@HermanG05 HermanG05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed.

Comment on lines 121 to 126
output_results: List[List[DetectionInWorld]] = output_queue.queue.get()

assert output_results is not None
assert isinstance(output_results, list)
assert len(output_results) == 1
assert all(isinstance(obj, ObjectInWorld) for obj in output_results)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry maybe I should've been more specific. On line 121 and 135 where you're using the .get() method to remove a list from the queue, you want the variable to expect a List[ObjectInWorld], not a List[List[DetectionInWorld]]. The get method returns a single element from the queue, and in this case, each element should be a List[ObjectInWorld].

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok mb, simple fix then

Copy link
Contributor

@HermanG05 HermanG05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed

Comment on lines 135 to 140
output_results: List[DetectionInWorld] = output_queue.queue.get()

assert output_results is not None
assert isinstance(output_results, list)
assert len(output_results) == 2
assert all(isinstance(obj, ObjectInWorld) for obj in output_results)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be better to create a loop where you extract each list from the queue and check whether they are the types youre expecting. You'd remove the len(output_results) assertion and just wrap the other ones inside the loop, exiting if they fail. I would probably try to do this with test_data_1 as well.

Copy link
Contributor

@HermanG05 HermanG05 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conditionally Approved

Comment on lines 27 to 30
output_results: List[DetectionInWorld] = output_queue.queue.get()

while not output_queue.queue.empty():
output_results = output_queue.queue.get()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move output_results: List[DetectionInWorld] = output_queue.queue.get() to line 30 and remove it from line 27.

@RohanKatreddy RohanKatreddy merged commit 371c45f into main Feb 15, 2025
1 check passed
@RohanKatreddy RohanKatreddy deleted the cluster-estimation-integration-test branch February 15, 2025 17:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants