wuyifan18 / DeepLog

Pytorch Implementation of DeepLog.
MIT License
361 stars 154 forks source link

Error executing LogKeyModel_train.py #19

Closed jpweins closed 5 years ago

jpweins commented 5 years ago

(base) jay@pop-os:~/git/DeepLog$ python ./LogKeyModel_train.py Number of sessions(hdfs_train): 4855 Number of seqs(hdfs_train): 46575 Traceback (most recent call last): File "./LogKeyModel_train.py", line 68, in writer = SummaryWriter(log_dir='log/' + log) File "/home/jay/.local/lib/python3.6/site-packages/tensorboardX/writer.py", line 254, in init self._get_file_writer() File "/home/jay/.local/lib/python3.6/site-packages/tensorboardX/writer.py", line 310, in _get_file_writer self.file_writer = FileWriter(logdir=self.logdir, **self.kwargs) TypeError: init() got an unexpected keyword argument 'log_dir'

wuyifan18 commented 5 years ago

hi, You can print the log_dir first.

jpweins commented 5 years ago

Hi,

Thanks for the fast response. I don't understand what your suggesting. log/Adam with batch_size=2048;epoch=300 is being passed to SummaryWriter in main. Please advise.

Thanks, Jay

On Mon, May 27, 2019 at 7:23 PM Yifan Wu notifications@github.com wrote:

hi, You can print the log_dir first.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wuyifan18/DeepLog/issues/19?email_source=notifications&email_token=ABAUNL7NNGE4O6KDFLENQQDPXSJQ7A5CNFSM4HP6KIC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWKZDMA#issuecomment-496341424, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAUNL6TH7REMMNS622FRELPXSJQ7ANCNFSM4HP6KICQ .

wuyifan18 commented 5 years ago

@jpweins I got it. It just because of the tensorboardX's version. If you are using tensorboardX==1.7, you should modify writer = SummaryWriter(log_dir='log/' + log) to writer = SummaryWriter(logdir='log/' + log). I have fixed it, you can git clone the newest version. Thanks for your issue.

Best regards, Yifan Wu

jpweins commented 5 years ago

This is what logdir is set to when SummaryWriter is called: log/Adam with batch_size=2048;epoch=300 I looks like logdir isn't set in SummaryWriter. On line 237 the following code is executed. if not logdir: import socket from datetime import datetime currenttime = datetime.now().strftime('%b%d%H-%M-%S') logdir = os.path.join( 'runs', currenttime + '' + socket.gethostname() + comment) self.logdir = logdir

This is what logdir is set to: runs/May27_23-15-24_pop-os

On Mon, May 27, 2019 at 10:08 PM Yifan Wu notifications@github.com wrote:

Just print(log_dir) to see if the log_dir is correct.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wuyifan18/DeepLog/issues/19?email_source=notifications&email_token=ABAUNL7XN33X7PPOSUYXUYLPXS44DA5CNFSM4HP6KIC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWK7J3Q#issuecomment-496366830, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAUNLZOXE6DGU233RDQRXLPXS44DANCNFSM4HP6KICQ .

wuyifan18 commented 5 years ago

@jpweins Using the newest code which I have updated.

jpweins commented 5 years ago

Thanks!!😁

On Tue, May 28, 2019 at 12:02 AM Yifan Wu notifications@github.com wrote:

@jpweins https://github.com/jpweins Using the newest code which I have updated.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wuyifan18/DeepLog/issues/19?email_source=notifications&email_token=ABAUNL4II35ORPZXSDE2ENLPXTKHBA5CNFSM4HP6KIC2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWLFDSQ#issuecomment-496390602, or mute the thread https://github.com/notifications/unsubscribe-auth/ABAUNL4UVWY5GV3EBKXF72DPXTKHBANCNFSM4HP6KICQ .