You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ContainerCLI.create() and ContainerCLI.run() support cpuset_cpus and cpuset_mems as List[int], which is converted to a CLI arg using ",".join(...).
ContainerCLI.update() supports cpuset_cpus and cpuset_mems as List[int] in the type signature but then converts to a CLI arg simply by stringifying (implicitly in utils.run()), which I assume will always fail.
In reality the CLI accepts a cpuset representation, which includes: a range, e.g. "0-3", a selection, e.g. "0,2", a combination of both, e.g. "0-3,7".
I'd suggest it'd make most sense just to support the user specifying this as a string, rather than only allowing the "selection" format via a list. This would mean fixing the type annotation on update() and a backwards incompatible change on create() and run().
The text was updated successfully, but these errors were encountered:
@gabrieldemarmiesse how should we handle this backwards incompatible change, assuming you're happy with what I'm proposing? Should the create() and run() methods still accept List[int] and emit a deprecation warning? Or is this something we can just change?
@LewisGaul do you think it would make sense to have List[int] | str? With List[int] being there when someone is programmatically choosing the cpuset. This option is more powerful than the range and combinaison, and is intuitive.
Let me know if I'm missing something, it's not an option I use often.
@LewisGaul do you think it would make sense to have List[int] | str? With List[int] being there when someone is programmatically choosing the cpuset. This option is more powerful than the range and combinaison, and is intuitive.
ContainerCLI.create()
andContainerCLI.run()
supportcpuset_cpus
andcpuset_mems
asList[int]
, which is converted to a CLI arg using",".join(...)
.ContainerCLI.update()
supportscpuset_cpus
andcpuset_mems
asList[int]
in the type signature but then converts to a CLI arg simply by stringifying (implicitly inutils.run()
), which I assume will always fail.In reality the CLI accepts a cpuset representation, which includes: a range, e.g.
"0-3"
, a selection, e.g."0,2"
, a combination of both, e.g."0-3,7"
.I'd suggest it'd make most sense just to support the user specifying this as a string, rather than only allowing the "selection" format via a list. This would mean fixing the type annotation on
update()
and a backwards incompatible change oncreate()
andrun()
.The text was updated successfully, but these errors were encountered: