Given model weights format not compatible with femr 0.2.4
#5
by danvag - opened
Hello!
I am trying to use MOTOR on the MIMIC dataset following this tutorial: https://github.com/som-shahlab/femr/blob/main/tutorials/5_MOTOR%20Featurization%20And%20Modeling.ipynb . I have also converted MIMIC to a format compatible with meds_reader using https://github.com/Medical-Event-Data-Standard/meds_etl , as suggested.
However, it seems like there is a mismatch in the model weights format shared here and the one femr 0.2.4 expects (error message below):
File "/users/danai/.conda/envs/MOTOR_env/lib/python3.11/site-packages/femr/models/transformer.py", line 483, in compute_features
model = femr.models.transformer.FEMRModel.from_pretrained(model_path, task_config=task.get_task_config())
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/users/danai/.conda/envs/MOTOR_env/lib/python3.11/site-packages/transformers/modeling_utils.py", line 4057, in from_pretrained
checkpoint_files, sharded_metadata = _get_resolved_checkpoint_files(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/users/danai/.conda/envs/MOTOR_env/lib/python3.11/site-packages/transformers/modeling_utils.py", line 571, in _get_resolved_checkpoint_files
raise OSError(
OSError: Error no file named model.safetensors, or pytorch_model.bin, found in directory /users/danai/data/MOTOR.
Would it be possible to share the model weights in a format that is compatible with femr 0.2.4 and meds_reader, so that anyone following your tutorials can use them?
Many thanks in advance!