Skip to content

Commit

Permalink
Update precook script and precooked ouptuts
Browse files Browse the repository at this point in the history
Ensure precooked values are fixed to what we want
  • Loading branch information
graeme-of-cern committed May 3, 2024
1 parent ccdd02b commit 53ce205
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 7 deletions.
10 changes: 6 additions & 4 deletions package/scripts/precook_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,21 +95,23 @@ def make_net(proc_net, fixed_value, rand=False):

def make_nvidia(proc_nvidia, fixed_value, rand=False):
# idx
print(proc_nvidia, fixed_value, rand)
smi_fname = os.path.join(proc_nvidia, "smi")
memory_lim = 100
pct_lim = 100
memory_lim = 10000
with open(smi_fname, "w") as f:
params = [
0, # idx
pid, # pid
"G", # type
random.randint(0, memory_lim) if rand else fixed_value, # sm
random.randint(0, memory_lim) if rand else fixed_value, # mem
random.randint(0, pct_lim) if rand else fixed_value, # sm
random.randint(0, pct_lim) if rand else fixed_value, # mem
# The following are not monitored metrics
"-", # enc
"-", # dec
"-", # jpg
"-", # ofa
random.randint(0, memory_lim*100) if rand else fixed_value, # fb
random.randint(0, memory_lim) if rand else fixed_value, # fb
0, # ccpm
"python3", # command
]
Expand Down
2 changes: 1 addition & 1 deletion package/scripts/precooked_tests/drop/1/nvidia/smi
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0 1729 G 86 53 - - - - 9077 0 python3
0 1729 G 50 50 - - - - 50 0 python3
2 changes: 1 addition & 1 deletion package/scripts/precooked_tests/drop/2/nvidia/smi
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0 1729 G 17 93 - - - - 4374 0 python3
0 1729 G 100 100 - - - - 100 0 python3
2 changes: 1 addition & 1 deletion package/scripts/precooked_tests/drop/3/nvidia/smi
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0 1729 G 2 69 - - - - 4629 0 python3
0 1729 G 20 20 - - - - 20 0 python3

0 comments on commit 53ce205

Please sign in to comment.