Add model EMA (Exponential Moving Average) #108
Annotations
10 errors
type-check:
luxonis_train/callbacks/ema.py#L27
Expression of type "None" cannot be assigned to parameter of type "str"
"None" is not assignable to "str" (reportArgumentType)
|
type-check:
luxonis_train/callbacks/ema.py#L42
Cannot assign to attribute "state_dict" for class "ModelEma*"
One or more overloads of "state_dict" is not assignable
Type "Dict[str, Any]" is not assignable to type "(*, destination: T_destination@state_dict, prefix: str = ..., keep_vars: bool = ...) -> T_destination@state_dict" (reportAttributeAccessIssue)
|
type-check:
luxonis_train/callbacks/ema.py#L52
Cannot assign to attribute "state_dict" for class "ModelEma*" (reportAttributeAccessIssue)
|
type-check:
luxonis_train/callbacks/ema.py#L90
Expression of type "None" cannot be assigned to parameter of type "str"
"None" is not assignable to "str" (reportArgumentType)
|
type-check:
luxonis_train/callbacks/ema.py#L154
"update" is not a known attribute of "None" (reportOptionalMemberAccess)
|
type-check:
luxonis_train/callbacks/ema.py#L170
Argument of type "Overload[(*, destination: T_destination@state_dict, prefix: str = ..., keep_vars: bool = ...) -> T_destination@state_dict, (*, prefix: str = ..., keep_vars: bool = ...) -> Dict[str, Any]]" cannot be assigned to parameter "state_dict" of type "Mapping[str, Any]" in function "load_state_dict"
"function" is not assignable to "Mapping[str, Any]" (reportArgumentType)
|
type-check:
luxonis_train/callbacks/ema.py#L170
"state_dict" is not a known attribute of "None" (reportOptionalMemberAccess)
|
type-check:
luxonis_train/callbacks/ema.py#L182
Argument of type "Dict[str, Any] | None" cannot be assigned to parameter "state_dict" of type "Mapping[str, Any]" in function "load_state_dict"
Type "Dict[str, Any] | None" is not assignable to type "Mapping[str, Any]"
"None" is not assignable to "Mapping[str, Any]" (reportArgumentType)
|
type-check:
luxonis_train/callbacks/ema.py#L195
Argument of type "Overload[(*, destination: T_destination@state_dict, prefix: str = ..., keep_vars: bool = ...) -> T_destination@state_dict, (*, prefix: str = ..., keep_vars: bool = ...) -> Dict[str, Any]]" cannot be assigned to parameter "state_dict" of type "Mapping[str, Any]" in function "load_state_dict"
"function" is not assignable to "Mapping[str, Any]" (reportArgumentType)
|
type-check:
luxonis_train/callbacks/ema.py#L195
"state_dict" is not a known attribute of "None" (reportOptionalMemberAccess)
|