You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to convert a model that I fine tuned in python to tensorflow js format to use it in the web.
the fine tuned model folder has the following files:
config.json
generation_config.json
model.safetensors
special_tokens_map.json
tokenizer_config.json
tokenizer.json
I followed the same instructions for converting it using both tensorflowjs_convertor and tensorflowjs_wizard its all returning the same error bellow.
Relevant code
## command line code 1tensorflowjs_converter \ --input_format=tf_saved_model \ --output_node_names='finetuned_task_to_json_model' \ --saved_model_tags=serve \ ./llm-testing/task_to_json_fine_tuned_model \ ./llm-testing/task_to_json_fine_tuned_tfjs_model## command line code 2tensorflowjs_wizard
Relevant log output
C:\Users\User_Name\AppData\Roaming\Python\Python312\site-packages\tensorflowjs\read_weights.py:28: FutureWarning: In the future `np.object` will be defined as the corresponding NumPy scalar.
np.uint8, np.uint16, np.object, np.bool]
Traceback (most recent call last):
File "c:\Users\User_Name\Projects\Local\random-scripts\llm-testing\fine-tuning-model.py", line 70, in<module>
import tensorflowjs as tfjs
File "C:\Users\User_Name\AppData\Roaming\Python\Python312\site-packages\tensorflowjs\__init__.py", line 21, in<module>
from tensorflowjs import converters
File "C:\Users\User_Name\AppData\Roaming\Python\Python312\site-packages\tensorflowjs\converters\__init__.py", line 21, in<module>
from tensorflowjs.converters.converter import convert
File "C:\Users\User_Name\AppData\Roaming\Python\Python312\site-packages\tensorflowjs\converters\converter.py", line 35, in<module>
from tensorflowjs.converters import keras_h5_conversion as conversion
File "C:\Users\User_Name\AppData\Roaming\Python\Python312\site-packages\tensorflowjs\converters\keras_h5_conversion.py", line 33, in<module>
from tensorflowjs import write_weights # pylint: disable=import-error
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\User_Name\AppData\Roaming\Python\Python312\site-packages\tensorflowjs\write_weights.py", line 25, in<module>
from tensorflowjs import read_weights
File "C:\Users\User_Name\AppData\Roaming\Python\Python312\site-packages\tensorflowjs\read_weights.py", line 28, in<module>
np.uint8, np.uint16, np.object, np.bool]
^^^^^^^^^
File "C:\Python312\Lib\site-packages\numpy\__init__.py", line 338, in __getattr__
raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'object'.
`np.object` was a deprecated aliasforthe builtin `object`. To avoid this errorin existing code, use `object` by itself. Doing this will not modify any behavior and is safe.
The aliases was originally deprecated in NumPy 1.20;for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'object_'?
tensorflow_hub Version
0.12.0 (latest stable release)
TensorFlow Version
2.8 (latest stable release)
Other libraries
No response
Python Version
3.x
OS
Windows
The text was updated successfully, but these errors were encountered:
What happened?
I'm trying to convert a model that I fine tuned in python to tensorflow js format to use it in the web.
the fine tuned model folder has the following files:
config.json
generation_config.json
model.safetensors
special_tokens_map.json
tokenizer_config.json
tokenizer.json
I followed the same instructions for converting it using both
tensorflowjs_convertor
andtensorflowjs_wizard
its all returning the same error bellow.Relevant code
Relevant log output
tensorflow_hub Version
0.12.0 (latest stable release)
TensorFlow Version
2.8 (latest stable release)
Other libraries
No response
Python Version
3.x
OS
Windows
The text was updated successfully, but these errors were encountered: