From 2f36005164828ebed890cce1f0b04911c0ec32b8 Mon Sep 17 00:00:00 2001 From: Franziska Schloesser Date: Tue, 22 Nov 2022 01:05:09 +0100 Subject: [PATCH 1/7] add --all_rows option to piping mode of ipet-parse --- README.md | 34 +++++++++++++++++++--------------- ipet/Experiment.py | 5 ++--- ipet/TestRun.py | 7 ++++--- scripts/ipet-parse | 5 +++-- 4 files changed, 28 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index d88badc..d035da4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# IPET (Interactive Performance Evaluation Tools) +# IPET (Interactive Performance Evaluation Tools) IPET is a toolbox that allows to easily create customized benchmark tables from raw solver log files, written in Python 3. @@ -83,12 +83,12 @@ to use a differently named virtual environment somewhere else, of course. cd ipet virtualenv --python python3 venv source venv/bin/activate - + Note that you may deactivate the virtual environment at any time by calling deactivate -2. (*optional* step to install the graphical user interface, for command line only skip to next step) +2. (*optional* step to install the graphical user interface, for command line only skip to next step) Install PyQt4 bindings inside your virtual environment by calling the provided script, which assumes that you are running inside the virtual environment "venv" or the one specified by the optional path. The script will ask you to carefully read and accept the license agreement for using PyQt4 bindings. @@ -102,7 +102,7 @@ The script will ask you to carefully read and accept the license agreement for u 4. As a developer, it might be useful to call the following command instead: pip install -e . - + This creates symlinks to the IPET source files in the site-packages of the virtual environment library, and allows for more rapid testing and development. @@ -132,15 +132,15 @@ use the graphical user interface. Run the command python -m unittest test - + if the output says OK, all tests were passed. # Usage and concept **under construction** -## Overview - +## Overview + IPET takes a logfile and some optional additional files like an error-, set- and metafile, extracts information and aggregates this data in a compact table. The Logfiles need to have an `.out` extension, errorfiles need to have `.err`, setfiles are `.set` and metafiles are `.meta` @@ -154,8 +154,8 @@ It is possible to configure ipet for your own solver and testset, please check t ## Basic usage on the command line -IPET is easily used on the command line. Assume you have a logfile `testrun.out` that contains the output of running the solver on a list of instances. -The output of each run is preceded by a line indicating the instance and preceded by a line indicating correct shutdown of the solver. +IPET is easily used on the command line. Assume you have a logfile `testrun.out` that contains the output of running the solver on a list of instances. +The output of each run is preceded by a line indicating the instance and preceded by a line indicating correct shutdown of the solver. In other words your format is the following: @01 /path/to/my/first_instance.clp @@ -169,12 +169,12 @@ In other words your format is the following: @01 /path/to/my/last_instance.clp =ready= - + Now you call the parsing command with the logfile, which will create a `testrun.trn` file storing the parsed data. ipet-parse -l testrun.out - -In the second step you call the evaluation command with this `testrun.trn` file and an evaluation file that encodes the datakey and aggregation functions for your table. + +In the second step you call the evaluation command with this `testrun.trn` file and an evaluation file that encodes the datakey and aggregation functions for your table. There is an example in `scripts/evaluation.xml`. Calling `ipet-evaluate` will display the aggregated table only: @@ -184,6 +184,10 @@ If you are interesting in the considered values that result in this table you ca ipet-evaluate -e scripts/evaluation.xml -t testrun.trn --long +If you want to see what the parsed fields are, you can use + + cat logfile.out | ipet-parse -a + ## Tutorial for parsing results obtained with SCIP Say that you used SCIP to solve a number of instances and would like to get the solving time, number of nodes used and the status of the solver for each instance. This short tutorial will show you how to do that with ipet. As an input, it is assumed that you have the output of scip in a separate file for each instance in the folder `SCIP_OUT_FILES`. @@ -219,7 +223,7 @@ $ ipet-evaluate -t SCIP_OUT_FILES/concatenated.trn -e scripts/evaluation.xml --l 2021-07-01 14:52:33,213 - WARNING - ipet.evaluation.IPETEvalTable - Filtergroup diff-timeouts is empty and has been deactived. Instancewise Results: Time Nodes Status -ProblemName +ProblemName 31966239 36004.22 1 fail_inconsistent 31966240 36007.75 1 fail_inconsistent 31966241 36012.76 1 fail_inconsistent @@ -283,7 +287,7 @@ ProblemName 31966299 2.54 1 ok Aggregated Results: _time_ _limit_ _primfail_ _dualfail_ _fail_ _abort_ _solved_ _unkn_ _count_ _miss_ Time_shmean(1.0) Nodes_shmean(100.0) -Group +Group all 0 0 0 0 59 0 2 0 61 0 26604.848145 1.0 alloptimal 0 0 0 0 0 0 2 0 2 0 2.534996 1.0 easyinstances 0 0 0 0 0 0 2 0 2 0 2.534996 1.0 @@ -303,7 +307,7 @@ Additionally you need to place a `__init__.py` file in the `~/.ipet/solvers/` fo - `~/.ipet/readers`, where the user can define their own rules for extracting data by giving a line, position and format of the number or string they want to parse from the logfile(s). For an example check `scripts/readers-example.xml`. - `~/.ipet/solufiles`, that contains solution files with information about the correct solution of instance files or their (inf)feasibility status. For an example check `test/data/short.solu` -- +- ## Starting the graphical user interface IPET has a subdirectory called "scripts" with scripts to invoke log file parsing, test run evaluating, and starting diff --git a/ipet/Experiment.py b/ipet/Experiment.py index ff18841..1f71681 100644 --- a/ipet/Experiment.py +++ b/ipet/Experiment.py @@ -286,10 +286,9 @@ def calculateIntegrals(self,scale=False, lim=(None,None)): logger.error("Error for dual bound on problem %s, list: %s " % (problemid, processplotdata)) - - def printToConsole(self, formatstr = "{idx} {d}"): + def printToConsole(self, formatstr = "{idx} {d}", all_rows = False): for tr in self.testruns: - tr.printToConsole(formatstr) + tr.printToConsole(formatstr, all_rows) def saveToFile(self, filename): """ Save the experiment instance to a file specified by 'filename'. diff --git a/ipet/TestRun.py b/ipet/TestRun.py index 265a159..6c1f2c2 100644 --- a/ipet/TestRun.py +++ b/ipet/TestRun.py @@ -12,6 +12,7 @@ from ipet import Key from ipet import misc from pandas import DataFrame, notnull +import pandas as pd import os, sys import logging from ipet.Key import CONTEXT_LOGFILE, CONTEXT_METAFILE @@ -379,13 +380,13 @@ def emptyCurrentProblemData(self): """ return self.currentproblemdata == {} - def printToConsole(self, formatstr = "{idx}: {d}"): + def printToConsole(self, formatstr = "{idx}: {d}", all_rows = False): """ Print data to console """ + if (all_rows): + pd.set_option('display.max_rows', None) for idx, d in self.data.iterrows(): -# pd.set_option('display.max_rows', len(d)) print(formatstr.format(d = d, idx = idx)) -# pd.reset_option('display.max_rows') def toJson(self): """ Return the data-object in json diff --git a/scripts/ipet-parse b/scripts/ipet-parse index dad22c7..865679f 100644 --- a/scripts/ipet-parse +++ b/scripts/ipet-parse @@ -84,8 +84,9 @@ argparser.add_argument('-l', '--logfiles', nargs = '*', help = "list of outfiles argparser.add_argument('-r', '--readers', nargs = '*', default = [], help = "list of additional readers in xml format that should be used for parsing") argparser.add_argument('-s', '--solufiles', nargs = '*', default = [], help = "list of solu files that should be taken into account") argparser.add_argument("-D", "--debug", action = "store_true", default = False, help = "Enable debug output to console during parsing") +argparser.add_argument("-a", "--all_rows", action = "store_true", default = False, help = "In piped moded: display all rows.") argparser.add_argument("-f", "--formatstr", default = DEFAULT_FORMATSTR, - help = """format string for displaying output per instance to console. The internal formatter uses 'idx' + help = """In piped mode: format string for displaying output per instance to console. The internal formatter uses 'idx' to reference the index and 'd' for the collected data for this instance. default : "%s" """ % DEFAULT_FORMATSTR ) argparser.add_argument("-v", "--validatedual", action = "store_true", default = Experiment.DEFAULT_VALIDATEDUAL, help = "Enable dual validation, relative to 'gaptol' parameter") @@ -204,4 +205,4 @@ if __name__ == '__main__': else: experiment.addStdinput() experiment.collectData() - experiment.printToConsole(arguments.formatstr) + experiment.printToConsole(arguments.formatstr, arguments.all_rows) From 98814097934c0730056609465c99eb3306f3f69b Mon Sep 17 00:00:00 2001 From: Franziska Schloesser Date: Tue, 22 Nov 2022 17:19:06 +0100 Subject: [PATCH 2/7] update setup.py --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index dbc6086..b30fae9 100644 --- a/setup.py +++ b/setup.py @@ -17,7 +17,7 @@ try: import pypandoc - long_description = pypandoc.convert('README.md', 'rst') + long_description = pypandoc.convert_file('README.md', 'rst') except(IOError, ImportError): long_description = "Interactive Performance Evaluation tools, see README.md" From a00b5be3ea80e4e74f4be5f658eba49639ebabb2 Mon Sep 17 00:00:00 2001 From: Franziska Schloesser Date: Tue, 22 Nov 2022 17:27:15 +0100 Subject: [PATCH 3/7] update requirements for python 3.10 --- requirements-gui.txt | 2 +- requirements.txt | 7 +------ requirements_3.10.txt | 6 ++++++ 3 files changed, 8 insertions(+), 7 deletions(-) mode change 100644 => 120000 requirements.txt create mode 100644 requirements_3.10.txt diff --git a/requirements-gui.txt b/requirements-gui.txt index a1e35e3..6ccafc3 100644 --- a/requirements-gui.txt +++ b/requirements-gui.txt @@ -1 +1 @@ -matplotlib==3.1.1 +matplotlib diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index 1e4072e..0000000 --- a/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -numpy==1.17.5 -pandas==0.25.3 -pypandoc==1.4 -scipy==1.3.3 -toposort==1.5 -tqdm==4.56.0 diff --git a/requirements.txt b/requirements.txt new file mode 120000 index 0000000..9e8ec4d --- /dev/null +++ b/requirements.txt @@ -0,0 +1 @@ +requirements_3.10.txt \ No newline at end of file diff --git a/requirements_3.10.txt b/requirements_3.10.txt new file mode 100644 index 0000000..58d4be5 --- /dev/null +++ b/requirements_3.10.txt @@ -0,0 +1,6 @@ +numpy==1.23.5 +pandas==1.5.1 +pypandoc==1.10 +scipy==1.9.3 +toposort==1.7 +tqdm==4.64.1 From 9365bf5d07ae402cbe1e5ee451fedb184ff7782e Mon Sep 17 00:00:00 2001 From: Franziska Schloesser Date: Tue, 22 Nov 2022 17:28:27 +0100 Subject: [PATCH 4/7] revert change to requirements-gui --- requirements-gui.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-gui.txt b/requirements-gui.txt index 6ccafc3..a1e35e3 100644 --- a/requirements-gui.txt +++ b/requirements-gui.txt @@ -1 +1 @@ -matplotlib +matplotlib==3.1.1 From 2fd4cbbc567a29101341c03e3d3e541f6e0f0494 Mon Sep 17 00:00:00 2001 From: Franziska Schloesser Date: Tue, 22 Nov 2022 18:58:58 +0100 Subject: [PATCH 5/7] brush over documentation and add ipet-evaluate docmode --- README.md | 10 ++++-- doc/Makefile | 3 +- doc/source/README.md | 1 + doc/source/_static/logo.png | Bin 0 -> 2241 bytes doc/source/conf.py | 17 +++++----- doc/source/index.rst | 2 +- doc/source/installation.md | 33 -------------------- doc/source/ipet.parsing.rst | 8 ----- doc/source/scripts.rst | 5 ++- ipet/parsing/StatisticReader.py | 3 +- ipet/parsing/StatisticReader_TableReader.py | 2 +- requirements-doc.txt | 2 ++ scripts/ipet-evaluate | 15 ++++++++- scripts/ipet-parse | 1 + 14 files changed, 42 insertions(+), 60 deletions(-) create mode 120000 doc/source/README.md create mode 100644 doc/source/_static/logo.png delete mode 100644 doc/source/installation.md create mode 100644 requirements-doc.txt diff --git a/README.md b/README.md index d035da4..694eb33 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -# IPET (Interactive Performance Evaluation Tools) +IPET (Interactive Performance Evaluation Tools) +=============================================== IPET is a toolbox that allows to easily create customized benchmark tables from raw solver log files, written in Python 3. @@ -186,7 +187,11 @@ If you are interesting in the considered values that result in this table you ca If you want to see what the parsed fields are, you can use - cat logfile.out | ipet-parse -a + cat logfile.out | ipet-parse -a | sort + +Then of course if you search for a specific string, you can use + + cat locafile.out | ipet-parse -a | grep Time ## Tutorial for parsing results obtained with SCIP @@ -202,6 +207,7 @@ Concatenated logs from folder '../SCIP_OUT_FILES' into '../SCIP_OUT_FILES/concat ### Step 2 We can now parse the results by calling the ipet-parse command with the concatenated logfile: + ``` $ ipet-parse -l SCIP_OUT_FILES/concatenated.out 2021-07-01 14:49:50,530 - INFO - root - Start parsing process using 8 threads diff --git a/doc/Makefile b/doc/Makefile index 8dc61a0..d68947d 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -19,4 +19,5 @@ help: %: Makefile @mkdir -p source/commandline @ipet-parse --docmode | tee source/commandline/ipet-parse.rst - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file + @ipet-parse --docmode | tee source/commandline/ipet-evaluate.rst + @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/doc/source/README.md b/doc/source/README.md new file mode 120000 index 0000000..fe84005 --- /dev/null +++ b/doc/source/README.md @@ -0,0 +1 @@ +../../README.md \ No newline at end of file diff --git a/doc/source/_static/logo.png b/doc/source/_static/logo.png new file mode 100644 index 0000000000000000000000000000000000000000..e49e2ef023511b055dc476083522082af905c3f9 GIT binary patch literal 2241 zcma)8c~lbE8Yd-8Yi5+pOv439pZdg7bHPN%NFa(R&B`3N$pv#oEyawa#hl4ZOie*8 zOL>LTBJM&u9CO!{Nk&x2L~|LJQlv<8@Vxg=?@jaO+;i`D?)lF7-S4~K{eHijPQatT z(a_TX007@$F{ooo+rBt;(!3eP7NL0@%*b z4O>tuy4QibHPr)*z)fzjOQ{%uY8C+WzYb&JEXZ>VAK1b1uHlx{HbhzkGn?J(TZhWY zdkdzjH{MKuv_~6U)$3v=KcTENj3mH%%Ty0%)_G;h$61)pp{a@6DJ1KcOu1vlbX3_Me)t@bOgldB&$Z39%7LEa2aZtmz-Gft9$Y6S?&}g_*c_ zQ>$*hq5WJ+FT6#uytB1}uC9%uHGP^Z!uS>~_NZe;_B^R->$uKWvRw!c(g-x#ruHDK z*{y|YXJ@pHbjU-=bB)Y($m7@bKt5OoGyRd9IFbb)(R*^uT$SW? z{qInltyo=*+?0VV+Tvv{xg}`Xcw-B~r8t(16r7?41@h0v+IrI|z)2qon)Y3(S~k9y z$^UhRF&y6-dZ*U_znMf2=Y=*1$$x?D@YC6oWSe#guK6 zb5>#kO;g>@D@MULyT?n^v5*LbI#ZhJ_+fgCLJ;bdq2t72c)&hbE3-AEXoZC^2sgFV zKcnICiZ`eJrBgX?bQBOkq36Nt-4?&==eRMY+i72i*v=pN{fU9)b^o+|79d?& zuH-b73XEKLr+dg1tlkrxU^YMoxn^RNCp(5GrN~U_p<3yffCWFr+nET-w>g-Yvd5Aa zK11CT!2^5dglQ;iu}6V_=Q$&A)@#+0lZtTUfLtF4)lwIGMj!O&{lwuOF>1XIG|R1S z^lQv`6`|EeM5*lc=@%|$<=Q$*rTebK_(9g)Yp-RbJ;yAkWny3d6iB;>Eu1~dG)lI` z_e!~(C!>2Cv_nag$u$ZD?PJx+HS(-%GU_h#{N*ldg5YMOxB@4s0HYlgpMwQq*vg-u z@=m`a6Jp7ZQ+D>W3eV0S9_PspV&F*JsT_9+np6%+;+|S0SDNOeAuJcg^q7=nc_vwK zmMEAR@vu*;@h|H_k$kG)DV3Tt^onNQlI^za&qLWph&Mur?nM}Gf0}iCyT?I zsp1XQ#q?gq-#M@xW=j|AVQB$(Wa?a<$#P6~myo|tgrw~J38@6UWyYlfb==i^Rdbby{dA>NU zzyRl9)mOaI#vW`r8P~bGC+89dtPNl2s?9dsF@UDH=AHgJ#eadRyO9x4Iepx`RKEk! zpgS{!++kYe?b@wvL<4?SK@YMjJrD}jzm4{9i3vbrsqV;C(S}lEV)#l(g$u#?_OkvV z>PJl|cDK)==dH^bxbXn*!EoyzcWsQ1RcQ5*h5jJ}BUKiJwa)cf9w$g?uK!|xZK zU#wh~TWDda)AxjjI-HCp(Ju;4cPvAZt5-U${!-`u47&d~wV$9kkQidh@Br~~!*qIR zlI1`Lp3-#=Mgv~Hx-=xVK#bHkLETmZo{uU_!SI@|sOT5y^#-qNpUob}IQ`QG|5UHp z`xR4!r%iXq4{cy3tdb~u3|C#3P5M|l;_}5kHM+!-+jFR)a9jl|rGQ;n$X_zKlvnd3 z#E$(rHhaDLq9RUptNT9glVqb=1K;AeMZN#``2gS(t`!3|o%HC_8OlEi0DAzBV!H=W F{{a7x^` you can search for Keys matching the given regular expression + Example + + >>> ipet-evaluate -t mytestrun.trn -k Time + will show you all keys parsed in mytestrun that contain the string "Time". ''' @@ -137,7 +143,7 @@ argparser.add_argument('-f', '--fileextensions', default = None, action = "appen argparser.add_argument('--tolerance', default = None, help = "relative objective tolerance for validation") argparser.add_argument('--colselection', default = None, help = "List of column indices to display in aggregated tables") argparser.add_argument('--horizontal', action = "store_true", default = False, help = "Should the inner index of the aggregated table be pivoted into the columns?") - +argparser.add_argument("--docmode", action = "store_true", default = False, help = "print this help as restructured text") if __name__ == '__main__': try: @@ -153,6 +159,13 @@ if __name__ == '__main__': ch = logging.StreamHandler(sys.stdout) ch.setFormatter(formatter) logger.addHandler(ch) + + if arguments.docmode: + print(pypandoc.convert_text(epilog, "rst", "md")) + print(pypandoc.convert_text(validation_doc, "rst", "md")) + print(pypandoc.convert_text(output_doc, "rst", "md")) + exit() + if arguments.quiet: logger.setLevel(logging.ERROR) elif arguments.debug: diff --git a/scripts/ipet-parse b/scripts/ipet-parse index 865679f..775937c 100644 --- a/scripts/ipet-parse +++ b/scripts/ipet-parse @@ -165,6 +165,7 @@ if __name__ == '__main__': if arguments.docmode: print(pypandoc.convert_text(formatstrExamples, "rst", "md")) + print(pypandoc.convert_text(explainAutoloading, "rst", "md")) exit() if arguments.debug: From d42bc3eece4dd2a699dc0528715c82bcc9401dcb Mon Sep 17 00:00:00 2001 From: Franziska Schloesser Date: Tue, 22 Nov 2022 19:38:13 +0100 Subject: [PATCH 6/7] update documentation and fix some warnings --- Makefile | 225 ------------------------------- README.md | 2 +- doc/Makefile | 4 +- doc/source/_static/.gitignore | 3 + doc/source/ipet.concepts.rst | 61 +++++---- doc/source/ipet.evaluation.rst | 47 ++++--- doc/source/ipet.misc.rst | 51 ++++--- doc/source/ipet.parsing.rst | 129 +++++++++--------- doc/source/ipet.rst | 65 +++++---- doc/source/ipet.validation.rst | 21 +++ ipet/evaluation/IPETEvalTable.py | 13 +- ipet/evaluation/IPETFilter.py | 17 ++- 12 files changed, 219 insertions(+), 419 deletions(-) delete mode 100644 Makefile create mode 100644 doc/source/_static/.gitignore create mode 100644 doc/source/ipet.validation.rst diff --git a/Makefile b/Makefile deleted file mode 100644 index ba260dc..0000000 --- a/Makefile +++ /dev/null @@ -1,225 +0,0 @@ -# Makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = sphinx-build -PAPER = -BUILDDIR = build - -# Internal variables. -PAPEROPT_a4 = -D latex_paper_size=a4 -PAPEROPT_letter = -D latex_paper_size=letter -ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source -# the i18n builder cannot share the environment and doctrees with the others -I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source - -.PHONY: help -help: - @echo "Please use \`make ' where is one of" - @echo " html to make standalone HTML files" - @echo " dirhtml to make HTML files named index.html in directories" - @echo " singlehtml to make a single large HTML file" - @echo " pickle to make pickle files" - @echo " json to make JSON files" - @echo " htmlhelp to make HTML files and a HTML help project" - @echo " qthelp to make HTML files and a qthelp project" - @echo " applehelp to make an Apple Help Book" - @echo " devhelp to make HTML files and a Devhelp project" - @echo " epub to make an epub" - @echo " epub3 to make an epub3" - @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" - @echo " latexpdf to make LaTeX files and run them through pdflatex" - @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" - @echo " text to make text files" - @echo " man to make manual pages" - @echo " texinfo to make Texinfo files" - @echo " info to make Texinfo files and run them through makeinfo" - @echo " gettext to make PO message catalogs" - @echo " changes to make an overview of all changed/added/deprecated items" - @echo " xml to make Docutils-native XML files" - @echo " pseudoxml to make pseudoxml-XML files for display purposes" - @echo " linkcheck to check all external links for integrity" - @echo " doctest to run all doctests embedded in the documentation (if enabled)" - @echo " coverage to run coverage check of the documentation (if enabled)" - @echo " dummy to check syntax errors of document sources" - -.PHONY: clean -clean: - rm -rf $(BUILDDIR)/* - -.PHONY: html -html: - $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." - -.PHONY: dirhtml -dirhtml: - $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml - @echo - @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." - -.PHONY: singlehtml -singlehtml: - $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml - @echo - @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." - -.PHONY: pickle -pickle: - $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle - @echo - @echo "Build finished; now you can process the pickle files." - -.PHONY: json -json: - $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json - @echo - @echo "Build finished; now you can process the JSON files." - -.PHONY: htmlhelp -htmlhelp: - $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp - @echo - @echo "Build finished; now you can run HTML Help Workshop with the" \ - ".hhp project file in $(BUILDDIR)/htmlhelp." - -.PHONY: qthelp -qthelp: - $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp - @echo - @echo "Build finished; now you can run "qcollectiongenerator" with the" \ - ".qhcp project file in $(BUILDDIR)/qthelp, like this:" - @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/IPETInteractivePerformanceEvaluationTools.qhcp" - @echo "To view the help file:" - @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/IPETInteractivePerformanceEvaluationTools.qhc" - -.PHONY: applehelp -applehelp: - $(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp - @echo - @echo "Build finished. The help book is in $(BUILDDIR)/applehelp." - @echo "N.B. You won't be able to view it unless you put it in" \ - "~/Library/Documentation/Help or install it in your application" \ - "bundle." - -.PHONY: devhelp -devhelp: - $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp - @echo - @echo "Build finished." - @echo "To view the help file:" - @echo "# mkdir -p $$HOME/.local/share/devhelp/IPETInteractivePerformanceEvaluationTools" - @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/IPETInteractivePerformanceEvaluationTools" - @echo "# devhelp" - -.PHONY: epub -epub: - $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub - @echo - @echo "Build finished. The epub file is in $(BUILDDIR)/epub." - -.PHONY: epub3 -epub3: - $(SPHINXBUILD) -b epub3 $(ALLSPHINXOPTS) $(BUILDDIR)/epub3 - @echo - @echo "Build finished. The epub3 file is in $(BUILDDIR)/epub3." - -.PHONY: latex -latex: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo - @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." - @echo "Run \`make' in that directory to run these through (pdf)latex" \ - "(use \`make latexpdf' here to do that automatically)." - -.PHONY: latexpdf -latexpdf: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through pdflatex..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -.PHONY: latexpdfja -latexpdfja: - $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex - @echo "Running LaTeX files through platex and dvipdfmx..." - $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja - @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." - -.PHONY: text -text: - $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text - @echo - @echo "Build finished. The text files are in $(BUILDDIR)/text." - -.PHONY: man -man: - $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man - @echo - @echo "Build finished. The manual pages are in $(BUILDDIR)/man." - -.PHONY: texinfo -texinfo: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo - @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." - @echo "Run \`make' in that directory to run these through makeinfo" \ - "(use \`make info' here to do that automatically)." - -.PHONY: info -info: - $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo - @echo "Running Texinfo files through makeinfo..." - make -C $(BUILDDIR)/texinfo info - @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." - -.PHONY: gettext -gettext: - $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale - @echo - @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." - -.PHONY: changes -changes: - $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes - @echo - @echo "The overview file is in $(BUILDDIR)/changes." - -.PHONY: linkcheck -linkcheck: - $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck - @echo - @echo "Link check complete; look for any errors in the above output " \ - "or in $(BUILDDIR)/linkcheck/output.txt." - -.PHONY: doctest -doctest: - $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest - @echo "Testing of doctests in the sources finished, look at the " \ - "results in $(BUILDDIR)/doctest/output.txt." - -.PHONY: coverage -coverage: - $(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage - @echo "Testing of coverage in the sources finished, look at the " \ - "results in $(BUILDDIR)/coverage/python.txt." - -.PHONY: xml -xml: - $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml - @echo - @echo "Build finished. The XML files are in $(BUILDDIR)/xml." - -.PHONY: pseudoxml -pseudoxml: - $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml - @echo - @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." - -.PHONY: dummy -dummy: - $(SPHINXBUILD) -b dummy $(ALLSPHINXOPTS) $(BUILDDIR)/dummy - @echo - @echo "Build finished. Dummy builder generates no files." diff --git a/README.md b/README.md index 694eb33..eedb7bb 100644 --- a/README.md +++ b/README.md @@ -323,7 +323,7 @@ the graphical user interface. In your virtual environment type: - pip install sphinx + pip install sphinx myst-parser cd doc make html diff --git a/doc/Makefile b/doc/Makefile index d68947d..bc0d173 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -18,6 +18,6 @@ help: # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). %: Makefile @mkdir -p source/commandline - @ipet-parse --docmode | tee source/commandline/ipet-parse.rst - @ipet-parse --docmode | tee source/commandline/ipet-evaluate.rst + @ipet-parse --docmode > source/commandline/ipet-parse.rst + @ipet-parse --docmode > source/commandline/ipet-evaluate.rst @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/doc/source/_static/.gitignore b/doc/source/_static/.gitignore new file mode 100644 index 0000000..b4cbd57 --- /dev/null +++ b/doc/source/_static/.gitignore @@ -0,0 +1,3 @@ +*png +*css +*js diff --git a/doc/source/ipet.concepts.rst b/doc/source/ipet.concepts.rst index dacad0f..4207cef 100644 --- a/doc/source/ipet.concepts.rst +++ b/doc/source/ipet.concepts.rst @@ -1,54 +1,53 @@ -ipet\.concepts package -====================== +ipet.concepts package +===================== Submodules ---------- -ipet\.concepts\.Editable module -------------------------------- +ipet.concepts.Editable module +----------------------------- .. automodule:: ipet.concepts.Editable - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.concepts\.IPETMessageStream module ----------------------------------------- +ipet.concepts.IPETMessageStream module +-------------------------------------- .. automodule:: ipet.concepts.IPETMessageStream - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.concepts\.IPETNode module -------------------------------- +ipet.concepts.IPETNode module +----------------------------- .. automodule:: ipet.concepts.IPETNode - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.concepts\.Manager module ------------------------------- +ipet.concepts.Manager module +---------------------------- .. automodule:: ipet.concepts.Manager - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.concepts\.Observer module -------------------------------- +ipet.concepts.Observer module +----------------------------- .. automodule:: ipet.concepts.Observer - :members: - :undoc-members: - :show-inheritance: - + :members: + :undoc-members: + :show-inheritance: Module contents --------------- .. automodule:: ipet.concepts - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/ipet.evaluation.rst b/doc/source/ipet.evaluation.rst index 18e5d14..1cae999 100644 --- a/doc/source/ipet.evaluation.rst +++ b/doc/source/ipet.evaluation.rst @@ -1,38 +1,45 @@ -ipet\.evaluation package -======================== +ipet.evaluation package +======================= Submodules ---------- -ipet\.evaluation\.Aggregation module ------------------------------------- +ipet.evaluation.Aggregation module +---------------------------------- .. automodule:: ipet.evaluation.Aggregation - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.evaluation\.IPETEvalTable module --------------------------------------- +ipet.evaluation.IPETEvalTable module +------------------------------------ .. automodule:: ipet.evaluation.IPETEvalTable - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.evaluation\.IPETFilter module ------------------------------------ +ipet.evaluation.IPETFilter module +--------------------------------- .. automodule:: ipet.evaluation.IPETFilter - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: + +ipet.evaluation.TestSets module +------------------------------- +.. automodule:: ipet.evaluation.TestSets + :members: + :undoc-members: + :show-inheritance: Module contents --------------- .. automodule:: ipet.evaluation - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/ipet.misc.rst b/doc/source/ipet.misc.rst index f0a512f..7e5aa0b 100644 --- a/doc/source/ipet.misc.rst +++ b/doc/source/ipet.misc.rst @@ -1,46 +1,45 @@ -ipet\.misc package -================== +ipet.misc package +================= Submodules ---------- -ipet\.misc\.integrals module ----------------------------- +ipet.misc.integrals module +-------------------------- .. automodule:: ipet.misc.integrals - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.misc\.loader module -------------------------- +ipet.misc.loader module +----------------------- .. automodule:: ipet.misc.loader - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.misc\.misc module ------------------------ +ipet.misc.misc module +--------------------- .. automodule:: ipet.misc.misc - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.misc\.quick\_Pandas module --------------------------------- +ipet.misc.quick\_Pandas module +------------------------------ .. automodule:: ipet.misc.quick_Pandas - :members: - :undoc-members: - :show-inheritance: - + :members: + :undoc-members: + :show-inheritance: Module contents --------------- .. automodule:: ipet.misc - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/ipet.parsing.rst b/doc/source/ipet.parsing.rst index db5f8f0..c32fb06 100644 --- a/doc/source/ipet.parsing.rst +++ b/doc/source/ipet.parsing.rst @@ -1,110 +1,101 @@ -ipet\.parsing package -===================== +ipet.parsing package +==================== Submodules ---------- -ipet\.parsing\.ReaderManager module ------------------------------------ +ipet.parsing.ReaderManager module +--------------------------------- .. automodule:: ipet.parsing.ReaderManager - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.parsing\.Solver module ----------------------------- +ipet.parsing.Solver module +-------------------------- .. automodule:: ipet.parsing.Solver - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.parsing\.StatisticReader module -------------------------------------- +ipet.parsing.StatisticReader module +----------------------------------- .. automodule:: ipet.parsing.StatisticReader - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.parsing\.StatisticReader\_CustomHistoryReader module ----------------------------------------------------------- +ipet.parsing.StatisticReader\_CustomHistoryReader module +-------------------------------------------------------- .. automodule:: ipet.parsing.StatisticReader_CustomHistoryReader - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.parsing\.StatisticReader\_CustomReader module ---------------------------------------------------- +ipet.parsing.StatisticReader\_CustomReader module +------------------------------------------------- .. automodule:: ipet.parsing.StatisticReader_CustomReader - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.parsing\.StatisticReader\_DualBoundHistoryReader module -------------------------------------------------------------- +ipet.parsing.StatisticReader\_DualBoundHistoryReader module +----------------------------------------------------------- .. automodule:: ipet.parsing.StatisticReader_DualBoundHistoryReader - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.parsing\.StatisticReader\_GeneralInformationReader module ---------------------------------------------------------------- +ipet.parsing.StatisticReader\_GeneralInformationReader module +------------------------------------------------------------- .. automodule:: ipet.parsing.StatisticReader_GeneralInformationReader - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.parsing\.StatisticReader\_PluginStatisticsReader module +ipet.parsing.StatisticReader\_PrimalBoundHistoryReader module ------------------------------------------------------------- -.. automodule:: ipet.parsing.StatisticReader_PluginStatisticsReader - :members: - :undoc-members: - :show-inheritance: - -ipet\.parsing\.StatisticReader\_PrimalBoundHistoryReader module ---------------------------------------------------------------- - .. automodule:: ipet.parsing.StatisticReader_PrimalBoundHistoryReader - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.parsing\.StatisticReader\_SoluFileReader module ------------------------------------------------------ +ipet.parsing.StatisticReader\_TableReader module +------------------------------------------------ -.. automodule:: ipet.parsing.StatisticReader_SoluFileReader - :members: - :undoc-members: - :show-inheritance: +.. automodule:: ipet.parsing.StatisticReader_TableReader + :members: + :undoc-members: + :show-inheritance: -ipet\.parsing\.StatisticReader\_VariableReader module ------------------------------------------------------ +ipet.parsing.StatisticReader\_VariableReader module +--------------------------------------------------- .. automodule:: ipet.parsing.StatisticReader_VariableReader - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.parsing\.TraceFileReader module -------------------------------------- +ipet.parsing.TraceFileReader module +----------------------------------- .. automodule:: ipet.parsing.TraceFileReader - :members: - :undoc-members: - :show-inheritance: - + :members: + :undoc-members: + :show-inheritance: Module contents --------------- .. automodule:: ipet.parsing - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/ipet.rst b/doc/source/ipet.rst index ece4bdf..84604da 100644 --- a/doc/source/ipet.rst +++ b/doc/source/ipet.rst @@ -5,52 +5,59 @@ Subpackages ----------- .. toctree:: - - ipet.concepts - ipet.evaluation - ipet.misc - ipet.parsing + ipet.concepts + ipet.evaluation + ipet.misc + ipet.parsing + ipet.validation Submodules ---------- -ipet\.Experiment module ------------------------ +ipet.Experiment module +---------------------- .. automodule:: ipet.Experiment - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: + +ipet.IPETError module +--------------------- -ipet\.Key module ----------------- +.. automodule:: ipet.IPETError + :members: + :undoc-members: + :show-inheritance: + +ipet.Key module +--------------- .. automodule:: ipet.Key - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.TestRun module --------------------- +ipet.TestRun module +------------------- .. automodule:: ipet.TestRun - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: -ipet\.version module --------------------- +ipet.version module +------------------- .. automodule:: ipet.version - :members: - :undoc-members: - :show-inheritance: - + :members: + :undoc-members: + :show-inheritance: Module contents --------------- .. automodule:: ipet - :members: - :undoc-members: - :show-inheritance: + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/ipet.validation.rst b/doc/source/ipet.validation.rst new file mode 100644 index 0000000..622c0c2 --- /dev/null +++ b/doc/source/ipet.validation.rst @@ -0,0 +1,21 @@ +ipet.validation package +======================= + +Submodules +---------- + +ipet.validation.Validation module +--------------------------------- + +.. automodule:: ipet.validation.Validation + :members: + :undoc-members: + :show-inheritance: + +Module contents +--------------- + +.. automodule:: ipet.validation + :members: + :undoc-members: + :show-inheritance: diff --git a/ipet/evaluation/IPETEvalTable.py b/ipet/evaluation/IPETEvalTable.py index 5e8c773..35c75b0 100644 --- a/ipet/evaluation/IPETEvalTable.py +++ b/ipet/evaluation/IPETEvalTable.py @@ -896,7 +896,8 @@ def getIndex(self) -> list: def getDefaultgroup(self, data): """Return tuple representation of defaultgroup - Parameters: + Parameters + ---------- data data frame object with columns that match the specified column index """ @@ -1635,12 +1636,10 @@ def tryGenerateIndexAndDefaultgroup(self, data): ''' Generate a reasonable index and defaultgroup based on the given data - Take a look at the columns: Key.ProblemName, Key.Solver, Key.Settings, - Key.Version and Key.LogFileName. - Set indexsplit to 1 and choose the column with the most values as rowindex. - From the remaining columns choose as columnindex as one or two columns with - as little values as possible but at least two. - At last generate a defaultgroup based on the new index. + Take a look at the columns: Key.ProblemName, Key.Solver, Key.Settings, Key.Version and + Key.LogFileName. Set indexsplit to 1 and choose the column with the most values as rowindex. + From the remaining columns choose as columnindex as one or two columns with as little values + as possible but at least two. At last generate a defaultgroup based on the new index. Parameters ---------- diff --git a/ipet/evaluation/IPETFilter.py b/ipet/evaluation/IPETFilter.py index 8c4792a..af1b6b3 100644 --- a/ipet/evaluation/IPETFilter.py +++ b/ipet/evaluation/IPETFilter.py @@ -321,12 +321,10 @@ def applyListOperator(self, df, groupindex): In combination with the 'anytestrun' attribute, there are four possibilities in total: - | anytestrun | operator | result | - |------------|----------|--------| - | one |diff |True, if there are at least 2 different values in a group | - | all |diff |True, if all values are different in this group | - | one |equal |True, if at least one value occurs twice in a group | - | all |equal |True, if there is only a single value for this group | + - anytestrun=one, operator=diff yields True, if there are at least 2 different values in a group + - anytestrun=all, operator=diff yields True, if all values are different in this group + - anytestrun=one, operator=equal yields True, if at least one value occurs twice in a group + - anytestrun=all, operator=equal yields True, if there is only a single value for this group """ # @@ -413,9 +411,10 @@ def applyFilter(self, df, groupindex = None): (only needed for list operators 'equal' and 'diff') - Returns - ------- - booleanseries : + Returns + ------- + fcol : DataFrame + filtered data frame object """ if self.operator in self.listoperators: filtercol = self.applyListOperator(df, groupindex) From 80d6598888999501e68df744a964905afec730d2 Mon Sep 17 00:00:00 2001 From: Franziska Schloesser Date: Fri, 17 Nov 2023 00:09:31 +0100 Subject: [PATCH 7/7] Address comment in pull request #98 --- ipet/TestRun.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/ipet/TestRun.py b/ipet/TestRun.py index 6c1f2c2..0937f7a 100644 --- a/ipet/TestRun.py +++ b/ipet/TestRun.py @@ -383,8 +383,6 @@ def emptyCurrentProblemData(self): def printToConsole(self, formatstr = "{idx}: {d}", all_rows = False): """ Print data to console """ - if (all_rows): - pd.set_option('display.max_rows', None) for idx, d in self.data.iterrows(): print(formatstr.format(d = d, idx = idx))