Giter Site home page Giter Site logo

linkedin / avro2tf Goto Github PK

View Code? Open in Web Editor NEW
125.0 125.0 21.0 37.46 MB

Avro2TF is designed to fill the gap of making users' training data ready to be consumed by deep learning training frameworks.

License: BSD 2-Clause "Simplified" License

Scala 100.00%
deep-learning linkedin machine-learning tensorflow

avro2tf's People

Contributors

alice2008 avatar annyan09023 avatar cyzhangchenya avatar ddicato avatar ganeshparameswaran avatar plliao avatar sacsar avatar wensheng-sun avatar yiming200x avatar zhangxuhong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

avro2tf's Issues

java.util.NoSuchElementException: No value found for 'sparseVector'

The README talks about setting the dtype to 'sparseVector', which is an older form of this library. You'd get the error above about "No value found for 'sparseVector'".

The documentation should talk more about how the fields "isSparse": true | false , "dtype": "float", and "isDocumentFeature": true | false are used together to produce the indices and values output and how the naming works. This will allow people to know how to use the library from the documentation without having to go into the tutorial.

In the README, it uses 'words_wideFeatures_sparse', but doesn't give any details.

GCP support via Dataproc

Opening this issue to add support to Google Cloud Dataproc for Avro2TF.

  1. Add initialization action
  2. Create example (Read BigQuery table (Public Datasets), export table to Avro format and use Avro2TF to generate TF records).
  3. Train a model using TF records.

demo data throws NoSuchElementException: No value found for 'sparseVector' when parsing json config file

I use the default json file

{
  "features": [
    {
      "inputFeatureInfo": {
        "columnExpr": "userId"
      },
      "outputTensorInfo": {
        "name": "userId",
        "dtype": "long",
        "shape": [
          -1
        ]
      }
    },
    {
      "inputFeatureInfo": {
        "columnExpr": "movieId",
        "transformConfig": {
          "hashInfo": {
            "hashBucketSize": 1000,
            "numHashFunctions": 4
          }
        }
      },
      "outputTensorInfo": {
        "name": "movieId_hashed",
        "dtype": "long",
        "shape": [
          4
        ]
      }
    },
    {
      "inputFeatureInfo": {
        "columnExpr": "genreFeatures.term"
      },
      "outputTensorInfo": {
        "name": "genreFeatures_term",
        "dtype": "long",
        "shape": [
          -1
        ]
      }
    },
    {
      "inputFeatureInfo": {
        "columnConfig": {
          "genreFeatures": {
            "whitelist": [
              "Genre"
            ]
          },
          "movieLatentFactorFeatures": {
            "blacklist": [
              "0"
            ]
          }
        },
        "transformConfig": {
          "hashInfo": {
            "hashBucketSize": 100,
            "combiner": "AVG"
          }
        }
      },
      "outputTensorInfo": {
        "name": "genreFeatures_movieLatentFactorFeatures",
        "dtype": "SparseVector",
        "shape": []
      }
    }
  ],
  "labels": [
    {
      "inputFeatureInfo": {
        "columnExpr": "response"
      },
      "outputTensorInfo": {
        "name": "response",
        "dtype": "double",
        "shape": []
      }
    }
  ]
}

it throws the following exception:

Error: Option --avro2tf-config-path failed when given 'tensorizeIn_config_movielens.json'. java.util.NoSuchElementException: No value found for 'sparseVector'
	at scala.Enumeration.withName(Enumeration.scala:124)
	at io.circe.Decoder$$anonfun$enumDecoder$1$$anonfun$apply$22$$anonfun$apply$23.apply(Decoder.scala:1097)
	at io.circe.Decoder$$anonfun$enumDecoder$1$$anonfun$apply$22$$anonfun$apply$23.apply(Decoder.scala:1097)
	at scala.util.Try$.apply(Try.scala:192)
	at io.circe.Decoder$$anonfun$enumDecoder$1$$anonfun$apply$22.apply(Decoder.scala:1097)
	at io.circe.Decoder$$anonfun$enumDecoder$1$$anonfun$apply$22.apply(Decoder.scala:1096)
	at io.circe.Decoder$$anon$37.apply(Decoder.scala:438)
	at io.circe.Decoder$class.tryDecode(Decoder.scala:46)
	at io.circe.Decoder$$anon$37.tryDecode(Decoder.scala:437)
	at io.circe.Decoder$$anon$22.tryDecode(Decoder.scala:94)
	at com.linkedin.avro2tf.parsers.Avro2TFConfigParser$$anonfun$1$anon$importedDecoder$macro$190$1$$anon$25.configuredDecode(Avro2TFConfigParser.scala:31)
	at io.circe.generic.extras.decoding.ConfiguredDecoder$CaseClassConfiguredDecoder.apply(ConfiguredDecoder.scala:58)
	at io.circe.Decoder$class.tryDecode(Decoder.scala:46)
	at io.circe.generic.decoding.DerivedDecoder.tryDecode(DerivedDecoder.scala:6)
	at com.linkedin.avro2tf.parsers.Avro2TFConfigParser$$anonfun$1$anon$importedDecoder$macro$190$1$$anon$30.configuredDecode(Avro2TFConfigParser.scala:31)
	at io.circe.generic.extras.decoding.ConfiguredDecoder$CaseClassConfiguredDecoder.apply(ConfiguredDecoder.scala:58)
	at io.circe.Decoder$class.decodeJson(Decoder.scala:64)
	at io.circe.generic.decoding.DerivedDecoder.decodeJson(DerivedDecoder.scala:6)
	at io.circe.Parser$class.finishDecode(Parser.scala:13)
	at io.circe.config.parser$.finishDecode(parser.scala:64)
	at io.circe.config.parser$.decode(parser.scala:164)
	at io.circe.config.syntax$CirceConfigOps$.as$extension0(syntax.scala:176)
	at com.linkedin.avro2tf.parsers.Avro2TFConfigParser$$anonfun$1.apply(Avro2TFConfigParser.scala:31)
	at com.linkedin.avro2tf.parsers.Avro2TFConfigParser$$anonfun$1.apply(Avro2TFConfigParser.scala:31)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
	at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
	at scala.collection.Iterator$class.foreach(Iterator.scala:893)
	at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
	at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
	at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
	at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
	at scala.collection.AbstractTraversable.map(Traversable.scala:104)
	at com.linkedin.avro2tf.parsers.Avro2TFConfigParser$.getAvro2TFConfiguration(Avro2TFConfigParser.scala:31)
	at com.linkedin.avro2tf.parsers.Avro2TFJobParamsParser$$anon$1$$anonfun$11.apply(Avro2TFJobParamsParser.scala:208)
	at com.linkedin.avro2tf.parsers.Avro2TFJobParamsParser$$anon$1$$anonfun$11.apply(Avro2TFJobParamsParser.scala:179)
	at scopt.OptionDef$$anonfun$34.apply(options.scala:600)
	at scopt.OptionDef.applyArgument(options.scala:679)
	at scopt.OptionParser.scopt$OptionParser$$handleArgument$1(options.scala:444)
	at scopt.OptionParser.parse(options.scala:490)
	at com.linkedin.avro2tf.parsers.Avro2TFJobParamsParser$.parse(Avro2TFJobParamsParser.scala:359)
	at com.tencent.weishi.recall.DataFrame2TFRecord$.main(DataFrame2TFRecord.scala:169)
	at com.tencent.weishi.recall.DataFrame2TFRecord.main(DataFrame2TFRecord.scala)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.spark.deploy.yarn.ApplicationMaster$$anon$4.run(ApplicationMaster.scala:727)

Partition skew when TensorizeIn computes 'max' of its integer columns

There appears to be an intermittent performance issue, where the "head at TensorMetadataGeneration.scala:113" job can take almost an hour in a single executor, while all other executors take less than 1-2 minutes.

Perhaps agg(Map[String, String]) is less efficient (or less Catalyst-optimizable) than agg(Column, Column*).

Restore support for "accept single value as array" in config?

In looking at the diff in #39, I noticed that DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY was set to true, but, after #31 was merged, this effectively became false. This behavior wasn't documented or tested, but could be restored if desired. (I assume it was intended to be used with the labels field.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.