Skip to content

Commit

Permalink
format with black
Browse files Browse the repository at this point in the history
  • Loading branch information
yuema137 committed Oct 30, 2024
1 parent 9b471de commit 17619bc
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions utilix/batchq.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from simple_slurm import Slurm # type: ignore
from . import logger


# Get the SERVER type
def get_server_type():
hostname = os.uname().nodename
Expand All @@ -23,7 +24,8 @@ def get_server_type():
raise ValueError(
f"Unknown server type for hostname {hostname}. Please use midway2, midway3, or dali."
)



SERVER = get_server_type()

USER: Optional[str] = os.environ.get("USER")
Expand All @@ -33,10 +35,10 @@ def get_server_type():
SCRATCH_DIR: str = os.environ.get("SCRATCH", ".")
# for non-dali hosts, SCRATCH_DIR must have write permission
if not os.access(SCRATCH_DIR, os.W_OK) and SERVER != "Dali":
raise ValueError(
f"SCRATCH_DIR {SCRATCH_DIR} does not have write permission. "
"You may need to set SCRATCH_DIR manually in your .bashrc or .bash_profile."
)
raise ValueError(
f"SCRATCH_DIR {SCRATCH_DIR} does not have write permission. "
"You may need to set SCRATCH_DIR manually in your .bashrc or .bash_profile."
)

PARTITIONS: List[str] = [
"dali",
Expand Down

0 comments on commit 17619bc

Please sign in to comment.