Skip to content
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

Large scale inference docs #994

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

benjeffery
Copy link
Member

Fixes #840

@benjeffery
Copy link
Member Author

@hyanwong Can I have a read-through here?

Copy link

codecov bot commented Feb 4, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.17%. Comparing base (e3b2155) to head (37645ef).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #994   +/-   ##
=======================================
  Coverage   93.17%   93.17%           
=======================================
  Files          18       18           
  Lines        6374     6374           
  Branches     1088     1088           
=======================================
  Hits         5939     5939           
  Misses        296      296           
  Partials      139      139           
Flag Coverage Δ
C 93.17% <100.00%> (ø)
python 95.52% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@jeromekelleher jeromekelleher left a comment

Choose a reason for hiding this comment

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

LGTM

:param int min_work_per_job: The minimum amount of work (as a count of genotypes) to
allocate to a single parallel job. If the amount of work in a group of ancestors
exceeds this level it will be broken up into parallel partitions, subject to
the constriant of `max_num_partitions`.
Copy link
Member

Choose a reason for hiding this comment

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

typo, constriant

@benjeffery benjeffery mentioned this pull request Feb 5, 2025
Copy link
Member

@hyanwong hyanwong left a comment

Choose a reason for hiding this comment

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

Great works, thanks @benjeffery

It's all quite complicated, and I'm not sure I have a feel for how all the parts fit together, but the descriptions are detailed enough that I could follow them without problems.

I guess at some future point we might want a schematic, but that can wait for now. I reckon you can merge this and get someone (e.g. Duncan or Savita?) to try it out.

entire genotype array for the contig being inferred needs to fit in RAM.
This is the high-water mark for memory usage in tsinfer.
Note the `genotype_encoding` argument, setting this to
{class}`tsinfer.GenotypeEncoding.ONE_BIT` reduces the memory footprint of
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to say that this can't be used if there is missing data?

The plot below shows the number of ancestors matched in each group for a typical
human data set:

```{figure} _static/ancestor_grouping.png
Copy link
Member

Choose a reason for hiding this comment

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

May be worth indicating that the group number is ordered by time, so that group 0 represents the oldest ancestors?

{meth}`match_ancestors_batch_group_finalise` will then insert the matches and
output the tree sequence to `work_dir`.

At anypoint the process can be resumed from the last successfully completed call to
Copy link
Member

Choose a reason for hiding this comment

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

"anypoint" -> "any point"


At anypoint the process can be resumed from the last successfully completed call to
{meth}`match_ancestors_batch_groups`. As the tree sequences in `work_dir` checkpoint the
progress.
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure I understand / can parse this last sentence

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.

Add "Inferring large datasets" documentation
3 participants