Skip to content
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

[WIP] Add mindone transformers model tests #752

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

CaitinZhao
Copy link
Collaborator

What does this PR do?

Fixes # (issue)

Adds # (feature)

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline?
  • Did you make sure to update the documentation with your changes? E.g. record bug fixes or new features in What's New. Here are the
    documentation guidelines
  • Did you build and run the code without any errors?
  • Did you report the running environment (NPU type/MS version) and performance in the doc? (better record it for data loading, model inference, or training tasks)
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@xxx

@CaitinZhao CaitinZhao changed the title Add mindone transformers model tests [WIP] Add mindone transformers model tests Nov 14, 2024
@@ -4,7 +4,7 @@

import mindspore as ms

from .modeling_test_utils import compute_diffs, generalized_parse_args, get_modules
from ..modeling_test_utils import compute_diffs, generalized_parse_args, get_modules

THRESHOLD_FP16 = 1e-2
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why 1e-2


@pytest.mark.parametrize(
"name,pt_module,ms_module,init_args,init_kwargs,inputs_args,inputs_kwargs,outputs_map,dtype,mode",
[case + context for case in CLIP_CASES for context in [["fp16", 0], ["fp16", 1], ["fp32", 0], ["fp32", 1]]],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what about bf16?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants