Skip to content

Generate tests for m24#8

Open
Pikus16 wants to merge 3 commits into
mainfrom
m24_vids
Open

Generate tests for m24#8
Pikus16 wants to merge 3 commits into
mainfrom
m24_vids

Conversation

@Pikus16

@Pikus16 Pikus16 commented Nov 16, 2021

Copy link
Copy Markdown
Collaborator

Incorporates tests for perspective, location, relation, relation_type, as well as continuing to support class as previously done.

@as6520 as6520 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good for the most part with some minor changes

Comment thread gen_data/gen_test_m24.py
from tqdm.auto import trange
import hashlib
from collections import OrderedDict
# from vidaug import augmentors as va

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If these imports aren't necessary, could you remove them?

help = "# of groups to generate tests for")
@click.option("--num_runs", default=1, type=int,
help = "# of runs for each group")
@click.option("--num_samples_per_run", default=10, type=int,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should the default be set to 1024, since that is the standard length of the test?

@click.option("--prob_novel_sample", default=0.5, type=float,
help="probability of novel sample being introduced " +
"after 'novelty_timestamp'")
@click.option("--round_size", default=1, type=int,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should the default be set to 32 since that is the standard round size?

), # TODO: confirm that this should be ceil
"representation": None, # figure out what this should be
"threshold": 0.5, # TODO: don't hardcode this
"pre_novelty_batches": math.ceil(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think this should be floor, since post novelty would be in the batch where the red_light_det is

'location','relation','relation_type']:
is_spatial = is_temporal = 0
else:
raise NotImplementedError('Unknown aug_type {}'.format(aug_type))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
raise NotImplementedError('Unknown aug_type {}'.format(aug_type))
raise NotImplementedError(f'Unknown aug_type {aug_type}')


del combine_known_unknown[vid_id]

assert len(combine_known_unknown) == 0

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this assertion required since we aren't using this variable beyond this point?


return return_dict_known, return_dict_unknown

def gen_test(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should this be gen_tests? Since it looks like it is generating a bunch of tests

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants