You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation of update_rqmt says "Updates the given requirements for this job, values not set in rqmt will not be affected.". So I had assumed that every time I called this function, it would update the rqmts of the task with the values of the new rqmt. However, internally this is not the case. The provided rqmt is stored and used later. Therefore, multiple calls overwrite the previous results.
See here:
def update_rqmt(self, task_name, rqmt):
"""Updates the given requirements for this job, values not set in rqmt will not be affected.
:param str task_name: Which task will be affected
:param rqmt: the new requirements
:return:
"""
self._sis_task_rqmt_overwrite[task_name] = rqmt.copy(), False
return self
This is then used later in the _sis_tasks method
if task_name in self._sis_task_rqmt_overwrite:
rqmt, replace = self._sis_task_rqmt_overwrite[task_name]
if replace:
task._rqmt = rqmt
else:
task._rqmt.update(rqmt)
I was not the only one confused by this so I believe we should clarify the documentation.
The documentation of update_rqmt says "Updates the given requirements for this job, values not set in rqmt will not be affected.". So I had assumed that every time I called this function, it would update the rqmts of the task with the values of the new rqmt. However, internally this is not the case. The provided rqmt is stored and used later. Therefore, multiple calls overwrite the previous results.
See here:
This is then used later in the _sis_tasks method
I was not the only one confused by this so I believe we should clarify the documentation.
See #219 for a proposed fix.
The text was updated successfully, but these errors were encountered: