Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Supervisely version to v6.73.100 #214

Merged
merged 8 commits into from
Jun 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,32 +1,43 @@
name: Supervisely Build and Push Image Manual
name: Docker Image Build

on:
workflow_dispatch:
inputs:
tag_version:
description: 'Docker Image Tag'
description: 'Docker Image Tag (without "v")'
required: true
default: ''

jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: false
swap-storage: true
-
name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
-
name: Login to DockerHub
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v3
uses: docker/build-push-action@v5
with:
push: true
file: Dockerfile
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/manual-build-push-docker-image.yml

This file was deleted.

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,
)