當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。