It looks like the config file at '/tmp/tmpjk2l9r6n' is not a valid JSON file.

#1
by burcukoc - opened

Hi,

I am trying to run the model and I’m getting this error when running select & load model.

Downloading (…)ptain-1337/CrudeBERT:
55.6k/? [00:00<00:00, 1.99MB/s]

JSONDecodeError Traceback (most recent call last)
/usr/local/lib/python3.9/dist-packages/transformers/configuration_utils.py in _get_config_dict(cls, pretrained_model_name_or_path, **kwargs)
657 # Load config dict
--> 658 config_dict = cls._dict_from_json_file(resolved_config_file)
659 config_dict["_commit_hash"] = commit_hash

8 frames
JSONDecodeError: Expecting value: line 1 column 1 (char 0)

During handling of the above exception, another exception occurred:

OSError Traceback (most recent call last)
/usr/local/lib/python3.9/dist-packages/transformers/configuration_utils.py in _get_config_dict(cls, pretrained_model_name_or_path, **kwargs)
659 config_dict["_commit_hash"] = commit_hash
660 except (json.JSONDecodeError, UnicodeDecodeError):
--> 661 raise EnvironmentError(
662 f"It looks like the config file at '{resolved_config_file}' is not a valid JSON file."
663 )

OSError: It looks like the config file at '/tmp/tmpjk2l9r6n' is not a valid JSON file.

Can you help me with that? Thank you.

Hi,

I believe that error is caused by my side.
I'll upload the files for JSON and config again.
Please let me know if that works for you.

Best Regards,

Hopefully it will work now :)

hi Captain-1337! Read your paper, looks cool, I'd like to play with your model, however I'm seeing this on the Hosted Inference API: Can't load tokenizer using from_pretrained, please update its configuration: stat: path should be string, bytes, os.PathLike or integer, not NoneType

Dear @rjwm

I appreciate your interest.
I'll try to fix it by Wednesday and notify you once done.

Best Regards

Hi,

I would like to apply this model to my dataset, but I Can't load tokenizer using from_pretrained, and get the same error:
stat: path should be string, bytes, os.PathLike or integer, not NoneType

can you please help me?
best regards

Hi,

I believe that error is unrelated to the tokenizer.
Try to set the path the following way:

sys.path.append('C:/Users/USERNAME/Desktop/finbert')
project_dir = Path.cwd().parent

path = project_dir/'Language_Models'/'CrudeBERT'

Warmest regards

Sign up or log in to comment