Git Product home page Git Product logo

Comments (3)

leewyang avatar leewyang commented on May 25, 2024

This was mostly to account for different APIs and behaviors between different versions of TensorFlow, since different users of TFoS were on different versions of TensorFlow.

Anyhow, if you set the export_dir to an HDFS path, all chief/worker nodes would attempt to write to the same shared location, leading to various I/O errors. So, this just redirects non-chief workers to write to local disk, while the chief worker writes to HDFS. And in this case, we just consider the HDFS model as source of truth, while the various worker_models are discarded when the executor containers shut down.

If your cloud filesystem isn't supported by TF, then yes, you could just save to local disk and then copy it to your filesystem later. And in this case, each chief/worker would write to separate local disks, so you have any I/O conflicts, so you shouldn't need this compat code at all. Instead, you could just use:

model.save(export_dir, save_format='tf')

from tensorflowonspark.

doufs avatar doufs commented on May 25, 2024

@leewyang
image
thanks for your apply. as you said, the various worker_models are discarded when the executor containers shut down, as a result, we only saved the model file in the chief node. So is it a complete model file(ah, i mean, will it missing or lost something)? sorry, maybe i'm confused about the logic of saving model in distribute training.

from tensorflowonspark.

leewyang avatar leewyang commented on May 25, 2024

Yes, it is the complete model, and unfortunately, this is just how TF works at the moment.

from tensorflowonspark.

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.