Skip to content
Snippets Groups Projects
Commit 53b89cd6 authored by Flavio TARSETTI's avatar Flavio TARSETTI
Browse files

Merge branch 'docedit' into 'master'

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

See merge request !11
parents 6a28eda6 d8ac2605
No related branches found
No related tags found
1 merge request!11added note about the hashing system of database block and the fact that root…
Pipeline #
...@@ -223,10 +223,14 @@ The Cache System ...@@ -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: 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 * 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 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 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 * 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: :: 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 ...@@ -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: :: 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: :: And uncomment line 53: ::
#print(nump) #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: :: 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 ...@@ -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: :: 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: :: Recomment line 53 and uncomment line 54: ::
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment