Skip to content

Commit 0bc24a5

Browse files
author
Mark-ZhouWX
committed
hack work_root
1 parent 357b71b commit 0bc24a5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

official/cv/segment-anything/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ opencv-python
44
omegaconf==2.0.0
55

66
# Optional. for preprocess medical ct and mr dataset
7-
connected-components-3d
8-
SimpleITK
7+
# connected-components-3d
8+
# SimpleITK

official/cv/segment-anything/segment_anything/utils/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def set_directory_and_log(main_device, rank_id, rank_size, work_root, log_level,
138138
if args_callback is not None:
139139
for cb in args_callback:
140140
if cb.type.endswith('SaveCkpt'):
141-
hack_list = {'save_dir': save_dir, 'main_device': main_device}
141+
hack_list = {'save_dir': save_dir, 'main_device': main_device, 'work_root': work_root}
142142
cb.update(hack_list)
143143
return save_dir
144144

official/cv/segment-anything/train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
def main(args) -> None:
2020
# Step1: initialize environment
21-
ms.context.set_context(mode=args.mode, device_target=args.device, pynative_synchronize=False)
21+
ms.context.set_context(mode=args.mode, device_target=args.device, pynative_synchronize=False, max_device_memory="50GB")
2222
ms.set_seed(42)
2323

2424
rank_id, rank_size, main_device = set_distributed(args.distributed)

0 commit comments

Comments
 (0)