This repository was archived by the owner on Apr 15, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
splicemachine/mlflow_support Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -122,18 +122,24 @@ def _lp(key, value):
122122 :param key: key for the parameter
123123 :param value: value for the parameter
124124 """
125+ if len (str (value )) > 250 or len (str (key )) > 250 :
126+ raise SpliceMachineException (f'It seems your parameter input is too long. The max length is 250 characters.'
127+ f'Your key is length { len (str (key ))} and your value is length { len (str (value ))} .' )
125128 mlflow .log_param (key , value )
126129
127130
128131@_mlflow_patch ('lm' )
129- def _lm (key , value ):
132+ def _lm (key , value , step = None ):
130133 """
131134 Add a shortcut for logging metrics in MLFlow.
132135 Accessible from mlflow.lm
133136 :param key: key for the parameter
134137 :param value: value for the parameter
135138 """
136- mlflow .log_metric (key , value )
139+ if len (str (key )) > 250 :
140+ raise SpliceMachineException (f'It seems your metric key is too long. The max length is 250 characters,'
141+ f'but yours is { len (str (key ))} ' )
142+ mlflow .log_metric (key , value , step = step )
137143
138144
139145@_mlflow_patch ('log_model' )
You can’t perform that action at this time.
0 commit comments