arg refactor

12 views
Skip to first unread message

Daniel Lee

unread,
Sep 7, 2013, 12:31:57 AM9/7/13
to stan...@googlegroups.com
Michael, I've got it running tests without failures. Right now, it's in branch feature/issue-202.

I could use your help for one more thing.

test/gm/argument_configuration generates 3 extraneous files. I don't know how to squash them. They are:
1) "append_diagnostic=0"
2) "good"
3) "samples.csv"

I would prefer if those files weren't generated by the test.


Daniel

Daniel Lee

unread,
Sep 7, 2013, 12:49:28 AM9/7/13
to stan...@googlegroups.com
I've debugged the test a little bit. See below.

On Sat, Sep 7, 2013 at 12:31 AM, Daniel Lee <bea...@alum.mit.edu> wrote:
Michael, I've got it running tests without failures. Right now, it's in branch feature/issue-202.

I could use your help for one more thing.

test/gm/argument_configuration generates 3 extraneous files. I don't know how to squash them. They are:
1) "append_diagnostic=0": looks like the argument gets generated as "diagnostic_file=append_diagnostic=0"

This is generated by:
- TestOutputWithMethod:  "append_diagnostic=0": looks like the argument gets generated as "diagnostic_file=append_diagnostic=0"

 
2) "good"

This is generated by:
- TestDataWithMethod: "data=good"
- TestDataWithoutMethod

 
3) "samples.csv"


The rest of the tests.

 

I would prefer if those files weren't generated by the test.


Could you help with making sure the files aren't generated?

 

Michael Betancourt

unread,
Sep 7, 2013, 4:14:02 PM9/7/13
to stan...@googlegroups.com
> t/gm/argument_configuration generates 3 extraneous files. I don't know how to squash them. They are:
> 1) "append_diagnostic=0": looks like the argument gets generated as "diagnostic_file=append_diagnostic=0"

Fixed and pushed.

> This is generated by:
> - TestOutputWithMethod: "append_diagnostic=0": looks like the argument gets generated as "diagnostic_file=append_diagnostic=0"
>
>
> 2) "good"

Actually from TestOutputWithMethod.

>
> This is generated by:
> - TestDataWithMethod: "data=good"
> - TestDataWithoutMethod
>
>
> 3) "samples.csv"
>
>
> The rest of the tests.

So both of these come from running with sample_file=(good/samples.csv). I'm not sure how to mod the code so that output does not get created when we specify it -- how do you clean up the samples output when you run models in other tests? Is it easier to change the run location or explicitly delete the file from within the executable?

Daniel Lee

unread,
Sep 9, 2013, 12:27:34 AM9/9/13
to stan...@googlegroups.com
Thanks!
We could change the run location. That's one way to fix the problem.

If the files were generated in the test/ folder or any subfolder, it wouldn't show up on git status. The folder is ignored. I would prefer not to add samples.csv to the git ignore file. Someone might lose a sample file if they do a git clean. By someone, I mean me.


Michael Betancourt

unread,
Sep 9, 2013, 3:39:43 AM9/9/13
to stan...@googlegroups.com
I agree that changing the run location is the easiest option, I've just never done that before. Do you have an example?

Daniel Lee

unread,
Sep 9, 2013, 11:38:19 AM9/9/13
to stan...@googlegroups.com
No, haven't done it before either, but I think we should be able to do it by prepending a "cd <>;" to the line, no? And adjusting the command call.

When you're free, hit me on google chat. If you're not free anytime soon, we can do it tomorrow.


Daniel



--
You received this message because you are subscribed to the Google Groups "stan development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to stan-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages