Skip to content

Commit

Permalink
Merge pull request advimman#163 from calpt/main
Browse files Browse the repository at this point in the history
Don't set debug signal handler on Windows
  • Loading branch information
senya-ashukha authored Nov 18, 2023
2 parents ee58655 + b311798 commit 5e921c0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
3 changes: 2 additions & 1 deletion bin/predict.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
@hydra.main(config_path='../configs/prediction', config_name='default.yaml')
def main(predict_config: OmegaConf):
try:
register_debug_signal_handlers() # kill -10 <pid> will result in traceback dumped into log
if sys.platform != 'win32':
register_debug_signal_handlers() # kill -10 <pid> will result in traceback dumped into log

device = torch.device(predict_config.device)

Expand Down
3 changes: 2 additions & 1 deletion bin/predict_inner_features.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
@hydra.main(config_path='../configs/prediction', config_name='default_inner_features.yaml')
def main(predict_config: OmegaConf):
try:
register_debug_signal_handlers() # kill -10 <pid> will result in traceback dumped into log
if sys.platform != 'win32':
register_debug_signal_handlers() # kill -10 <pid> will result in traceback dumped into log

device = torch.device(predict_config.device)

Expand Down
3 changes: 2 additions & 1 deletion bin/to_jit.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ def forward(self, image, mask):

@hydra.main(config_path="../configs/prediction", config_name="default.yaml")
def main(predict_config: OmegaConf):
register_debug_signal_handlers() # kill -10 <pid> will result in traceback dumped into log
if sys.platform != 'win32':
register_debug_signal_handlers() # kill -10 <pid> will result in traceback dumped into log

train_config_path = os.path.join(predict_config.model.path, "config.yaml")
with open(train_config_path, "r") as f:
Expand Down
3 changes: 2 additions & 1 deletion bin/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ def main(config: OmegaConf):
try:
need_set_deterministic = handle_deterministic_config(config)

register_debug_signal_handlers() # kill -10 <pid> will result in traceback dumped into log
if sys.platform != 'win32':
register_debug_signal_handlers() # kill -10 <pid> will result in traceback dumped into log

is_in_ddp_subprocess = handle_ddp_parent_process()

Expand Down

0 comments on commit 5e921c0

Please sign in to comment.