machineconfig 1.94__py3-none-any.whl → 1.96__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of machineconfig might be problematic. Click here for more details.
- machineconfig/cluster/cloud_manager.py +445 -343
- machineconfig/cluster/data_transfer.py +63 -56
- machineconfig/cluster/distribute.py +284 -280
- machineconfig/cluster/file_manager.py +234 -237
- machineconfig/cluster/job_params.py +133 -133
- machineconfig/cluster/loader_runner.py +183 -149
- machineconfig/cluster/remote_machine.py +269 -252
- machineconfig/cluster/script_execution.py +215 -209
- machineconfig/cluster/script_notify_upon_completion.py +50 -43
- machineconfig/cluster/self_ssh.py +52 -54
- machineconfig/cluster/sessions_managers/__init__.py +0 -0
- machineconfig/cluster/sessions_managers/archive/__init__.py +0 -0
- machineconfig/{jobs/python → cluster/sessions_managers/archive}/create_zellij_template.py +5 -3
- machineconfig/cluster/sessions_managers/archive/session_managers.py +184 -0
- machineconfig/cluster/sessions_managers/demo_rich_zellij.py +0 -0
- machineconfig/cluster/sessions_managers/enhanced_command_runner.py +160 -0
- machineconfig/cluster/sessions_managers/wt_local.py +494 -0
- machineconfig/cluster/sessions_managers/wt_local_manager.py +577 -0
- machineconfig/cluster/sessions_managers/wt_remote.py +288 -0
- machineconfig/cluster/sessions_managers/wt_remote_manager.py +483 -0
- machineconfig/cluster/sessions_managers/wt_utils/layout_generator.py +196 -0
- machineconfig/cluster/sessions_managers/wt_utils/process_monitor.py +418 -0
- machineconfig/cluster/sessions_managers/wt_utils/remote_executor.py +175 -0
- machineconfig/cluster/sessions_managers/wt_utils/session_manager.py +300 -0
- machineconfig/cluster/sessions_managers/wt_utils/status_reporter.py +228 -0
- machineconfig/cluster/sessions_managers/zellij_local.py +418 -0
- machineconfig/cluster/sessions_managers/zellij_local_manager.py +533 -0
- machineconfig/cluster/sessions_managers/zellij_remote.py +229 -0
- machineconfig/cluster/sessions_managers/zellij_remote_manager.py +188 -0
- machineconfig/cluster/sessions_managers/zellij_utils/example_usage.py +64 -0
- machineconfig/cluster/sessions_managers/zellij_utils/layout_generator.py +126 -0
- machineconfig/cluster/sessions_managers/zellij_utils/process_monitor.py +334 -0
- machineconfig/cluster/sessions_managers/zellij_utils/remote_executor.py +68 -0
- machineconfig/cluster/sessions_managers/zellij_utils/session_manager.py +119 -0
- machineconfig/cluster/sessions_managers/zellij_utils/status_reporter.py +85 -0
- machineconfig/cluster/templates/cli_click.py +0 -1
- machineconfig/cluster/templates/cli_gooey.py +102 -104
- machineconfig/cluster/templates/run_cloud.py +51 -51
- machineconfig/cluster/templates/run_cluster.py +103 -59
- machineconfig/cluster/templates/run_remote.py +57 -58
- machineconfig/cluster/templates/utils.py +69 -36
- machineconfig/jobs/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/linux/msc/lid.sh +2 -4
- machineconfig/jobs/linux/msc/network.sh +3 -6
- machineconfig/jobs/python/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python/check_installations.py +258 -190
- machineconfig/jobs/python/create_bootable_media.py +7 -3
- machineconfig/jobs/python/python_cargo_build_share.py +50 -50
- machineconfig/jobs/python/python_ve_symlink.py +10 -10
- machineconfig/jobs/python/vscode/__pycache__/select_interpreter.cpython-311.pyc +0 -0
- machineconfig/jobs/python/vscode/api.py +3 -3
- machineconfig/jobs/python/vscode/link_ve.py +6 -6
- machineconfig/jobs/python/vscode/select_interpreter.py +13 -9
- machineconfig/jobs/python/vscode/sync_code.py +14 -11
- machineconfig/jobs/python_custom_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python_custom_installers/archive/ngrok.py +5 -5
- machineconfig/jobs/python_custom_installers/dev/aider.py +4 -4
- machineconfig/jobs/python_custom_installers/dev/alacritty.py +7 -6
- machineconfig/jobs/python_custom_installers/dev/brave.py +11 -7
- machineconfig/jobs/python_custom_installers/dev/bypass_paywall.py +7 -8
- machineconfig/jobs/python_custom_installers/dev/code.py +7 -5
- machineconfig/jobs/python_custom_installers/dev/cursor.py +66 -5
- machineconfig/jobs/python_custom_installers/dev/docker_desktop.py +4 -5
- machineconfig/jobs/python_custom_installers/dev/espanso.py +21 -17
- machineconfig/jobs/python_custom_installers/dev/goes.py +6 -12
- machineconfig/jobs/python_custom_installers/dev/lvim.py +7 -6
- machineconfig/jobs/python_custom_installers/dev/nerdfont.py +5 -5
- machineconfig/jobs/python_custom_installers/dev/redis.py +11 -7
- machineconfig/jobs/python_custom_installers/dev/wezterm.py +12 -8
- machineconfig/jobs/python_custom_installers/dev/winget.py +194 -0
- machineconfig/jobs/python_custom_installers/{dev/docker.py → docker.py} +12 -7
- machineconfig/jobs/python_custom_installers/gh.py +10 -9
- machineconfig/jobs/python_custom_installers/hx.py +36 -65
- machineconfig/jobs/python_custom_installers/scripts/linux/brave.sh +4 -8
- machineconfig/jobs/python_custom_installers/scripts/linux/docker.sh +5 -10
- machineconfig/jobs/python_custom_installers/scripts/linux/docker_start.sh +3 -6
- machineconfig/jobs/python_custom_installers/scripts/linux/edge.sh +3 -6
- machineconfig/jobs/python_custom_installers/scripts/linux/nerdfont.sh +5 -10
- machineconfig/jobs/python_custom_installers/scripts/linux/pgsql.sh +4 -8
- machineconfig/jobs/python_custom_installers/scripts/linux/redis.sh +5 -10
- machineconfig/jobs/python_custom_installers/scripts/linux/timescaledb.sh +6 -12
- machineconfig/jobs/python_custom_installers/scripts/linux/vscode.sh +101 -33
- machineconfig/jobs/python_custom_installers/scripts/linux/warp-cli.sh +5 -10
- machineconfig/jobs/python_custom_installers/scripts/linux/wezterm.sh +3 -6
- machineconfig/jobs/python_custom_installers/{dev/warp-cli.py → warp-cli.py} +5 -5
- machineconfig/jobs/python_generic_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python_generic_installers/config.json +133 -9
- machineconfig/jobs/python_generic_installers/dev/config.json +208 -37
- machineconfig/jobs/python_generic_installers/update.py +3 -0
- machineconfig/jobs/python_linux_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/jobs/python_linux_installers/config.json +42 -6
- machineconfig/jobs/python_linux_installers/dev/config.json +79 -11
- machineconfig/jobs/python_windows_installers/config.json +6 -0
- machineconfig/profile/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/profile/__pycache__/create.cpython-311.pyc +0 -0
- machineconfig/profile/__pycache__/shell.cpython-311.pyc +0 -0
- machineconfig/profile/create.py +5 -5
- machineconfig/profile/create_hardlinks.py +5 -5
- machineconfig/profile/shell.py +69 -63
- machineconfig/scripts/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/cloud/init.sh +9 -18
- machineconfig/scripts/linux/fire +5 -24
- machineconfig/scripts/linux/fire_agents +27 -0
- machineconfig/scripts/linux/share_cloud.sh +6 -12
- machineconfig/scripts/linux/wifi_conn +24 -0
- machineconfig/scripts/python/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/cloud_copy.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/cloud_mount.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/cloud_sync.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/croshell.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_backup_retrieve.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_devapps_install.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/devops_update_repos.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/fire_agents.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/fire_jobs.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/fire_jobs.cpython-313.pyc +0 -0
- machineconfig/scripts/python/__pycache__/get_zellij_cmd.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/repos.cpython-311.pyc +0 -0
- machineconfig/scripts/python/archive/im2text.py +28 -30
- machineconfig/scripts/python/archive/tmate_conn.py +10 -13
- machineconfig/scripts/python/archive/tmate_start.py +12 -16
- machineconfig/scripts/python/choose_wezterm_theme.py +12 -21
- machineconfig/scripts/python/cloud_copy.py +49 -104
- machineconfig/scripts/python/cloud_manager.py +77 -91
- machineconfig/scripts/python/cloud_mount.py +36 -46
- machineconfig/scripts/python/cloud_repo_sync.py +33 -79
- machineconfig/scripts/python/cloud_sync.py +35 -45
- machineconfig/scripts/python/croshell.py +70 -92
- machineconfig/scripts/python/devops.py +54 -113
- machineconfig/scripts/python/devops_add_identity.py +71 -109
- machineconfig/scripts/python/devops_add_ssh_key.py +42 -149
- machineconfig/scripts/python/devops_backup_retrieve.py +31 -119
- machineconfig/scripts/python/devops_devapps_install.py +6 -10
- machineconfig/scripts/python/devops_update_repos.py +5 -4
- machineconfig/scripts/python/dotfile.py +10 -7
- machineconfig/scripts/python/fire_agents.py +69 -0
- machineconfig/scripts/python/fire_jobs.py +117 -78
- machineconfig/scripts/python/ftpx.py +8 -8
- machineconfig/scripts/python/get_zellij_cmd.py +3 -3
- machineconfig/scripts/python/gh_models.py +6 -4
- machineconfig/scripts/python/helpers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/__init__.cpython-313.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/cloud_helpers.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/helpers2.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/helpers4.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/helpers4.cpython-313.pyc +0 -0
- machineconfig/scripts/python/helpers/__pycache__/repo_sync_helpers.cpython-311.pyc +0 -0
- machineconfig/scripts/python/helpers/cloud_helpers.py +49 -46
- machineconfig/scripts/python/helpers/helpers2.py +26 -39
- machineconfig/scripts/python/helpers/helpers4.py +23 -35
- machineconfig/scripts/python/helpers/repo_sync_helpers.py +33 -67
- machineconfig/scripts/python/mount_nfs.py +8 -11
- machineconfig/scripts/python/mount_nw_drive.py +4 -4
- machineconfig/scripts/python/mount_ssh.py +2 -2
- machineconfig/scripts/python/onetimeshare.py +56 -57
- machineconfig/scripts/python/pomodoro.py +55 -55
- machineconfig/scripts/python/repos.py +72 -49
- machineconfig/scripts/python/scheduler.py +70 -53
- machineconfig/scripts/python/snapshot.py +21 -24
- machineconfig/scripts/python/start_slidev.py +6 -5
- machineconfig/scripts/python/start_terminals.py +3 -1
- machineconfig/scripts/python/viewer.py +5 -4
- machineconfig/scripts/python/viewer_template.py +138 -140
- machineconfig/scripts/python/wifi_conn.py +416 -62
- machineconfig/scripts/python/wsl_windows_transfer.py +18 -3
- machineconfig/scripts/windows/fire.ps1 +27 -15
- machineconfig/settings/linters/.pylintrc +6 -7
- machineconfig/settings/lvim/windows/config.lua +0 -0
- machineconfig/settings/shells/bash/init.sh +6 -0
- machineconfig/settings/shells/ipy/profiles/default/startup/playext.py +7 -6
- machineconfig/settings/shells/pwsh/init.ps1 +6 -6
- machineconfig/settings/shells/wt/settings.json +51 -266
- machineconfig/setup_linux/nix/cli_installation.sh +9 -18
- machineconfig/setup_linux/others/openssh-server_add_pub_key.sh +3 -6
- machineconfig/setup_linux/web_shortcuts/all.sh +5 -10
- machineconfig/setup_linux/web_shortcuts/ascii_art.sh +7 -14
- machineconfig/setup_linux/web_shortcuts/croshell.sh +6 -12
- machineconfig/setup_linux/web_shortcuts/interactive.sh +39 -70
- machineconfig/setup_linux/web_shortcuts/ssh.sh +8 -16
- machineconfig/setup_linux/web_shortcuts/update_system.sh +7 -14
- machineconfig/setup_windows/wt_and_pwsh/set_pwsh_theme.py +3 -6
- machineconfig/setup_windows/wt_and_pwsh/set_wt_settings.py +27 -21
- machineconfig/utils/ai/browser_user_wrapper.py +60 -45
- machineconfig/utils/ai/generate_file_checklist.py +4 -7
- machineconfig/utils/ai/url2md.py +15 -7
- machineconfig/utils/cloud/onedrive/setup_oauth.py +59 -0
- machineconfig/utils/cloud/onedrive/transaction.py +796 -0
- machineconfig/utils/{utils_code.py → code.py} +25 -22
- machineconfig/utils/installer.py +81 -44
- machineconfig/utils/installer_utils/installer_abc.py +7 -6
- machineconfig/utils/installer_utils/installer_class.py +44 -25
- machineconfig/utils/io_save.py +107 -0
- machineconfig/utils/{utils_links.py → links.py} +28 -35
- machineconfig/utils/{utils_options.py → options.py} +14 -28
- machineconfig/utils/path.py +112 -0
- machineconfig/utils/path_reduced.py +608 -0
- machineconfig/utils/procs.py +134 -73
- machineconfig/utils/scheduling.py +312 -222
- machineconfig/utils/utils.py +19 -26
- machineconfig/utils/utils2.py +42 -0
- machineconfig/utils/utils5.py +84 -0
- machineconfig/utils/ve.py +49 -103
- {machineconfig-1.94.dist-info → machineconfig-1.96.dist-info}/METADATA +5 -3
- machineconfig-1.96.dist-info/RECORD +437 -0
- {machineconfig-1.94.dist-info → machineconfig-1.96.dist-info}/WHEEL +1 -1
- machineconfig/cluster/session_managers.py +0 -183
- machineconfig/cluster/templates/f.py +0 -4
- machineconfig/jobs/python/__pycache__/check_installations.cpython-311.pyc +0 -0
- machineconfig/jobs/python/__pycache__/checkout_version.cpython-311.pyc +0 -0
- machineconfig/jobs/python/__pycache__/python_ve_symlink.cpython-311.pyc +0 -0
- machineconfig/jobs/python/checkout_version.py +0 -123
- machineconfig/jobs/python/vscode/__pycache__/api.cpython-311.pyc +0 -0
- machineconfig/jobs/python/vscode/__pycache__/link_ve.cpython-311.pyc +0 -0
- machineconfig/jobs/python_custom_installers/__pycache__/hx.cpython-311.pyc +0 -0
- machineconfig/jobs/python_windows_installers/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/scripts/python/.mypy_cache/.gitignore +0 -2
- machineconfig/scripts/python/.mypy_cache/3.11/@plugins_snapshot.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/__future__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/__future__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_ast.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_ast.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_bz2.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_bz2.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_codecs.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_codecs.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_collections_abc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_collections_abc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_compression.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_compression.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_decimal.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_decimal.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_frozen_importlib.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_frozen_importlib.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_frozen_importlib_external.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_frozen_importlib_external.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_io.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_io.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_locale.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_locale.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_stat.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_stat.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_struct.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_struct.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_thread.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_thread.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_typeshed/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_typeshed/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_typeshed/importlib.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_typeshed/importlib.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_warnings.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_warnings.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_weakref.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_weakref.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_weakrefset.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/_weakrefset.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/abc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/abc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/argparse.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/argparse.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/ast.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/ast.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/binascii.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/binascii.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/builtins.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/builtins.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/bz2.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/bz2.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/calendar.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/calendar.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/codecs.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/codecs.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/collections/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/collections/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/collections/abc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/collections/abc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/configparser.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/configparser.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/contextlib.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/contextlib.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/dataclasses.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/dataclasses.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/datetime.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/datetime.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/decimal.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/decimal.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/dis.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/dis.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/_policybase.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/_policybase.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/charset.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/charset.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/contentmanager.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/contentmanager.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/errors.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/errors.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/header.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/header.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/message.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/message.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/policy.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/email/policy.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/enum.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/enum.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/fnmatch.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/fnmatch.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/functools.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/functools.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/gc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/gc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/genericpath.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/genericpath.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/getpass.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/getpass.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/cmd.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/cmd.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/compat.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/compat.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/config.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/config.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/db.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/db.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/diff.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/diff.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/exc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/exc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/base.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/base.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/fun.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/fun.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/typ.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/typ.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/util.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/index/util.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/base.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/base.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/blob.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/blob.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/commit.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/commit.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/fun.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/fun.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/base.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/base.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/root.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/root.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/util.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/submodule/util.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/tag.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/tag.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/tree.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/tree.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/util.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/objects/util.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/head.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/head.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/log.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/log.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/reference.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/reference.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/remote.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/remote.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/symbolic.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/symbolic.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/tag.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/refs/tag.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/remote.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/remote.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/base.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/base.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/fun.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/repo/fun.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/types.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/types.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/util.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/git/util.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/glob.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/glob.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/gzip.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/gzip.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_abc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_abc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_bootstrap.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_bootstrap.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_bootstrap_external.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/_bootstrap_external.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/abc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/abc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/machinery.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/machinery.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/metadata/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/metadata/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/metadata/_meta.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/metadata/_meta.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/readers.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/readers.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/_common.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/_common.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/abc.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/importlib/resources/abc.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/inspect.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/inspect.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/io.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/io.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/itertools.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/itertools.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/locale.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/locale.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/logging/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/logging/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/mimetypes.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/mimetypes.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/mmap.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/mmap.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/numbers.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/numbers.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/opcode.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/opcode.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/os/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/os/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/os/path.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/os/path.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/pathlib.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/pathlib.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/platform.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/platform.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/posixpath.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/posixpath.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/re.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/re.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/resource.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/resource.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/shlex.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/shlex.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/shutil.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/shutil.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/signal.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/signal.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/scripts/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/scripts/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/scripts/python/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/src/machineconfig/scripts/python/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sre_compile.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sre_compile.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sre_constants.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sre_constants.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sre_parse.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sre_parse.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/stat.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/stat.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/string.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/string.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/struct.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/struct.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/subprocess.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/subprocess.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sys/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/sys/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/tarfile.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/tarfile.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/tempfile.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/tempfile.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/textwrap.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/textwrap.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/threading.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/threading.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/time.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/time.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/types.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/types.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/typing.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/typing.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/typing_extensions.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/typing_extensions.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/urllib/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/urllib/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/urllib/parse.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/urllib/parse.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/uuid.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/uuid.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/warnings.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/warnings.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/weakref.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/weakref.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/zipfile/__init__.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/zipfile/__init__.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/zlib.data.json +0 -1
- machineconfig/scripts/python/.mypy_cache/3.11/zlib.meta.json +0 -1
- machineconfig/scripts/python/.mypy_cache/CACHEDIR.TAG +0 -3
- machineconfig/scripts/python/__pycache__/cloud_repo_sync.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/gh_models.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/url2md.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/viewer.cpython-311.pyc +0 -0
- machineconfig/scripts/python/__pycache__/vscode_api.cpython-311.pyc +0 -0
- machineconfig/settings/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/settings/linters/.ruff_cache/.gitignore +0 -2
- machineconfig/settings/linters/.ruff_cache/CACHEDIR.TAG +0 -1
- machineconfig/settings/shells/ipy/profiles/default/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/settings/shells/ipy/profiles/default/startup/__pycache__/__init__.cpython-311.pyc +0 -0
- machineconfig/settings/shells/ipy/profiles/default/startup/__pycache__/playext.cpython-311.pyc +0 -0
- machineconfig/utils/utils_path.py +0 -151
- machineconfig/utils/ve_utils/ve1.py +0 -111
- machineconfig/utils/ve_utils/ve2.py +0 -142
- machineconfig-1.94.dist-info/RECORD +0 -710
- {machineconfig-1.94.dist-info → machineconfig-1.96.dist-info}/top_level.txt +0 -0
|
@@ -1,359 +1,461 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
import pandas as pd
|
|
4
3
|
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from machineconfig.cluster.loader_runner import JOB_STATUS, LogEntry
|
|
8
|
-
from typing import Optional, Any, NoReturn
|
|
9
|
-
from rich.console import Console
|
|
10
|
-
import time
|
|
11
|
-
from dataclasses import fields
|
|
12
|
-
import getpass
|
|
13
|
-
import random
|
|
14
|
-
import platform
|
|
4
|
+
# from machineconfig.utils.utils2 import read_ini
|
|
5
|
+
# from machineconfig.utils.io_save import save_pickle
|
|
15
6
|
|
|
7
|
+
# from machineconfig.cluster.loader_runner import JOB_STATUS, LogEntry
|
|
8
|
+
# from typing import Optional, Any, NoReturn
|
|
9
|
+
# from rich.console import Console
|
|
10
|
+
# import pickle
|
|
11
|
+
# import time
|
|
12
|
+
# import getpass
|
|
13
|
+
# import random
|
|
14
|
+
# import platform
|
|
15
|
+
# from datetime import datetime, timedelta
|
|
16
16
|
|
|
17
|
-
class CloudManager:
|
|
18
|
-
base_path = P("~/tmp_results/remote_machines/cloud")
|
|
19
|
-
server_interval_sec: int = 60 * 5
|
|
20
|
-
num_claim_checks: int = 3
|
|
21
|
-
inter_check_interval_sec: int = 15
|
|
22
|
-
def __init__(self, max_jobs: int, cloud: Optional[str] = None, reset_local: bool = False) -> None:
|
|
23
|
-
if reset_local:
|
|
24
|
-
print("☠️ Resetting local cloud cache ☠️. Locally created / completed jobs not yet synced will not make it to the cloud.")
|
|
25
|
-
P(self.base_path).expanduser().delete(sure=True)
|
|
26
|
-
self.status_root: P = self.base_path.expanduser().joinpath("workers", f"{getpass.getuser()}@{platform.node()}").create()
|
|
27
|
-
self.max_jobs: int = max_jobs
|
|
28
|
-
if cloud is None:
|
|
29
|
-
from machineconfig.utils.utils import DEFAULTS_PATH
|
|
30
|
-
self.cloud = Read.ini(DEFAULTS_PATH)['general']['rclone_config_name']
|
|
31
|
-
else: self.cloud = cloud
|
|
32
|
-
self.lock_claimed = False
|
|
33
|
-
from machineconfig.cluster.remote_machine import RemoteMachine
|
|
34
|
-
self.running_jobs: list[RemoteMachine] = []
|
|
35
|
-
self.console = Console()
|
|
36
17
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
18
|
+
# def format_table_markdown(data: list[dict[str, Any]]) -> str:
|
|
19
|
+
# """Convert list of dictionaries to markdown table format."""
|
|
20
|
+
# if not data:
|
|
21
|
+
# return ""
|
|
22
|
+
|
|
23
|
+
# # Get all unique keys from all dictionaries
|
|
24
|
+
# all_keys = set()
|
|
25
|
+
# for row in data:
|
|
26
|
+
# all_keys.update(row.keys())
|
|
27
|
+
|
|
28
|
+
# keys = sorted(all_keys)
|
|
29
|
+
|
|
30
|
+
# # Create header
|
|
31
|
+
# header = "|" + "|".join(f" {key} " for key in keys) + "|"
|
|
32
|
+
# separator = "|" + "|".join(" --- " for _ in keys) + "|"
|
|
33
|
+
|
|
34
|
+
# # Create rows
|
|
35
|
+
# rows = []
|
|
36
|
+
# for row in data:
|
|
37
|
+
# row_values = []
|
|
38
|
+
# for key in keys:
|
|
39
|
+
# value = row.get(key, "")
|
|
40
|
+
# # Convert to string and handle None values
|
|
41
|
+
# if value is None:
|
|
42
|
+
# value = ""
|
|
43
|
+
# else:
|
|
44
|
+
# value = str(value)
|
|
45
|
+
# row_values.append(f" {value} ")
|
|
46
|
+
# rows.append("|" + "|".join(row_values) + "|")
|
|
47
|
+
|
|
48
|
+
# return "\n".join([header, separator] + rows)
|
|
57
49
|
|
|
58
|
-
# =================== CLOUD MONITORING ===================
|
|
59
|
-
def fetch_cloud_live(self):
|
|
60
|
-
remote = CloudManager.base_path
|
|
61
|
-
localpath = P.tmp().joinpath("tmp_dirs/cloud_manager_live").create()
|
|
62
|
-
alternative_base = localpath.delete(sure=True).from_cloud(cloud=self.cloud, remotepath=remote.get_remote_path(root="myhome", rel2home=True), verbose=False)
|
|
63
|
-
return alternative_base
|
|
64
|
-
@staticmethod
|
|
65
|
-
def prepare_servers_report(cloud_root: P):
|
|
66
|
-
from machineconfig.cluster.remote_machine import RemoteMachine
|
|
67
|
-
workers_root = cloud_root.joinpath("workers").search("*")
|
|
68
|
-
res: dict[str, list[RemoteMachine]] = {}
|
|
69
|
-
times: dict[str, pd.Timedelta] = {}
|
|
70
|
-
for a_worker in workers_root:
|
|
71
|
-
running_jobs = a_worker.joinpath("running_jobs.pkl")
|
|
72
|
-
times[a_worker.name] = pd.Timestamp.now() - pd.to_datetime(running_jobs.time("m"))
|
|
73
|
-
res[a_worker.name] = Read.pickle(path=running_jobs) if running_jobs.exists() else []
|
|
74
|
-
servers_report = pd.DataFrame({"machine": list(res.keys()), "#RJobs": [len(x) for x in res.values()], "LastUpdate": list(times.values())})
|
|
75
|
-
return servers_report
|
|
76
|
-
def run_monitor(self):
|
|
77
|
-
"""Without syncing, bring the latest from the cloud to random local path (not the default path, as that would require the lock)"""
|
|
78
|
-
from rich import print as pprint
|
|
79
|
-
def routine(sched: Any):
|
|
80
|
-
_ = sched
|
|
81
|
-
alternative_base = self.fetch_cloud_live()
|
|
82
|
-
assert alternative_base is not None
|
|
83
|
-
lock_path = alternative_base.expanduser().joinpath("lock.txt")
|
|
84
|
-
if lock_path.exists(): lock_owner: str = lock_path.read_text()
|
|
85
|
-
else: lock_owner = "None"
|
|
86
|
-
self.console.print(f"🔒 Lock is held by: {lock_owner}")
|
|
87
|
-
self.console.print("🧾 Log File:")
|
|
88
|
-
log_path = alternative_base.joinpath("logs.pkl")
|
|
89
|
-
if log_path.exists(): log: dict[JOB_STATUS, 'pd.DataFrame'] = Read.pickle(path=log_path)
|
|
90
|
-
else:
|
|
91
|
-
self.console.print("Log file doesn't exist! 🫤 must be that cloud is getting purged or something 🤔 ")
|
|
92
|
-
log = {}
|
|
93
|
-
for item_name, item_df in log.items():
|
|
94
|
-
self.console.rule(f"{item_name} DataFrame (Latest {'10' if len(item_df) > 10 else len(item_df)} / {len(item_df)})")
|
|
95
|
-
print() # empty line after the rule helps keeping the rendering clean in the terminal while zooming in and out.
|
|
96
|
-
if item_name != "queued":
|
|
97
|
-
t2 = pd.to_datetime(item_df["end_time"]) if item_name != "running" else pd.Series([pd.Timestamp.now()] * len(item_df))
|
|
98
|
-
if len(t2) == 0 and len(item_df) == 0: pass # the subtraction below gives an error if both are empty. TypeError: cannot subtract DatetimeArray from ndarray
|
|
99
|
-
else: item_df["duration"] = t2 - pd.to_datetime(item_df["start_time"])
|
|
100
50
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
51
|
+
# class CloudManager:
|
|
52
|
+
# base_path = PathExtended("~/tmp_results/remote_machines/cloud")
|
|
53
|
+
# server_interval_sec: int = 60 * 5
|
|
54
|
+
# num_claim_checks: int = 3
|
|
55
|
+
# inter_check_interval_sec: int = 15
|
|
56
|
+
# def __init__(self, max_jobs: int, cloud: Optional[str] = None, reset_local: bool = False) -> None:
|
|
57
|
+
# if reset_local:
|
|
58
|
+
# print("☠️ Resetting local cloud cache ☠️. Locally created / completed jobs not yet synced will not make it to the cloud.")
|
|
59
|
+
# PathExtended(self.base_path).expanduser().delete(sure=True)
|
|
60
|
+
# status_root_path = self.base_path.expanduser().joinpath("workers", f"{getpass.getuser()}@{platform.node()}")
|
|
61
|
+
# status_root_path.mkdir(parents=True, exist_ok=True)
|
|
62
|
+
# self.status_root: P = status_root_path
|
|
63
|
+
# self.max_jobs: int = max_jobs
|
|
64
|
+
# if cloud is None:
|
|
65
|
+
# from machineconfig.utils.utils import DEFAULTS_PATH
|
|
66
|
+
# self.cloud = read_ini(DEFAULTS_PATH)['general']['rclone_config_name']
|
|
67
|
+
# else: self.cloud = cloud
|
|
68
|
+
# self.lock_claimed = False
|
|
69
|
+
# from machineconfig.cluster.remote_machine import RemoteMachine
|
|
70
|
+
# self.running_jobs: list[RemoteMachine] = []
|
|
71
|
+
# self.console = Console()
|
|
114
72
|
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
else:
|
|
135
|
-
entry.pid = None
|
|
136
|
-
entry.cmd = None
|
|
137
|
-
entry.start_time = None
|
|
138
|
-
entry.end_time = None
|
|
139
|
-
entry.run_machine = None
|
|
140
|
-
entry.session_name = None
|
|
141
|
-
rm.file_manager.execution_log_dir.expanduser().joinpath("status.txt").delete(sure=True)
|
|
142
|
-
rm.file_manager.execution_log_dir.expanduser().joinpath("pid.txt").delete(sure=True)
|
|
143
|
-
entry.note += f"| Job was interrupted by a crash of the machine `{this_machine}`."
|
|
144
|
-
dirt.append(entry.name)
|
|
145
|
-
print(f"Job `{entry.name}` is not running, removing it from log of running jobs.")
|
|
146
|
-
if return_to_queue:
|
|
147
|
-
log["queued"] = pd.concat([log["queued"], pd.DataFrame([entry.__dict__])], ignore_index=True)
|
|
148
|
-
print(f"Job `{entry.name}` is not running, returning it to the queue.")
|
|
149
|
-
else:
|
|
150
|
-
log["failed"] = pd.concat([log["failed"], pd.DataFrame([entry.__dict__])], ignore_index=True)
|
|
151
|
-
print(f"Job `{entry.name}` is not running, moving it to failed jobs.")
|
|
152
|
-
log["running"] = log["running"][~log["running"]["name"].isin(dirt)]
|
|
153
|
-
self.write_log(log=log)
|
|
154
|
-
def clean_failed_jobs_mess(self):
|
|
155
|
-
"""If you want to do it for remote machine, use `rerun_jobs` (manual selection)"""
|
|
156
|
-
print("⚠️ Cleaning failed jobs mess for this machine ⚠️")
|
|
157
|
-
from machineconfig.cluster.remote_machine import RemoteMachine
|
|
158
|
-
log = self.read_log()
|
|
159
|
-
for _idx, row in log["failed"].iterrows():
|
|
160
|
-
entry = LogEntry.from_dict(row.to_dict())
|
|
161
|
-
a_job_path = CloudManager.base_path.expanduser().joinpath(f"jobs/{entry.name}")
|
|
162
|
-
rm: RemoteMachine = Read.pickle(path=a_job_path.joinpath("data/remote_machine.Machine.pkl"))
|
|
163
|
-
entry.note += f"| Job failed @ {entry.run_machine}"
|
|
164
|
-
entry.pid = None
|
|
165
|
-
entry.cmd = None
|
|
166
|
-
entry.start_time = None
|
|
167
|
-
entry.end_time = None
|
|
168
|
-
entry.run_machine = None
|
|
169
|
-
entry.session_name = None
|
|
170
|
-
rm.file_manager.execution_log_dir.expanduser().joinpath("status.txt").delete(sure=True)
|
|
171
|
-
rm.file_manager.execution_log_dir.expanduser().joinpath("pid.txt").delete(sure=True)
|
|
172
|
-
print(f"Job `{entry.name}` is not running, removing it from log of running jobs.")
|
|
173
|
-
log["queued"] = pd.concat([log["queued"], pd.DataFrame([entry.__dict__])], ignore_index=True)
|
|
174
|
-
print(f"Job `{entry.name}` is not running, returning it to the queue.")
|
|
175
|
-
log["failed"] = pd.DataFrame(columns=log["failed"].columns)
|
|
176
|
-
self.write_log(log=log)
|
|
177
|
-
self.release_lock()
|
|
178
|
-
def rerun_jobs(self):
|
|
179
|
-
"""This method involves manual selection but has all-files scope (failed and running) and can be used for both local and remote machines.
|
|
180
|
-
The reason it is not automated for remotes is because even though the server might have failed, the processes therein might be running, so there is no automated way to tell."""
|
|
181
|
-
log = self.read_log()
|
|
182
|
-
from machineconfig.cluster.remote_machine import RemoteMachine
|
|
183
|
-
from machineconfig.utils.utils import display_options
|
|
184
|
-
jobs_all: list[str] = self.base_path.expanduser().joinpath("jobs").search("*").apply(lambda x: x.name).list
|
|
185
|
-
jobs_selected = display_options(options=jobs_all, msg="Select Jobs to Redo", multi=True, fzf=True)
|
|
186
|
-
for a_job in jobs_selected:
|
|
187
|
-
# find in which dataframe does this job lives:
|
|
188
|
-
for log_type, log_df in log.items():
|
|
189
|
-
if a_job in log_df["name"].values: break
|
|
190
|
-
else: raise ValueError(f"Job `{a_job}` is not found in any of the log dataframes.")
|
|
191
|
-
entry = LogEntry.from_dict(log_df[log_df["name"] == a_job].iloc[0].to_dict())
|
|
192
|
-
a_job_path = CloudManager.base_path.expanduser().joinpath(f"jobs/{entry.name}")
|
|
193
|
-
entry.note += f"| Job failed @ {entry.run_machine}"
|
|
194
|
-
entry.pid = None
|
|
195
|
-
entry.cmd = None
|
|
196
|
-
entry.start_time = None
|
|
197
|
-
entry.end_time = None
|
|
198
|
-
entry.run_machine = None
|
|
199
|
-
entry.session_name = None
|
|
200
|
-
rm: RemoteMachine = Read.pickle(path=a_job_path.joinpath("data/remote_machine.Machine.pkl"))
|
|
201
|
-
rm.file_manager.execution_log_dir.expanduser().joinpath("status.txt").delete(sure=True)
|
|
202
|
-
rm.file_manager.execution_log_dir.expanduser().joinpath("pid.txt").delete(sure=True)
|
|
203
|
-
log["queued"] = pd.concat([log["queued"], pd.DataFrame([entry.__dict__])], ignore_index=True)
|
|
204
|
-
log[log_type] = log[log_type][log[log_type]["name"] != a_job]
|
|
205
|
-
print(f"Job `{entry.name}` was removed from {log_type} and added to the queue in order to be re-run.")
|
|
206
|
-
self.write_log(log=log)
|
|
207
|
-
self.release_lock()
|
|
73
|
+
# # =================== READ WRITE OF LOGS ===================
|
|
74
|
+
# def read_log(self) -> dict[JOB_STATUS, list[dict[str, Any]]]:
|
|
75
|
+
# # assert self.claim_lock, f"method should never be called without claiming the lock first. This is a cloud-wide file."
|
|
76
|
+
# if not self.lock_claimed: self.claim_lock()
|
|
77
|
+
# path = self.base_path.joinpath("logs.pkl").expanduser()
|
|
78
|
+
# if not path.exists():
|
|
79
|
+
# log: dict[JOB_STATUS, list[dict[str, Any]]] = {}
|
|
80
|
+
# log['queued'] = []
|
|
81
|
+
# log['running'] = []
|
|
82
|
+
# log['completed'] = []
|
|
83
|
+
# log['failed'] = []
|
|
84
|
+
# path.parent.mkdir(parents=True, exist_ok=True)
|
|
85
|
+
# save_pickle(obj=log, path=path, verbose=False)
|
|
86
|
+
# return log
|
|
87
|
+
# return pickle.loads(path.read_bytes())
|
|
88
|
+
# def write_log(self, log: dict[JOB_STATUS, list[dict[str, Any]]]) -> None:
|
|
89
|
+
# # assert self.claim_lock, f"method should never be called without claiming the lock first. This is a cloud-wide file."
|
|
90
|
+
# if not self.lock_claimed: self.claim_lock()
|
|
91
|
+
# save_pickle(obj=log, path=self.base_path.joinpath("logs.pkl").expanduser(), verbose=False)
|
|
208
92
|
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
93
|
+
# # =================== CLOUD MONITORING ===================
|
|
94
|
+
# def fetch_cloud_live(self):
|
|
95
|
+
# remote = CloudManager.base_path
|
|
96
|
+
# localpath = PathExtended.tmp().joinpath("tmp_dirs/cloud_manager_live")
|
|
97
|
+
# localpath.mkdir(parents=True, exist_ok=True)
|
|
98
|
+
# alternative_base = localpath.delete(sure=True).from_cloud(cloud=self.cloud, remotepath=remote.get_remote_path(root="myhome", rel2home=True), verbose=False)
|
|
99
|
+
# return alternative_base
|
|
100
|
+
# @staticmethod
|
|
101
|
+
# def prepare_servers_report(cloud_root: PathExtended) -> list[dict[str, Any]]:
|
|
102
|
+
# from machineconfig.cluster.remote_machine import RemoteMachine
|
|
103
|
+
# # Replace crocodile List usage with plain Python list
|
|
104
|
+
# workers_root = [p for p in cloud_root.joinpath("workers").iterdir()]
|
|
105
|
+
# res: dict[str, list[RemoteMachine]] = {}
|
|
106
|
+
# times: dict[str, timedelta] = {}
|
|
107
|
+
# for a_worker in workers_root:
|
|
108
|
+
# running_jobs = a_worker.joinpath("running_jobs.pkl")
|
|
109
|
+
# file_mod_time = datetime.fromtimestamp(running_jobs.stat().st_mtime) if running_jobs.exists() else datetime.min
|
|
110
|
+
# times[a_worker.name] = datetime.now() - file_mod_time
|
|
111
|
+
# res[a_worker.name] = pickle.loads(running_jobs.read_bytes()) if running_jobs.exists() else []
|
|
112
|
+
|
|
113
|
+
# # Create list of dictionaries instead of DataFrame
|
|
114
|
+
# servers_report = []
|
|
115
|
+
# for machine in res.keys():
|
|
116
|
+
# servers_report.append({
|
|
117
|
+
# "machine": machine,
|
|
118
|
+
# "#RJobs": len(res[machine]),
|
|
119
|
+
# "LastUpdate": times[machine]
|
|
120
|
+
# })
|
|
121
|
+
# return servers_report
|
|
122
|
+
# def run_monitor(self):
|
|
123
|
+
# """Without syncing, bring the latest from the cloud to random local path (not the default path, as that would require the lock)"""
|
|
124
|
+
# from rich import print as pprint
|
|
125
|
+
# def routine(sched: Any):
|
|
126
|
+
# _ = sched
|
|
127
|
+
# alternative_base = self.fetch_cloud_live()
|
|
128
|
+
# assert alternative_base is not None
|
|
129
|
+
# lock_path = alternative_base.expanduser().joinpath("lock.txt")
|
|
130
|
+
# if lock_path.exists(): lock_owner: str = lock_path.read_text()
|
|
131
|
+
# else: lock_owner = "None"
|
|
132
|
+
# self.console.print(f"🔒 Lock is held by: {lock_owner}")
|
|
133
|
+
# self.console.print("🧾 Log File:")
|
|
134
|
+
# log_path = alternative_base.joinpath("logs.pkl")
|
|
135
|
+
# if log_path.exists(): log: dict[JOB_STATUS, list[dict[str, Any]]] = pickle.loads(log_path.read_bytes())
|
|
136
|
+
# else:
|
|
137
|
+
# self.console.print("Log file doesn't exist! 🫤 must be that cloud is getting purged or something 🤔 ")
|
|
138
|
+
# log = {}
|
|
139
|
+
# for item_name, item_list in log.items():
|
|
140
|
+
# self.console.rule(f"{item_name} Jobs (Latest {'10' if len(item_list) > 10 else len(item_list)} / {len(item_list)})")
|
|
141
|
+
# print() # empty line after the rule helps keeping the rendering clean in the terminal while zooming in and out.
|
|
142
|
+
|
|
143
|
+
# # Add duration calculation for non-queued items
|
|
144
|
+
# display_items = []
|
|
145
|
+
# for item in item_list:
|
|
146
|
+
# display_item = item.copy()
|
|
147
|
+
# if item_name != "queued" and "start_time" in item and item["start_time"]:
|
|
148
|
+
# try:
|
|
149
|
+
# if item_name == "running":
|
|
150
|
+
# end_time = datetime.now()
|
|
151
|
+
# else:
|
|
152
|
+
# end_time = datetime.fromisoformat(item["end_time"]) if item.get("end_time") else datetime.now()
|
|
153
|
+
# start_time = datetime.fromisoformat(item["start_time"])
|
|
154
|
+
# display_item["duration"] = end_time - start_time
|
|
155
|
+
# except Exception:
|
|
156
|
+
# display_item["duration"] = "unknown"
|
|
157
|
+
# display_items.append(display_item)
|
|
218
158
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
else: raise ValueError(f"I receieved a status that I don't know how to handle `{status}`")
|
|
241
|
-
self.running_jobs = [a_rm for a_rm in self.running_jobs if a_rm.config.job_id not in jobs_ids_to_be_removed_from_running]
|
|
242
|
-
Save.pickle(obj=self.running_jobs, path=self.status_root.joinpath("running_jobs.pkl"), verbose=False)
|
|
243
|
-
self.status_root.to_cloud(cloud=self.cloud, rel2home=True, verbose=False) # no need for lock as this writes to a folder specific to this machine.
|
|
244
|
-
def start_jobs_if_possible(self):
|
|
245
|
-
"""This is the only authority responsible for moving jobs from queue df to running df."""
|
|
246
|
-
if len(self.running_jobs) == self.max_jobs:
|
|
247
|
-
print(f"⚠️ No more capacity to run more jobs ({len(self.running_jobs)} / {self.max_jobs=})")
|
|
248
|
-
return
|
|
249
|
-
from machineconfig.cluster.remote_machine import RemoteMachine
|
|
250
|
-
log = self.read_log() # ask for the log file.
|
|
251
|
-
if len(log["queued"]) == 0:
|
|
252
|
-
print("No queued jobs found.")
|
|
253
|
-
return None
|
|
254
|
-
idx: int = 0
|
|
255
|
-
while len(self.running_jobs) < self.max_jobs:
|
|
256
|
-
queue_entry = LogEntry.from_dict(log["queued"].iloc[idx].to_dict())
|
|
257
|
-
a_job_path = CloudManager.base_path.expanduser().joinpath(f"jobs/{queue_entry.name}")
|
|
258
|
-
rm: RemoteMachine = Read.pickle(path=a_job_path.joinpath("data/remote_machine.Machine.pkl"))
|
|
259
|
-
if rm.config.allowed_remotes is not None and f"{getpass.getuser()}@{platform.node()}" not in rm.config.allowed_remotes:
|
|
260
|
-
print(f"Job `{queue_entry.name}` is not allowed to run on this machine. Skipping ...")
|
|
261
|
-
idx += 1
|
|
262
|
-
if idx >= len(log["queued"]):
|
|
263
|
-
break # looked at all jobs in the queue and none is allowed to run on this machine.
|
|
264
|
-
continue # look at the next job in the queue.
|
|
265
|
-
pid, _process_cmd = rm.fire(run=True)
|
|
266
|
-
queue_entry.pid = pid
|
|
267
|
-
# queue_entry.cmd = process_cmd
|
|
268
|
-
queue_entry.run_machine = f"{getpass.getuser()}@{platform.node()}"
|
|
269
|
-
queue_entry.start_time = pd.Timestamp.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
270
|
-
queue_entry.session_name = rm.job_params.session_name
|
|
271
|
-
log["queued"] = log["queued"][log["queued"]["name"] != queue_entry.name]
|
|
272
|
-
# log["queued"] = log["queued"].iloc[1:] if len(log["queued"]) > 0 else pd.DataFrame(columns=log["queued"].column)
|
|
273
|
-
log["running"] = pd.concat([log["running"], pd.DataFrame([queue_entry.__dict__])], ignore_index=True)
|
|
274
|
-
self.running_jobs.append(rm)
|
|
275
|
-
self.write_log(log=log)
|
|
276
|
-
return None
|
|
159
|
+
# # Filter columns based on item type
|
|
160
|
+
# excluded_cols = {"cmd", "note"}
|
|
161
|
+
# if item_name == "queued": excluded_cols.update({"pid", "start_time", "end_time", "run_machine"})
|
|
162
|
+
# if item_name == "running": excluded_cols.update({"submission_time", "source_machine", "end_time"})
|
|
163
|
+
# if item_name == "completed": excluded_cols.update({"submission_time", "source_machine", "start_time", "pid"})
|
|
164
|
+
# if item_name == "failed": excluded_cols.update({"submission_time", "source_machine", "start_time"})
|
|
165
|
+
|
|
166
|
+
# # Filter items and take last 10
|
|
167
|
+
# filtered_items = []
|
|
168
|
+
# for item in display_items[-10:]:
|
|
169
|
+
# filtered_item = {k: v for k, v in item.items() if k not in excluded_cols}
|
|
170
|
+
# filtered_items.append(filtered_item)
|
|
171
|
+
|
|
172
|
+
# if filtered_items:
|
|
173
|
+
# pprint(format_table_markdown(filtered_items))
|
|
174
|
+
# pprint("\n\n")
|
|
175
|
+
# print("👷 Workers:")
|
|
176
|
+
# servers_report = self.prepare_servers_report(cloud_root=alternative_base)
|
|
177
|
+
# pprint(format_table_markdown(servers_report))
|
|
178
|
+
# sched = Scheduler(routine=routine, wait="5m")
|
|
179
|
+
# sched.run()
|
|
277
180
|
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
181
|
+
# # ================== CLEARNING METHODS ===================
|
|
182
|
+
# def clean_interrupted_jobs_mess(self, return_to_queue: bool = True):
|
|
183
|
+
# """Clean jobs that failed but in logs show running by looking at the pid.
|
|
184
|
+
# If you want to do the same for remote machines, you will need to do it manually using `rerun_jobs`"""
|
|
185
|
+
# assert len(self.running_jobs) == 0, "method should never be called while there are running jobs. This can only be called at the beginning of the run."
|
|
186
|
+
# from machineconfig.cluster.remote_machine import RemoteMachine
|
|
187
|
+
# this_machine = f"{getpass.getuser()}@{platform.node()}"
|
|
188
|
+
# log = self.read_log()
|
|
189
|
+
# # servers_report = self.prepare_servers_report(cloud_root=CloudManager.base_path.expanduser())
|
|
190
|
+
# dirt: list[str] = []
|
|
191
|
+
# for job_data in log["running"]:
|
|
192
|
+
# entry = LogEntry.from_dict(job_data)
|
|
193
|
+
# if entry.run_machine != this_machine: continue
|
|
194
|
+
# a_job_path = CloudManager.base_path.expanduser().joinpath(f"jobs/{entry.name}")
|
|
195
|
+
# rm: RemoteMachine = pickle.loads(a_job_path.joinpath("data/remote_machine.Machine.pkl").read_bytes())
|
|
196
|
+
# status = rm.file_manager.get_job_status(session_name=rm.job_params.session_name, tab_name=rm.job_params.tab_name)
|
|
197
|
+
# if status == "running":
|
|
198
|
+
# print(f"Job `{entry.name}` is still running, added to running jobs.")
|
|
199
|
+
# self.running_jobs.append(rm)
|
|
200
|
+
# else:
|
|
201
|
+
# entry.pid = None
|
|
202
|
+
# entry.cmd = None
|
|
203
|
+
# entry.start_time = None
|
|
204
|
+
# entry.end_time = None
|
|
205
|
+
# entry.run_machine = None
|
|
206
|
+
# entry.session_name = None
|
|
207
|
+
# rm.file_manager.execution_log_dir.expanduser().joinpath("status.txt").delete(sure=True)
|
|
208
|
+
# rm.file_manager.execution_log_dir.expanduser().joinpath("pid.txt").delete(sure=True)
|
|
209
|
+
# entry.note += f"| Job was interrupted by a crash of the machine `{this_machine}`."
|
|
210
|
+
# dirt.append(entry.name)
|
|
211
|
+
# print(f"Job `{entry.name}` is not running, removing it from log of running jobs.")
|
|
212
|
+
# if return_to_queue:
|
|
213
|
+
# log["queued"].append(entry.__dict__)
|
|
214
|
+
# print(f"Job `{entry.name}` is not running, returning it to the queue.")
|
|
215
|
+
# else:
|
|
216
|
+
# log["failed"].append(entry.__dict__)
|
|
217
|
+
# print(f"Job `{entry.name}` is not running, moving it to failed jobs.")
|
|
218
|
+
# # Remove entries that are in dirt list
|
|
219
|
+
# log["running"] = [job for job in log["running"] if job.get("name") not in dirt]
|
|
220
|
+
# self.write_log(log=log)
|
|
221
|
+
# def clean_failed_jobs_mess(self):
|
|
222
|
+
# """If you want to do it for remote machine, use `rerun_jobs` (manual selection)"""
|
|
223
|
+
# print("⚠️ Cleaning failed jobs mess for this machine ⚠️")
|
|
224
|
+
# from machineconfig.cluster.remote_machine import RemoteMachine
|
|
225
|
+
# log = self.read_log()
|
|
226
|
+
# for job_data in log["failed"]:
|
|
227
|
+
# entry = LogEntry.from_dict(job_data)
|
|
228
|
+
# a_job_path = CloudManager.base_path.expanduser().joinpath(f"jobs/{entry.name}")
|
|
229
|
+
# rm: RemoteMachine = pickle.loads(a_job_path.joinpath("data/remote_machine.Machine.pkl").read_bytes())
|
|
230
|
+
# entry.note += f"| Job failed @ {entry.run_machine}"
|
|
231
|
+
# entry.pid = None
|
|
232
|
+
# entry.cmd = None
|
|
233
|
+
# entry.start_time = None
|
|
234
|
+
# entry.end_time = None
|
|
235
|
+
# entry.run_machine = None
|
|
236
|
+
# entry.session_name = None
|
|
237
|
+
# rm.file_manager.execution_log_dir.expanduser().joinpath("status.txt").delete(sure=True)
|
|
238
|
+
# rm.file_manager.execution_log_dir.expanduser().joinpath("pid.txt").delete(sure=True)
|
|
239
|
+
# print(f"Job `{entry.name}` is not running, removing it from log of running jobs.")
|
|
240
|
+
# log["queued"].append(entry.__dict__)
|
|
241
|
+
# print(f"Job `{entry.name}` is not running, returning it to the queue.")
|
|
242
|
+
# log["failed"] = []
|
|
243
|
+
# self.write_log(log=log)
|
|
244
|
+
# self.release_lock()
|
|
245
|
+
# def rerun_jobs(self):
|
|
246
|
+
# """This method involves manual selection but has all-files scope (failed and running) and can be used for both local and remote machines.
|
|
247
|
+
# The reason it is not automated for remotes is because even though the server might have failed, the processes therein might be running, so there is no automated way to tell."""
|
|
248
|
+
# log = self.read_log()
|
|
249
|
+
# from machineconfig.cluster.remote_machine import RemoteMachine
|
|
250
|
+
# from machineconfig.utils.utils import display_options
|
|
251
|
+
# # Replace crocodile List usage with plain Python list comprehension
|
|
252
|
+
# jobs_all: list[str] = [p.name for p in self.base_path.expanduser().joinpath("jobs").iterdir()]
|
|
253
|
+
# jobs_selected = display_options(options=jobs_all, msg="Select Jobs to Redo", multi=True, fzf=True)
|
|
254
|
+
# for a_job in jobs_selected:
|
|
255
|
+
# # find in which log list does this job live:
|
|
256
|
+
# found_log_type = None
|
|
257
|
+
# found_entry_data = None
|
|
258
|
+
# for log_type, log_list in log.items():
|
|
259
|
+
# for job_data in log_list:
|
|
260
|
+
# if job_data.get("name") == a_job:
|
|
261
|
+
# found_log_type = log_type
|
|
262
|
+
# found_entry_data = job_data
|
|
263
|
+
# break
|
|
264
|
+
# if found_log_type:
|
|
265
|
+
# break
|
|
266
|
+
|
|
267
|
+
# if not found_log_type:
|
|
268
|
+
# raise ValueError(f"Job `{a_job}` is not found in any of the log lists.")
|
|
269
|
+
|
|
270
|
+
# if found_entry_data is None:
|
|
271
|
+
# raise ValueError(f"Job `{a_job}` has no entry data.")
|
|
272
|
+
|
|
273
|
+
# entry = LogEntry.from_dict(found_entry_data)
|
|
274
|
+
# a_job_path = CloudManager.base_path.expanduser().joinpath(f"jobs/{entry.name}")
|
|
275
|
+
# entry.note += f"| Job failed @ {entry.run_machine}"
|
|
276
|
+
# entry.pid = None
|
|
277
|
+
# entry.cmd = None
|
|
278
|
+
# entry.start_time = None
|
|
279
|
+
# entry.end_time = None
|
|
280
|
+
# entry.run_machine = None
|
|
281
|
+
# entry.session_name = None
|
|
282
|
+
# rm: RemoteMachine = pickle.loads(a_job_path.joinpath("data/remote_machine.Machine.pkl").read_bytes())
|
|
283
|
+
# rm.file_manager.execution_log_dir.expanduser().joinpath("status.txt").delete(sure=True)
|
|
284
|
+
# rm.file_manager.execution_log_dir.expanduser().joinpath("pid.txt").delete(sure=True)
|
|
285
|
+
# log["queued"].append(entry.__dict__)
|
|
286
|
+
# # Remove from original log type
|
|
287
|
+
# log[found_log_type] = [job for job in log[found_log_type] if job.get("name") != a_job]
|
|
288
|
+
# print(f"Job `{entry.name}` was removed from {found_log_type} and added to the queue in order to be re-run.")
|
|
289
|
+
# self.write_log(log=log)
|
|
290
|
+
# self.release_lock()
|
|
304
291
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
time.sleep(wait)
|
|
315
|
-
return self.claim_lock(first_call=False)
|
|
292
|
+
# def serve(self):
|
|
293
|
+
# self.clean_interrupted_jobs_mess()
|
|
294
|
+
# def routine(sched: Any):
|
|
295
|
+
# _ = sched
|
|
296
|
+
# self.start_jobs_if_possible()
|
|
297
|
+
# self.get_running_jobs_statuses()
|
|
298
|
+
# self.release_lock()
|
|
299
|
+
# sched = Scheduler(routine=routine, wait=f"{self.server_interval_sec}s")
|
|
300
|
+
# return sched.run()
|
|
316
301
|
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
302
|
+
# def get_running_jobs_statuses(self):
|
|
303
|
+
# """This is the only authority responsible for moving jobs from running df to failed df or completed df."""
|
|
304
|
+
# jobs_ids_to_be_removed_from_running: list[str] = []
|
|
305
|
+
# for a_rm in self.running_jobs:
|
|
306
|
+
# status = a_rm.file_manager.get_job_status(session_name=a_rm.job_params.session_name, tab_name=a_rm.job_params.tab_name)
|
|
307
|
+
# if status == "running": pass
|
|
308
|
+
# elif status == "completed" or status == "failed":
|
|
309
|
+
# job_name = a_rm.config.job_id
|
|
310
|
+
# log = self.read_log()
|
|
311
|
+
|
|
312
|
+
# # Find the entry in running jobs
|
|
313
|
+
# entry_data = None
|
|
314
|
+
# for job_data in log["running"]:
|
|
315
|
+
# if job_data.get("name") == job_name:
|
|
316
|
+
# entry_data = job_data
|
|
317
|
+
# break
|
|
318
|
+
|
|
319
|
+
# if entry_data:
|
|
320
|
+
# entry = LogEntry.from_dict(entry_data)
|
|
321
|
+
# entry.end_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
322
|
+
# log[status].append(entry.__dict__)
|
|
323
|
+
# # Remove from running
|
|
324
|
+
# log["running"] = [job for job in log["running"] if job.get("name") != job_name]
|
|
325
|
+
# self.write_log(log=log)
|
|
326
|
+
# # self.running_jobs.remove(a_rm)
|
|
327
|
+
# jobs_ids_to_be_removed_from_running.append(a_rm.config.job_id)
|
|
328
|
+
# elif status == "queued": raise RuntimeError("I thought I'm working strictly with running jobs, and I encountered unexpected a job with `queued` status.")
|
|
329
|
+
# else: raise ValueError(f"I receieved a status that I don't know how to handle `{status}`")
|
|
330
|
+
# self.running_jobs = [a_rm for a_rm in self.running_jobs if a_rm.config.job_id not in jobs_ids_to_be_removed_from_running]
|
|
331
|
+
# save_pickle(obj=self.running_jobs, path=self.status_root.joinpath("running_jobs.pkl"), verbose=False)
|
|
332
|
+
# self.status_root.to_cloud(cloud=self.cloud, rel2home=True, verbose=False) # no need for lock as this writes to a folder specific to this machine.
|
|
333
|
+
# def start_jobs_if_possible(self):
|
|
334
|
+
# """This is the only authority responsible for moving jobs from queue df to running df."""
|
|
335
|
+
# if len(self.running_jobs) == self.max_jobs:
|
|
336
|
+
# print(f"⚠️ No more capacity to run more jobs ({len(self.running_jobs)} / {self.max_jobs=})")
|
|
337
|
+
# return
|
|
338
|
+
# from machineconfig.cluster.remote_machine import RemoteMachine
|
|
339
|
+
# log = self.read_log() # ask for the log file.
|
|
340
|
+
# if len(log["queued"]) == 0:
|
|
341
|
+
# print("No queued jobs found.")
|
|
342
|
+
# return None
|
|
343
|
+
# idx: int = 0
|
|
344
|
+
# while len(self.running_jobs) < self.max_jobs:
|
|
345
|
+
# if idx >= len(log["queued"]):
|
|
346
|
+
# break # looked at all jobs in the queue
|
|
347
|
+
|
|
348
|
+
# queue_entry = LogEntry.from_dict(log["queued"][idx])
|
|
349
|
+
# a_job_path = CloudManager.base_path.expanduser().joinpath(f"jobs/{queue_entry.name}")
|
|
350
|
+
# rm: RemoteMachine = pickle.loads(a_job_path.joinpath("data/remote_machine.Machine.pkl").read_bytes())
|
|
351
|
+
# if rm.config.allowed_remotes is not None and f"{getpass.getuser()}@{platform.node()}" not in rm.config.allowed_remotes:
|
|
352
|
+
# print(f"Job `{queue_entry.name}` is not allowed to run on this machine. Skipping ...")
|
|
353
|
+
# idx += 1
|
|
354
|
+
# continue # look at the next job in the queue.
|
|
355
|
+
|
|
356
|
+
# pid, _process_cmd = rm.fire(run=True)
|
|
357
|
+
# queue_entry.pid = pid
|
|
358
|
+
# # queue_entry.cmd = process_cmd
|
|
359
|
+
# queue_entry.run_machine = f"{getpass.getuser()}@{platform.node()}"
|
|
360
|
+
# queue_entry.start_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
|
361
|
+
# queue_entry.session_name = rm.job_params.session_name
|
|
362
|
+
|
|
363
|
+
# # Remove from queued and add to running
|
|
364
|
+
# log["queued"] = [job for job in log["queued"] if job.get("name") != queue_entry.name]
|
|
365
|
+
# log["running"].append(queue_entry.__dict__)
|
|
366
|
+
# self.running_jobs.append(rm)
|
|
367
|
+
# self.write_log(log=log)
|
|
368
|
+
# return None
|
|
320
369
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
370
|
+
# def reset_cloud(self, unsafe: bool = False):
|
|
371
|
+
# print("☠️ Resetting cloud server ☠️")
|
|
372
|
+
# if not unsafe: self.claim_lock() # it is unsafe to ignore the lock since other workers thinnk they own the lock and will push their data and overwrite the reset. Do so only when knowing that other
|
|
373
|
+
# base_path = CloudManager.base_path.expanduser().delete(sure=True)
|
|
374
|
+
# base_path.mkdir(parents=True, exist_ok=True)
|
|
375
|
+
# base_path.sync_to_cloud(cloud=self.cloud, rel2home=True, sync_up=True, verbose=True, transfers=100)
|
|
376
|
+
# self.release_lock()
|
|
377
|
+
# def reset_lock(self):
|
|
378
|
+
# base_path = CloudManager.base_path.expanduser()
|
|
379
|
+
# base_path.mkdir(parents=True, exist_ok=True)
|
|
380
|
+
# base_path.joinpath("lock.txt").write_text("").to_cloud(cloud=self.cloud, rel2home=True, verbose=False)
|
|
381
|
+
# @staticmethod
|
|
382
|
+
# def run_clean_trial():
|
|
383
|
+
# self = CloudManager(max_jobs=1)
|
|
384
|
+
# base_path = self.base_path.expanduser().delete(sure=True)
|
|
385
|
+
# base_path.mkdir(parents=True, exist_ok=True)
|
|
386
|
+
# base_path.sync_to_cloud(cloud=self.cloud, rel2home=True, sync_up=True, transfers=20)
|
|
387
|
+
# from machineconfig.cluster.templates.run_remote import run_on_cloud
|
|
388
|
+
# run_on_cloud()
|
|
389
|
+
# self.serve()
|
|
390
|
+
# def claim_lock(self, first_call: bool = True) -> None:
|
|
391
|
+
# """
|
|
392
|
+
# Note: If the parameters of the class are messed with, there is no gaurantee of zero collision by this method.
|
|
393
|
+
# It takes at least inter_check_interval_sec * num_claims_check to claim the lock.
|
|
394
|
+
# """
|
|
395
|
+
# if first_call: print("Claiming lock 🔒 ...")
|
|
396
|
+
# this_machine = f"{getpass.getuser()}@{platform.node()}"
|
|
397
|
+
# path = CloudManager.base_path.expanduser()
|
|
398
|
+
# path.mkdir(parents=True, exist_ok=True)
|
|
399
|
+
# lock_path = path.joinpath("lock.txt").from_cloud(cloud=self.cloud, rel2home=True, verbose=False)
|
|
400
|
+
# if lock_path is None:
|
|
401
|
+
# print("Lock doesn't exist on remote, uploading for the first time.")
|
|
402
|
+
# path.joinpath("lock.txt").write_text(this_machine).to_cloud(cloud=self.cloud, rel2home=True, verbose=False)
|
|
403
|
+
# return self.claim_lock(first_call=False)
|
|
338
404
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
405
|
+
# locking_machine = lock_path.read_text()
|
|
406
|
+
# if locking_machine != "" and locking_machine != this_machine:
|
|
407
|
+
# lock_mod_time = datetime.fromtimestamp(lock_path.stat().st_mtime)
|
|
408
|
+
# if (datetime.now() - lock_mod_time).total_seconds() > 3600:
|
|
409
|
+
# print(f"⚠️ Lock was claimed by `{locking_machine}` for more than an hour. Something wrong happened there. Resetting the lock!")
|
|
410
|
+
# self.reset_lock()
|
|
411
|
+
# return self.claim_lock(first_call=False)
|
|
412
|
+
# print(f"CloudManager: Lock already claimed by `{locking_machine}`. 🤷♂️")
|
|
413
|
+
# wait = int(random.random() * 30)
|
|
414
|
+
# print(f"💤 sleeping for {wait} seconds and trying again.")
|
|
415
|
+
# time.sleep(wait)
|
|
416
|
+
# return self.claim_lock(first_call=False)
|
|
417
|
+
|
|
418
|
+
# if locking_machine == this_machine: print("Lock already claimed by this machine. 🤭")
|
|
419
|
+
# elif locking_machine == "": print("No claims on lock, claiming it ... 🙂")
|
|
420
|
+
# else: raise ValueError("Unexpected value of lock_data at this point of code.")
|
|
421
|
+
|
|
422
|
+
# path.joinpath("lock.txt").write_text(this_machine).to_cloud(cloud=self.cloud, rel2home=True, verbose=False)
|
|
423
|
+
# counter: int = 1
|
|
424
|
+
# while counter < self.num_claim_checks:
|
|
425
|
+
# lock_path_tmp = path.joinpath("lock.txt").from_cloud(cloud=self.cloud, rel2home=True, verbose=False)
|
|
426
|
+
# assert lock_path_tmp is not None
|
|
427
|
+
# lock_data_tmp = lock_path_tmp.read_text()
|
|
428
|
+
# if lock_data_tmp != this_machine:
|
|
429
|
+
# print(f"CloudManager: Lock already claimed by `{lock_data_tmp}`. 🤷♂️")
|
|
430
|
+
# print(f"sleeping for {self.inter_check_interval_sec} seconds and trying again.")
|
|
431
|
+
# time.sleep(self.inter_check_interval_sec)
|
|
432
|
+
# return self.claim_lock(first_call=False)
|
|
433
|
+
# counter += 1
|
|
434
|
+
# print(f"‼️ Claim laid, waiting for 10 seconds and checking if this is challenged: #{counter}-{self.num_claim_checks} ❓")
|
|
435
|
+
# time.sleep(10)
|
|
436
|
+
# CloudManager.base_path.expanduser().sync_to_cloud(cloud=self.cloud, rel2home=True, verbose=False, sync_down=True)
|
|
437
|
+
# print("✅ Lock Claimed 🔒")
|
|
438
|
+
# self.lock_claimed = True
|
|
439
|
+
|
|
440
|
+
# def release_lock(self):
|
|
441
|
+
# if not self.lock_claimed:
|
|
442
|
+
# print("⚠️ Lock is not claimed, nothing to release.")
|
|
443
|
+
# return
|
|
444
|
+
# print("Releasing Lock")
|
|
445
|
+
# path = CloudManager.base_path.expanduser()
|
|
446
|
+
# path.mkdir(parents=True, exist_ok=True)
|
|
447
|
+
# lock_path = path.joinpath("lock.txt").from_cloud(cloud=self.cloud, rel2home=True, verbose=False)
|
|
448
|
+
# if lock_path is None:
|
|
449
|
+
# print("Lock doesn't exist on remote, uploading for the first time.")
|
|
450
|
+
# path.joinpath("lock.txt").write_text("").to_cloud(cloud=self.cloud, rel2home=True, verbose=False)
|
|
451
|
+
# self.lock_claimed = False
|
|
452
|
+
# return NoReturn
|
|
453
|
+
# data = lock_path.read_text()
|
|
454
|
+
# this_machine = f"{getpass.getuser()}@{platform.node()}"
|
|
455
|
+
# if data != this_machine:
|
|
456
|
+
# raise ValueError(f"CloudManager: Lock already claimed by `{data}`. 🤷♂️ Can't release a lock not owned! This shouldn't happen. Consider increasing trails before confirming the claim.")
|
|
457
|
+
# # self.lock_claimed = False
|
|
458
|
+
# path.joinpath("lock.txt").write_text("")
|
|
459
|
+
# CloudManager.base_path.expanduser().sync_to_cloud(cloud=self.cloud, rel2home=True, verbose=False, sync_up=True) # .to_cloud(cloud=self.cloud, rel2home=True, verbose=False)
|
|
460
|
+
# self.lock_claimed = False
|
|
461
|
+
# return NoReturn
|