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

发现了一个逻辑漏洞/found a bug #78

Open
jjtybcb opened this issue Jan 12, 2024 · 0 comments
Open

发现了一个逻辑漏洞/found a bug #78

jjtybcb opened this issue Jan 12, 2024 · 0 comments

Comments

@jjtybcb
Copy link

jjtybcb commented Jan 12, 2024

subtools/pytorch/libs/supports/utils.py line 319
这行中的方法的作用是将传入的字典与默认字典做对比,将传入字典与默认的不同的部分赋值给默认字典,然后返回默认字典。但是如果这个方法的最后两个布尔参数均为false,那么如果你传入的字典中包含了默认字典中不存在的键值,则既不会报错,也不会将不存在的键值赋值给默认字典并返回。那么你将得到一个只包含默认字段的字典,而你定义的新字段(可能是你修改了一些模型或方法,增加定义了一些新变量),将采用你在方法或模型中设定好的默认值。而你在主程序,如run****.py中定义的参数,则不会传入那些方法或模型中。

At least one of this function's last two variables which are 'force_check' and 'support_unkown' should be true. So that the function can raise an error or refine the new parameters of the individual definition for the default dictionary which will be return.
Or, the params you defined in the main program such as run****.py will be not passed into the methods or classes.

希望作者能看到这条问题,并对自己的程序作出修改。

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

No branches or pull requests

1 participant