Skip to content

Commit

Permalink
Logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
iwatkot committed Feb 29, 2024
1 parent fcaef39 commit 0bd104f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/main.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
import os

# from datetime import datetime
from distutils import util

import supervisely as sly
from dotenv import load_dotenv

# from supervisely.api.file_api import FileInfo
from supervisely.api.module_api import ApiField
from supervisely.io.fs import get_file_ext

Expand Down Expand Up @@ -91,6 +87,8 @@ def download(project: sly.Project) -> str:
else:
save_images = False

sly.logger.info(f"Starting download of project {project.name} to {download_dir}...")

sly.Project.download(
api,
project_id,
Expand All @@ -101,10 +99,13 @@ def download(project: sly.Project) -> str:
save_image_meta=True,
save_images=save_images,
)

sly.logger.info("Project downloaded...")
return download_dir


if __name__ == "__main__":
project = api.project.get_info_by_id(project_id)
download_dir = download(project)
sly.output.set_download(download_dir)
sly.logger.info("Archive uploaded and ready for download.")

0 comments on commit 0bd104f

Please sign in to comment.