From 935b881ccb0255ef46ddc7ab55fc9ef5d66fbba4 Mon Sep 17 00:00:00 2001 From: khaoula boutiche Date: Thu, 22 Feb 2024 16:35:43 +0100 Subject: [PATCH] Update common_deploy and the main README.md file, and rename Colab notebook. Signed-off-by: khaoula boutiche --- README.md | 28 ++++++------------- common/common_deploy.py | 4 +-- ...ab.ipynb => stm32ai_model_zoo_colab.ipynb} | 0 3 files changed, 11 insertions(+), 21 deletions(-) rename tutorials/notebooks/{STM32AI_Model_Zoo_Colab.ipynb => stm32ai_model_zoo_colab.ipynb} (100%) diff --git a/README.md b/README.md index c004f6e0..9872b627 100644 --- a/README.md +++ b/README.md @@ -155,22 +155,12 @@ on [How to install STM32 model zoo](https://wiki.st.com/stm32mcu/index.php?title In [tutorials/notebooks](tutorials/notebooks/README.md) you will find a jupyter notebook that can be easily deployed on Colab to exercise STM32 model zoo training scripts. -## Notes - -In this project, we are using **TensorFLow version 2.8.3** following unresolved issues with newest versions of -TensorFlow, see [more](https://github.com/tensorflow/tensorflow/issues/56242). - -**Warnings** : - -* In this project we are using the `mlflow` library to log the results of different runs. Depending on which version of - Windows OS are you using or where you place the project the output log files might have a very long path which might - result in an error at the time of logging the results. As by default, Windows uses a path length limitation (MAX_PATH) - of 256 characters: Naming Files, Paths, and Namespaces. To avoid this potential error, create (or edit) a variable - named `LongPathsEnabled` in **Registry Editor** - under `Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\` and assign it a value of `1`. This - will change the maximum length allowed for the file length on Windows machines and will avoid any errors resulting due - to this. For more details have a look at - this [link](https://knowledge.autodesk.com/support/autocad/learn-explore/caas/sfdcarticles/sfdcarticles/The-Windows-10-default-path-length-limitation-MAX-PATH-is-256-characters.html) - . -* If there are some white spaces in the paths (for Python, STM32CubeIDE, or, STM32Cube.AI local installation) this can - result in errors. So avoid having paths with white spaces in them. + +> [!IMPORTANT] +> In this project, we are using **TensorFLow version 2.8.3** following unresolved issues with newest versions of TensorFlow, see [more](https://github.com/tensorflow/tensorflow/issues/56242). + +>[!CAUTION] +> If there are some white spaces in the paths (for Python, STM32CubeIDE, or, STM32Cube.AI local installation) this can result in errors. So avoid having paths with white spaces in them. + +>[!TIP] +> In this project we are using the `mlflow` library to log the results of different runs. Depending on which version of Windows OS are you using or where you place the project the output log files might have a very long path which might result in an error at the time of logging the results. As by default, Windows uses a path length limitation (MAX_PATH) of 256 characters: Naming Files, Paths, and Namespaces. To avoid this potential error, create (or edit) a variable named `LongPathsEnabled` in **Registry Editor** under **Computer/HKEY_LOCAL_MACHINE/SYSTEM/CurrentControlSet/Control/FileSystem/** and assign it a value of `1`. This will change the maximum length allowed for the file length on Windows machines and will avoid any errors resulting due to this. For more details have a look at this [link](https://knowledge.autodesk.com/support/autocad/learn-explore/caas/sfdcarticles/sfdcarticles/The-Windows-10-default-path-length-limitation-MAX-PATH-is-256-characters.html). diff --git a/common/common_deploy.py b/common/common_deploy.py index 529bed9e..b2c0d9e8 100644 --- a/common/common_deploy.py +++ b/common/common_deploy.py @@ -279,8 +279,8 @@ def stmaic_local_call(session): # Get footprints of the given model results = cloud_analyze(ai=ai, model_path=model_path, optimization=optimization, get_model_name_output=get_model_name_output) - needed_ram = round(int(results["ram_size"]) / 1024, 2) - needed_rom = round(int(results["rom_size"]) / 1024, 2) + needed_ram = int(results["ram_size"]) + needed_rom = int(results["rom_size"]) with open(os.path.join(board.config.memory_pool_path), 'r') as f: memory_pool = json.load(f) diff --git a/tutorials/notebooks/STM32AI_Model_Zoo_Colab.ipynb b/tutorials/notebooks/stm32ai_model_zoo_colab.ipynb similarity index 100% rename from tutorials/notebooks/STM32AI_Model_Zoo_Colab.ipynb rename to tutorials/notebooks/stm32ai_model_zoo_colab.ipynb