Skip to main content

Brute force grid search

Project description

# Brute: easy grid search

## Introduction

This command-line script lets you run any command with many possible inputs in a distributed environment such as SGE, SLURM, or a local machine with many processors. Basic checkpointing is provided via the doit library, so that failed jobs might be re-run without re-running all jobs.

## Installation

Run:

python setup.py install

This should place the command brute in your path.

## Usage

Sample usage:

brute worker.py –foo 1,2,3 –bar x

will execute 3 tasks:

  • worker.py –foo 1 –bar x

  • worker.py –foo 2 –bar x

  • worker.py –foo 3 –bar x

Each task will have a subdirectory where a run script and a log file will be created. The location where the subdirectories are created may be controlled via the –brute-dir flag.

Grid-specific options go in a configuration file. See examples/brute.conf for an example.

## Summarizing results

In addition to the brute command-line script, the scrape command is provided to facilitate summarizing the results of large grid jobs. This command has two main uses:

  1. Obtain the job return status information. This is the default behavior, and produces a summary of the return status. Alternatively, –status-verbose prints the return status for all jobs instead of a summary.

  2. For jobs which produce a single number as a result, scrape may be used to sort and summarize the jobs according to this score.

This second use is especially useful in machine learning applications. For this purpose, a Python script must be provided via –scraper. This script must provide the following method:

def scrape(PATH):

# TODO: implement code to scrape job output return SCORE

The result will be the jobs and their arguments, sorted by their scores. The –max argument may be used to limit the number of displayed results.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cmdline-brute-0.3.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

cmdline_brute-0.3-py3.4.egg (17.8 kB view details)

Uploaded Egg

File details

Details for the file cmdline-brute-0.3.tar.gz.

File metadata

  • Download URL: cmdline-brute-0.3.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for cmdline-brute-0.3.tar.gz
Algorithm Hash digest
SHA256 97939771fec05ab4c1ae95ca6fc882eb04597c75a278f12cb748b5158b6f4e3b
MD5 a14270d50bcbada644f86d7c3ebe81a2
BLAKE2b-256 b65a8e0bb68b5948de4ac56be297902e2498f9c6a9ea7bca8797f1c09ed8fed7

See more details on using hashes here.

File details

Details for the file cmdline_brute-0.3-py3.4.egg.

File metadata

File hashes

Hashes for cmdline_brute-0.3-py3.4.egg
Algorithm Hash digest
SHA256 d8eb2c4e86c9fc1c1d23b378253a8243544fa44d3236cf970db0c42edc6bd1c1
MD5 4c6ae70634146aab5f2ded4de283ff20
BLAKE2b-256 b71153c87872ebaeb4350018d7df610d7c0eafc1a9edb3923eb2af84252ee40f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page