psweep

psweep#

CALC_DIR

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

DATABASE_BASENAME

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

FileTemplate(filename[, target_suffix])

GIT_ADD_ALL

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

Machine(machine_dir[, jobscript_name])

PANDAS_DEFAULT_ORIENT

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

PANDAS_TIME_UNIT

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

PSET_HASH_ALG

str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str

PsweepHashError

_get_col_filter([skip_prefix_cols, ...])

Implement the package-wide prefix/postfix default convention.

_setup_simulate_dir(*, calc_dir, ...)

capture_logs_wrapper(pset, func, capture_logs)

Capture and redirect stdout and stderr produced in func().

check_calc_dir(calc_dir, df)

Check calc dir for consistency with database.

df_ensure_dtypes(df[, fill_value])

Make sure that df's dtype is object.

df_extract_dicts(df[, py_types])

Convert df's rows to dicts.

df_extract_params(df[, py_types])

Extract params (list of psets) from df.

df_extract_pset(df, pset_id[, py_types])

Extract a single pset dict for pset_id from df.

df_filter_conds(df, conds[, op])

Filter DataFrame using bool arrays/Series/DataFrames in conds.

df_print(df[, index, special_cols, ...])

Print DataFrame, by default without the index and prefix columns such as _pset_id.

df_read(fn[, fmt])

Read DataFrame from file fn.

df_to_json(df, **kwds)

Like df.to_json but with defaults for orient, date_unit, date_format, double_precision.

df_update_pset_cols(df, pset_cols[, ...])

Make sure that df has at least pset_cols columns.

df_update_pset_hash(df[, copy])

Add or update _pset_hash column.

df_write(fn, df[, fmt])

Write DataFrame to disk.

file_read(fn)

file_write(fn, txt[, mode])

filter_cols(cols[, kind])

filter_params_dup_hash(params, hashes)

Return params with psets whose hash is not in hashes.

filter_params_unique(params)

Reduce params to unique psets.

flatten(seq)

fullpath(path)

func_wrapper(pset, func, *[, tmpsave, ...])

Add those prefix fields (e.g. _time_utc) to pset which can be determined at call time.

gather_calc_templates(calc_templ_dir)

gather_machines(machine_templ_dir)

get_many_uuids(num[, retry, existing])

get_uuid([retry, existing])

git_clean()

git_enter(use_git[, always_commit])

git_exit(use_git, df)

in_git_repo()

intspace(*args[, dtype])

Like np.linspace but round to integers.

is_seq(seq)

itr(func)

Wrap func to allow passing args not as sequence.

itr2params(loops)

Transform the (possibly nested) result of a loop over plists (or whatever has been used to create psets) to a proper list of psets by flattening and merging dicts.

json_read(fn)

json_write(fn, obj)

logspace(start, stop[, num, offset, log_func])

Like numpy.logspace but

makedirs(path)

Create path recursively, no questions asked.

merge_dicts(args)

Start with an empty dict and update with each arg dict left-to-right.

pgrid(plists)

Convenience function for the most common loop: nested loops with itertools.product: ps.itr2params(itertools.product(a,b,c,...)).

pickle_read(fn)

pickle_write(fn, obj)

plist(name, seq)

Create a list of single-item dicts holding the parameter name and a value.

prep_batch(params, *[, calc_templ_dir, ...])

Write files based on templates.

pset_hash(dct[, method, raise_error])

Reproducible hash of a dict for usage in database (hash of a pset).

run(func, params[, df, poolsize, ...])

Call func for each pset in params.

stargrid(const, vary[, vary_labels, ...])

Helper to create a specific param sampling pattern.

system(cmd, **kwds)

Call shell command.