Skip to content

Commit

Permalink
Update Supervisely version to v6.73.100 (#214)
Browse files Browse the repository at this point in the history
* update train

* add reqs

* fix typo

* update train

* update train

* update train

* update build action

* update docker
  • Loading branch information
cxnt committed Jun 10, 2024
1 parent 5ddf66b commit 0b7b9f8
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
4 changes: 3 additions & 1 deletion dev_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# git+https://github.com/supervisely/supervisely.git@test-branch

# pip install -r requirements.txt
supervisely==6.73.95
supervisely==6.73.100

opencv-python-headless==4.5.5.62
opencv-python==4.5.5.62
Expand Down
2 changes: 1 addition & 1 deletion supervisely/serve/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"serve"
],
"description": "Deploy model as REST API service",
"docker_image": "supervisely/yolov5:1.0.3",
"docker_image": "supervisely/yolov5:1.0.4",
"instance_version": "6.8.88",
"entrypoint": "python -m uvicorn main:m.app --app-dir ./supervisely/serve/src --host 0.0.0.0 --port 8000 --ws websockets",
"port": 8000,
Expand Down
2 changes: 1 addition & 1 deletion supervisely/train/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"train"
],
"description": "Dashboard to configure and monitor training",
"docker_image": "supervisely/yolov5:1.0.3",
"docker_image": "supervisely/yolov5:1.0.4",
"min_instance_version": "6.8.70",
"main_script": "supervisely/train/src/sly_train.py",
"gui_template": "supervisely/train/src/gui.html",
Expand Down
11 changes: 10 additions & 1 deletion supervisely/train/src/sly_train_globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import sys
import yaml
import supervisely as sly
from supervisely.nn.artifacts.yolov5 import YOLOv5
from supervisely.app.v1.app_service import AppService
from dotenv import load_dotenv

Expand Down Expand Up @@ -54,6 +55,14 @@
experiment_name = str(task_id)
local_artifacts_dir = os.path.join(runs_dir, experiment_name)
sly.logger.info(f"All training artifacts will be saved to local directory {local_artifacts_dir}")
remote_artifacts_dir = os.path.join("/yolov5_train", project_info.name, experiment_name)

sly_yolov5 = YOLOv5(team_id)
framework_dir = sly_yolov5.framework_folder

remote_artifacts_dir = os.path.join(framework_dir, project_info.name, experiment_name)
remote_artifacts_dir = api.file.get_free_dir_name(team_id, remote_artifacts_dir)

remote_weights_dir = sly_yolov5.get_weights_path(remote_artifacts_dir)
remote_weights_dir = api.file.get_free_dir_name(team_id, remote_artifacts_dir)

sly.logger.info(f"After training artifacts will be uploaded to Team Files: {remote_artifacts_dir}")
14 changes: 13 additions & 1 deletion supervisely/train/src/sly_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,16 @@ def _gen_message(current, total):
globals.api.file.upload(globals.team_id, local_path, remote_path,
lambda monitor: progress_cb(progress_last + monitor.bytes_read))
progress.message = _gen_message(idx + 1, len(local_files))
time.sleep(0.5)
time.sleep(0.5)

# generate metadata
globals.sly_yolov5.generate_metadata(
app_name=globals.sly_yolov5.app_name,
task_id=globals.experiment_name,
artifacts_folder=globals.remote_artifacts_dir,
weights_folder=globals.remote_weights_dir,
weights_ext=globals.sly_yolov5.weights_ext,
project_name=globals.project_info.name,
task_type=globals.sly_yolov5.task_type,
config_path=None,
)

0 comments on commit 0b7b9f8

Please sign in to comment.