Skip to content

Commit

Permalink
Add upgrade instructions.
Browse files Browse the repository at this point in the history
  • Loading branch information
jendrikseipp committed Oct 21, 2023
1 parent 62ffd04 commit 6098eb3
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
31 changes: 31 additions & 0 deletions docs/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,37 @@ documentation <lab.parser.html>`_ for how to amend your parsers and then run the
./my-exp.py parse


.. _portparsers:

How do I port my parsers to version 8.x?
----------------------------------------

Since version 8.0, Lab has a dedicated "parse" experiment step. First of all,
what are the benefits of this?

* No need to write parsers in separate files.
* Log output from solvers and parsers remains separate.
* No need for ``exp.add_parse_again_step()``. Parsing and re-parsing is now
exactly the same.
* Parsers are checked for syntax errors before the experiment is run.
* Parsing runs much faster (for an experiment with 3 algorithms and 5 parsers
the parsing time went down from 51 minutes to 5 minutes, both measured on
cold file system caches).
* As before, you can let the Slurm environment do the parsing for you and get
notified when the report is finished: ``./myexp.py build start parse fetch
report``

To adapt your parsers to this new API, you need to make the following changes:

* Your parser module (e.g., "custom_parser.py") does not have to be executable
anymore, but it must be importable and expose a :class:`Parser
<lab.parser.Parser>` instance. Then, instead of
``exp.add_parser("custom_parser.py")`` use ``from custom_parser import
MyParser`` and ``exp.add_parser(MyParser())``.
* Remove ``exp.add_parse_again_step()`` and insert ``exp.add_step("parse",
exp.parse)`` after ``exp.add_step("start", exp.start_runs)``.


How can I compute a new attribute from multiple runs?
-----------------------------------------------------

Expand Down
12 changes: 12 additions & 0 deletions docs/news.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
Changelog
=========

v8.0 (2023-10-21)
-----------------

Lab
^^^
* Make parsing a separate experiment step, see :ref:`FAQs <portparsers>` for motivation and upgrade instructions (Jendrik Seipp).

Downward Lab
^^^^^^^^^^^^
* None.


v7.5 (2023-10-21)
-----------------

Expand Down

0 comments on commit 6098eb3

Please sign in to comment.