adaptivemd package¶
Submodules¶
adaptivemd.brain module¶
adaptivemd.io module¶
adaptivemd.model module¶
-
class
adaptivemd.model.Model(data)[source]¶ Bases:
adaptivemd.mongodb.base.StorableMixinA wrapper to hold model data
Examples
>>> m = Model({'msm' : [[0.9, 0.1], [0.1, 0.9]]}) >>> print m.msm >>> print m['msm']
Variables: data (dict of str : anything) – the data of the model
adaptivemd.reducer module¶
-
class
adaptivemd.reducer.ActionParser[source]¶ Bases:
objectA class that can interprete actions into scheduler understandable commands
-
parse(scheduler, action)[source]¶ Parse a single action
Parameters: - scheduler (Scheduler) – the used scheduler which knows about specifics in the parsing process, like, e.g., file paths
- action (Action or dict or list of str) – the actual action to be parsed
Returns: Return type: list of Action or dict or str
-
-
class
adaptivemd.reducer.DictFilterParser[source]¶ Bases:
adaptivemd.reducer.ActionParser-
parse(scheduler, action)[source]¶ Parse a single action
Parameters: - scheduler (Scheduler) – the used scheduler which knows about specifics in the parsing process, like, e.g., file paths
- action (Action or dict or list of str) – the actual action to be parsed
Returns: Return type: list of Action or dict or str
-
-
class
adaptivemd.reducer.StrFilterParser[source]¶ Bases:
adaptivemd.reducer.ActionParser-
parse(scheduler, action)[source]¶ Parse a single action
Parameters: - scheduler (Scheduler) – the used scheduler which knows about specifics in the parsing process, like, e.g., file paths
- action (Action or dict or list of str) – the actual action to be parsed
Returns: Return type: list of Action or dict or str
-
-
class
adaptivemd.reducer.ChainedParser(parent, child)[source]¶ Bases:
adaptivemd.reducer.ActionParserParser that represents the chained application of two parser
-
class
adaptivemd.reducer.StageInParser[source]¶ Bases:
adaptivemd.reducer.ActionParserSpecial parser that can interpret actions into RP stage-in phase
-
parse(scheduler, action)[source]¶ Parse a single action
Parameters: - scheduler (Scheduler) – the used scheduler which knows about specifics in the parsing process, like, e.g., file paths
- action (Action or dict or list of str) – the actual action to be parsed
Returns: Return type: list of Action or dict or str
-
-
class
adaptivemd.reducer.BashParser[source]¶ Bases:
adaptivemd.reducer.ActionParser-
parse(scheduler, action)[source]¶ Parse a single action
Parameters: - scheduler (Scheduler) – the used scheduler which knows about specifics in the parsing process, like, e.g., file paths
- action (Action or dict or list of str) – the actual action to be parsed
Returns: Return type: list of Action or dict or str
-
-
class
adaptivemd.reducer.StageParser[source]¶ Bases:
adaptivemd.reducer.ActionParserParse into possible RP Stage commands for ComputeUnits
-
parse(scheduler, action)[source]¶ Parse a single action
Parameters: - scheduler (Scheduler) – the used scheduler which knows about specifics in the parsing process, like, e.g., file paths
- action (Action or dict or list of str) – the actual action to be parsed
Returns: Return type: list of Action or dict or str
-
-
class
adaptivemd.reducer.WorkerParser[source]¶ Bases:
adaptivemd.reducer.ActionParserA parser that can interprete transactions from/to
file://for workersThis will write the files to the target location instead of a real transaction. It requires the file to be stored in the DB using
load()-
parse(scheduler, action)[source]¶ Parse a single action
Parameters: - scheduler (Scheduler) – the used scheduler which knows about specifics in the parsing process, like, e.g., file paths
- action (Action or dict or list of str) – the actual action to be parsed
Returns: Return type: list of Action or dict or str
-
-
class
adaptivemd.reducer.PrefixParser[source]¶ Bases:
adaptivemd.reducer.ActionParserReplace all adaptiveMD prefixes
Usually the last step to convert all file paths
-
parse(scheduler, action)[source]¶ Parse a single action
Parameters: - scheduler (Scheduler) – the used scheduler which knows about specifics in the parsing process, like, e.g., file paths
- action (Action or dict or list of str) – the actual action to be parsed
Returns: Return type: list of Action or dict or str
-