From fbe1d963f5fde876f80be584cf037aa8521b98fa Mon Sep 17 00:00:00 2001 From: Elazar Gershuni Date: Sun, 4 Aug 2024 19:04:32 +0300 Subject: [PATCH] fix accidental rename --- checkpoint/persist.py | 2 +- scripts/vm.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/checkpoint/persist.py b/checkpoint/persist.py index f6cd306..102d875 100644 --- a/checkpoint/persist.py +++ b/checkpoint/persist.py @@ -114,7 +114,7 @@ def commit(self, *args) -> None: pathlib.Path(temp_filename).rename(self.filename) with open(self.tsv_filename, "a") as f: - size = pickle.results((self.i, args, self.iterator)).__sizeof__() + size = pickle.dumps((self.i, args, self.iterator)).__sizeof__() self.printing_index += 1 print( self.printing_index, diff --git a/scripts/vm.sh b/scripts/vm.sh index 1a9bed4..bb9cecd 100755 --- a/scripts/vm.sh +++ b/scripts/vm.sh @@ -9,7 +9,10 @@ if [ -z "$EXPERIMENT" ]; then echo "Usage: $0 [QMP_PORT] [TCP_PORT] [STEP]" exit 1 fi + +mkdir -f results mkdir -f results/${EXPERIMENT} +chmod -R a+w results STEP=${2:-1} QMP_PORT=${3:-4444} @@ -91,6 +94,7 @@ write_files: runcmd: - sudo chown -R ubuntu:ubuntu ${GUEST_HOME} - [su, ubuntu, -c, "cp -r /mnt/${EXPERIMENT_TAG}/* ${GUEST_HOME}/"] + - [su, ubuntu, -c, "ln -s /mnt/results ./results"] - [su, ubuntu, -c, "python3 -m venv ${GUEST_HOME}/.venv"] - [su, ubuntu, -c, "${VENV_BIN}/pip install -r /mnt/${CHECKPOINT_LIB}/requirements.txt"] - [su, ubuntu, -c, "${VENV_BIN}/pip install -r ${GUEST_HOME}/${EXPERIMENT}/requirements.txt"]