tensorflow.python.framework.errors_impl.UnknownError:输入/输出错误

时间:2018-06-02 21:43:29

标签: python-3.x azure tensorflow pyspark databricks

我们正尝试使用yahoo的python框架tensorflowonspark将Spark上的Tensorflow与Azure Databricks集群一起使用。

到目前为止我们做了什么:

按照此Databricks thread的说明进行操作。

下载笔记本并使用预先构建的MNIST在Azure Databricks集群上成功运行它.tfrecords

当我们收到错误时

现在,我们已通过此脚本将MNIST转换为.tfrecords。并上传到S3。 在那之后,每当我们尝试启动训练脚本时,我们都会陷入困境。

这是错误日志:

18/06/02 20:35:05 ERROR Executor: Exception in task 1.3 in stage 0.0 (TID 4)
org.apache.spark.api.python.PythonException: Traceback (most recent call last):
File "/databricks/spark/python/pyspark/worker.py", line 229, in main
process()
File "/databricks/spark/python/pyspark/worker.py", line 224, in process
serializer.dump_stream(func(split_index, iterator), outfile)
File "/databricks/spark/python/pyspark/rdd.py", line 2438, in pipeline_func
return func(split, prev_func(split, iterator))
File "/databricks/spark/python/pyspark/rdd.py", line 2438, in pipeline_func
return func(split, prev_func(split, iterator))
File "/databricks/spark/python/pyspark/rdd.py", line 2438, in pipeline_func
return func(split, prev_func(split, iterator))
File "/databricks/spark/python/pyspark/rdd.py", line 2438, in pipeline_func
return func(split, prev_func(split, iterator))
File "/databricks/spark/python/pyspark/rdd.py", line 362, in func
return f(iterator)
File "/databricks/spark/python/pyspark/rdd.py", line 809, in func
r = f(it)
File "/databricks/python/lib/python3.5/site-packages/tensorflowonspark/TFSparkNode.py", line 353, in _mapfn
wrapper_fn(tf_args, ctx)
File "/databricks/python/lib/python3.5/site-packages/tensorflowonspark/TFSparkNode.py", line 310, in wrapper_fn
fn(args, context)
File "<command-4392809887925381>", line 31, in train
File "<command-4392809887925376>", line 40, in worker_function
File "<command-4392809887925444>", line 43, in add_optimizers_and_launch_sess
File "/databricks/python/lib/python3.5/site-packages/tensorflow/python/training/supervisor.py", line 727, in prepare_or_wait_for_session
self._write_graph()
File "/databricks/python/lib/python3.5/site-packages/tensorflow/python/training/supervisor.py", line 630, in _write_graph
self._logdir, "graph.pbtxt")
File "/databricks/python/lib/python3.5/site-packages/tensorflow/python/framework/graph_io.py", line 71, in write_graph
text_format.MessageToString(graph_def))
File "/databricks/python/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 431, in atomic_write_string_to_file
rename(temp_pathname, filename, overwrite)
File "/databricks/python/lib/python3.5/site-packages/tensorflow/python/lib/io/file_io.py", line 410, in rename
compat.as_bytes(oldname), compat.as_bytes(newname), overwrite, status)
File "/databricks/python/lib/python3.5/site-packages/tensorflow/python/framework/errors_impl.py", line 519, in __exit__
c_api.TF_GetCode(self.status.status))
tensorflow.python.framework.errors_impl.UnknownError: /dbfs/mnt/mnist-checkpoint-dir/graph.pbtxt.tmp2eed09f69a3443e0ac3c8ef02bdec6e0; Input/output error

at org.apache.spark.api.python.BasePythonRunner$ReaderIterator.handlePythonException(PythonRunner.scala:303)
at org.apache.spark.api.python.PythonRunner$$anon$1.read(PythonRunner.scala:443)
at org.apache.spark.api.python.PythonRunner$$anon$1.read(PythonRunner.scala:426)
at org.apache.spark.api.python.BasePythonRunner$ReaderIterator.hasNext(PythonRunner.scala:257)
at org.apache.spark.InterruptibleIterator.hasNext(InterruptibleIterator.scala:37)
at scala.collection.Iterator$class.foreach(Iterator.scala:893)
at org.apache.spark.InterruptibleIterator.foreach(InterruptibleIterator.scala:28)
at scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:59)
at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:104)
at scala.collection.mutable.ArrayBuffer.$plus$plus$eq(ArrayBuffer.scala:48)
at scala.collection.TraversableOnce$class.to(TraversableOnce.scala:310)
at org.apache.spark.InterruptibleIterator.to(InterruptibleIterator.scala:28)
at scala.collection.TraversableOnce$class.toBuffer(TraversableOnce.scala:302)
at org.apache.spark.InterruptibleIterator.toBuffer(InterruptibleIterator.scala:28)
at scala.collection.TraversableOnce$class.toArray(TraversableOnce.scala:289)
at org.apache.spark.InterruptibleIterator.toArray(InterruptibleIterator.scala:28)
at org.apache.spark.rdd.RDD$$anonfun$collect$1$$anonfun$12.apply(RDD.scala:951)
at org.apache.spark.rdd.RDD$$anonfun$collect$1$$anonfun$12.apply(RDD.scala:951)
at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:2166)
at org.apache.spark.SparkContext$$anonfun$runJob$5.apply(SparkContext.scala:2166)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:87)
at org.apache.spark.scheduler.Task.run(Task.scala:111)
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:349)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

我们找不到与此错误相关的任何线程。

由于我是Distributed Tensorflow的新手,任何帮助都会非常值得注意。

0 个答案:

没有答案