Skip to content

Commit

Permalink
Merge pull request #3 from supervisely-ecosystem/user-name-hotfix
Browse files Browse the repository at this point in the history
user name hotfix
  • Loading branch information
qanelph authored Aug 25, 2021
2 parents 277d479 + e54f4d5 commit 2bcc963
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/globals.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
project_id = int(os.environ['modal.state.slyProjectId'])

# user = api.user.get_info_by_id(user_id)
user = "Supervisely"
user_name = "Supervisely"
project = api.project.get_info_by_id(project_id)
meta_json = api.project.get_meta(project_id)
meta = sly.ProjectMeta.from_json(meta_json)
Expand Down
4 changes: 2 additions & 2 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def export_to_coco(api: sly.Api, task_id, context, state, app_logger):
ann_infos = api.annotation.download_batch(dataset.id, image_ids)
anns = [sly.Annotation.from_json(x.annotation, g.meta) for x in ann_infos]
anns = [convert_geometry.convert_annotation(ann, meta) for ann in anns]
coco_ann = f.create_coco_annotation(meta, categories_mapping, dataset, g.user.name, batch, anns, label_id, ds_progress)
coco_ann = f.create_coco_annotation(meta, categories_mapping, dataset, g.user_name, batch, anns, label_id, ds_progress)
with open(os.path.join(ann_dir, f"instances.json"), 'w') as file:
json.dump(coco_ann, file)

Expand All @@ -51,4 +51,4 @@ def main():


if __name__ == "__main__":
sly.main_wrapper("main", main)
sly.main_wrapper("main", main)

0 comments on commit 2bcc963

Please sign in to comment.