Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(8237)

Issue 146850044: issue414

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 years, 7 months ago by jendrikseipp
Modified:
9 years, 6 months ago
Reviewers:
malte.helmert, Malte
Visibility:
Public.

Description

issue414

Patch Set 1 #

Total comments: 43
Unified diffs Side-by-side diffs Delta from patch set Stats (+245 lines, -246 lines) Patch
M src/cleanup View 1 chunk +0 lines, -3 lines 0 comments Download
M src/driver/aliases.py View 2 chunks +24 lines, -8 lines 4 comments Download
M src/driver/main.py View 2 chunks +7 lines, -16 lines 6 comments Download
M src/driver/portfolio.py View 8 chunks +176 lines, -157 lines 24 comments Download
M src/driver/run_components.py View 3 chunks +20 lines, -30 lines 4 comments Download
M src/plan View 1 chunk +8 lines, -2 lines 0 comments Download
M src/search/downward-seq-opt-fdss-1.py View 2 chunks +1 line, -5 lines 0 comments Download
M src/search/downward-seq-opt-fdss-2.py View 2 chunks +1 line, -4 lines 0 comments Download
M src/search/downward-seq-opt-merge-and-shrink.py View 2 chunks +1 line, -4 lines 0 comments Download
M src/search/downward-seq-sat-fdss-1.py View 2 chunks +2 lines, -5 lines 3 comments Download
M src/search/downward-seq-sat-fdss-2.py View 3 chunks +3 lines, -7 lines 2 comments Download
M src/search/globals.cc View 1 chunk +2 lines, -5 lines 0 comments Download

Messages

Total messages: 4
malte.helmert
First set of comments -- so far, I looked mainly at the integration into the ...
9 years, 7 months ago (2014-09-21 14:49:00 UTC) #1
jendrikseipp
https://codereview.appspot.com/146850044/diff/1/src/driver/aliases.py File src/driver/aliases.py (right): https://codereview.appspot.com/146850044/diff/1/src/driver/aliases.py#newcode155 src/driver/aliases.py:155: On 2014/09/21 14:48:59, malte.helmert wrote: > In this issue, ...
9 years, 7 months ago (2014-09-22 23:05:35 UTC) #2
malte.helmert
https://codereview.appspot.com/146850044/diff/1/src/driver/main.py File src/driver/main.py (right): https://codereview.appspot.com/146850044/diff/1/src/driver/main.py#newcode52 src/driver/main.py:52: exitcode = run_components.run_search(args) Right, I saw this later, too. ...
9 years, 7 months ago (2014-09-22 23:29:30 UTC) #3
jendrikseipp
9 years, 6 months ago (2014-09-26 14:04:00 UTC) #4
I have made all the changes suggested here and created a pull request at
bitbucket that looks at the whole branch
(https://bitbucket.org/jendrikseipp/downward/pull-request/21/issue414-driver/diff).
If you'd rather discuss things at rietveld, that's fine with me too.

https://codereview.appspot.com/146850044/diff/1/src/driver/main.py
File src/driver/main.py (right):

https://codereview.appspot.com/146850044/diff/1/src/driver/main.py#newcode52
src/driver/main.py:52: exitcode = run_components.run_search(args)
On 2014/09/22 23:29:28, malte.helmert wrote:
> Right, I saw this later, too. I would recommend letting the assertions from
> run_components.xyz propagate and catching them in one place (perhaps here) to
> terminate the program from there. This means that run_components and this
> function should not return anything. But it's indeed probably best to discuss
> this in person.
> 
> On 2014/09/22 23:05:35, jendrikseipp wrote:
> > On 2014/09/21 14:48:59, malte.helmert wrote:
> > > The loop should probably break if exitcode != 0, right?
> > > (We probably shouldn't run the preprocessor/search after a failed
translator
> > > run, for example.)
> > > 
> > > Also, we probably have something like "else:
> > > assert False" in other cases like this.
> > 
> > Well, in case the exitcode is != 0, we will abort in run_components anyway.
We
> > should probably discuss how to handle this in person.
> 

Done.

https://codereview.appspot.com/146850044/diff/1/src/driver/portfolio.py
File src/driver/portfolio.py (right):

https://codereview.appspot.com/146850044/diff/1/src/driver/portfolio.py#newco...
src/driver/portfolio.py:19: # we reserve some memory for the Python process (see
also main.py).
On 2014/09/22 23:29:28, malte.helmert wrote:
> On 2014/09/22 23:05:35, jendrikseipp wrote:
> > On 2014/09/21 14:48:59, malte.helmert wrote:
> > > The removed comment to the left suggests that this won't work.
> > 
> > I thought set_memory_limit() in main.py magically took care of that problem,
> but
> > yes, I just tested it and it doesn't.
> 
> Maybe keep the relevant parts of the old comment here as a TODO.

Done.

https://codereview.appspot.com/146850044/diff/1/src/driver/portfolio.py#newco...
src/driver/portfolio.py:68: plans = glob.glob("%s*" % plan_file)
On 2014/09/22 23:29:28, malte.helmert wrote:
> > How do you want to check for the case when we "cannot extract a plan cost
from
> a
> > fully written plan"? I thought the cost was our indicator for a fully
written
> > plan. 
> 
> You're right, the current code either succeeds in extracting a cost or treats
> the plan as incomplete, which is fine. (I was think of things like: finding a
> line that starts with "; cost = " and ends with \n, but then doesn't contain a
> parseable int. This simply won't match with the current re solution. If I had
> hacked it up, I'd probably be done things manually with split() etc., and then
> there would have been a call to int which might have failed. But I think the
re
> solution is better.)

Acknowledged.

https://codereview.appspot.com/146850044/diff/1/src/driver/portfolio.py#newco...
src/driver/portfolio.py:286: #       use ArgumentParser.parse_known_args() to
parse it here?
On 2014/09/22 23:29:28, malte.helmert wrote:
> > Sounds good to me. I wasn't sure how you think about adding more commandline
> > options. Will implement this tomorrow.
> 
> Too many command-line options can be a problem, but being able to control the
> output file name(s) feels like common functionality that one might expect from
a
> well-behaved command-line application. (For the same reason, the fixed
> "output.sas" and "output" files are still a problem, but one thing at a time.)

Done.

https://codereview.appspot.com/146850044/diff/1/src/driver/run_components.py
File src/driver/run_components.py (right):

https://codereview.appspot.com/146850044/diff/1/src/driver/run_components.py#...
src/driver/run_components.py:31: return exitcode
On 2014/09/22 23:29:28, malte.helmert wrote:
> On 2014/09/22 23:05:35, jendrikseipp wrote:
> 
> > The exitcode of the search component may be != 0, but we still want to
> continue
> > execution and exit with that exitcode instead of with 1, which is what
happens
> > if subprocess.CalledProcessError occurs.
> 
> I would catch the CalledProcessError exception and terminate with its exit
code,
> which unless I misremember is an attribute of the exception object.
> 
> (The point being that this is a utility function which can fail, and it should
> be up to the user to decide how to deal with the failure.)

Done.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b