Comments (12)
There is something that escapes my comprehension, I will explain.
The goal of this function is to create pir_params and NOT to run a pir_run.
This means that there is no true_phylogeny, as pir_run requires a true_phylogeny as well as pir_params, but as INDEPENDENT inputs.
This means that the number max_n_tries should make no difference, because its meaning is to try n times to replicate the same numbers of mutations in the twin_alignment.
But to produce a twin alignment you need a twin_phylogeny as well as a true_alignment which, in turn, requires a true_phylogeny, which we CANNOT have because we are not yet running pir_run.
TL;DR
pirouette is not running, we are just building pir_params.
The time grows as max_n_tries increases but there should be no tries going on because there is no phylogeny, only pir_params. Yet something is running max_n_tries times. I suspect is a test and it should not do it so many times.
I will investigate further.
from pirouette.
The problem is in check_pir_params
from pirouette.
And also in check_twinning_params
from pirouette.
Digging in -> check_sim_twal_fun
from pirouette.
I switched to a simpler test phylogeny and a different root sequence (of higher entropy) in check_sim_twal_fun.
Now it seems to go faster but there is one thing that must be kept in mind: this test depends on random variables, as the twin alignment is randomly generated. I thought of adding a set.seed, but we do not want to impose a specific pseudorandomness when checking variables, so I preferred to simplify the test.
from pirouette.
I merged your Pull Request, well done 👍
What is the result of the code profile? I know, these are hard to interpret 👨🔬
from pirouette.
I will take over from here 👍
from pirouette.
Running:
library(pirouette)
filename <- tempfile()
utils::Rprof(filename)
create_std_pir_paramses(n = 1)
utils::Rprof(NULL)
print(utils::summaryRprof(filename))
Results in
$by.self
total.pct
"pirouette::check_experiments" 91.64
"pirouette::check_experiments_candidates_have_same_mcmcs" 74.29
"check_mcmc_values" 58.45
"beautier::check_treelog" 24.02
"check_treelog_values" 23.58
"check_screenlog_values" 23.40
"check_tracelog_values" 22.95
"is_in_range" 12.54
"are_equal_treelogs" 11.21
$by.total
total.time total.pct self.time
"create_std_pir_paramses" 22.48 100.00 0.00
"pirouette::check_experiments" 20.60 91.64 0.02
"pirouette::check_pir_params_data_types" 17.96 79.89 0.00
"pirouette::check_pir_params" 17.96 79.89 0.00
"pirouette::check_experiments_candidates_have_same_mcmcs" 16.70 74.29 0.02
"beautier::are_equal_mcmcs" 16.62 73.93 0.00
"create_std_pir_params" 14.88 66.19 0.00
"beautier::check_mcmc" 13.16 58.54 0.00
"check_mcmc_values" 13.14 58.45 0.04
$sample.interval
[1] 0.02
$sampling.time
[1] 22.48
Number 1 time waster: check_experiments_candidates_have_same_mcmcs
- Full profile here: profile.txt
from pirouette.
I couldn't speed up check_experiments_candidates_have_same_mcmcs
easily [*], I think beautier::check_mcmc
is the sweet spot.
- [*] I thought replacing
experiment_1
byexperiments[[i]]
would reduce long copies, but that was a misconception
from pirouette.
Created a repo to let Travis check: https://github.com/richelbilderbeek/pirouette_profile
from pirouette.
A repo to let Travis check beautier's speed: https://github.com/richelbilderbeek/beautier_profile
from pirouette.
It's fine as it is 👍
from pirouette.
Related Issues (20)
- 'pir_params$twinning_params$twin_evidence_filename' must be NA if there is no evidences estimated HOT 2
- Why is `create_std_pir_paramses` slow? HOT 1
- Creating an exemplary DD tree HOT 1
- Lose dependency upon becosys HOT 1
- Improve speed of pir_plot_from_files HOT 4
- Reduce waste in pir_plots HOT 3
- Use correct number of bins HOT 1
- Fix facet title HOT 2
- Check that values from files are correctly classified HOT 1
- Fix pir_plot HOT 1
- 'create_exemplary_dd_tree' must match all pirouette examples code HOT 1
- Prepare version for pirouette article HOT 2
- Let all pirouette examples use 'create_exemplary_dd_tree' HOT 1
- Update nodeSub::sim_dual_linked HOT 1
- Fix CRAN Windows build HOT 1
- Use feast to do DNA sequence simulation HOT 1
- Fix CRAN issues HOT 1
- Fix CRAN issues HOT 1
- pirouette cleans up too much?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pirouette.