-
Notifications
You must be signed in to change notification settings - Fork 541
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* working expanded queue * added event * updated testing and bug fixes * fixed missed space * formatting fix * fixed setting up status + enabled spot * format * fixed setting up test * addressed comments * change stop lock range * error message for needing update * removed wandb.py * added skylet restart * updates * addressed comments * formatting + minor comment addressing * more comments addressed * Fix rich status * fixed stalling issue * format * small test bug * fixed skylet launch issue * formatting + forgetten file * more formatting + remove check * addressed comments and removed pkill usage * schedule after setup too * Update sky/backends/cloud_vm_ray_backend.py Co-authored-by: Zhanghao Wu <[email protected]> * addressed more comments * formatting * Address comments * faster job scheduling * format * Fix cancellation logic * Don't schedule a job after reboot * add comment * revert changes in test * Add test for cancelling pending jobs * Make update job status more readable * schedule more frequently for job cancelling --------- Co-authored-by: Zhanghao Wu <[email protected]>
- Loading branch information
1 parent
03e097d
commit f431fc6
Showing
8 changed files
with
369 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
"""Restarts skylet if version does not match""" | ||
|
||
import os | ||
import subprocess | ||
|
||
from sky.skylet import constants | ||
|
||
VERSION_FILE = os.path.expanduser(constants.SKYLET_VERSION_FILE) | ||
|
||
|
||
def restart_skylet(): | ||
# Kills old skylet if it is running | ||
subprocess.run( | ||
'ps aux | grep "sky.skylet.skylet" | grep "python3 -m"' | ||
'| awk \'{print $2}\' | xargs kill >> ~/.sky/skylet.log 2>&1', | ||
shell=True, | ||
check=False) | ||
subprocess.run( | ||
'nohup python3 -m sky.skylet.skylet' | ||
' >> ~/.sky/skylet.log 2>&1 &', | ||
shell=True, | ||
check=True) | ||
with open(VERSION_FILE, 'w') as v_f: | ||
v_f.write(constants.SKYLET_VERSION) | ||
|
||
|
||
proc = subprocess.run( | ||
'ps aux | grep -v "grep" | grep "sky.skylet.skylet" | grep "python3 -m"', | ||
shell=True, | ||
check=False) | ||
|
||
running = (proc.returncode == 0) | ||
|
||
version_match = False | ||
if os.path.exists(VERSION_FILE): | ||
with open(VERSION_FILE) as f: | ||
if f.read().strip() == constants.SKYLET_VERSION: | ||
version_match = True | ||
|
||
if not running or not version_match: | ||
restart_skylet() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.