Skip to content

Commit

Permalink
hostname override
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexis-BX committed Feb 4, 2024
1 parent 0bc6213 commit 19d3f63
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions robin/train/train_mem.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,12 @@
USE_FLASH_ATTN_2 = False

if __name__ == "__main__":
hostname = os.environ.get('HOSTNAME') if os.environ.get('HOSTNAME') != None else os.uname()[1]
if hostname == None: hostname = os.environ.get('HOST_NAME')

hostname = os.environ.get('HOST_NAME')
if hostname == None:
hostname = os.environ.get('HOSTNAME')
if hostname == None:
hostname = os.uname()[1]

print('Running on cluster:', end=' ')
match hostname.lower():
case x if 'frontier' in x:
Expand Down

0 comments on commit 19d3f63

Please sign in to comment.