gcr / torch-residual-networks

This is a Torch implementation of ["Deep Residual Learning for Image Recognition",Kaiming He, Xiangyu Zhang, Shaoqing Ren, Jian Sun](http://arxiv.org/abs/1512.03385) the winners of the 2015 ILSVRC and COCO challenges.
zlib License
576 stars 146 forks source link

How to use lab-workbook in train-cifar.lua #4

Closed lim0606 closed 8 years ago

lim0606 commented 8 years ago

Hi,

First of all, thank you for sharing your review work.

It seems that lab-workbook is required to make snapshot in train-cifar.lua; thus I installed it with your repository (https://github.com/gcr/lab-workbook).

However, this package asked me to have a configuration file ~/.lab-workbook-config, and I have no idea how to set it.

Is there anyone who help me to use it?

I would also appreciate if someone let me know I can snapshot weights with other methods. I used to use caffe and I'm new to lua and torch.

Thanks,

gcr commented 8 years ago

oops! sorry! i've been meaning to document lab-workbook for a while.

It's probably best to simply replace all the workbook calls with your own calls to torch.save() and print(). The idea behind the lab workbook is to stream all of your experiment results (loss, error, models) to Amazon S3, so you don't have to worry about keeping them on the filesystem. This is super helpful if you have several machines running at once.

If you want to use the lab workbook:

[default]
aws_access_key_id = 123456abcdefgh
aws_secret_access_key = 123456abcdefgh

At this point, the aws command should be on your $PATH and aws list should list all of your S3 buckets.

bucketPrefix = s3://bucket-name-here/path/to/experiments/

This will save the results of all experiments to the /path/to/experiments/ prefix in the bucket-name-here S3 bucket. (Make sure this prefix ends in /).

Every time you run your code, it creates a new experiment and prints the random experiment ID. You can then save this ID and analyze the results in an IPython notebook running on your laptop or whatever (see example).

Again, sorry this isn't documented very well. If you don't want to fight with it, you can just replace everything with calls to print and torch.save to save yourself the trouble...

lim0606 commented 8 years ago

@gcr

Thank you for kind response!

I tried to use lab-workbook and aws-cli as you suggested, but I couldn't.

I followed some instructions from here http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-welcome.html http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html http://docs.aws.amazon.com/cli/latest/userguide/installing.html#cli-test-the-setup http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html

However, aws keep saying

A client error (InvalidAccessKeyId) occurred when calling the ListBuckets operation: The AWS Access Key Id you provided does not exist in our records.

I thinks I will use torch.save() and print() for now.

Once again, thank you for your assistance.

Jaehyun

lim0606 commented 8 years ago

It was the problem of credentials. I think the credential I copied somehow changed by myself. I made a new use, and the problem solved.

Thank you so much! The lab-workbook seems really helpful :)

gcr commented 8 years ago

glad (and mildly surprised) it works for you!

if others find this thread in the future, perhaps running aws configure is a good way to set the credentials at first

dasguptar commented 8 years ago

@gcr Could you maybe add some documentation for lab-workbook?

gcr commented 8 years ago

Sure, @dasguptar ! Here's some documentation for the lab-workbook library:

https://github.com/gcr/lab-workbook#readme

Hope this helps!

If you don't like this library, I hope it's pretty easy to replace all the calls with logging/saving of your choice. It should be pretty self-evident what each call is doing...