)]}'
{
  "commit": "54441d239c4103f36c0080d1a6ac83e1e06f942b",
  "tree": "4f917785e3fe6188b8def234992a5fe321a9df5f",
  "parents": [
    "106ff4e41f4574a670499a43ecfdf0ccacc1ffe7"
  ],
  "author": {
    "name": "Katherine Wu",
    "email": "kathywu@google.com",
    "time": "Wed Dec 08 11:56:47 2021 -0800"
  },
  "committer": {
    "name": "TensorFlower Gardener",
    "email": "gardener@tensorflow.org",
    "time": "Wed Dec 08 12:03:34 2021 -0800"
  },
  "message": "Cache the results of list_children when exporting SavedModel, and trigger function side effects before gathering the children.\n\nAs part of the SavedModel layering project, `Trackable` will have a single function that returns all Trackable children -- functions included. That means that the following will be combined into a single function:\n- `_checkpoint_dependencies`\n- `_list_extra_dependencies_for_serialization`\n- `_list_functions_for_serialization`\n\nCurrently, SavedModel caches the result to `_list_functions_for_serialization`, but not for the other methods. Why? Because the functions returned from `_list_functions_for_serialization` can trigger side effects when tracing (such as adding a variable to the `Trackable`).\n\nWe need to keep the guarantee that children are only gathered a single time, because in many cases (such as the `Resource` class), new tf.functions are generated each time. In `Resource`, a new init/create/destroy function is generated inside `_list_functions_for_serialization`.\n\nTherefore, SavedModel saving must cache the results to `list_children`, while at the same time triggering the function tracing and side effects in the appropriate manner.\n\nPiperOrigin-RevId: 415061678\nChange-Id: I9c8d5fafcd4b67fb57cf66296a1fc9a5d3745e51\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "aaf7d541413c17d4d5ee1f3cf6f0369c30735db1",
      "old_mode": 33188,
      "old_path": "tensorflow/python/data/ops/dataset_ops.py",
      "new_id": "a43a9d7f07e2812928319f8b248436d31dd15f10",
      "new_mode": 33188,
      "new_path": "tensorflow/python/data/ops/dataset_ops.py"
    },
    {
      "type": "modify",
      "old_id": "327d9625e8ad8462f93be7540cd276f6575fae9c",
      "old_mode": 33188,
      "old_path": "tensorflow/python/saved_model/save.py",
      "new_id": "fb6338cf5f67a3970cb261bcbafe1b464b1b8aa2",
      "new_mode": 33188,
      "new_path": "tensorflow/python/saved_model/save.py"
    }
  ]
}
