memray / OpenNMT-kpg-release

Keyphrase Generation
MIT License
217 stars 34 forks source link

PermissionError: [Errno 13] Permission denied: '/logs/' #30

Closed sjchasel closed 3 years ago

sjchasel commented 3 years ago

When I am training a One2Seq model with Diversity Mechanisms enabled by python train.py -config config/train/config-rnn-keyphrase-one2seq-diverse.yml , there is an error: Traceback (most recent call last): File "train.py", line 6, in <module> main() File "/home/yons/OpenNMT-kpg-release-new/onmt/bin/train.py", line 274, in main train(opt) File "/home/yons/OpenNMT-kpg-release-new/onmt/bin/train.py", line 32, in train train_single._check_save_model_path(opt) File "/home/yons/OpenNMT-kpg-release-new/onmt/train_single.py", line 55, in _check_save_model_path os.makedirs(opt.wandb_log_dir) File "/home/yons/anaconda3/lib/python3.7/os.py", line 221, in makedirs mkdir(name, mode) PermissionError: [Errno 13] Permission denied: '/logs/' Could you tell me what I should do?

sjchasel commented 3 years ago

There is no 'exp_dir' but 'exp' and no statement about 'wandb' in config/train/config-rnn-keyphrase-one2seq-diverse.yml. Will this have any bad effects?

memray commented 3 years ago

wandb is a new feature here. Please set up your own account and apikey. Otherwise, you'll write logs under my account but you do not have access to them.

sjchasel commented 3 years ago

But the content in config/train/config-rnn-keyphrase-one2seq-diverse.yml is

`model_type: keyphrase tgt_type: verbatim_append

data: data/keyphrase/meng17/kp20k

data: data/keyphrase/meng17/kp20k_small

data: data/keyphrase/meng17/stackexchange

save_checkpoint_steps: 5000 keep_checkpoint: 10000 seed: 3435 train_steps: 100000 valid_steps: 200000 # no validation report_every: 100

encoder_type: brnn rnn_type: GRU word_vec_size: 100 rnn_size: 150 layers: 1

optim: adam learning_rate: 1e-3 max_grad_norm: 2

batch_size: 64 valid_batch_size: 128 dropout: 0.1

global_attention: mlp

tensorboard: 'true' log_file_level: DEBUG

copy_attn: 'true' reuse_copy_attn: 'true' coverage_attn: 'true'

context_gate: 'both' input_feed: 1 share_embeddings: 'true' bridge: 'true'

orth_reg: 'true' lambda_orth_reg: 0.1 sem_cov: 'true' lambda_sem_cov: 0.1

tgt_enc: 'rnn' detach_tgt_enc: 'true' num_negsample: 16 use_ending_state: 'true'

exp: kp20k-one2seq-birnn-GRU150-EMB100-ATTNmlp-Dropout00 save_model: models/keyphrase/meng17-one2seq/kp20k.one2seq.birnn.Dropout00 log_file: output/keyphrase/meng17-one2seq/kp20k.one2seq.birnn.Dropout00.log tensorboard_log_dir: runs/keyphrase/meng17-one2seq/kp20k.one2seq.birnn.Dropout00/

world_size: 1 gpu_ranks:

there is no 'wandb' or 'wandb_key'. Why wandb will be called?

And there is no exp_dir in yml file either, why the error is not Neither exp_dir nor save_model is not given! ?

memray commented 3 years ago

Please refer to new config files in here, wandb is a newly-added feature so not covered in previous files.