{"action":"created","issue":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/17702","repository_url":"https://api.github.com/repos/tensorflow/tensorflow","labels_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/17702/labels{/name}","comments_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/17702/comments","events_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/17702/events","html_url":"https://github.com/tensorflow/tensorflow/issues/17702","id":305021480,"node_id":"MDU6SXNzdWUzMDUwMjE0ODA=","number":17702,"title":"UnrecognizedFlagError: Unknown command line flag 'f'","user":{"login":"magicmutal","id":17216714,"node_id":"MDQ6VXNlcjE3MjE2NzE0","avatar_url":"https://avatars2.githubusercontent.com/u/17216714?v=4","gravatar_id":"","url":"https://api.github.com/users/magicmutal","html_url":"https://github.com/magicmutal","followers_url":"https://api.github.com/users/magicmutal/followers","following_url":"https://api.github.com/users/magicmutal/following{/other_user}","gists_url":"https://api.github.com/users/magicmutal/gists{/gist_id}","starred_url":"https://api.github.com/users/magicmutal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magicmutal/subscriptions","organizations_url":"https://api.github.com/users/magicmutal/orgs","repos_url":"https://api.github.com/users/magicmutal/repos","events_url":"https://api.github.com/users/magicmutal/events{/privacy}","received_events_url":"https://api.github.com/users/magicmutal/received_events","type":"User","site_admin":false},"labels":[{"id":386191887,"node_id":"MDU6TGFiZWwzODYxOTE4ODc=","url":"https://api.github.com/repos/tensorflow/tensorflow/labels/stat:awaiting%20response","name":"stat:awaiting response","color":"f4b400","default":false}],"state":"closed","locked":false,"assignee":{"login":"tatatodd","id":5453737,"node_id":"MDQ6VXNlcjU0NTM3Mzc=","avatar_url":"https://avatars3.githubusercontent.com/u/5453737?v=4","gravatar_id":"","url":"https://api.github.com/users/tatatodd","html_url":"https://github.com/tatatodd","followers_url":"https://api.github.com/users/tatatodd/followers","following_url":"https://api.github.com/users/tatatodd/following{/other_user}","gists_url":"https://api.github.com/users/tatatodd/gists{/gist_id}","starred_url":"https://api.github.com/users/tatatodd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatatodd/subscriptions","organizations_url":"https://api.github.com/users/tatatodd/orgs","repos_url":"https://api.github.com/users/tatatodd/repos","events_url":"https://api.github.com/users/tatatodd/events{/privacy}","received_events_url":"https://api.github.com/users/tatatodd/received_events","type":"User","site_admin":false},"assignees":[{"login":"tatatodd","id":5453737,"node_id":"MDQ6VXNlcjU0NTM3Mzc=","avatar_url":"https://avatars3.githubusercontent.com/u/5453737?v=4","gravatar_id":"","url":"https://api.github.com/users/tatatodd","html_url":"https://github.com/tatatodd","followers_url":"https://api.github.com/users/tatatodd/followers","following_url":"https://api.github.com/users/tatatodd/following{/other_user}","gists_url":"https://api.github.com/users/tatatodd/gists{/gist_id}","starred_url":"https://api.github.com/users/tatatodd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatatodd/subscriptions","organizations_url":"https://api.github.com/users/tatatodd/orgs","repos_url":"https://api.github.com/users/tatatodd/repos","events_url":"https://api.github.com/users/tatatodd/events{/privacy}","received_events_url":"https://api.github.com/users/tatatodd/received_events","type":"User","site_admin":false}],"milestone":null,"comments":27,"created_at":"2018-03-14T04:44:39Z","updated_at":"2018-10-26T21:07:39Z","closed_at":"2018-10-26T21:07:39Z","author_association":"NONE","body":"### System information\r\n- **Have I written custom code (as opposed to using a stock example script provided in TensorFlow)**: custom code\r\n- **OS Platform and Distribution (e.g., Linux Ubuntu 16.04)**: Windows 10\r\n- **TensorFlow installed from (source or binary)**: source\r\n- **TensorFlow version (use command below)**: tensorflow 1.5.0\r\n- **Python version**: pyhton 3.6.3\r\n- **Bazel version (if compiling from source)**: None\r\n- **GCC/Compiler version (if compiling from source)**: None\r\n- **CUDA/cuDNN version**:  None\r\n- **GPU model and memory**: GTX960M\r\n- **Exact command to reproduce**:\r\n\r\nProblem Description\r\n\r\nWhen trying to run this code\r\n```\r\nimport tensorflow as tf\r\n\r\nflags = tf.app.flags\r\nFLAGS = flags.FLAGS\r\nflags.DEFINE_float('learning_rate', 0.01, 'Initial learning rate.')\r\nflags.DEFINE_integer('max_steps', 2000, 'Number of steps to run trainer.')\r\nflags.DEFINE_integer('hidden1', 128, 'Number of units in hidden layer 1.')\r\nflags.DEFINE_integer('hidden2', 32, 'Number of units in hidden layer 2.')\r\nflags.DEFINE_integer('batch_size', 100, 'Batch size. '\r\n'Must divide evenly into the dataset sizes.')\r\nflags.DEFINE_string('train_dir', 'data', 'Directory to put the training data.')\r\nflags.DEFINE_boolean('fake_data', False, 'If true, uses fake data '\r\n'for unit testing.')\r\n\r\nFLAGS = flags.FLAGS\r\nprint(FLAGS.learning_rate)\r\n```\r\nI got this error message\r\n```\r\n---------------------------------------------------------------------------\r\nUnrecognizedFlagError                     Traceback (most recent call last)\r\n<ipython-input-3-1ce89dff3e81> in <module>()\r\n      1 FLAGS = flags.FLAGS\r\n----> 2 print(FLAGS.learning_rate)\r\n\r\nc:\\users\\jinsu\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\tensorflow\\python\\platform\\flags.py in __getattr__(self, name)\r\n     82     # a flag.\r\n     83     if not wrapped.is_parsed():\r\n---> 84       wrapped(_sys.argv)\r\n     85     return wrapped.__getattr__(name)\r\n     86 \r\n\r\nc:\\users\\jinsu\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\absl\\flags\\_flagvalues.py in __call__(self, argv, known_only)\r\n    628       suggestions = _helpers.get_flag_suggestions(name, list(self))\r\n    629       raise _exceptions.UnrecognizedFlagError(\r\n--> 630           name, value, suggestions=suggestions)\r\n    631 \r\n    632     self.mark_as_parsed()\r\n\r\nUnrecognizedFlagError: Unknown command line flag 'f'\r\n```\r\nThis is another\r\n```\r\nimport tensorflow as tf\r\n\r\nFLAGS = tf.app.flags.FLAGS\r\nFLAGS.learning_rate = 0.02\r\nFLAGS.name = 'test'\r\n\r\nprint(FLAGS.learning_rate)\r\nprint(FLAGS.name)\r\n```\r\n```\r\n---------------------------------------------------------------------------\r\nUnrecognizedFlagError                     Traceback (most recent call last)\r\n<ipython-input-1-fe17797ba132> in <module>()\r\n      2 \r\n      3 FLAGS = tf.app.flags.FLAGS\r\n----> 4 FLAGS.learning_rate = 0.02\r\n      5 FLAGS.name = 'test'\r\n      6 \r\n\r\nc:\\users\\jinsu\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\tensorflow\\python\\platform\\flags.py in __setattr__(self, name, value)\r\n     86 \r\n     87   def __setattr__(self, name, value):\r\n---> 88     return self.__dict__['__wrapped'].__setattr__(name, value)\r\n     89 \r\n     90   def __delattr__(self, name):\r\n\r\nc:\\users\\jinsu\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\absl\\flags\\_flagvalues.py in __setattr__(self, name, value)\r\n    494       raise AttributeError(name)\r\n    495     if name not in fl:\r\n--> 496       return self._set_unknown_flag(name, value)\r\n    497     fl[name].value = value\r\n    498     self._assert_validators(fl[name].validators)\r\n\r\nc:\\users\\jinsu\\appdata\\local\\programs\\python\\python36\\lib\\site-packages\\absl\\flags\\_flagvalues.py in _set_unknown_flag(self, name, value)\r\n    372       except NameError:  # Flag name is not valid.\r\n    373         pass\r\n--> 374     raise _exceptions.UnrecognizedFlagError(name, value)\r\n    375 \r\n    376   def append_flag_values(self, flag_values):\r\n\r\nUnrecognizedFlagError: Unknown command line flag 'learning_rate'\r\n\r\n```\r\nDid I miss anything??\r\nI cannot figure out what the problem is."},"comment":{"url":"https://api.github.com/repos/tensorflow/tensorflow/issues/comments/433543736","html_url":"https://github.com/tensorflow/tensorflow/issues/17702#issuecomment-433543736","issue_url":"https://api.github.com/repos/tensorflow/tensorflow/issues/17702","id":433543736,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzU0MzczNg==","user":{"login":"ymodak","id":42785357,"node_id":"MDQ6VXNlcjQyNzg1MzU3","avatar_url":"https://avatars1.githubusercontent.com/u/42785357?v=4","gravatar_id":"","url":"https://api.github.com/users/ymodak","html_url":"https://github.com/ymodak","followers_url":"https://api.github.com/users/ymodak/followers","following_url":"https://api.github.com/users/ymodak/following{/other_user}","gists_url":"https://api.github.com/users/ymodak/gists{/gist_id}","starred_url":"https://api.github.com/users/ymodak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ymodak/subscriptions","organizations_url":"https://api.github.com/users/ymodak/orgs","repos_url":"https://api.github.com/users/ymodak/repos","events_url":"https://api.github.com/users/ymodak/events{/privacy}","received_events_url":"https://api.github.com/users/ymodak/received_events","type":"User","site_admin":false},"created_at":"2018-10-26T21:07:39Z","updated_at":"2018-10-26T21:07:39Z","author_association":"NONE","body":"Closing due to staleness. Please use the latest version for TensorFLow and build again. Feel free to open a new issue if it still persists. Thanks!"}}
{"actor":{"display_login":"ymodak"}}