Skip to content

Commit

Permalink
Fix problem with remaining appArgs
Browse files Browse the repository at this point in the history
  • Loading branch information
awicenec committed Sep 21, 2023
1 parent c205a0a commit ebe5789
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
6 changes: 0 additions & 6 deletions daliuge-engine/dlg/apps/constructs.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
# @param category Scatter
# @param tag template
# @param num_of_copies 4/Integer/ConstructParameter/NoPort/ReadWrite//False/False/Specifies the number of replications of the content of the scatter construct
# @param dropclass dlg.apps.constructs.ScatterDrop/String/ComponentParameter/NoPort/ReadWrite//False/False/Drop class
# @par EAGLE_END
class ScatterDrop(BarrierAppDROP):
"""
Expand All @@ -26,7 +25,6 @@ class ScatterDrop(BarrierAppDROP):
# @param tag template
# @param num_of_inputs 2/Integer/ConstructParameter/NoPort/ReadWrite//False/False/Number of inputs
# @param gather_axis 0/Integer/ApplicationArgument/NoPort/ReadWrite//False/False/Index of gather axis
# @param dropclass dlg.apps.constructs.GatherDrop/String/ComponentParameter/NoPort/ReadWrite//False/False/Drop class
# @par EAGLE_END
class GatherDrop(BarrierAppDROP):
"""
Expand All @@ -43,7 +41,6 @@ class GatherDrop(BarrierAppDROP):
# @param category Loop
# @param tag template
# @param num_of_iter 2/Integer/ConstructParameter/NoPort/ReadWrite//False/False/Number of iterations
# @param dropclass dlg.apps.constructs.LoopDrop/String/ComponentParameter/NoPort/ReadWrite//False/False/Drop class
# @par EAGLE_END
class LoopDrop(BarrierAppDROP):
"""
Expand All @@ -60,7 +57,6 @@ class LoopDrop(BarrierAppDROP):
# @param category MKN
# @param tag template
# @param k 1/Integer/ConstructParameter/NoPort/ReadWrite//False/False/Internal multiplicity
# @param dropclass dlg.apps.constructs.MKNDrop/String/ComponentParameter/NoPort/ReadWrite//False/False/Drop class
# @par EAGLE_END
class MKNDrop(BarrierAppDROP):
"""
Expand All @@ -78,7 +74,6 @@ class MKNDrop(BarrierAppDROP):
# @param tag template
# @param num_of_inputs 2/Integer/ConstructParameter/NoPort/ReadWrite//False/False/Number of inputs
# @param gather_axis 0/Integer/ApplicationArgument/NoPort/ReadWrite//False/False/Index of gather axis
# @param dropclass dlg.apps.constructs.GroupByDrop/String/ComponentParameter/NoPort/ReadWrite//False/False/Drop class
# @par EAGLE_END
class GroupByDrop(BarrierAppDROP):
"""
Expand All @@ -93,7 +88,6 @@ class GroupByDrop(BarrierAppDROP):
# @details A SubGraph template drop
# @par EAGLE_START
# @param category SubGraph
# @param dropclass dlg.apps.constructs.SubGraphDrop/String/ComponentParameter/NoPort/ReadWrite//False/False/Drop class
# @param tag template
# @par EAGLE_END
class SubGraphDrop(BarrierAppDROP):
Expand Down
5 changes: 5 additions & 0 deletions daliuge-engine/dlg/apps/pyfunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ def import_using_name(app, fname):
)
mod = getattr(mod, parts[-1])
break
except ModuleNotFoundError:
# try again, sometimes fixes the namespace
mod = import_using_name(app, fname)
break
except Exception as e:
raise InvalidDropException(
app, "Problem importing module %s, %s" % (mod, e)
Expand Down Expand Up @@ -519,6 +523,7 @@ def optionalEval(x):
if k in pargsDict:
pargsDict.update({k: value})

_ = [appArgs.pop(k) for k in pargsDict if k in appArgs]
logger.debug("Updated posargs dictionary: %s", pargsDict)

keyargsDict.update(
Expand Down
4 changes: 2 additions & 2 deletions daliuge-engine/dlg/apps/simple.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def averageArray(self):
# @param construct Gather
# @param category PythonApp
# @param tag daliuge
# @param num_of_inputs 4/Integer/ConstructParameter/NoPort/ReadWrite//False/False/The Gather width, stating how many inputs each Gather instance will handle
# @param num_of_inputs 4/Integer/ConstructParameter/NoPort/ReadWrite//False/False/The Gather width, stating how many inputs each Gather instance will handle
# @param dropclass dlg.apps.simple.GenericGatherApp/String/ComponentParameter/NoPort/ReadOnly//False/False/Application class
# @param execution_time 5/Float/ConstraintParameter/NoPort/ReadOnly//False/False/Estimated execution time
# @param num_cpus 1/Integer/ConstraintParameter/NoPort/ReadOnly//False/False/Number of cores used
Expand Down Expand Up @@ -449,7 +449,7 @@ def run(self):
# @param category PythonApp
# @param construct Gather
# @param tag daliuge
# @param num_of_inputs 4/Integer/ConstructParameter/NoPort/ReadWrite//False/False/The Gather width, stating how many inputs each Gather instance will handle
# @param num_of_inputs 4/Integer/ConstructParameter/NoPort/ReadWrite//False/False/The Gather width, stating how many inputs each Gather instance will handle
# @param function sum/Select/ApplicationArgument/NoPort/ReadWrite/sum,prod,min,max,add,multiply,maximum,minimum/False/False/The function used for gathering
# @param reduce_axes None/String/ApplicationArgument/NoPort/ReadOnly//False/False/The array axes to reduce, None reduces all axes for sum, prod, max, min functions
# @param dropclass dlg.apps.simple.GenericNpyGatherApp/String/ComponentParameter/NoPort/ReadOnly//False/False/Application class
Expand Down

0 comments on commit ebe5789

Please sign in to comment.