class to do benchmarking More...
Public Member Functions | |
| def | __init__ (self, client, robot, problemSolver) |
| def | do |
| Solve the same problem for the specified cases, for various random seed. More... | |
| def | getCase (self, iter) |
| def | writeResume (self, filename=None) |
| Write data to file. More... | |
| def | tryResumeAndDelete (self, filename=None) |
| In case of crash of HPP, the benchmark class writes temporary datas to a file. More... | |
| def | resumeFrom (self, fname) |
| def | plotTime (self, axes) |
| def | plotPathLength (self, axes) |
| def | writeDatabase (self, nameDatabase, experimentName='default', nameLogFile='temp.log', append=False) |
| This method create a database which store the benchmark results. More... | |
| def | __str__ (self) |
Public Attributes | |
| seedRange | |
| A list of seed to initialize the random generator. More... | |
| cases | |
| A list of cases for which benchmarking will be done. More... | |
| iterPerCase | |
| Number of times one case is repeated (for one seed). More... | |
| client | |
| robot | |
| ps | |
| current | |
| results | |
Static Public Attributes | |
| toSeconds = np.array ([60*60,60,1,1e-3]) | |
| Used to transform HPP output into seconds. More... | |
| string | crashFile = "/tmp/resume.hpp.corbaserver.benchmark.pickle" |
| The filename of the crash file. More... | |
class to do benchmarking
If you wish to replot datas stored in a file:
You can do the following
Then, launch your server with this:
Finally, launch your script with this:
This will restart the server whenever it crashes and will resume the benchmarks where it stopped.
| def hpp.corbaserver.benchmark.Benchmark.__init__ | ( | self, | |
| client, | |||
| robot, | |||
| problemSolver | |||
| ) |
| def hpp.corbaserver.benchmark.Benchmark.__str__ | ( | self | ) |
References hpp.corbaserver.benchmark.Benchmark._printStats(), hpp.corbaserver.benchmark.Benchmark.results, and hpp.corbaserver.benchmark.Benchmark.toSeconds.
| def hpp.corbaserver.benchmark.Benchmark.do | ( | self, | |
initCase = lambda this, |
|||
| case, | |||
| iter | |||
| ) |
Solve the same problem for the specified cases, for various random seed.
| initCase | a function of 3 arguments:
|
| def hpp.corbaserver.benchmark.Benchmark.getCase | ( | self, | |
| iter | |||
| ) |
References hpp.corbaserver.benchmark.Benchmark.cases, hpp.corbaserver.benchmark.Benchmark.crashFile, hpp.corbaserver.benchmark.Benchmark.current, hpp.corbaserver.benchmark.Benchmark.iterPerCase, hpp.corbaserver.benchmark.Benchmark.results, hpp.corbaserver.benchmark.Benchmark.resumeFrom(), hpp.corbaserver.benchmark.Benchmark.seedRange, hpp.corbaserver.benchmark.Benchmark.tryResumeAndDelete(), and hpp.corbaserver.benchmark.Benchmark.writeResume().
| def hpp.corbaserver.benchmark.Benchmark.plotPathLength | ( | self, | |
| axes | |||
| ) |
References hpp.corbaserver.benchmark.Benchmark._boxplot(), hpp.corbaserver.benchmark.Benchmark.cases, hpp.corbaserver.benchmark.Benchmark.iterPerCase, hpp.corbaserver.benchmark.Benchmark.ps, hpp.corbaserver.benchmark.Benchmark.results, hpp.corbaserver.problem_solver.ProblemSolver.robot, hpp.corbaserver.benchmark.Benchmark.robot, hpp.corbaserver.benchmark.Benchmark.seedRange, hpp.corbaserver.benchmark.Benchmark.toSeconds, and hpp.corbaserver.benchmark.Benchmark.writeDatabase().
| def hpp.corbaserver.benchmark.Benchmark.plotTime | ( | self, | |
| axes | |||
| ) |
References hpp.corbaserver.benchmark.Benchmark._boxplot(), hpp.corbaserver.benchmark.Benchmark.cases, hpp.corbaserver.benchmark.Benchmark.iterPerCase, hpp.corbaserver.benchmark.Benchmark.results, hpp.corbaserver.benchmark.Benchmark.seedRange, and hpp.corbaserver.benchmark.Benchmark.toSeconds.
| def hpp.corbaserver.benchmark.Benchmark.resumeFrom | ( | self, | |
| fname | |||
| ) |
References hpp.corbaserver.benchmark.Benchmark.cases, hpp.corbaserver.benchmark.Benchmark.current, hpp.corbaserver.benchmark.Benchmark.iterPerCase, hpp.corbaserver.benchmark.Benchmark.results, and hpp.corbaserver.benchmark.Benchmark.seedRange.
Referenced by hpp.corbaserver.benchmark.Benchmark.getCase().
| def hpp.corbaserver.benchmark.Benchmark.tryResumeAndDelete | ( | self, | |
filename = None |
|||
| ) |
In case of crash of HPP, the benchmark class writes temporary datas to a file.
The method will check if the crash file exists and:
| filename | if None, it uses member Benchmark.crashFile |
Referenced by hpp.corbaserver.benchmark.Benchmark.getCase().
| def hpp.corbaserver.benchmark.Benchmark.writeDatabase | ( | self, | |
| nameDatabase, | |||
experimentName = 'default', |
|||
nameLogFile = 'temp.log', |
|||
append = False |
|||
| ) |
This method create a database which store the benchmark results.
You can then use it in the platform http://plannerarena.org/ to plot your results.
| nameDatabase | the name of the created file (extension must be in .db) |
| experimentName | the name of the current scenario/problem (used when you append several scenario in the same database) |
| nameLogFile | the name of the text file writed |
| append | if True, the current result will be added in the given database. |
Referenced by hpp.corbaserver.benchmark.Benchmark.plotPathLength().
| def hpp.corbaserver.benchmark.Benchmark.writeResume | ( | self, | |
filename = None |
|||
| ) |
Write data to file.
| filename | if None, it uses member Benchmark.crashFile |
Referenced by hpp.corbaserver.benchmark.Benchmark.getCase().
| hpp.corbaserver.benchmark.Benchmark.cases |
A list of cases for which benchmarking will be done.
Referenced by hpp.corbaserver.benchmark.Benchmark.getCase(), hpp.corbaserver.benchmark.Benchmark.plotPathLength(), hpp.corbaserver.benchmark.Benchmark.plotTime(), and hpp.corbaserver.benchmark.Benchmark.resumeFrom().
| hpp.corbaserver.benchmark.Benchmark.client |
|
static |
The filename of the crash file.
Referenced by hpp.corbaserver.benchmark.Benchmark.getCase().
| hpp.corbaserver.benchmark.Benchmark.current |
| hpp.corbaserver.benchmark.Benchmark.iterPerCase |
Number of times one case is repeated (for one seed).
Referenced by hpp.corbaserver.benchmark.Benchmark.getCase(), hpp.corbaserver.benchmark.Benchmark.plotPathLength(), hpp.corbaserver.benchmark.Benchmark.plotTime(), and hpp.corbaserver.benchmark.Benchmark.resumeFrom().
| hpp.corbaserver.benchmark.Benchmark.ps |
Referenced by hpp.corbaserver.benchmark.Benchmark.plotPathLength().
| hpp.corbaserver.benchmark.Benchmark.results |
| hpp.corbaserver.benchmark.Benchmark.robot |
Referenced by hpp.corbaserver.benchmark.Benchmark.plotPathLength().
| hpp.corbaserver.benchmark.Benchmark.seedRange |
A list of seed to initialize the random generator.
Referenced by hpp.corbaserver.benchmark.Benchmark.getCase(), hpp.corbaserver.benchmark.Benchmark.plotPathLength(), hpp.corbaserver.benchmark.Benchmark.plotTime(), and hpp.corbaserver.benchmark.Benchmark.resumeFrom().
|
static |
Used to transform HPP output into seconds.
Referenced by hpp.corbaserver.benchmark.Benchmark.__str__(), hpp.corbaserver.benchmark.Benchmark.plotPathLength(), and hpp.corbaserver.benchmark.Benchmark.plotTime().