Restore DL Workbench State¶
DL Workbench enables performing multiple experiments to analyze performance and accuracy data. To always have access to your data in the DL Workbench, use additional parameters when you run the DL Workbench that enable DL Workbench state preservation.
Note
It is highly recommended to enable DL Workbench state preservation.
Why you need to preserve DL Workbench state:
Your data might be lost due to accidental removal of a container or other infrastructural failures.
You want to share your experimental data and DL Workbench artifacts with your team.
You want to transfer DL Workbench data to another machine and continue your experiments there.
You work with the DL Workbench of some version and want to update to a higher version, for example, from 2020.4 to 2021.1.
Ignore state preservation if:
You do not plan to share data.
You do not plan to update the DL Workbench in the future.
You just want to get acquainted with the DL Workbench and understand its key offerings.
Even if you do not enable state preservation, your data is secured as long as there is a container on your machine. When you stop a container, you still have access to your data when you resume the container as described in the Pause and Resume Docker Container section of Work with Docker Container. However, if you remove a container that you ran without enabling state preservation, all your data is lost with that removed container.
To restore the DL Workbench data:
Follow instructions for you operating system to enable state preservation:
When you remove a container, all data is present in the mounted host folder. To continue working with the data in a new DL Workbench container, start the DL Workbench with the mounted folder or volume using
--assets-directory
or--volume
.
Preserve DL Workbench State on Linux and macOS¶
To enable DL Workbench state preservation, mount a host directory to a Docker container. The example below shows how to mount a local folder while running a Docker container on Linux* with a CPU enabled as a profiling target and in detached mode. To learn how to run the application on different targets, operating system, or in a different mode, see Advanced Configurations page.
To run DL Workbench with Python Starter on your OS, use the first command from installation form :
python3 -m pip install -U openvino-workbench
In the directory with the
openvino-workbench
script, create the/home/workbench/.workbench
folder with read, write, and execute permissions:mkdir -m 777 /home/workbench/.workbench
Run the command below:
openvino-workbench --image openvino/workbench:2022.1 --assets-directory ~/.workbench
All your data is placed in the mounted directory once you mount it and run the DL Workbench:
|-- ~/.workbench
|-- token.txt
|-- datasets/
|-- models/
|-- postgresql_data_directory/
|-- tutorials/
Preserve DL Workbench State on Windows¶
Due to problems of mounting a local folder to a Docker container on Windows, the best way to preserve the state on Windows is to use Docker volumes :
Get a Docker image as described in the Install DL Workbench section of Install DL Workbench.
Create a Docker volume:
docker volume create workbench_volume
Start the DL Workbench with the mounted volume:
docker run -p 127.0.0.1:5665:5665 ` --name workbench ` --volume workbench_volume:/home/workbench/.workbench ` -d openvino/workbench:latest
All your data is placed in the mounted volume once you mount it and run the DL Workbench:
|-- token.txt
|-- datasets/
|-- models/
|-- postgresql_data_directory/
Troubleshooting¶
When importing assets, DL Workbench validates their consistency. If any assets have different checksum to what the DL Workbench stores, these artifacts are considered as threatening security of the DL Workbench. Remove these assets and try to run the DL Workbench again.
DL Workbench fails to start if the provided assets cannot be imported due to aforementioned versioning policy. In that case, create new assets directory and mount it instead of the existing one.