Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ---------------------------------------------------------------------------
- UnimplementedError Traceback (most recent call last)
- <ipython-input-24-f5130b4038c8> in <module>
- 1 get_ipython().system('mkdir DistilBERT')
- ----> 2 model.save("DistilBERT")
- /opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/engine/network.py in save(self, filepath, overwrite, include_optimizer, save_format, signatures, options)
- 1050 """
- 1051 save.save_model(self, filepath, overwrite, include_optimizer, save_format,
- -> 1052 signatures, options)
- 1053
- 1054 def save_weights(self, filepath, overwrite=True, save_format=None):
- /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)
- 136 else:
- 137 saved_model_save.save(model, filepath, overwrite, include_optimizer,
- --> 138 signatures, options)
- 139
- 140
- /opt/conda/lib/python3.7/site-packages/tensorflow/python/keras/saving/saved_model/save.py in save(model, filepath, overwrite, include_optimizer, signatures, options)
- 76 # we use the default replica context here.
- 77 with distribution_strategy_context._get_default_replica_context(): # pylint: disable=protected-access
- ---> 78 save_lib.save(model, filepath, signatures, options)
- 79
- 80 if not include_optimizer:
- /opt/conda/lib/python3.7/site-packages/tensorflow/python/saved_model/save.py in save(obj, export_dir, signatures, options)
- 955 # the SavedModel proto itself.
- 956 utils_impl.get_or_create_variables_dir(export_dir)
- --> 957 object_saver.save(utils_impl.get_variables_path(export_dir))
- 958 builder_impl.copy_assets_to_destination_dir(asset_info.asset_filename_map,
- 959 export_dir)
- /opt/conda/lib/python3.7/site-packages/tensorflow/python/training/tracking/util.py in save(self, file_prefix, checkpoint_number, session)
- 1185 file_io.recursive_create_dir(os.path.dirname(file_prefix))
- 1186 save_path, new_feed_additions = self._save_cached_when_graph_building(
- -> 1187 file_prefix=file_prefix_tensor, object_graph_tensor=object_graph_tensor)
- 1188 if new_feed_additions:
- 1189 feed_dict.update(new_feed_additions)
- /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)
- 1133 or context.executing_eagerly() or ops.inside_function()):
- 1134 saver = functional_saver.MultiDeviceSaver(named_saveable_objects)
- -> 1135 save_op = saver.save(file_prefix)
- 1136 with ops.device("/cpu:0"):
- 1137 with ops.control_dependencies([save_op]):
- /opt/conda/lib/python3.7/site-packages/tensorflow/python/training/saving/functional_saver.py in save(self, file_prefix)
- 254 # _SingleDeviceSaver will use the CPU device when necessary, but initial
- 255 # read operations should be placed on the SaveableObject's device.
- --> 256 sharded_saves.append(saver.save(shard_prefix))
- 257
- 258 with ops.control_dependencies(sharded_saves):
- /opt/conda/lib/python3.7/site-packages/tensorflow/python/training/saving/functional_saver.py in save(self, file_prefix)
- 68 for spec in saveable.specs:
- 69 tensor_names.append(spec.name)
- ---> 70 tensors.append(spec.tensor)
- 71 tensor_slices.append(spec.slice_spec)
- 72 with ops.device("cpu:0"):
- /opt/conda/lib/python3.7/site-packages/tensorflow/python/training/saving/saveable_object.py in tensor(self)
- 53 @property
- 54 def tensor(self):
- ---> 55 return self._tensor() if callable(self._tensor) else self._tensor
- 56
- 57
- /opt/conda/lib/python3.7/site-packages/tensorflow/python/training/saving/saveable_object_util.py in f()
- 89 def f():
- 90 with ops.device(v.device):
- ---> 91 x = v.read_value()
- 92 # To allow variables placed on non-CPU devices to be checkpointed,
- 93 # we copy them to CPU on the same machine first.
- /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/resource_variable_ops.py in read_value(self)
- 667 # Return an identity so it can get placed on whatever device the context
- 668 # specifies instead of the device where the variable is.
- --> 669 return array_ops.identity(value)
- 670
- 671 def sparse_read(self, indices, name=None):
- /opt/conda/lib/python3.7/site-packages/tensorflow/python/util/dispatch.py in wrapper(*args, **kwargs)
- 178 """Call target, and fall back on dispatchers if there is a TypeError."""
- 179 try:
- --> 180 return target(*args, **kwargs)
- 181 except (TypeError, ValueError):
- 182 # Note: convert_to_eager_tensor currently raises a ValueError, not a
- /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/array_ops.py in identity(input, name)
- 280 # variables. Variables have correct handle data when graph building.
- 281 input = ops.convert_to_tensor(input)
- --> 282 ret = gen_array_ops.identity(input, name=name)
- 283 # Propagate handle data for happier shape inference for resource variables.
- 284 if hasattr(input, "_handle_data"):
- /opt/conda/lib/python3.7/site-packages/tensorflow/python/ops/gen_array_ops.py in identity(input, name)
- 3896 pass # Add nodes to the TensorFlow graph.
- 3897 except _core._NotOkStatusException as e:
- -> 3898 _ops.raise_from_not_ok_status(e, name)
- 3899 # Add nodes to the TensorFlow graph.
- 3900 _, _, _op, _outputs = _op_def_library._apply_op_helper(
- /opt/conda/lib/python3.7/site-packages/tensorflow/python/framework/ops.py in raise_from_not_ok_status(e, name)
- 6651 message = e.message + (" name: " + name if name is not None else "")
- 6652 # pylint: disable=protected-access
- -> 6653 six.raise_from(core._status_to_exception(e.code, message), None)
- 6654 # pylint: enable=protected-access
- 6655
- /opt/conda/lib/python3.7/site-packages/six.py in raise_from(value, from_value)
- UnimplementedError: File system scheme '[local]' not implemented (file: 'DistilBERT/variables/variables_temp_c1e16b00842b4a46b45eb1d4a4e21a4e/part-00000-of-00002')
- 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