Guest User

Untitled

a guest
Oct 8th, 2020
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.51 KB | None | 0 0
  1. ---------------------------------------------------------------------------
  2. UnimplementedError Traceback (most recent call last)
  3. <ipython-input-24-f5130b4038c8> in <module>
  4. 1 get_ipython().system('mkdir DistilBERT')
  5. ----> 2 model.save("DistilBERT")
  6.  
  7. /opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/engine/network.py in save(self, filepath, overwrite, include_optimizer, save_format, signatures, options)
  8. 1050 """
  9. 1051 save.save_model(self, filepath, overwrite, include_optimizer, save_format,
  10. -> 1052 signatures, options)
  11. 1053
  12. 1054 def save_weights(self, filepath, overwrite=True, save_format=None):
  13.  
  14. /opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/saving/save.py in save_model(model, filepath, overwrite, include_optimizer, save_format, signatures, options)
  15. 136 else:
  16. 137 saved_model_save.save(model, filepath, overwrite, include_optimizer,
  17. --> 138 signatures, options)
  18. 139
  19. 140
  20.  
  21. /opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/saving/saved_model/save.py in save(model, filepath, overwrite, include_optimizer, signatures, options)
  22. 76 # we use the default replica context here.
  23. 77 with distribution_strategy_context._get_default_replica_context(): # pylint: disable=protected-access
  24. ---> 78 save_lib.save(model, filepath, signatures, options)
  25. 79
  26. 80 if not include_optimizer:
  27.  
  28. /opt/conda/lib/python3.7/site-packages/tensorflow/python/saved_model/save.py in save(obj, export_dir, signatures, options)
  29. 955 # the SavedModel proto itself.
  30. 956 utils_impl.get_or_create_variables_dir(export_dir)
  31. --> 957 object_saver.save(utils_impl.get_variables_path(export_dir))
  32. 958 builder_impl.copy_assets_to_destination_dir(asset_info.asset_filename_map,
  33. 959 export_dir)
  34.  
  35. /opt/conda/lib/python3.7/site-packages/tensorflow/python/training/tracking/util.py in save(self, file_prefix, checkpoint_number, session)
  36. 1185 file_io.recursive_create_dir(os.path.dirname(file_prefix))
  37. 1186 save_path, new_feed_additions = self._save_cached_when_graph_building(
  38. -> 1187 file_prefix=file_prefix_tensor, object_graph_tensor=object_graph_tensor)
  39. 1188 if new_feed_additions:
  40. 1189 feed_dict.update(new_feed_additions)
  41.  
  42. /opt/conda/lib/python3.7/site-packages/tensorflow/python/training/tracking/util.py in _save_cached_when_graph_building(self, file_prefix, object_graph_tensor)
  43. 1133 or context.executing_eagerly() or ops.inside_function()):
  44. 1134 saver = functional_saver.MultiDeviceSaver(named_saveable_objects)
  45. -> 1135 save_op = saver.save(file_prefix)
  46. 1136 with ops.device("/cpu:0"):
  47. 1137 with ops.control_dependencies([save_op]):
  48.  
  49. /opt/conda/lib/python3.7/site-packages/tensorflow/python/training/saving/functional_saver.py in save(self, file_prefix)
  50. 254 # _SingleDeviceSaver will use the CPU device when necessary, but initial
  51. 255 # read operations should be placed on the SaveableObject's device.
  52. --> 256 sharded_saves.append(saver.save(shard_prefix))
  53. 257
  54. 258 with ops.control_dependencies(sharded_saves):
  55.  
  56. /opt/conda/lib/python3.7/site-packages/tensorflow/python/training/saving/functional_saver.py in save(self, file_prefix)
  57. 68 for spec in saveable.specs:
  58. 69 tensor_names.append(spec.name)
  59. ---> 70 tensors.append(spec.tensor)
  60. 71 tensor_slices.append(spec.slice_spec)
  61. 72 with ops.device("cpu:0"):
  62.  
  63. /opt/conda/lib/python3.7/site-packages/tensorflow/python/training/saving/saveable_object.py in tensor(self)
  64. 53 @property
  65. 54 def tensor(self):
  66. ---> 55 return self._tensor() if callable(self._tensor) else self._tensor
  67. 56
  68. 57
  69.  
  70. /opt/conda/lib/python3.7/site-packages/tensorflow/python/training/saving/saveable_object_util.py in f()
  71. 89 def f():
  72. 90 with ops.device(v.device):
  73. ---> 91 x = v.read_value()
  74. 92 # To allow variables placed on non-CPU devices to be checkpointed,
  75. 93 # we copy them to CPU on the same machine first.
  76.  
  77. /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/resource_variable_ops.py in read_value(self)
  78. 667 # Return an identity so it can get placed on whatever device the context
  79. 668 # specifies instead of the device where the variable is.
  80. --> 669 return array_ops.identity(value)
  81. 670
  82. 671 def sparse_read(self, indices, name=None):
  83.  
  84. /opt/conda/lib/python3.7/site-packages/tensorflow/python/util/dispatch.py in wrapper(*args, **kwargs)
  85. 178 """Call target, and fall back on dispatchers if there is a TypeError."""
  86. 179 try:
  87. --> 180 return target(*args, **kwargs)
  88. 181 except (TypeError, ValueError):
  89. 182 # Note: convert_to_eager_tensor currently raises a ValueError, not a
  90.  
  91. /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/array_ops.py in identity(input, name)
  92. 280 # variables. Variables have correct handle data when graph building.
  93. 281 input = ops.convert_to_tensor(input)
  94. --> 282 ret = gen_array_ops.identity(input, name=name)
  95. 283 # Propagate handle data for happier shape inference for resource variables.
  96. 284 if hasattr(input, "_handle_data"):
  97.  
  98. /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/gen_array_ops.py in identity(input, name)
  99. 3896 pass # Add nodes to the TensorFlow graph.
  100. 3897 except _core._NotOkStatusException as e:
  101. -> 3898 _ops.raise_from_not_ok_status(e, name)
  102. 3899 # Add nodes to the TensorFlow graph.
  103. 3900 _, _, _op, _outputs = _op_def_library._apply_op_helper(
  104.  
  105. /opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/ops.py in raise_from_not_ok_status(e, name)
  106. 6651 message = e.message + (" name: " + name if name is not None else "")
  107. 6652 # pylint: disable=protected-access
  108. -> 6653 six.raise_from(core._status_to_exception(e.code, message), None)
  109. 6654 # pylint: enable=protected-access
  110. 6655
  111.  
  112. /opt/conda/lib/python3.7/site-packages/six.py in raise_from(value, from_value)
  113.  
  114. UnimplementedError: File system scheme '[local]' not implemented (file: 'DistilBERT/variables/variables_temp_c1e16b00842b4a46b45eb1d4a4e21a4e/part-00000-of-00002')
  115. Encountered when executing an operation using EagerExecutor. This error cancels all future operations and poisons their output tensors. [Op:Identity]
Advertisement
Add Comment
Please, Sign In to add comment