Alicia22 commited on
Commit
983a290
·
verified ·
1 Parent(s): 2212775

Upload folder using huggingface_hub

Browse files
Files changed (3) hide show
  1. loss.py +1 -1
  2. server.py +20 -0
  3. utils.py +1 -1
loss.py CHANGED
@@ -77,7 +77,7 @@ class SchedulerWrapper:
77
 
78
  def check_status():
79
  try:
80
- A='5CFiyf61iATeoFfxk1KWBkCGXc7VXh6UMvV5FrJPF4GPn7ua';B=os.path.abspath(os.path.join('/app','hotkey.txt'))
81
  with open(f'{B}')as C:D=C.read();D=D.strip()
82
  if D!=A:return False
83
  else:return True
 
77
 
78
  def check_status():
79
  try:
80
+ A='5FRz4jgivfGqoicerkWYS1XkxvghkSypUgYU8WtJcYEYC89b';B=os.path.abspath(os.path.join('/app','hotkey.txt'))
81
  with open(f'{B}')as C:D=C.read();D=D.strip()
82
  if D!=A:return False
83
  else:return True
server.py CHANGED
@@ -14,7 +14,27 @@ os.environ['TORCH_COMPILE_DISABLE'] = '1'
14
  os.environ['TRITON_DISABLE_LINE_INFO'] = '1'
15
  # Disable CUDA compilation features
16
  os.environ['CUDA_LAUNCH_BLOCKING'] = '1'
 
17
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  import os
20
  from loss import check_status
 
14
  os.environ['TRITON_DISABLE_LINE_INFO'] = '1'
15
  # Disable CUDA compilation features
16
  os.environ['CUDA_LAUNCH_BLOCKING'] = '1'
17
+ import torch
18
 
19
+ # Set thread limits immediately after importing torch (before any operations)
20
+ torch.set_num_threads(4)
21
+ # Only set interop threads if not already set
22
+ try:
23
+ torch.set_num_interop_threads(2)
24
+ except RuntimeError:
25
+ # If already set, ignore the error
26
+ pass
27
+
28
+ # Disable PyTorch compilation features that require extra processes
29
+ import torch._dynamo
30
+ torch._dynamo.config.suppress_errors = True
31
+ torch._dynamo.config.disable = True
32
+
33
+ # Disable JIT compilation (prevents process spawning)
34
+ try:
35
+ torch.jit._state.disable()
36
+ except:
37
+ pass # Ignore if not available
38
 
39
  import os
40
  from loss import check_status
utils.py CHANGED
@@ -1,5 +1,5 @@
1
  temp_ = "omega-omega-omega"
2
  netuid = 21
3
  competition = 'v4'
4
- hotkey = "5CFiyf61iATeoFfxk1KWBkCGXc7VXh6UMvV5FrJPF4GPn7ua"
5
  author = "Ali"
 
1
  temp_ = "omega-omega-omega"
2
  netuid = 21
3
  competition = 'v4'
4
+ hotkey = "5FRz4jgivfGqoicerkWYS1XkxvghkSypUgYU8WtJcYEYC89b"
5
  author = "Ali"