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.
否则,现在的写法是要求用户的pytorch版本严格等于1.12.1,即使用户已经安装了更新的版本也是不行的。我认为应当允许用户使用任何Pytorch 1.X(只要大于某个特定版本,因为我们的程序可能会使用某些较新的Pytorch特性)。
根据语义化版本规则,相同的大版本号一般意味着没有API Breaking Changes,因此这样做应当不会产生问题,同时也给了用户更大的自由。
PS:版本声明字符串的语法参考https://python-poetry.org/docs/dependency-specification/#multiple-requirements