Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

demo does not work in pyCharm

Abierto
#58 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
python, spark, tensorflow

Línea de trabajo

Comienza con la demo en tensor_frame_test.py y sigue tfs.block a través de tensorframes/core.py, especialmente _auto_placeholder y _java_api. Comprueba cómo se carga el archivo tensorframes-0.2.3-s_2.10.jar proporcionado e investiga la clase faltante org.tensorframes.impl.DebugRowOps indicada. Se considera completado cuando la demo llega a df2.collect() sin la ClassNotFoundException.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

help wanted

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)

Lenguaje dominante
Scala
Estrellas
743
Forks
158
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de databricks/tensorframes

Todos los issues de databricks/tensorframes

Issues similares

Más issues de Scala

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.