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

Obsessive-compulsive disorder #28

Open
GitHub-TXZ opened this issue Oct 14, 2023 · 4 comments
Open

Obsessive-compulsive disorder #28

GitHub-TXZ opened this issue Oct 14, 2023 · 4 comments

Comments

@GitHub-TXZ
Copy link

Great Work!A tiny problem. Logger. info printed the information twice on the command line, I don't want this to happen.

[20:24:57.016] Namespace(data='colon', snapshot_path='./snapshot/colon', data_prefix='../data', rand_crop_size=(256, 256, 256), device='cuda:0', batch_size=1, num_classes=2, num_worker=6, checkpoint='last', tolerance=5)
2023-10-14 20:24:57,016 - Namespace(data='colon', snapshot_path='./snapshot/colon', data_prefix='../data', rand_crop_size=(256, 256, 256), device='cuda:0', batch_size=1, num_classes=2, num_worker=6, checkpoint='last', tolerance=5)

@GitHub-TXZ
Copy link
Author

[20:29:25.391] Case ../data/imagesTr/colon_008.nii.gz - Dice 0.045385 | NSD 0.126578
2023-10-14 20:29:25,391 - Case ../data/imagesTr/colon_008.nii.gz - Dice 0.045385 | NSD 0.126578
[20:31:28.960] Case ../data/imagesTr/colon_009.nii.gz - Dice 0.605519 | NSD 0.567307
2023-10-14 20:31:28,960 - Case ../data/imagesTr/colon_009.nii.gz - Dice 0.605519 | NSD 0.567307
[20:34:15.599] Case ../data/imagesTr/colon_026.nii.gz - Dice 0.000000 | NSD 0.000000
2023-10-14 20:34:15,599 - Case ../data/imagesTr/colon_026.nii.gz - Dice 0.000000 | NSD 0.000000

@GitHub-TXZ
Copy link
Author

setup_logger(logger_name="test", root=args.snapshot_path, screen=True, tofile=True)
logger = logging.getLogger(f"test")
logger.info(str(args)

@GitHub-TXZ
Copy link
Author

How to fix it? Help me please, thanks a lot

@peterant330
Copy link
Collaborator

peterant330 commented Oct 16, 2023

How to fix it? Help me please, thanks a lot

https://github.com/med-air/3DSAM-adapter/blob/b993875cfcb88ff0841d68bab3bb742c793fb68f/3DSAM-adapter/train.py#L68C68-L68C68

Hi, you can set screen=False in this line.

setup_logger(logger_name="train", root=args.snapshot_path, screen=False, tofile=True)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants