demo does not work in pyCharm
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 25/100
- Tipo di issue
- Bug
- Chiarezza
- Da chiarire
- Stato di attività
- Ferma
- Stack tecnologico
- python, spark, tensorflow
- Ambito
- data, distributed-systems, machine-learning
Direzione di ricerca
Inizia con la demo in tensor_frame_test.py e segui tfs.block attraverso tensorframes/core.py, in particolare _auto_placeholder e _java_api. Verifica come viene caricato il file tensorframes-0.2.3-s_2.10.jar fornito e analizza la classe mancante org.tensorframes.impl.DebugRowOps segnalata. Il lavoro è completato quando la demo raggiunge df2.collect() senza la ClassNotFoundException.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
i'm currently trying to run the demo in pyCharm my file looks like this:
the attached pyFile is the location of my tensorframes jar
import tensorflow as tf
from pyspark.sql import Row
from pyspark.sql import SparkSession
spark = SparkSession
.builder
.appName("PythonSQL")
.getOrCreate()
spark.sparkContext.addPyFile('/home/hdiuser/PycharmProjects/TensorFramesTest/tensorframes-0.2.3-s_2.10.jar')
import tensorframes as tfs
data = [Row(x=float(x)) for x in range(10)]
df = spark.createDataFrame(data)
print df.show()
with tf.Graph().as_default() as g:
#The TensorFlow placeholder that corresponds to column 'x'.
#The shape of the placeholder is automatically inferred from the DataFrame.
x = tfs.block(df, "x")
# The output that adds 3 to x
z = tf.add(x, 3, name='z')
# The resulting dataframe
df2 = tfs.map_blocks(z, df)
The transform is lazy as for most DataFrame operations. This will trigger it:
df2.collect()
the output is as follows:
| x|
+---+
|0.0|
|1.0|
|2.0|
|3.0|
|4.0|
|5.0|
|6.0|
|7.0|
|8.0|
|9.0|
+---+
None
Traceback (most recent call last):
File "/home/hdiuser/PycharmProjects/TensorFramesTest/tensor_frame_test.py", line 40, in
x = tfs.block(df, "x")
File "/tmp/spark-8785f696-946f-4b70-8c4f-11d5b1e1ecbc/userFiles-bb752893-c175-4844-968e-5ee426ef7e03/tensorframes-0.2.3-s_2.10.jar/tensorframes/core.py", line 315, in block
File "/tmp/spark-8785f696-946f-4b70-8c4f-11d5b1e1ecbc/userFiles-bb752893-c175-4844-968e-5ee426ef7e03/tensorframes-0.2.3-s_2.10.jar/tensorframes/core.py", line 333, in _auto_placeholder
File "/tmp/spark-8785f696-946f-4b70-8c4f-11d5b1e1ecbc/userFiles-bb752893-c175-4844-968e-5ee426ef7e03/tensorframes-0.2.3-s_2.10.jar/tensorframes/core.py", line 30, in _java_api
File "/home/hdiuser/anaconda2/envs/tensorflow/lib/python2.7/site-packages/py4j/java_gateway.py", line 1133, in call
answer, self.gateway_client, self.target_id, self.name)
File "/usr/hdp/current/spark-client/python/pyspark/sql/utils.py", line 63, in deco
return f(_a, *_kw)
File "/home/hdiuser/anaconda2/envs/tensorflow/lib/python2.7/site-packages/py4j/protocol.py", line 319, in get_return_value
format(target_id, ".", name), value)
py4j.protocol.Py4JJavaError: An error occurred while calling o67.loadClass.
: java.lang.ClassNotFoundException: org.tensorframes.impl.DebugRowOps
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:237)
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
at py4j.Gateway.invoke(Gateway.java:280)
at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:128)
at py4j.commands.CallCommand.execute(CallCommand.java:79)
at py4j.GatewayConnection.run(GatewayConnection.java:211)
at java.lang.Thread.run(Thread.java:745)
- Lingua principale
- Scala
- Stelle
- 743
- Fork
- 158
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di databricks/tensorframes
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
databricks/tensorframes#185 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
databricks/tensorframes#181 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
databricks/tensorframes#179 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 15/100
databricks/tensorframes#176 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 30/100
databricks/tensorframes#165 ·
Tutte le issue di databricks/tensorframes
Issue simili
-
ShuffleManagerRegistry.register recursion guard is inverted, permits GlutenShuffleManager subclasses Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
-
module: unknown type: bug/reported
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
OpenXiangShan/XiangShan#6623 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 70/100