vissutagunawan commited on
Commit
bbca133
·
verified ·
1 Parent(s): 8987533

claim1_native: UTF-8 locale + skip torchinfo summary

Browse files
Files changed (1) hide show
  1. sweep.sh +6 -0
sweep.sh CHANGED
@@ -4,6 +4,7 @@
4
  set -e
5
  export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
6
  export PYTHONUTF8=1 PYTHONIOENCODING=utf-8 # conda image has POSIX locale
 
7
  export HF_HUB_DISABLE_PROGRESS_BARS=1 # tqdm block chars crash charmap
8
  echo "=== install env ==="
9
  pip install -q "the_well[benchmark]==1.2.0" hydra-core timm einops h5py plotly torchinfo omegaconf imageio 2>&1 | tail -3 || \
@@ -78,6 +79,11 @@ if os.path.exists(dst): shutil.rmtree(dst)
78
  shutil.copytree(src, dst)
79
  print('configs ->', dst, '| config.yaml exists:', os.path.exists(os.path.join(dst, 'config.yaml')))
80
  PY
 
 
 
 
 
81
  echo "=== run authors' validation ==="
82
  python -m walrus.train \
83
  --config-dir=/tmp/cfg --config-name=extended_config \
 
4
  set -e
5
  export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
6
  export PYTHONUTF8=1 PYTHONIOENCODING=utf-8 # conda image has POSIX locale
7
+ export LANG=C.UTF-8 LC_ALL=C.UTF-8 # UTF-8 locale so getpreferredencoding()!=charmap (torchinfo box chars / config dump)
8
  export HF_HUB_DISABLE_PROGRESS_BARS=1 # tqdm block chars crash charmap
9
  echo "=== install env ==="
10
  pip install -q "the_well[benchmark]==1.2.0" hydra-core timm einops h5py plotly torchinfo omegaconf imageio 2>&1 | tail -3 || \
 
79
  shutil.copytree(src, dst)
80
  print('configs ->', dst, '| config.yaml exists:', os.path.exists(os.path.join(dst, 'config.yaml')))
81
  PY
82
+ # Skip the torchinfo model summary (1.3B params, depth=5 -> very slow + Unicode
83
+ # box chars); it's a diagnostic printout only, no effect on validation.
84
+ WPKG=$(python -c "import walrus,os;print(os.path.dirname(walrus.__file__))")
85
+ sed -i 's/^\( *\)summary(model, depth=5)/\1pass # summary skipped (verbose+unicode)/' "$WPKG/train.py"
86
+ grep -n "summary skipped\|summary(model" "$WPKG/train.py" || true
87
  echo "=== run authors' validation ==="
88
  python -m walrus.train \
89
  --config-dir=/tmp/cfg --config-name=extended_config \