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

run train.py #65

Open
apuomline opened this issue Nov 18, 2023 · 2 comments
Open

run train.py #65

apuomline opened this issue Nov 18, 2023 · 2 comments

Comments

@apuomline
Copy link

Hello author, I ran the train.py file with an error. The following is the specific content of the error:

What I entered:
python train.py -net sam -mod sam_adpt -exp_name medical-sam-ada -sam_ckpt checkpoint/sam/sam_vit_b_01ec64.pth -image_size 1024 -b 8 -dataset isic --data_path ISBI2016_dataset

Namespace(net='sam', baseline='unet', seg_net='transunet', mod='sam_adpt', exp_name='medical-sam-ada', type='map', vis=None, reverse=False, pretrain=False, val_freq=100, gpu=True, gpu_device=0, sim_gpu=0, epoch_ini=1, image_size=1024, out_size=256, patch_size=2, dim=512, depth=1, heads=16, mlp_dim=1024, w=4, b=8, s=True, warm=1, lr=0.0001, uinch=1, imp_lr=0.0003, weights=0, base_weights=0, sim_weights=0, distributed='none', dataset='isic', sam_ckpt='checkpoint/sam/sam_vit_b_01ec64.pth', thd=False, chunk=96, num_sample=4, roi_size=96, evl_chunk=None, data_path='ISBI2016_dataset', path_helper={'prefix': 'logs\medical-sam-ada_2023_11_18_10_37_15', 'ckpt_path': 'logs\medical-sam-ada_2023_11_18_10_37_15\Model', 'log_path': 'logs\medical-sam-ada_2023_11_18_10_37_15\Log', 'sample_path': 'logs\medical-sam-ada_2023_11_18_10_37_15\Samples'})
n
writer = SummaryWriter(log_dir=os.path.join(
File "F:\miniconda\envs\medical-sam-adapter\lib\site-packages\tensorboardX\writer.py", line 300, in init
self._get_file_writer()
File "F:\miniconda\envs\medical-sam-adapter\lib\site-packages\tensorboardX\writer.py", line 348, in _get_file_writer
self.file_writer = FileWriter(logdir=self.logdir,
File "F:\miniconda\envs\medical-sam-adapter\lib\site-packages\tensorboardX\writer.py", line 104, in init
self.event_writer = EventFileWriter(
File "F:\miniconda\envs\medical-sam-adapter\lib\site-packages\tensorboardX\event_file_writer.py", line 104, in init
directory_check(self._logdir)
File "F:\miniconda\envs\medical-sam-adapter\lib\site-packages\tensorboardX\record_writer.py", line 51, in directory_check
os.makedirs(path)
File "F:\miniconda\envs\medical-sam-adapter\lib\os.py", line 225, in makedirs
mkdir(name, mode)
OSError: [WinError 123] 文件名、目录名或卷标语法不正确。: 'runs\sam\2023-11-18T10:37:14.772235'

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Title: run train.py error

@apuomline apuomline changed the title run train.py erro run train.py Nov 18, 2023
@chankeh
Copy link

chankeh commented Mar 10, 2024

hi, the reason is that the system cannot support special character for directory name ,
you should change the code in global_settings.py, and modify the following code :
``TIME_NOW = datetime.now().isoformat().replace('-', '').replace(':', '')

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

3 participants