-
Notifications
You must be signed in to change notification settings - Fork 218
[Hackathon 5th No.80] 添加appflow以及对应模型单测 #352
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
Conversation
tests/models/test_groundingdino.py
Outdated
) | ||
from paddlemix.models.blip2.eva_vit import VisionTransformer | ||
from paddlemix.models.blip2.modeling import BLIP_2_PRETRAINED_MODEL_ARCHIVE_LIST | ||
from paddlemix.models.blip2.Qformer import BertLMHeadModel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
去掉无关的import
|
||
def test_save_load(self): | ||
pass | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
from paddlemix.models.blip2.modeling import BLIP_2_PRETRAINED_MODEL_ARCHIVE_LIST | ||
from paddlemix.models.blip2.Qformer import BertLMHeadModel | ||
from tests.models.test_configuration_common import ConfigTester | ||
from tests.models.test_modeling_common import ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
删除无关import
tests/models/test_sam.py
Outdated
|
||
def test_save_load(self): | ||
pass | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个单测,跟blip2没关系吧,删掉相关代码
tests/models/test_sam.py
Outdated
self.assertIsNotNone(config) | ||
|
||
|
||
#todo @slow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
增加输出结果比较
tests/appflow/test_text2video.py
Outdated
|
||
create_test(name="test_dygraph", static_mode=False) | ||
if _run_slow_test: | ||
create_test(name="test_static", static_mode=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个没有静态图推理,删掉
tests/appflow/test_text2video.py
Outdated
|
||
self.assertIsNotNone(video_frames) | ||
|
||
setattr(OpenSetDetSamAppSlowTest, name, test_openset_det_sam) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个跟opensetdetsam没有关系,删掉
def setUpClass(cls): | ||
pass | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
删掉
result = task(prompt=prompt)['result'] | ||
|
||
self.assertIsNotNone(result) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
增加结果对比
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是文生图,对于生成的结果图片怎么对比呢,是预先存一个结果图片,然后比较结果图片的像素值么
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
预存结果图片,取部分patch比较即可。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
无需上传
|
||
|
||
class OpenSetDetSamAppSlowTest(unittest.TestCase): | ||
@classmethod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
类命名要与单测相关
def setUpClass(cls): | ||
pass | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
删掉
tests/appflow/test_audio_chat.py
Outdated
|
||
self.assertIsNotNone(result) | ||
|
||
setattr(OpenSetDetSamAppSlowTest, name, test_openset_det_sam) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
删掉
create_test(name="test_dygraph", static_mode=False) | ||
if _run_slow_test: | ||
create_test(name="test_static", static_mode=True) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
没有静态图推理
tests/appflow/zh.wav
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
无需上传
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
与该任务无关,删掉
所有单测,增加结果输出对比。结果图片可以上传百度云,然后分享一下链接。 |
LGTM + 需要补充结果图片 |
基本符合要求,可以合入 |
添加appflow以及对应模型单测
初步提交
任务描述