Skip to content

Missing DegreeGroupedPermutations and performance tuning#84

Draft
lagillenwater wants to merge 11 commits into
greenelab:mainfrom
lagillenwater:missing-dgp
Draft

Missing DegreeGroupedPermutations and performance tuning#84
lagillenwater wants to merge 11 commits into
greenelab:mainfrom
lagillenwater:missing-dgp

Conversation

@lagillenwater

Copy link
Copy Markdown

updates to handle missing DegreeGroupedPermutation records and tune performance

@d33bs d33bs left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This LGTM generally. The safety added for non-existent data looked sensible and the resource increases looked like they'd be useful.

@falquaddoomi - could we ask you to also take a look at this? @lagillenwater built upon the work you had started on this project.

@dhimmel - as a background, a group led by Casey and others is exploring how to increase the performance of data extractions from this project in order to address research questions. The changes here were started by @falquaddoomi and continued by @lagillenwater in order to see improvements when running a local instance of the database (where remote calls were otherwise not fast enough). Would you also have any thoughts about these changes or how we could reach a reasonable merge? Please don't hesitate to let us know if you have any thoughts and thank you in advance for your help.

f'source_degree={source_degree}, target_degree={target_degree}. '
f'Returning PathCount with null p-value.'
)
dgp_record = None

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Would it make sense to try and expand the tests for this case? I'm unsure how unusual or difficult this might be - so this could be an unreasonable question.

Comment on lines +157 to +160
if adj_p_value is not None:
metapath_score = -math.log10(adj_p_value)
else:
metapath_score = None

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Consider adding a comment about when the adj_p_value might be None to help explain why we need this branching.

Comment on lines +98 to +103
try:
if instance.dgp is not None:
instance.dgp.reversed = reversed_
has_dgp = True
except (DegreeGroupedPermutation.DoesNotExist, AttributeError):
pass

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Consider adding some comments here about why we wouldn't have dgp.

@dhimmel dhimmel left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

improvements when running a local instance of the database (where remote calls were otherwise not fast enough). Would you also have any thoughts about these changes or how we could reach a reasonable merge?

Thanks @d33bs for the context. I don't fully understand what this PR is trying to accomplish in terms of which changes are related to missing DegreeGroupedPermutation records versus performance versus unrelated infra updates.

I'll probably take a back seat here unless specific questions come up I can help with.

Comment thread docker/requirements.txt

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

why creating a second environment specification instead of using environment.yml?

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.

4 participants