Skip to content

Commit

Permalink
Start to bring in the Simple Translator
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinVinsen committed May 8, 2020
1 parent 8df99ef commit 0cfe45e
Show file tree
Hide file tree
Showing 5 changed files with 2,298 additions and 443 deletions.
22 changes: 16 additions & 6 deletions daliuge-translator/dlg/dropmake/pg_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,9 @@ def _update_key_value_attributes(self, kwargs):
if len(k_v) > 1:
# Do substitutions for MKN
if "mkn" in self.jd:
kwargs[k_v[0]] = self._mkn_substitution(self.jd["mkn"], k_v[1])
kwargs[k_v[0]] = self._mkn_substitution(
self.jd["mkn"], k_v[1]
)
else:
kwargs[k_v[0]] = k_v[1]

Expand Down Expand Up @@ -823,7 +825,12 @@ def _create_test_drop_spec(self, oid, rank, kwargs):
pass
elif drop_type == "ExclusiveForceNode":
drop_spec = dropdict(
{"oid": oid, "type": "ExclusiveForceNode", "storage": "null", "rank": rank}
{
"oid": oid,
"type": "ExclusiveForceNode",
"storage": "null",
"rank": rank,
}
)
else:
raise GraphException("Unknown DROP type: '{0}'".format(drop_type))
Expand Down Expand Up @@ -1715,9 +1722,12 @@ def to_gojs_json(self, string_rep=True, outdict=None, visual=False):
# print("gojs_json called within MyKarkarPGTP from {0}".format(inspect.stack()[1][3]))

if self._num_parts_done == 0 and self._partitions is None:
self._num_parts_done, _, self._ptime, self._partitions = (
self._scheduler.partition_dag()
)
(
self._num_parts_done,
_,
self._ptime,
self._partitions,
) = self._scheduler.partition_dag()
# print("%s: _num_parts_done = %d" % (self.__class__.__name__, self._num_parts_done))
# print("len(self._partitions) = %d" % (len(self._partitions)))
# for part in self._partitions:
Expand Down Expand Up @@ -2660,7 +2670,7 @@ def unroll(lg, oid_prefix=None, zerorun=False, app=None):
ALGO_MY_SARKAR: "mysarkar",
ALGO_MIN_NUM_PARTS: "min_num_parts",
ALGO_PSO: "pso",
ALGO_SIMPLE: "simple"
ALGO_SIMPLE: "simple",
}


Expand Down
Loading

0 comments on commit 0cfe45e

Please sign in to comment.