Files
ml-sdk/use_case_examples/time_notebook_execution.sh
zeekay bde2e2531b Initial commit: Lux FHE ML SDK
Machine Learning with FHE - fork of Zama Concrete-ML
- Built-in FHE-friendly ML models
- scikit-learn compatible API
- PyTorch model conversion
- Quantization-aware training
2025-12-27 21:08:09 -08:00

26 lines
488 B
Bash
Executable File

#!/bin/bash
print_time_execution() {
printf " - Notebook %s executed in %02dh:%02dm:%02ds\n" "$1" $(($2/3600)) $(($2%3600/60)) $(($2%60))
}
START=$(date +%s)
set +e
jupyter nbconvert --to notebook --inplace --execute "$1" 1>&2
result=$?
set -e
END=$(date +%s)
TIME_EXEC=$((END-START))
# Check the result of nbconvert execution
if [ $result -ne 0 ]; then
echo "Error: nbconvert failed with status $result"
exit $result
else
print_time_execution "$1" ${TIME_EXEC}
fi