Commit d8ac2605 authored by Zohreh MOSTAANI's avatar Zohreh MOSTAANI

added note about the hashing system of database block and the fact that root...

added note about the hashing system of database block and the fact that root folder is not a part of it plus minor modifications
parent 6a28eda6
Pipeline #22772 passed with stages
in 41 minutes and 16 seconds
......@@ -223,10 +223,14 @@ The Cache System
There is a subfolder in your prefix called ``cache``. This folder holds all the caches for every step of every experiment you have ran - every block, once executed, saves its results in a cache entry. The cache entry for a block is saved in a path made from hashing the metadata & code from that block and every block before it. This means the following:
* You may re-run an experiment and immediately get its results, since all of the experiment's steps are found in the cache
* Changing a block in an experiment (whether its a source code file or metadata) will re-run that step and every step that depends on it
* Changing a database means that all experiments ran using that database cannot use any of their caches
* Changing an analyzer of an experiment means that only the last step will have to be re-ran
* You may re-run an experiment and immediately get its results, since all of the experiment's steps are found in the cache.
* Changing a block in an experiment (whether its a source code file or metadata) will re-run that step and every step that depends on it.
* Changing a database means that all experiments ran using that database cannot use any of their caches.
* Changing an analyzer of an experiment means that only the last step will have to be re-ran.
.. note:: Please note that the root folder of the database is not a part of information used for producing the hash of the database block. Therefore if the only modification in a database block is changing its root folder, beat will use the previous cach data available. You need to clear the cache manually to make sure that the new root folder is accessable by beat. for more information about the data used for making the hashes of each block please refer to the `hash.py <https://gitlab.idiap.ch/beat/beat.core/blob/master/beat/core/hash.py>`_ from beat.core.
To look at an experiment's caches, use the ``beat exp caches <exp name>`` command. To see our experiment's caches: ::
......@@ -259,13 +263,13 @@ Let's run a different experiment for this: ``test/test/iris/1/error``. This expe
Let's edit that Python file: ::
$ beat algo edit test/iris_analyzer_error/1
$ beat alg edit test/iris_analyzer_error/1
And uncomment line 53: ::
#print(nump)
.. note:: If you don't want to edit using the ``beat algo edit`` command (e.g., an external editor), you can find the path of the file to edit by using ``beat algo path`` instead of ``beat algo edit`` and copying the file path.
.. note:: If you don't want to edit using the ``beat alg edit`` command (e.g., an external editor), you can find the path of the file to edit by using ``beat alg path`` instead of ``beat alg edit`` and copying the file path.
Save the file, exit the editor, and re-run the experiment again, to get the following message: ::
......@@ -278,7 +282,7 @@ Save the file, exit the editor, and re-run the experiment again, to get the foll
Now we know for sure that "nump" isn't defined. To make very sure, let's inspect it with ``ipdb``. Edit the file again with: ::
$ beat algo edit test/iris_analyzer_error/1
$ beat alg edit test/iris_analyzer_error/1
Recomment line 53 and uncomment line 54: ::
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment