Skip to content

Commit

Permalink
V2 stop (#18)
Browse files Browse the repository at this point in the history
* disable whatcher on shutdown

* upd sdk

* added logger to whatcher

* start train in thread

* added stop callback on train

* added stop event on validation

* beautify

* rename

* added checkpoints dir
  • Loading branch information
TheoLisin authored Nov 11, 2023
1 parent f542e26 commit f181fcc
Show file tree
Hide file tree
Showing 5 changed files with 178 additions and 64 deletions.
3 changes: 2 additions & 1 deletion train/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
src/__pycache__/
local.env
tempfiles/
tempfiles/
runs/
3 changes: 2 additions & 1 deletion train/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
supervisely==6.72.110
supervisely==6.72.182
# git+https://github.com/supervisely/supervisely.git@v2-stop
ultralytics==8.0.112
--extra-index-url https://download.pytorch.org/whl/cu113
torch==1.10.1+cu113
Expand Down
5 changes: 4 additions & 1 deletion train/src/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@

if sly.is_production():
app_session_id = sly.io.env.task_id()
root_model_checkpoint_dir = sly.app.get_synced_data_dir()
else:
app_session_id = 777 # for debug
root_model_checkpoint_dir = os.path.join(app_root_directory, "runs")


det_models_data_path = os.path.join(root_source_path, "models", "det_models_data.json")
seg_models_data_path = os.path.join(root_source_path, "models", "seg_models_data.json")
Expand All @@ -29,4 +32,4 @@
train_params_filepath = "training_params.yml" # for debug
train_counter, val_counter = 0, 0
center_matches = {}
keypoints_template = None
keypoints_template = None
Loading

0 comments on commit f181fcc

Please sign in to comment.