From 08a2b3baa4e364e67cef9d573c4cb56f87f188aa Mon Sep 17 00:00:00 2001 From: Ben Chen <6263622+ben-c-2013@users.noreply.github.com> Date: Thu, 26 Mar 2026 16:06:10 +0100 Subject: [PATCH 1/2] Edited Runnable.load() and added an option to load a .obj using a specified path. --- src/abel/classes/runnable.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/abel/classes/runnable.py b/src/abel/classes/runnable.py index c82497e4..fa0e554b 100644 --- a/src/abel/classes/runnable.py +++ b/src/abel/classes/runnable.py @@ -154,9 +154,11 @@ def save(self): pickle.dump(self, savefile) # load object from file - def load(self, shot=None): + def load(self, shot=None, obj_path=None): import dill as pickle - with open(self.object_path(shot), 'rb') as loadfile: + if obj_path is None: + obj_path = self.object_path(shot) + with open(obj_path, 'rb') as loadfile: try: obj = pickle.load(loadfile) return obj From cdd9b97b883adad7c1328d7ef6f5f6a738478aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carl=20A=2E=20Lindstr=C3=B8m?= Date: Tue, 20 Oct 2026 14:27:03 +0200 Subject: [PATCH 2/2] Changed the Runnable load function self argument optional --- src/abel/classes/runnable.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/abel/classes/runnable.py b/src/abel/classes/runnable.py index fa0e554b..e3477b58 100644 --- a/src/abel/classes/runnable.py +++ b/src/abel/classes/runnable.py @@ -154,7 +154,7 @@ def save(self): pickle.dump(self, savefile) # load object from file - def load(self, shot=None, obj_path=None): + def load(self=None, shot=None, obj_path=None): import dill as pickle if obj_path is None: obj_path = self.object_path(shot)