def demoIII(): time.localtime() script_path = make_script(output_directory) task_specifier = RandomSample2D(3,3,3) task_command = SimplePyScriptCommand(script_path, argorder=['x','y']) task_launcher = Launcher(batch_name, task_specifier, task_command) task_launcher.print_info = 'stdout' return task_launcher
def collatz(): collatz_specifier = CollatzDemo(43, rationale='Illustrating dynamic specifiers') task_command = SimplePyScriptCommand(script_path) task_launcher = Launcher('Collatz_demo', collatz_specifier, task_command) task_launcher.description='This is a dynamic example' task_launcher.tag='collatz' return task_launcher
def simple(): cross_product_densities = LinearSpecs("retina_density", 2,7,steps=3) * LinearSpecs("cortex_density", 1,6,steps=3) run_batch_spec = Spec(times=[1,5,10], rationale='Avoiding default of 10000 iterations for testing purposes.') combined_spec = run_batch_spec * cross_product_densities # This is a Topographica specific component to generate a run_batch command run_batch_command = RunBatchCommand('../../../examples/tiny.ty') tasklauncher = Launcher(batch_name,combined_spec,run_batch_command) tasklauncher.tag = 'example_tag' tasklauncher.max_concurrency = max_concurrency # Ignored for cluster. return tasklauncher
def demoII(): task_specifier = LinearSpecs('arg1',1,10,steps=5) * LinearSpecs('arg2',10,20,steps=5) task_specifier.rationale = """Is this better than a shell script? Consider the cross product of 3 parameters with 20 values each, ie. 8000 entries. The dispatch module aims to avoid constant rewriting of this sort of code with features such as modularity, composability, extensive documentation and pre-launch review. """ task_command = SimplePyScriptCommand(script_path, argorder=['arg1','arg2']) task_launcher = Launcher('DemoII', task_specifier, task_command) task_launcher.description='This is documentation for demoII' task_launcher.tag='demo2' return task_launcher