datumaro icon indicating copy to clipboard operation
datumaro copied to clipboard

About `get_random_items` method in `Visualizer`

Open irmo322 opened this issue 1 year ago • 3 comments

Hi,

Visualizer class has a method named get_random_items(n_samples) in which dataset items are chosen using random.choices. I expect get_random_items to not choose the same item multiple times, which can occur with random.choices.

Replacing random.choices by random.sample would solved this issue.

Also, I wonder why get_random_items is not in Dataset class in the first place. This functionality is not really related to visualization and is useful is other cases.

Thanks for reading.

irmo322 avatar Jun 07 '24 13:06 irmo322

Hi @irmo322, Thanks for your interests on our project. I'll put your suggestion in our backlog. Or, you can open a PR if you want. We greatly appreciate the participation from the open community.

vinnamkim avatar Jun 10 '24 02:06 vinnamkim

Hey @vinnamkim, I am interested to work on this issue. Can you please assign it to me?

ChaitanyaYeole02 avatar Jul 21 '24 20:07 ChaitanyaYeole02

Hey @vinnamkim, I am interested to work on this issue. Can you please assign it to me?

Sure, it's always welcome.

vinnamkim avatar Jul 22 '24 01:07 vinnamkim