-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storing the NODE_FEATURES
in the annotation graph once for speed-up
#277
Conversation
grace/simulator/store_features.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder why do we prefer to do this in a separate script? Woudnt be easier that on the first run (if no graph features is provided as an input) the features are extracted and saved for a following run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this choice limits our ability to do patch / graph augmentations on the go. I think the entire approach of how I create the synthetic dataset need to be rebuild to allow some flexibility (PR incoming soon). This is a temporary hack that works for now, but I'll need to think about how not to jeopardise the option to include augmentations in the process.
grace/run.py
Outdated
image_aug, graph_aug = img_graph_augs(image, graph) | ||
return feature_extractor(image_aug, graph_aug) | ||
# Prepare the feature extractor: | ||
if config.extractor_fn is not None: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So the logic here is that the features are part of the loaded graph and is we don't want to compute new features we don't provided extractor_fn
in the config file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly - just temporarily though, because none of my experiments include patch / graph augmentations (yet).
d2abf14
to
99c1042
Compare
Ok, so i think is ok to merge as it is something that will allow you to quickly iterate on the model improvement. However, should have an eye on how we want the pipeline to look for an external user and what to keep inside or outside of it. |
670afc0
to
340cd1f
Compare
PR contribution summary
Why is this PR useful / good for? Please describe the problem(s) you're trying to address.
.grace
folders in the given path withnodes.parquet
file which holds theNODE_FEATURES
GraphAttrs.NODE_FEATURES
are now in the graph so that the feature extraction doesn't have to be repeated at every runNone
(default) to theconfig.extractor_fn
List of proposed changes / linked issues & discussions
What should a reviewer concentrate their feedback on?
grace/grace/simulator/README.md
Lines 32 to 38 in 4feae20
What type of PR is this? (check all applicable)
Added tests?
PR review summary
Describe what this PR does & how you reviewed the individual items, where needed:
Some helper checks to tick off:
In conclusion, after my review, I'd like to: