This PR proposes to restore the type annotation in the ParameterConfig.
Currently, choices of categorical parameter and sequence of ordinal parameter can takes only str and float parameters, respectively.
This behavior is not supposed originally, but is implemented by PR #291 in accordance with that of aiaccel.util.aiaccel.CommandLineArgs before merge of PR #276.
Recently, by PR #276, aiaccel.util.aiaccel.CommandLineArgs is enabled to parse float, int, and str parameter from command line.
In addition to this, by the same PR, UnionNode is successfully unwraped.
Therefore, type annotations using combination of Union and List can be used without any errors and work well.
For these reasones, type annotations of categorical and ordinal parameters should be restored.
Note that, unfortunately, omegaconf can not treat Union of List like Union[List[float], List[int], List[str]].
Thus, the type annotation is given like List[Union[float, int, str]].
This PR proposes to restore the type annotation in the ParameterConfig.
Currently,
choices
of categorical parameter andsequence
of ordinal parameter can takes onlystr
andfloat
parameters, respectively. This behavior is not supposed originally, but is implemented by PR #291 in accordance with that ofaiaccel.util.aiaccel.CommandLineArgs
before merge of PR #276.Recently, by PR #276,
aiaccel.util.aiaccel.CommandLineArgs
is enabled to parsefloat
,int
, andstr
parameter from command line. In addition to this, by the same PR,UnionNode
is successfully unwraped. Therefore, type annotations using combination ofUnion
andList
can be used without any errors and work well.For these reasones, type annotations of categorical and ordinal parameters should be restored.
Note that, unfortunately, omegaconf can not treat
Union
ofList
likeUnion[List[float], List[int], List[str]]
. Thus, the type annotation is given likeList[Union[float, int, str]]
.