-
-
Notifications
You must be signed in to change notification settings - Fork 368
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
Add timing projection #219
Conversation
|
This is to let a user know how long it's going to take? Presumably if each iteration takes a long time, this won't just scroll off the screen --- isn't there some kind of pacifier output per iteration anyway? I love the idea of having expected completion times if we can estimate them even remotely reliably. |
This only prints at the beginning of a run -- the idea is to make a user aware that a model might take days to run, instead of the seconds/minutes they might be expecting, and hopefully encourage them to restart with a simpler model. On Sep 18, 2013, at 1:16 AM, Bob Carpenter [email protected] wrote:
|
I'm OK with this. It's a simple change.
On 9/18/13 3:37 AM, Michael Betancourt wrote:
|
Jenkins, ok to test. |
Test FAILed.
Refer to this link for build results: http://d1m1s1b1.stat.columbia.edu:8080/job/Stan%20Github%20Pull%20Requests/213/ |
This looks like it's breaking because offsets into output are being hard coded rather than matched by name. Is there a way to make the tests match by content rather than line number? Matching by line number is going to be super brittle for any little changes we do in the output like this pull request. |
Tests fixed. |
Test PASSed. |
Jenkins, retest this please. |
This should have been merged a while ago, just want to make sure it plays nicely with |
Jenkins, retest this please. |
2 similar comments
Jenkins, retest this please. |
Jenkins, retest this please. |
Test PASSed. |
The output looks like this:
I think I would prefer the timing to be after the output block indicating how the command line was called. The output gets buried deep. I could be convinced otherwise. |
My concern with moving it would be making it less obvious to On Nov 27, 2013, at 6:15 AM, Daniel Lee [email protected] wrote:
|
I like the expected timing. It's probably going to be inaccurate for probability My preferences about ordering match Michael's -- I like I think it'd help to give it in terms of number Minor point: "suit your expectations" is synonymous with
On 11/27/13, 9:25 AM, Michael Betancourt wrote:
|
std::cout << "Gradient evaluation took " << deltaT << " seconds" << std::endl; | ||
std::cout << "1000 transitions using 10 leapfrog steps per transition would take " | ||
<< 1e4 * deltaT << " seconds." << std::endl; | ||
std::cout << "Suit your expectations accordingly!" << std::endl << std::endl; |
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.
@betanalpha I'll let you choose what the final text is, but pick between:
"set your expections" or "adjust your expectations"
Or let me know which one you want and I'll take care of it. As far as I'm concerned, it's good to go once this gets changed. (I'd still prefer the info to come after the argument specification, but I'm good with it as-is.)
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.
Sorry -- that was from me. I was logged in as stan-buildbot.
On Fri, Dec 6, 2013 at 8:28 PM, Stan buildbot [email protected]:
In src/stan/gm/command.hpp:
@@ -499,6 +499,22 @@
}
// Check timing
clock_t start = clock();
std::vector<double> init_grad;
stan::model::log_prob_grad<true, true>(model,
cont_params, disc_params, init_grad,
&std::cout);
clock_t end = clock();
double deltaT = (double)(end - start) / CLOCKS_PER_SEC;
std::cout << "Gradient evaluation took " << deltaT << " seconds" << std::endl;
std::cout << "1000 transitions using 10 leapfrog steps per transition would take "
<< 1e4 \* deltaT << " seconds." << std::endl;
std::cout << "Suit your expectations accordingly!" << std::endl << std::endl;
@betanalpha https://github.com/betanalpha I'll let you choose what the
final text is, but pick between:"set your expections" or "adjust your expectations"
Or let me know which one you want and I'll take care of it. As far as I'm
concerned, it's good to go once this gets changed. (I'd still prefer the
info to come after the argument specification, but I'm good with it as-is.)—
Reply to this email directly or view it on GitHubhttps://github.com//pull/219/files#r8179476
.
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.
Updated to "adjust your expectations".
On Dec 6, 2013, at 8:28 PM, Stan buildbot [email protected] wrote:
In src/stan/gm/command.hpp:
@@ -499,6 +499,22 @@
}
// Check timing
clock_t start = clock();
std::vector<double> init_grad;
stan::model::log_prob_grad<true, true>(model,
cont_params, disc_params, init_grad,
&std::cout);
clock_t end = clock();
double deltaT = (double)(end - start) / CLOCKS_PER_SEC;
std::cout << "Gradient evaluation took " << deltaT << " seconds" << std::endl;
std::cout << "1000 transitions using 10 leapfrog steps per transition would take "
<< 1e4 \* deltaT << " seconds." << std::endl;
std::cout << "Suit your expectations accordingly!" << std::endl << std::endl;
@betanalpha I'll let you choose what the final text is, but pick between:
"set your expections" or "adjust your expectations"Or let me know which one you want and I'll take care of it. As far as I'm concerned, it's good to go once this gets changed. (I'd still prefer the info to come after the argument specification, but I'm good with it as-is.)
—
Reply to this email directly or view it on GitHub.
Jenkins, retest this please. |
@betanalpha, I just realized the manual should change reflecting these changes, right? |
Gah, yeah. Although it should only be in a few places.
|
I can take care of it. I don't think we need to do a full test run after On Sat, Dec 7, 2013 at 10:27 AM, Michael Betancourt <
|
@betanalpha, I take it back. I'll let you write in how you want it written up. Having the timing come in before the echoed parameters changes a lot more of the manual than after. I think I'd prefer to have you write it up how you're comfortable. In introduction.tex, in "Sampling from the Model," we've got this text:
In commands.tex, in "Command-Line Option Examples," the multiple figures needs to change. Most of the manual is written with the same assumption I've made: on any valid Stan run (whether it's optimize or sample), it will echo the parameters. I'm ok with it coming up front, we just need to fix the manual. |
If you want to just dump the pieces of the manual that I'll do them when I take a final pass at the manual,
On 12/7/13, 3:26 PM, Daniel Lee wrote:
|
Ok. I'll merge now and we'll add manual changes to that fix.
|
Test PASSed. |
Help alleviate overambitious users.