Skip to main content

Python experiment script protocol helpers for Research Lab runtime tasks.

Project description

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

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

myexp-0.1.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

myexp-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file myexp-0.1.0.tar.gz.

File metadata

  • Download URL: myexp-0.1.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for myexp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c52d1fcbbcd8c1aaf9e37375c83149d22f5b8f40a94c59af72d21bb6c175388a
MD5 15accea96801af1c580085542c98e560
BLAKE2b-256 5fbf977bc4ad9f8c72b554b360b4a91525f6333bad31419a249cf50555d42e38

See more details on using hashes here.

File details

Details for the file myexp-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: myexp-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for myexp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 efc1fe922b49085ba3f9bb6dff3c79931acff9e78297321c48382805e96298fe
MD5 00832ada3295a65735786b1f086bd80a
BLAKE2b-256 9b58dfc11059b0d3fe9e28830eaf288b2927f16db4e4135ec2488739b7d3eb4e

See more details on using hashes here.

Supported by

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