suchirsalhan commited on
Commit
c203e21
·
verified ·
1 Parent(s): 99771e8

Upload code/ma_common.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. code/ma_common.py +7 -0
code/ma_common.py CHANGED
@@ -9,7 +9,14 @@ for v in ("OMP_NUM_THREADS","MKL_NUM_THREADS","OPENBLAS_NUM_THREADS","NUMEXPR_NU
9
  os.environ.setdefault(v, "8")
10
  os.environ.setdefault("TOKENIZERS_PARALLELISM", "false")
11
  os.environ.setdefault("HF_HOME", "/root/hf_cache_mergeacc")
 
 
 
 
 
12
  sys.path.insert(0, "/root/mergeability/src")
 
 
13
  sys.path.insert(0, "/root/merge-accuracy")
14
  import numpy as np
15
  import torch
 
9
  os.environ.setdefault(v, "8")
10
  os.environ.setdefault("TOKENIZERS_PARALLELISM", "false")
11
  os.environ.setdefault("HF_HOME", "/root/hf_cache_mergeacc")
12
+ # VENDORED SNAPSHOT of mergeschool.core. /root/mergeability is another agent's live working tree
13
+ # and it is being edited concurrently -- two runs of this study died mid-flight with
14
+ # "ImportError: cannot import name 'merge' from 'mergeschool.core' (unknown location)" while its
15
+ # package __init__ was mid-rewrite. We take a frozen copy at /root/merge-accuracy/vendor and fall
16
+ # back to the original only if the copy is missing. /root/mergeability is never written to.
17
  sys.path.insert(0, "/root/mergeability/src")
18
+ if os.path.isdir("/root/merge-accuracy/vendor/mergeschool"):
19
+ sys.path.insert(0, "/root/merge-accuracy/vendor")
20
  sys.path.insert(0, "/root/merge-accuracy")
21
  import numpy as np
22
  import torch