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

some errors in train.py #6

Open
wzm2256 opened this issue Jun 27, 2018 · 4 comments
Open

some errors in train.py #6

wzm2256 opened this issue Jun 27, 2018 · 4 comments

Comments

@wzm2256
Copy link

wzm2256 commented Jun 27, 2018

Line 93 os.mkdir ----> os.makedirs
Line 46 default='logs' ----> default='./logs'

Not a big problem, Just mention it here for others' convenient.

@wzm2256 wzm2256 changed the title some errors some errors in train.py Jun 28, 2018
@nzarnaghi
Copy link

nzarnaghi commented Jul 9, 2020

I did these modifications, but it still does not work and gives me this error:

Namespace(batch_size=128, cuda=False, decoder='mlp', decoder_dropout=0.0, decoder_hidden=256, dims=4, dynamic_graph=False, edge_types=2, encoder='mlp', encoder_dropout=0.0, encoder_hidden=256, epochs=500, factor=True, gamma=0.5, hard=False, load_folder='', lr=0.0005, lr_decay=200, no_cuda=False, no_factor=False, num_atoms=5, prediction_steps=10, prior=False, save_folder='./logs', seed=42, skip_first=False, suffix='_springs5', temp=0.5, timesteps=49, var=5e-05)
Traceback (most recent call last):
File "train.py", line 93, in
os.makedirs(save_folder)
File "C:\Users\nzarnaghi\AppData\Local\Continuum\anaconda3\lib\os.py", line 221, in makedirs
mkdir(name, mode)
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: './logs/exp2020-07-08T12:45:08.925712/'

@lylyjy
Copy link

lylyjy commented Jan 20, 2021

Did you solve it?
I have the same error.

@grgn96
Copy link

grgn96 commented Jul 27, 2023

I am a Windows user and solved it without modifying line 46 as @wzm2256.
I changed line 93 with the following

save_folder = pathvalidate.sanitize_filepath(save_folder,"_","auto")
    if pathvalidate.is_valid_filepath(save_folder):   
        try: os.makedirs(save_folder)        
        except WindowsError():
            print("Check directory creation!\n")

the pathvalidate library is required.

@safermi
Copy link

safermi commented Oct 10, 2023

I did these modifications, but it still does not work and gives me this error:C:\Users\sl\Desktop\NRI-master>python train.py
Namespace(no_cuda=False, seed=42, epochs=500, batch_size=128, lr=0.0005, encoder_hidden=256, decoder_hidden=256, temp=0.5, num_atoms=5, encoder='mlp', decoder='mlp', no_factor=False, suffix='_springs5', encoder_dropout=0.0, decoder_dropout=0.0, save_folder='logs', load_folder='', edge_types=2, dims=4, timesteps=49, prediction_steps=10, lr_decay=200, gamma=0.5, skip_first=False, var=5e-05, hard=False, prior=False, dynamic_graph=False, cuda=False, factor=True)
Traceback (most recent call last):
File "C:\Users\sl\Desktop\NRI-master\train.py", line 93, in
os.makedirs(save_folder)
File "", line 225, in makedirs
OSError: [WinError 123] 文件名、目录名或卷标语法不正确。: 'logs/exp2023-10-10T16:59:42.303545/'这是什么意思
Can you tell me how to modify it,Thank you

我是 Windows 用户,并在没有将第 46 行修改为 .我用以下内容更改了第 93 行

save_folder = pathvalidate.sanitize_filepath(save_folder,"_","auto")
    if pathvalidate.is_valid_filepath(save_folder):   
        try: os.makedirs(save_folder)        
        except WindowsError():
            print("Check directory creation!\n")

路径验证库是必需的。

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

5 participants