File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed
Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -170,6 +170,26 @@ def unset_time_ordering(self):
170170
171171 return self
172172
173+ def get_time_ordering_variable (self ):
174+ """
175+ :return: the name of the variable
176+ :rtype: str
177+ """
178+ if self .mltask_settings .get ('time' , None ) and self .mltask_settings ['time' ]['enabled' ]:
179+ return self .mltask_settings ['time' ]['timeVariable' ]
180+ else :
181+ warnings .warn ("Time-based ordering is disabled in the current MLTask" )
182+
183+ def is_time_ordering_ascending (self ):
184+ """
185+ :return: True if the ordering is set to be ascending with respect to the time-ordering variable
186+ :rtype: bool
187+ """
188+ if self .mltask_settings .get ('time' , None ) and self .mltask_settings ['time' ]['enabled' ]:
189+ return self .mltask_settings ['time' ]['ascending' ]
190+ else :
191+ warnings .warn ("Time-based ordering is disabled in the current MLTask" )
192+
173193
174194class DSSMLTaskSettings (object ):
175195 """
You can’t perform that action at this time.
0 commit comments