<commit_before># Default configuration file for qtop.
# DO NOT OVERWRITE this file with your own settings. Instead, 
# create a new qtopconf.yaml in ~/.local/qtop/
# IMPORTANT: a blank line MUST be left after every line of *python code*.

# scheduler possible values (currently supported): pbs, oar, sge
# auto will try to detect available batch commands in the current system
scheduler: auto

# where to save output from batch commands and their conversion to yaml
savepath: /tmp/qtop_results_$USER

# batch commands, filenames to save their output in
# If user sets a sourcedir, qtop expects to find the respective
# filenames below, minus the _pid.
schedulers:
  pbs:
    pbsnodes_file: %(savepath)s/pbsnodes_a%(pid)s.txt, pbsnodes -a
    qstatq_file: %(savepath)s/qstat_q%(pid)s.txt, qstat -q
    qstat_file: %(savepath)s/qstat%(pid)s.txt, qstat
  oar:
    oarnodes_s_file: %(savepath)s/oarnodes_s_Y%(pid)s.txt, oarnodes -s -Y
    oarnodes_y_file: %(savepath)s/oarnodes_Y%(pid)s.txt, oarnodes -Y
    oarstat_file: %(savepath)s/oarstat%(pid)s.txt, oarstat
  sge:
    sge_file: %(savepath)s/qstat%(pid)s.F.xml.stdout, qstat -F -xml -u '*'
  demo:
    demo_file: %(savepath)s/demo%(pid)s.txt, echo 'Demo here'

signature_commands:  # commands used to uniquely identify the scheduler installed
  pbs: pbsnodes
  oar: oarnodes
  sge: qacct
  demo: echo

# Utilises lxml module. Needs to be installed in your system.
# Might result in segmentation fault in some systems.
faster_xml_parsing: False

# Meaning of queue state abbreviations
state_abbreviations:
  pbs:
    Q: queued_of_user
    R: running_of_user
    C: cancelled_of_user
    E: exiting_of_user
    W: waiting_of_user
  oar:
    E: Error
    F: Finishing
    S: Resuming
    H: Hold
    L: waiting_of_user
    W: queued_of_user
    R: running_of_user
    T: exiting_of_user
    S: cancelled_of_user
  sge:
    # ref: http://www.softpanorama.org/HPC/Grid_engine/Reference/qstat.shtml
    r: running_of_user
    E: exiting_of_user  # not real
    qw: queued_of_user
    C: cancelled_of_user  # not real
    W: waiting_of_user  # not real
    R: restarting_of_user
    Eqw: Eqw_of_user
    hqw: hold_of_user
    t: transferring_of_user
    T: threshold_reached
    ht: ht_of_user
    dr: job_ending_of_user
    dt: dt_of_user
    dht: dht_of_user
    s: suspended_of_user
    S: suspended_by_the_queue
    shite: testing_of_user
    Rs: suspended_of_user
    Rq: queued_of_user
    Rt: transferring_of_user
    Rr: running_of_user    
  pbs:
    Q: queued_of_user
    R: running_of_user
    C: cancelled_of_user
    E: exiting_of_user
    W: waiting_of_user
    H: holding_of_user
  demo:
    Q: queued_of_user
    R: running_of_user
    C: cancelled_of_user
    E: exiting_of_user
    W: waiting_of_user

# original OAR abbreviations:
# state_abbreviations = {
#     'W': 'Waiting',
#     'L': 'toLaunch',
#     'L': 'Launching',
#     'H': 'Hold',
#     'R': 'Running',
#     'T': 'Terminated',
#     'E': 'Error',
#     'E': 'toError',
#     'F': 'Finishing',
#     'S': 'Suspended',
#     'S': 'Resuming',
#     'W': 'toAckReservation',
# }

percentage: 0.8 # if less than PERCENTAGE x 100% of the matrices have jobs, perform a blind remap
possible_ids: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz # IDs of unix accounts, for the lower part of qtop
non_existent_node_symbol: #
# Term size is autodetected. If that fails, a value is read from here.
# If commented out, will get a fallback_terms_size from within constants.py
#term_size: [53, 176]
#term_size: [53, 126]  # for smaller screens, namely 1366 x 768
user_color_mappings:  # order should be from more generic-->more specific
# - \w+: Gray_D  # enabling this cancels all saved accounts in colormap.py
# - [\d]+: Gray_D
# - [A-Za-z]+0\d{2}: Red_L
# - [A-Za-z]+15\d: Gray_D
# - \w*lhc\w*: Cyan_L
# - \w+00\d: Blue
# - \w*cms\w*: Red_L
 - \w*cms048: Blue
 - \w*cms193: Gray_L
 - \w*atl\w+: Red
 - snielsen: Blue
 - ekalesaki: Cyan_L
 - zzhang: Red_L
 - mmravlak: Red_L
 - dbobbili: Cyan_L
 - patls021: Cyan_L

queue_color_mappings:
  - alice: Red_L
  - dteam\w+: Cyan_L

nodestate_color_mappings:
 - au: BlackOnRed
 - d: Red_LOnGrayBG

# if cluster numbering should start on a number # above this, do automatic blind remapping
exotic_starting_wn_nr: 9000
remapping:
# - "([A-Za-z]+)([1-9]|[1-9][0-9]|[0-9][0-9][0-9])$": |
#     lambda m: m.group(1)+str(int(m.group(2))+250)
     # e.g. wn100 --> wn350, wn101 --> wn351 and so on
# - 'torvalds(\d+)': 'tor\1'
# - 'gridlab(\d+)': 'glab\1'
# - 'gridmon(\d*)': 'mon\1'
 - '(.*?)cluster(.*?)': \1-\2  # remove "cluster" word from all node names
# WARNING: not working properly in native yaml parser
# - -: ""  # removes dashes for shortening (can also replace them with something else, e.g. _

sorting:  # this is here so that you can customise it to your heart's delight!!
  user_sort: |
      lambda d: (
      d['np'], # sort by number of cores
      ord(d['domainname'][0]), # sort by first letter
      len(d['domainname'].split('.', 1)[0].split('-')[0]),  # by name?
      int(re.sub(r'[A-Za-z _.-]+', '', d['domainname']) or "0"),
      )

  reverse: False

filtering:
 # - list_out_by_node_state: ['hqw','au']
 # - list_out: [3,4]
  # - list_in_by_name: ['da-p8-02',]
 # - list_out_by_name: ['da-p8-03',]
  # - list_out_by_name: [gaia-74, gaia-73, gaia-81, gaia-80, gaia-87, gaia-75, gaia-77, gaia-76, gaia-79, gaia-78]
 # - list_out_by_name_pattern:  ['^da-p6','^da-p7']
   # - ^da-p4
   # - p5
   # - ^da-p8
   # - ^da-p6

# what parts of qtop to display
user_display_parts:
 - job_accounting_summary
 - workernodes_matrix
 - user_accounts_pool_mappings

#wn_occupancy:
# - wn id lines
# - node state
# - temperature
# - core_user_map

# character used for vertical separator in WN occupancy matrix
vertical_separator: '|'
# Put vertical_separator every X columns.
vertical_separator_every_X_columns: 0
# Put vertical_separator in case of overspill (SGE systems only).
separator_after_overspill: True
# TODO (not implemented)
overspill_separator: '*'

workernodes_matrix:
 - wn id lines:<commit_msg>fixes in the yaml file<commit_after># Default configuration file for qtop.
# DO NOT OVERWRITE this file with your own settings. Instead, 
# create a new qtopconf.yaml in ~/.local/qtop/
# IMPORTANT: a blank line MUST be left after every line of *python code*.

# scheduler possible values (currently supported): pbs, oar, sge
# auto will try to detect available batch commands in the current system
scheduler: auto

# where to save output from batch commands and their conversion to yaml
savepath: /tmp/qtop_results_$USER

# batch commands, filenames to save their output in
# If user sets a sourcedir, qtop expects to find the respective
# filenames below, minus the _pid.
schedulers:
  pbs:
    pbsnodes_file: %(savepath)s/pbsnodes_a%(pid)s.txt, pbsnodes -a
    qstatq_file: %(savepath)s/qstat_q%(pid)s.txt, qstat -q
    qstat_file: %(savepath)s/qstat%(pid)s.txt, qstat
  oar:
    oarnodes_s_file: %(savepath)s/oarnodes_s_Y%(pid)s.txt, oarnodes -s -Y
    oarnodes_y_file: %(savepath)s/oarnodes_Y%(pid)s.txt, oarnodes -Y
    oarstat_file: %(savepath)s/oarstat%(pid)s.txt, oarstat
  sge:
    sge_file: %(savepath)s/qstat%(pid)s.F.xml.stdout, qstat -F -xml -u '*'
  demo:
    demo_file: %(savepath)s/demo%(pid)s.txt, echo 'Demo here'

signature_commands:  # commands used to uniquely identify the scheduler installed
  pbs: pbsnodes
  oar: oarnodes
  sge: qacct
  demo: echo

# Utilises lxml module. Needs to be installed in your system.
# Might result in segmentation fault in some systems.
faster_xml_parsing: False

# Meaning of queue state abbreviations
state_abbreviations:
  pbs:
    Q: queued_of_user
    R: running_of_user
    C: cancelled_of_user
    E: exiting_of_user
    W: waiting_of_user
  oar:
    E: Error
    F: Finishing
    S: Resuming
    H: Hold
    L: waiting_of_user
    W: queued_of_user
    R: running_of_user
    T: exiting_of_user
    S: cancelled_of_user
  sge:
    # ref: http://www.softpanorama.org/HPC/Grid_engine/Reference/qstat.shtml
    r: running_of_user
    E: exiting_of_user  # not real
    qw: queued_of_user
    C: cancelled_of_user  # not real
    W: waiting_of_user  # not real
    R: restarting_of_user
    Eqw: Eqw_of_user
    hqw: hold_of_user
    t: transferring_of_user
    T: threshold_reached
    ht: ht_of_user
    dr: job_ending_of_user
    dt: dt_of_user
    dht: dht_of_user
    s: suspended_of_user
    S: suspended_by_the_queue
    shite: testing_of_user
    Rs: suspended_of_user
    Rq: queued_of_user
    Rt: transferring_of_user
    Rr: running_of_user    
  pbs:
    Q: queued_of_user
    R: running_of_user
    C: cancelled_of_user
    E: exiting_of_user
    W: waiting_of_user
    H: holding_of_user
  demo:
    Q: queued_of_user
    R: running_of_user
    C: cancelled_of_user
    E: exiting_of_user
    W: waiting_of_user

# original OAR abbreviations:
# state_abbreviations = {
#     'W': 'Waiting',
#     'L': 'toLaunch',
#     'L': 'Launching',
#     'H': 'Hold',
#     'R': 'Running',
#     'T': 'Terminated',
#     'E': 'Error',
#     'E': 'toError',
#     'F': 'Finishing',
#     'S': 'Suspended',
#     'S': 'Resuming',
#     'W': 'toAckReservation',
# }

percentage: 0.8 # if less than PERCENTAGE x 100% of the matrices have jobs, perform a blind remap
possible_ids: 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz # IDs of unix accounts, for the lower part of qtop
non_existent_node_symbol: #
# Term size is autodetected. If that fails, a value is read from here.
# If commented out, will get a fallback_terms_size from within constants.py
#term_size: [53, 176]
#term_size: [53, 126]  # for smaller screens, namely 1366 x 768
user_color_mappings:  # order should be from more generic-->more specific
# - \w+: Gray_D  # enabling this cancels all saved accounts in colormap.py
# - [\d]+: Gray_D
# - [A-Za-z]+0\d{2}: Red_L
# - [A-Za-z]+15\d: Gray_D
# - \w*lhc\w*: Cyan_L
# - \w+00\d: Blue
# - \w*cms\w*: Red_L
 - \w*cms048: Blue
 - \w*cms193: Gray_L
 - \w*atl\w+: Red
 - snielsen: Blue
 - ekalesaki: Cyan_L
 - zzhang: Red_L
 - mmravlak: Red_L
 - dbobbili: Cyan_L
 - patls021: Cyan_L

queue_color_mappings:
  - alice: Red_L
  - dteam\w+: Cyan_L

nodestate_color_mappings:
 - au: BlackOnRed
 - d: Red_LOnGrayBG

# if cluster numbering should start on a number # above this, do automatic blind remapping
exotic_starting_wn_nr: 9000
remapping:
# - "([A-Za-z]+)([1-9]|[1-9][0-9]|[0-9][0-9][0-9])$": |
#     lambda m: m.group(1)+str(int(m.group(2))+250)
     # e.g. wn100 --> wn350, wn101 --> wn351 and so on
# - torvalds(\d+): tor\1
# - gridlab(\d+): glab\1
# - gridmon(\d*): mon\1
 # - ^da-(.*?): ca\1
 # - (.*?)cluster(.*?): \1-\2  # remove "cluster" word from all node names
# WARNING: not working properly in native yaml parser
# - -: ""  # removes dashes for shortening (can also replace them with something else, e.g. _

sorting:  # this is here so that you can customise it to your heart's delight!!
  user_sort: |
      lambda d: (
      d['np'], # sort by number of cores
      ord(d['domainname'][0]), # sort by first letter
      len(d['domainname'].split('.', 1)[0].split('-')[0]),  # by name?
      int(re.sub(r'[A-Za-z _.-]+', '', d['domainname']) or "0"),
      )

  reverse: False

filtering:
 # - list_out_by_node_state: ['hqw','au']
 # - list_out: [3,4]
 # - list_in_by_name: ['da-p8-02',]
 # - list_out_by_name: ['da-p8-03',]
 # - list_out_by_name: [gaia-74, gaia-73, gaia-81, gaia-80, gaia-87, gaia-75, gaia-77, gaia-76, gaia-79, gaia-78]
 # - list_out_by_name_pattern:  ['^da-p6','^da-p7']
   # - ^da-p4
   # - p5
   # - ^da-p8
   # - ^da-p6

# what parts of qtop to display
user_display_parts:
 - job_accounting_summary
 - workernodes_matrix
 - user_accounts_pool_mappings

#wn_occupancy:
# - wn id lines
# - node state
# - temperature
# - core_user_map

# character used for vertical separator in WN occupancy matrix
vertical_separator: '|'
# Put vertical_separator every X columns.
vertical_separator_every_X_columns: 0
# Put vertical_separator in case of overspill (SGE systems only).
separator_after_overspill: True
# TODO (not implemented)
overspill_separator: '*'

workernodes_matrix:
 - wn id lines:
{'fraction_non_alphanumeric': 0.12709084945883897, 'fraction_numerical': 0.020580518202689406, 'mean_word_length': 3.4792508262945283, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 8}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5724330', 'n_tokens_mistral': 5016, 'n_tokens_neox': 4744, 'n_words': 1237}