add resource-tier checker preflight#5
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
按照已讨论的资源模式设置了 checker min tier 和 default checkers for resource tier
CheckerConfig增加 selection_source 字段,用于区分 selected checker 来源:securoty_audit/tool.py中实际的checker选择就是按这个逻辑。相应地,validate_checker_resource_tier_availability()中会根据不同的来源设置不同的过滤策略:【可能存在冲突!!】
validate_selected_checkers()调整了 preflight 顺序:【可能存在冲突!!】删掉了原来的MODEL_PATH_KEYS,模型路径的配置在checker_config就能读到,不需要再传tool_defaults,相关的_resolve_model_path也有改动噢
【和network preflight有关】在 default.yaml 中补充 PIINERDetector 的默认配置 language=en,在检查依赖时除了要检查spacy库,还要确保安装了对应语言的模型
spacy_model = "{language}_core_web_lg"