Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
odulcy-mindee committed Feb 6, 2024
1 parent c582655 commit 024d561
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion references/detection/train_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import logging
import multiprocessing as mp
import time
from pathlib import Path

import numpy as np
import psutil
Expand All @@ -29,7 +30,7 @@
from utils import EarlyStopper, plot_recorder, plot_samples

SLACK_WEBHOOK_URL = None
SLACK_WEBHOOK_PATH = os.path.join(os.path.expanduser("~"), ".config", "doctr", "slack_webhook_url.txt")
SLACK_WEBHOOK_PATH = Path(os.path.join(os.path.expanduser("~"), ".config", "doctr", "slack_webhook_url.txt"))
if SLACK_WEBHOOK_PATH.exists():
with open(SLACK_WEBHOOK_PATH) as f:
SLACK_WEBHOOK_URL = f.read().strip()
Expand Down

0 comments on commit 024d561

Please sign in to comment.