{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/2973","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/2973/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/2973/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/2973/events","html_url":"https://github.com/tensorflow/tensorflow/issues/2973","id":161436874,"number":2973,"title":"restore() model with absolute and relative path","user":{"login":"dsindex","id":8259057,"avatar_url":"https://avatars.githubusercontent.com/u/8259057?v=3","gravatar_id":"","url":"https://api.github.com/users/dsindex","html_url":"https://github.com/dsindex","followers_url":"https://api.github.com/users/dsindex/followers","following_url":"https://api.github.com/users/dsindex/following{/other_user}","gists_url":"https://api.github.com/users/dsindex/gists{/gist_id}","starred_url":"https://api.github.com/users/dsindex/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dsindex/subscriptions","organizations_url":"https://api.github.com/users/dsindex/orgs","repos_url":"https://api.github.com/users/dsindex/repos","events_url":"https://api.github.com/users/dsindex/events{/privacy}","received_events_url":"https://api.github.com/users/dsindex/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/tensorflow/tensorflow/labels/awaiting%20googler","name":"awaiting googler","color":"b60205"},{"url":"https://api.github.com/repos/tensorflow/tensorflow/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"concretevitamin","id":592670,"avatar_url":"https://avatars.githubusercontent.com/u/592670?v=3","gravatar_id":"","url":"https://api.github.com/users/concretevitamin","html_url":"https://github.com/concretevitamin","followers_url":"https://api.github.com/users/concretevitamin/followers","following_url":"https://api.github.com/users/concretevitamin/following{/other_user}","gists_url":"https://api.github.com/users/concretevitamin/gists{/gist_id}","starred_url":"https://api.github.com/users/concretevitamin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concretevitamin/subscriptions","organizations_url":"https://api.github.com/users/concretevitamin/orgs","repos_url":"https://api.github.com/users/concretevitamin/repos","events_url":"https://api.github.com/users/concretevitamin/events{/privacy}","received_events_url":"https://api.github.com/users/concretevitamin/received_events","type":"User","site_admin":false},"assignees":[{"login":"concretevitamin","id":592670,"avatar_url":"https://avatars.githubusercontent.com/u/592670?v=3","gravatar_id":"","url":"https://api.github.com/users/concretevitamin","html_url":"https://github.com/concretevitamin","followers_url":"https://api.github.com/users/concretevitamin/followers","following_url":"https://api.github.com/users/concretevitamin/following{/other_user}","gists_url":"https://api.github.com/users/concretevitamin/gists{/gist_id}","starred_url":"https://api.github.com/users/concretevitamin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concretevitamin/subscriptions","organizations_url":"https://api.github.com/users/concretevitamin/orgs","repos_url":"https://api.github.com/users/concretevitamin/repos","events_url":"https://api.github.com/users/concretevitamin/events{/privacy}","received_events_url":"https://api.github.com/users/concretevitamin/received_events","type":"User","site_admin":false},{"login":"gunan","id":7946809,"avatar_url":"https://avatars.githubusercontent.com/u/7946809?v=3","gravatar_id":"","url":"https://api.github.com/users/gunan","html_url":"https://github.com/gunan","followers_url":"https://api.github.com/users/gunan/followers","following_url":"https://api.github.com/users/gunan/following{/other_user}","gists_url":"https://api.github.com/users/gunan/gists{/gist_id}","starred_url":"https://api.github.com/users/gunan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunan/subscriptions","organizations_url":"https://api.github.com/users/gunan/orgs","repos_url":"https://api.github.com/users/gunan/repos","events_url":"https://api.github.com/users/gunan/events{/privacy}","received_events_url":"https://api.github.com/users/gunan/received_events","type":"User","site_admin":false}],"milestone":null,"comments":16,"created_at":"2016-06-21T13:29:05Z","updated_at":"2016-10-11T18:20:28Z","closed_at":null,"body":"### Comment\r\nrestore succeeded with relative path(script directory), but failed with absolute path.\r\n\r\n### Environment info\r\nOperating System: \r\n\r\nUbunto 14.04.1\r\n\r\nInstalled version of CUDA and cuDNN: \r\n(please attach the output of `ls -l /path/to/cuda/lib/libcud*`):\r\n```\r\n22:16 $ ls -al /usr/local/cuda/lib64/libcud*\r\n-rw-r--r-- 1 root root   322936  8월 16  2015 /usr/local/cuda/lib64/libcudadevrt.a\r\nlrwxrwxrwx 1 root root       16  8월 16  2015 /usr/local/cuda/lib64/libcudart.so -> libcudart.so.7.5\r\nlrwxrwxrwx 1 root root       19  8월 16  2015 /usr/local/cuda/lib64/libcudart.so.7.5 -> libcudart.so.7.5.18\r\n-rwxr-xr-x 1 root root   383336  8월 16  2015 /usr/local/cuda/lib64/libcudart.so.7.5.18\r\n-rw-r--r-- 1 root root   720192  8월 16  2015 /usr/local/cuda/lib64/libcudart_static.a\r\n-rwxr-xr-x 1 root root 61453024  5월 26 09:37 /usr/local/cuda/lib64/libcudnn.so\r\n-rwxr-xr-x 1 root root 61453024  5월 26 09:37 /usr/local/cuda/lib64/libcudnn.so.4\r\n-rwxr-xr-x 1 root root 61453024  5월 26 09:37 /usr/local/cuda/lib64/libcudnn.so.4.0.7\r\n-rw-r--r-- 1 root root 62025862  5월 26 09:37 /usr/local/cuda/lib64/libcudnn_static.a\r\n```\r\n\r\nIf installed from binary pip package, provide:\r\n\r\n1. Which pip package you installed.\r\ntensorflow-0.8.0    \r\n\r\n2. The output from `python -c \"import tensorflow; print(tensorflow.__version__)\"`.\r\n```\r\nI tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcublas.so locally\r\nI tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcudnn.so locally\r\nI tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcufft.so locally\r\nI tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcuda.so.1 locally\r\nI tensorflow/stream_executor/dso_loader.cc:105] successfully opened CUDA library libcurand.so locally\r\n0.8.0\r\n```\r\n\r\n### Steps to reproduce\r\n1. train\r\n```\r\nhttps://github.com/tensorflow/tensorflow/blob/de1334da2c6e074c427d283898450de6e50a605d/tensorflow/models/embedding/word2vec_optimized.py\r\n\r\n$ python word2vec_optimized.py --train_data=text8 --eval_data=questions-words.txt --save_path=tmp\r\n```\r\n2. test\r\n```\r\nhttps://github.com/dsindex/segm-lstm/blob/master/test_word2vec.py\r\n\r\n$ python test_word2vec.py --model_path=tmp\r\n...\r\ncheckpoint_dir =  tmp\r\ncheckpoint_path =  tmp/model.ckpt-2264698\r\nmodel restored from tmp/model.ckpt-2264698\r\nanalogy = moscow\r\n...\r\n\r\n$ python test_word2vec.py --model_path=/path/to/segm-lstm/tensorflow/tensorflow/models/embedding/tmp\r\n...\r\ncheckpoint_dir =  /path/to/segm-lstm/tensorflow/tensorflow/models/embedding/tmp\r\ncheckpoint_path =  model.ckpt-2264698\r\nTraceback (most recent call last):\r\n  File \"test_word2vec.py\", line 224, in <module>\r\n    tf.app.run()\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py\", line 30, in run\r\n    sys.exit(main(sys.argv))\r\n  File \"test_word2vec.py\", line 204, in main\r\n    model.saver.restore(session, ckpt.model_checkpoint_path)\r\n  File \"/usr/local/lib/python2.7/dist-packages/tensorflow/python/training/saver.py\", line 1088, in restore\r\n    raise ValueError(\"Restore called with invalid save path %s\" % save_path)\r\nValueError: Restore called with invalid save path model.ckpt-2264698\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/253000764","html_url":"https://github.com/tensorflow/tensorflow/issues/2973#issuecomment-253000764","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/2973","id":253000764,"user":{"login":"concretevitamin","id":592670,"avatar_url":"https://avatars.githubusercontent.com/u/592670?v=3","gravatar_id":"","url":"https://api.github.com/users/concretevitamin","html_url":"https://github.com/concretevitamin","followers_url":"https://api.github.com/users/concretevitamin/followers","following_url":"https://api.github.com/users/concretevitamin/following{/other_user}","gists_url":"https://api.github.com/users/concretevitamin/gists{/gist_id}","starred_url":"https://api.github.com/users/concretevitamin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/concretevitamin/subscriptions","organizations_url":"https://api.github.com/users/concretevitamin/orgs","repos_url":"https://api.github.com/users/concretevitamin/repos","events_url":"https://api.github.com/users/concretevitamin/events{/privacy}","received_events_url":"https://api.github.com/users/concretevitamin/received_events","type":"User","site_admin":false},"created_at":"2016-10-11T18:20:28Z","updated_at":"2016-10-11T18:20:28Z","body":"Just to confirm my understanding -- the workflow of \"saving on one machine using relative path, moving the ckpt to another machine, restore there\" **is** supported, correct?\r\n\r\nI tried with this snippet:\r\n```python\r\n  def testSaveRelative(self):\r\n    rel_path = \"ckpts/step0\"\r\n    os.mkdir(os.path.join(os.getcwd(), \"ckpts\"))\r\n\r\n    with self.test_session() as sess:\r\n      v = tf.Variable(1.0, name=\"v\")\r\n      tf.initialize_all_variables().run()\r\n      saver = tf.train.Saver()\r\n      path = saver.save(sess, rel_path)\r\n    self.assertEqual(rel_path, path)\r\n```\r\nand it passed, generating this `checkpoint` file:\r\n```\r\nmodel_checkpoint_path: \"step0\"\r\nall_model_checkpoint_paths: \"step0\"\r\n```\r\n\r\nSo this should not be marked as a \"bug\", and more like a feature request (use relative paths by default).  For this request, I am not the best person to evaluate the consequences (if any) though."}}
{"actor":{"display_login":"concretevitamin"}}