当前位置: 首页>>代码示例>>Python>>正文


Python LaunchPad.reset方法代码示例

本文整理汇总了Python中fireworks.LaunchPad.reset方法的典型用法代码示例。如果您正苦于以下问题:Python LaunchPad.reset方法的具体用法?Python LaunchPad.reset怎么用?Python LaunchPad.reset使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在fireworks.LaunchPad的用法示例。


在下文中一共展示了LaunchPad.reset方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: lp

# 需要导入模块: from fireworks import LaunchPad [as 别名]
# 或者: from fireworks.LaunchPad import reset [as 别名]
def lp(request):
    lp = LaunchPad(name=TESTDB_NAME, strm_lvl='ERROR')
    lp.reset(password=None, require_password=False)

    def fin():
        lp.connection.drop_database(TESTDB_NAME)

    request.addfinalizer(fin)
    return lp
开发者ID:gmrigna,项目名称:abipy,代码行数:11,代码来源:conftest.py

示例2: main

# 需要导入模块: from fireworks import LaunchPad [as 别名]
# 或者: from fireworks.LaunchPad import reset [as 别名]
def main():
    # set up the LaunchPad and reset it
    launchpad = LaunchPad()
    launchpad.reset('', require_password=False)

    # Build the flow
    nflows = 2
    for i in range(nflows):
        flow = build_flow("flow_" + str(i))
        flow.build_and_pickle_dump()

        # create the Firework consisting of a single task
        firework = Firework(FireTaskWithFlow(flow=flow))

        # store workflow 
        launchpad.add_wf(firework)

    #launch it locally
    #launch_rocket(launchpad)

    return 0
开发者ID:gmrigna,项目名称:abipy,代码行数:23,代码来源:abifw.py

示例3: LaunchPad

# 需要导入模块: from fireworks import LaunchPad [as 别名]
# 或者: from fireworks.LaunchPad import reset [as 别名]
from fireworks import Firework, Workflow, LaunchPad, ScriptTask
from fireworks.core.rocket_launcher import rapidfire

# set up the LaunchPad and reset it
launchpad = LaunchPad()
launchpad.reset('', require_password=False)

# create the individual FireWorks and Workflow
fw1 = Firework(ScriptTask.from_str('echo "hello"'), name="hello")
fw2 = Firework(ScriptTask.from_str('echo "goodbye"'), name="goodbye", parents=[fw1,])
wf = Workflow([fw1, fw2], name="test workflow")

# store workflow and launch it locally
launchpad.add_wf(wf)
rapidfire(launchpad)
开发者ID:jmborr,项目名称:notebooks,代码行数:17,代码来源:test_workflow.py

示例4: FireWork

# 需要导入模块: from fireworks import LaunchPad [as 别名]
# 或者: from fireworks.LaunchPad import reset [as 别名]
    Returns:
        (Workflow): A workflow containing one FireWork (two FireTasks) which
            is automatically set up to run the optimization loop.

    """
    spec = {'_x': x}
    # ObjectiveFuncTask writes _y field to the spec internally.
    firework1 = Firework([ObjectiveFuncTask(), OptTask(**db_info)], spec=spec)
    return Workflow([firework1])


if __name__ == "__main__":
    # Make a MissionControl object
    mc = MissionControl(**db_info)

    # Reset the launchpad and optimization db for this example
    launchpad.reset(password=None, require_password=False)
    mc.reset(hard=True)

    # Configure the optimization db with MissionControl
    mc.configure(wf_creator=wf_creator, dimensions=x_dim)

    # Run the optimization loop 10 times.
    launchpad.add_wf(wf_creator([5, 5, 2]))
    rapidfire(launchpad, nlaunches=10, sleep_time=0)

    # Examine results
    plt = mc.plot()
    plt.show()
开发者ID:ardunn,项目名称:TurboWorks,代码行数:31,代码来源:basic.py


注:本文中的fireworks.LaunchPad.reset方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。