Skip to content

fix tests #753

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion paddlemix/models/clip/clip_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def from_pretrained(

return cls.from_dict(config_dict, **kwargs)

def to_dict(self):
def to_dict(self, saving_file=False):
"""
Serializes this instance to a Python dictionary. Override the default [`~PretrainedConfig.to_dict`].

Expand Down
2 changes: 1 addition & 1 deletion paddlemix/models/clip/coca_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def from_pretrained(cls, pretrained_model_name_or_path: Union[str, os.PathLike],

return cls.from_dict(config_dict, **kwargs)

def to_dict(self):
def to_dict(self, saving_file=False):
"""
Serializes this instance to a Python dictionary. Override the default [`~PretrainedConfig.to_dict`].

Expand Down
2 changes: 1 addition & 1 deletion paddlemix/models/clip/eva_clip_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def from_pretrained(

return cls.from_dict(config_dict, **kwargs)

def to_dict(self):
def to_dict(self, saving_file=False):
"""
Serializes this instance to a Python dictionary. Override the default [`~PretrainedConfig.to_dict`].

Expand Down
2 changes: 1 addition & 1 deletion paddlemix/models/imagebind/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ def from_text_vision_configs(
**kwargs,
)

def to_dict(self):
def to_dict(self, saving_file=False):
"""
Serializes this instance to a Python dictionary. Override the default [`~PretrainedConfig.to_dict`].

Expand Down
2 changes: 1 addition & 1 deletion paddlemix/models/minigpt4/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def from_vision_qformer_text_configs(
**kwargs,
)

def to_dict(self):
def to_dict(self, saving_file=False):
"""
Serializes this instance to a Python dictionary. Override the default [`~PretrainedConfig.to_dict`].
Returns:
Expand Down
2 changes: 1 addition & 1 deletion paddlemix/models/visualglm/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def from_vision_qformer_text_configs(
**kwargs,
)

def to_dict(self):
def to_dict(self, saving_file=False):
"""
Serializes this instance to a Python dictionary. Override the default [`~PretrainedConfig.to_dict`].
Returns:
Expand Down
2 changes: 1 addition & 1 deletion paddlemix/processors/image_processing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ def from_dict(cls, image_processor_dict: Dict[str, Any], **kwargs):
else:
return image_processor

def to_dict(self) -> Dict[str, Any]:
def to_dict(self, saving_file=False) -> Dict[str, Any]:
"""
Serializes this instance to a Python dictionary.

Expand Down
2 changes: 1 addition & 1 deletion paddlemix/processors/processing_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ def from_dict(cls, processor_dict: Dict[str, Any], **kwargs):
else:
return processor

def to_dict(self) -> Dict[str, Any]:
def to_dict(self, saving_file=False) -> Dict[str, Any]:
"""
Serializes this instance to a Python dictionary.

Expand Down
4 changes: 2 additions & 2 deletions tests/models/test_evaclip.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
CLIP_PRETRAINED_MODEL_ARCHIVE_LIST = ["paddlemix/EVA/EVA02-CLIP-L-14"]

tracker = get_rng_state_tracker()
# tracker.add("global_seed", 9987)
# tracker.add("local_seed", 1025)
tracker.add("global_seed", 6666)
tracker.add("local_seed", 1025)


class EVAVisionTransformerModelTester:
Expand Down