diff options
| -rw-r--r-- | rpc/listener.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/rpc/listener.py b/rpc/listener.py index 87eea37..81ad794 100644 --- a/rpc/listener.py +++ b/rpc/listener.py @@ -9,6 +9,10 @@ def list_checkpoints(payload): print("> list checkpoints") return sorted([f.split('/')[3] for f in glob.glob(os.path.join('./checkpoints/', payload, '/*/latest_net_G.pth'))]) +def list_all_checkpoints(payload): + print("> list all checkpoints") + return sorted(glob.glob(os.path.join('./checkpoints/*/*_net_G.pth'))) + def list_epochs(path): print("> list epochs for {}".format(path)) if not os.path.exists(os.path.join('./checkpoints/', path)): @@ -61,6 +65,8 @@ class Listener(): if cmd == 'list_checkpoints': return list_checkpoints(payload) + if cmd == 'list_all_checkpoints': + return list_all_checkpoints(payload) if cmd == 'list_epochs': return list_epochs(payload) if cmd == 'list_sequences': |
