Code Monkey home page Code Monkey logo

Comments (10)

KesterTong avatar KesterTong commented on June 20, 2024 2

Everything @Efaq Says above is correct: this should be done with Transform and must be done with TensorFlow ops (not py_func) so that it can be done in serving.

Please file an issue in the tensorflow/transform repo, and we can further discuss the exact functionality required.

from tfx.

Efaq avatar Efaq commented on June 20, 2024

Same issue here!

from tfx.

ruoyu90 avatar ruoyu90 commented on June 20, 2024

IIUC this is about converting 1 column into several features. You can use the transform component to do this by putting your logic into preprocessing_fn like our chicago taxi example.

from tfx.

Harshini-Gadige avatar Harshini-Gadige commented on June 20, 2024

For more information on using preprocessing_fn within Tensorflow Transform, please check Preprocessing function example here.

from tfx.

Efaq avatar Efaq commented on June 20, 2024

@ruoyu90 I think the issue goes through graph operations with dates, more than just converting one column into three. So:

  • task: given two date columns, generate a new column with the difference between them in days.
  • if we could use some python library (datetime for example), it would be trivial. Without the library, we would need to implement the knowledge about the calendar (number of days in each month etc)
  • I believe we cannot use a conventional python library because if we use it, the transformation would not be written to the graph, and thus we would not be able to have it at serving time.

If there is no way such operations to the graph, then as mentioned above we would need to implement a piece of pipeline transforming the data both before training and before serving, outside of the graph.

Does it make sense, or am I missing something here?

from tfx.

chanshah avatar chanshah commented on June 20, 2024

@tensorflow/transform-team please take a look.

from tfx.

Malonl avatar Malonl commented on June 20, 2024

Thanks for all of your replies. I will post an issue in the transform repo.

from tfx.

ian-hensel-apex avatar ian-hensel-apex commented on June 20, 2024

Any update on this?

from tfx.

dmitra79 avatar dmitra79 commented on June 20, 2024

Any update on these features? They really would be great to have!

from tfx.

pritamdodeja avatar pritamdodeja commented on June 20, 2024

Since tfx isn't supporting this, here is a workaround. You can use https://www.tensorflow.org/addons/api_docs/python/tfa/text/parse_time to parse the string to unix date time, and then derive temporal features from the number of seconds since 1970. I would almost be tempted to have a utility function that takes as input a list of columns that are date time and transforms those features to be unix time. I'll likely need to write this, and when I do, I'll post it here.

from tfx.

Related Issues (20)

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.