Skip to content

No Rollback after "cifar10_train.py" canceled #363

Closed

Description

@YGMaerz

Hi,

I noticed than on both Ubuntu and Mac OSX there is no handling of cancelling (rollback?) the cifar10-set download process of the cifar10_train.py via ctrl+c.

If the process was once canceled you will be incapable of running the script again. The following error will be issued:

Traceback (most recent call last):
  File "cifar10_train.py", line 138, in <module>
    tf.app.run()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/default/_app.py", line 11, in run
    sys.exit(main(sys.argv))
  File "cifar10_train.py", line 134, in main
    train()
  File "cifar10_train.py", line 69, in train
    images, labels = cifar10.distorted_inputs()
  File "/usr/local/lib/python2.7/dist-packages/tensorflow/models/image/cifar10/cifar10.py", line 166, in distorted_inputs
    raise ValueError('Failed to find file: ' + f)
ValueError: Failed to find file: /tmp/cifar10_data/cifar-10-batches-bin/data_batch_1.bin

Activity

  1. vincentvanhoucke commented on Nov 26, 2015

    @vincentvanhoucke
    Contributor

    Checking for integrity of all the files would be tedious. We could provide an option to always re-download, which might make DOSing the source web site a little too easy if people get used to enabling it.
    The simple 'rm -rf /tmp/cifar10_data' is a natural way to deal with this, so I'd be inclined not to do anything here.

  2. YGMaerz commented on Nov 27, 2015

    @YGMaerz
    Author

    I think atleast a md5sum-check shouldn't be surcharged.
    But this isn't the point.
    There is on neither of my systems a /tmp/cifar10_data/ directory, despite the error. Deduce from this fact "rm-rf /tmp/cifar10_train.py" hasn't worked for me.

    Sent from my iPhone

    On Nov 26, 2015, at 21:32, Vincent Vanhoucke [email protected] wrote:

    Checking for integrity of all the files would be tedious. We could provide an option to always re-download, which might make DOSing the source web site a little too easy if people get used to enabling it.
    The simple 'rm -rf /tmp/cifar10_data' is a natural way to deal with this, so I'd be inclined not to do anything here.

    —
    Reply to this email directly or view it on GitHub.

  3. vrv commented on Dec 1, 2015

    @vrv

    I'm not sure exactly what the problem is:

    def maybe_download_and_extract():

    Can you instrument that code and let us know if something is not behaving as expected?

  4. YGMaerz commented on Dec 3, 2015

    @YGMaerz
    Author

    I am so sorry, "rm -rf /tmp/cifar10_data" didn't work due to a miss configuration on my system.

    However I still think a checksum check should me implemented. This scripts is mainly used by newbies following the tensorflow cifar tutorial. It should be beginner friendly and not require deep research and terminal working.

  5. added
    stat:contribution welcome
    on Dec 21, 2015
  6. tegg89 commented on Oct 6, 2016

    @tegg89

    Go to /tmp, where is all the way outside of your directory. There you could find cifar10_train and cifar10_data folders. Inside cifar10_data folder, damaged cifar-10-binary.tar.gz file is located. The cifar10_train.py keep recognize this damaged file as intact one, error message keep shown.
    Therefore you should remove the cifar10_train and cifar10_data folders and re-python cifar10_train.py.

  7. Sunnysgw commented on Apr 19, 2017

    @Sunnysgw

    I‘m afraid that it's too late to say something. I think that maybe the data doesn't exists in your slave nodes.

  8. itsmeolivia commented on Jun 16, 2017

    @itsmeolivia
    Contributor

    Automatically closing due to lack of recent activity. Since this issue is old at this point, please reopen the issue if it still occurs when tried with the latest version of Tensorflow. Thank you.

  9. JerRyL2017 commented on Nov 28, 2017

    @JerRyL2017

    yeah I met the same issue as you.
    And I guess this is because I download it for a while but not perfectly,that means my computer have cifar-10 but it's bad.So,i get to
    /tmp/cifar10_data/
    and I delect anything about cifar-10

    after that I get back to cifar10_train,it worked !

  10. added a commit that references this issue on May 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

stat:contribution welcome

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions