pyphi.provenance.format_stem#
- pyphi.provenance.format_stem(name, params=None, run_label=None)[source]#
Build a filename stem encoding a script’s parameters.
Joins
name, one{key}{value}segment perparamsentry (in insertion order), andrun_labelwhen given, with underscores. Values and the run label are formatted withstr();.becomesp(so0.7→0p7and the filename keeps a single suffix) and any character outside[A-Za-z0-9_+-]becomes-.nameis used verbatim.Examples
>>> format_stem("study", {"seed": 42, "noise": 0.7}, "pilot") 'study_seed42_noise0p7_pilot'