Change extra_volumes to Optional in get_model_env#1321
Change extra_volumes to Optional in get_model_env#1321connor-tan wants to merge 6 commits intomicrosoft:mainfrom
Conversation
utils/env.py:963 在 QTDockerEnv.prepare() 里执行 next(iter(self.conf.extra_volumes.keys())),但 self.conf.extra_volumes 是空字典,抛出 StopIteration。
原因是这里把默认值覆盖掉了:
- components/coder/model_coder/conf.py:27 get_model_env() 的参数 extra_volumes 默认是 {},然后无条件执行 env.conf.extra_volumes = extra_volumes.copy(),这会把 utils/env.py 里
QlibDockerConf 的默认 extra_volumes 覆盖成空。
Change extra_volumes to Optional in get_model_env
|
@connor-tan please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.
Contributor License AgreementContribution License AgreementThis Contribution License Agreement (“Agreement”) is agreed to by the party signing below (“You”),
|
|
Hi, @connor-tan , Thanks for the PR. I have a few questions and suggestions:
Please take a look and update accordingly. Thanks! |
Description
utils/env.py:963 在 QTDockerEnv.prepare() 里执行 next(iter(self.conf.extra_volumes.keys())),但 self.conf.extra_volumes 是空字典,抛出 StopIteration。
原因是这里把默认值覆盖掉了:
components/coder/model_coder/conf.py:27 get_model_env() 的参数 extra_volumes 默认是 {},然后无条件执行 env.conf.extra_volumes = extra_volumes.copy(),这会把 utils/env.py 里 QlibDockerConf 的默认 extra_volumes 覆盖成空。
Motivation and Context
How Has This Been Tested?
Screenshots of Test Results (if appropriate):
Types of changes
📚 Documentation preview 📚: https://RDAgent--1321.org.readthedocs.build/en/1321/