File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -29,9 +29,8 @@ def __init__(self, name):
2929
3030
3131class InvalidParameterTypeError (DvcLiveError ):
32- def __init__ (self , val : Any ):
33- self .val = val
34- super ().__init__ (f"Parameter type { type (val )} is not supported." )
32+ def __init__ (self , msg : Any ):
33+ super ().__init__ (msg )
3534
3635
3736class InvalidReportModeError (DvcLiveError ):
Original file line number Diff line number Diff line change @@ -454,7 +454,7 @@ def _dump_params(self):
454454 try :
455455 dump_yaml (self ._params , self .params_file )
456456 except RepresenterError as exc :
457- raise InvalidParameterTypeError (exc .args ) from exc
457+ raise InvalidParameterTypeError (exc .args [ 0 ] ) from exc
458458
459459 def log_params (self , params : Dict [str , ParamLike ]):
460460 """Saves the given set of parameters (dict) to yaml"""
Original file line number Diff line number Diff line change @@ -84,5 +84,6 @@ class Dummy:
8484
8585 param_value = Dummy ()
8686
87- with pytest .raises (InvalidParameterTypeError ):
87+ with pytest .raises (InvalidParameterTypeError ) as excinfo :
8888 dvclive .log_param ("param_complex" , param_value )
89+ assert "Dummy" in excinfo .value .args [0 ]
You can’t perform that action at this time.
0 commit comments