Skip to content

Commit

Permalink
small updates, disable log for agent
Browse files Browse the repository at this point in the history
  • Loading branch information
almazgimaev committed Jan 9, 2024
1 parent da65478 commit 4b1aaa8
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions src/convert_sly_to_yolov5.py
Original file line number Diff line number Diff line change
@@ -1,28 +1,21 @@
import os
import sys
import yaml

from dotenv import load_dotenv

import supervisely as sly
from supervisely.app.v1.app_service import AppService

# debug mode
# app_root_directory = os.path.dirname(os.getcwd())
# sys.path.append(app_root_directory)
# sys.path.append(os.path.join(app_root_directory, "src"))
# print(f"App root directory: {app_root_directory}")
# sly.logger.info(f'PYTHONPATH={os.environ.get("PYTHONPATH", "")}')

if sly.is_development():
load_dotenv("local.env")
load_dotenv(os.path.expanduser("~/supervisely.env"))

my_app = AppService()

TEAM_ID = int(os.environ["context.teamId"])
WORKSPACE_ID = int(os.environ["context.workspaceId"])
PROJECT_ID = int(os.environ["modal.state.slyProjectId"])
TEAM_ID = sly.env.team_id()
WORKSPACE_ID = sly.env.workspace_id()
PROJECT_ID = sly.env.project_id()
PROCCESS_SHAPES = os.environ.get("modal.state.processShapes", "transform")
PROCCESS_SHAPES_MSG = "skipped" if PROCCESS_SHAPES == "skip" else "transformed to rectangles"

Expand Down Expand Up @@ -247,4 +240,4 @@ def main():
# @TODO: uncomment only for debug
# sly.fs.clean_dir(my_app.data_dir)

sly.main_wrapper("main", main)
sly.main_wrapper("main", main, log_for_agent=False)

0 comments on commit 4b1aaa8

Please sign in to comment.