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 am getting the following error when running the code. Does merge kit require a specific version of pydantic? The one I have installed is 2.7.1
If anyone experienced anything similar to this or knows how to solve it, any help would be greatly appreciated :)
Error:
Traceback (most recent call last):
File "/Users/hugocalero/Desktop/PruneMe/slice_with_mergekit/merge_me.py", line 18, in
run_merge(
File "/Users/hugocalero/Desktop/PruneMe/slice_with_mergekit/mergekit/mergekit/merge.py", line 87, in run_merge
).plan_to_disk(out_path=out_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/hugocalero/Desktop/PruneMe/slice_with_mergekit/mergekit/mergekit/plan.py", line 259, in plan_to_disk
self._plan()
File "/Users/hugocalero/Desktop/PruneMe/slice_with_mergekit/mergekit/mergekit/plan.py", line 308, in _plan
ConfigReader(
File "/Users/hugocalero/Desktop/PruneMe/venv/lib/python3.11/site-packages/pydantic/main.py", line 176, in init
self.pydantic_validator.validate_python(data, self_instance=self)
pydantic_core.pydantic_core.ValidationError: 1 validation error for ConfigReader
config
Input should be a valid dictionary or instance of MergeConfiguration [type=model_type, input_value=MergeConfiguration(merge...te=None, out_dtype=None), input_type=MergeConfiguration]
For further information visit https://errors.pydantic.dev/2.7/v/model_type
The text was updated successfully, but these errors were encountered:
Thank you for your answer. I have tried deleting such space, but I am still getting the same error saying the input is not a valid dict or instance of MergeConfiguration.
The merge_config variable that is loaded is: merge_method='passthrough' slices=[OutputSliceDefinition(sources=[InputSliceDefinition(model=ModelReference(model=ModelPath(path='HuggingFaceTB/SmolLM-360M-Instruct', revision=None), lora=None, override_architecture=None), layer_range=(0, 2), parameters=None), InputSliceDefinition(model=ModelReference(model=ModelPath(path='HuggingFaceTB/SmolLM-360M-Instruct', revision=None), lora=None, override_architecture=None), layer_range=(11, 32), parameters=None)], base_model=None, residual_weight=None, parameters=None)] models=None parameters=None base_model=None dtype='bfloat16' tokenizer_source=None tokenizer=None chat_template=None out_dtype=None
Hello!
I am trying to use the following notebook (https://github.com/arcee-ai/mergekit/blob/main/notebook.ipynb) with this yaml configuration file:
'''
slices:
layer_range: [0, 2]
layer_range: [11,32]
merge_method: passthrough
dtype: bfloat16
'''
I am getting the following error when running the code. Does merge kit require a specific version of pydantic? The one I have installed is 2.7.1
If anyone experienced anything similar to this or knows how to solve it, any help would be greatly appreciated :)
Error:
Traceback (most recent call last):
File "/Users/hugocalero/Desktop/PruneMe/slice_with_mergekit/merge_me.py", line 18, in
run_merge(
File "/Users/hugocalero/Desktop/PruneMe/slice_with_mergekit/mergekit/mergekit/merge.py", line 87, in run_merge
).plan_to_disk(out_path=out_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/hugocalero/Desktop/PruneMe/slice_with_mergekit/mergekit/mergekit/plan.py", line 259, in plan_to_disk
self._plan()
File "/Users/hugocalero/Desktop/PruneMe/slice_with_mergekit/mergekit/mergekit/plan.py", line 308, in _plan
ConfigReader(
File "/Users/hugocalero/Desktop/PruneMe/venv/lib/python3.11/site-packages/pydantic/main.py", line 176, in init
self.pydantic_validator.validate_python(data, self_instance=self)
pydantic_core.pydantic_core.ValidationError: 1 validation error for ConfigReader
config
Input should be a valid dictionary or instance of MergeConfiguration [type=model_type, input_value=MergeConfiguration(merge...te=None, out_dtype=None), input_type=MergeConfiguration]
For further information visit https://errors.pydantic.dev/2.7/v/model_type
The text was updated successfully, but these errors were encountered: