本文整理汇总了Python中fireworks.core.fworker.FWorker.from_dict方法的典型用法代码示例。如果您正苦于以下问题:Python FWorker.from_dict方法的具体用法?Python FWorker.from_dict怎么用?Python FWorker.from_dict使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类fireworks.core.fworker.FWorker
的用法示例。
在下文中一共展示了FWorker.from_dict方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: from_dict
# 需要导入模块: from fireworks.core.fworker import FWorker [as 别名]
# 或者: from fireworks.core.fworker.FWorker import from_dict [as 别名]
def from_dict(cls, m_dict):
fworker = FWorker.from_dict(m_dict['fworker']) if m_dict['fworker'] else None
action = FWAction.from_dict(m_dict['action']) if m_dict.get('action') else None
trackers = [Tracker.from_dict(f) for f in m_dict['trackers']] if m_dict.get('trackers') else None
return Launch(m_dict['state'], m_dict['launch_dir'], fworker,
m_dict['host'], m_dict['ip'], trackers, action,
m_dict['state_history'], m_dict['launch_id'], m_dict['fw_id'])
示例2: from_dict
# 需要导入模块: from fireworks.core.fworker import FWorker [as 别名]
# 或者: from fireworks.core.fworker.FWorker import from_dict [as 别名]
def from_dict(cls, m_dict):
fworker = FWorker.from_dict(m_dict["fworker"]) if m_dict["fworker"] else None
action = FWAction.from_dict(m_dict["action"]) if m_dict.get("action") else None
trackers = [Tracker.from_dict(f) for f in m_dict["trackers"]] if m_dict.get("trackers") else None
return Launch(
m_dict["state"],
m_dict["launch_dir"],
fworker,
m_dict["host"],
m_dict["ip"],
trackers,
action,
m_dict["state_history"],
m_dict["launch_id"],
m_dict["fw_id"],
)
示例3: from_dict
# 需要导入模块: from fireworks.core.fworker import FWorker [as 别名]
# 或者: from fireworks.core.fworker.FWorker import from_dict [as 别名]
def from_dict(cls, m_dict):
fworker = FWorker.from_dict(m_dict['fworker'])
action = FWAction.from_dict(m_dict['action']) if m_dict.get('action') else None
return Launch(m_dict['state'], m_dict['launch_dir'], fworker, m_dict['host'], m_dict['ip'], action,
m_dict['state_history'], m_dict['launch_id'], m_dict['fw_id'])