mirror of
https://github.com/marvinscham/masterthesis-playground.git
synced 2025-12-06 18:20:53 +01:00
Add training results, update meta files
This commit is contained in:
@@ -1,25 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Find all staged .ipynb files
|
||||
NOTEBOOKS=$(git diff --cached --name-only --diff-filter=ACM | grep '\.ipynb$' || true)
|
||||
|
||||
if [ -z "$NOTEBOOKS" ]; then
|
||||
echo "No Jupyter notebooks staged. Skipping Jupytext conversion."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "Converting staged Jupyter notebooks to .py (percent format)..."
|
||||
|
||||
# Loop through each notebook and convert
|
||||
for nb in $NOTEBOOKS; do
|
||||
if [ -f "$nb" ]; then
|
||||
echo " - Converting $nb"
|
||||
jupytext --to py:percent "$nb"
|
||||
pyfile="${nb%.ipynb}.py"
|
||||
# Stage the generated .py file
|
||||
git add "$pyfile"
|
||||
fi
|
||||
done
|
||||
./convert_jupytext.sh py
|
||||
|
||||
echo "✅ Jupytext conversion complete."
|
||||
|
||||
Reference in New Issue
Block a user