Metadata-Version: 2.4
Name: myexp
Version: 0.1.0
Summary: Python experiment script protocol helpers for Research Lab runtime tasks.
Author-email: Cai Jianping <jpingcai@163.com>
License-Expression: MIT
Project-URL: Homepage, https://pypi.org/project/myexp/
Keywords: experiments,research,runtime,protocol
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: PyYAML>=6.0

# myexp

`myexp` is the maintained Python protocol package for repository experiment scripts.

It lets one script run in two modes:

- local debug mode, using defaults embedded in the script;
- runtime mode, using a JSON object passed as the first command-line argument.

Runtime JSON parameters take precedence because scripts call `myexp.get_params(local_defaults)`, which returns injected JSON only when the process is running under the experiment runtime.

Results are emitted with `myexp.emit_result()` or `ExpTemplate.run()`. When `RESEARCH_LAB_RESULT_JSON` is set, `myexp` writes structured JSON to that sidecar path. When no sidecar path is available, it emits the legacy stdout marker so older parsers can still read the result.

The stable public API is exported from `myexp`:

- `is_exp_env()` / `isExpEnv()`
- `get_params()` / `getParams()`
- `emit_result()` / `printResult()`
- `get_yaml_conf_name()` / `getYamlConfName()`
- `parse_func_params()` / `parseFuncParams()`
- `unpack_aggr_param()` / `unpackAggrParam()`
- `conv_param_to_setting()` / `convParam2Setting()`
- `load_setting_from_yaml()` / `loadSettingFromYaml()`
- `ExpTemplate`

