Пример #1
0
 def __init__(self, sc, sqlContext):
     registerContext(sc)
     self.__dict__['sqlcontext'] = sqlContext
     wrapClass("org.apache.spark.sql.DataFrame")
     self.__dict__['caffeonspark'] = wrapClass(
         "com.yahoo.ml.caffe.CaffeOnSpark")
     self.__dict__['cos'] = self.__dict__.get('caffeonspark')(sc)
Пример #2
0
 def __init__(self,sc,args=None):
     registerContext(sc)
     if (args != None) :
         args_list = self.__convert_dict_to_list(args)
         self.__dict__['config']=wrapClass("com.yahoo.ml.caffe.Config")(sc,args_list)
     else :
         self.__dict__['config']=wrapClass("com.yahoo.ml.caffe.Config")(sc)
Пример #3
0
 def __init__(self, sc, args=None):
     registerContext(sc)
     if (args != None):
         args_list = self.__convert_dict_to_list(args)
         self.__dict__['config'] = wrapClass("com.yahoo.ml.caffe.Config")(
             sc, args_list)
     else:
         self.__dict__['config'] = wrapClass("com.yahoo.ml.caffe.Config")(
             sc)
Пример #4
0
 def __init__(self, sc):
     registerContext(sc)
     spark_major_version = int(sc.version.split(".")[0])
     if spark_major_version >= 2:
         wrapClass("org.apache.spark.sql.Dataset")
     else:
         wrapClass("org.apache.spark.sql.DataFrame")
     self.__dict__["caffeonspark"] = wrapClass("com.yahoo.ml.caffe.CaffeOnSpark")
     self.__dict__["cos"] = self.__dict__.get("caffeonspark")(sc)
     self.__dict__["sqlcontext"] = SQLContext(sc, self.__dict__["cos"].sqlContext)
Пример #5
0
 def __init__(self, sc):
     registerContext(sc)
     spark_major_version = int(sc.version.split('.')[0])
     if spark_major_version >= 2:
         wrapClass("org.apache.spark.sql.Dataset")
     else:
         wrapClass("org.apache.spark.sql.DataFrame")
     self.__dict__['caffeonspark'] = wrapClass(
         "com.yahoo.ml.caffe.CaffeOnSpark")
     self.__dict__['cos'] = self.__dict__.get('caffeonspark')(sc)
     self.__dict__['sqlcontext'] = SQLContext(
         sc, self.__dict__['cos'].sqlContext)
Пример #6
0
 def __init__(self,sc,sqlContext):
     registerContext(sc)
     self.__dict__['sqlcontext']=sqlContext
     wrapClass("org.apache.spark.sql.DataFrame")
     self.__dict__['caffeonspark']=wrapClass("com.yahoo.ml.caffe.CaffeOnSpark")
     self.__dict__['cos']=self.__dict__.get('caffeonspark')(sc)
Пример #7
0
 def __init__(self, sc):
     registerContext(sc)
     self.dataSource = wrapClass("com.yahoo.ml.caffe.DataSource")
Пример #8
0
 def __init__(self,sc):
     registerContext(sc)
     self.dataSource=wrapClass("com.yahoo.ml.caffe.DataSource")