thds.mops 3.9.20251021162756__py3-none-any.whl → 3.9.20251021205037__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of thds.mops might be problematic. Click here for more details.

thds/mops/parallel.py CHANGED
@@ -1,7 +1,7 @@
1
1
  import concurrent
2
2
  import typing as ty
3
3
 
4
- from thds.core import parallel
4
+ from thds.core import inspect, log, parallel
5
5
  from thds.core.parallel import ( # noqa: F401; for backward-compatibility, since these came from here originally.
6
6
  IterableWithLen,
7
7
  IteratorWithLen,
@@ -29,6 +29,7 @@ def parallel_yield_results(
29
29
  error_fmt=ERROR,
30
30
  success_fmt=DONE,
31
31
  named=named,
32
+ progress_logger=log.getLogger(inspect.caller_module_name(__name__) or __name__).info,
32
33
  )
33
34
 
34
35
 
@@ -5,7 +5,7 @@ import pickle
5
5
  import typing as ty
6
6
  from pathlib import Path
7
7
 
8
- from thds.core import config, log, pickle_visit, source
8
+ from thds.core import config, files, log, pickle_visit, source
9
9
  from thds.mops.pure.core.memo import function_memospace
10
10
  from thds.mops.pure.core.metadata import get_invoked_by
11
11
 
@@ -152,10 +152,7 @@ def log_function_execution(
152
152
  log_entry["uris_in_rvalue"] = sorted(source_uris)
153
153
 
154
154
  try:
155
- assert not log_file.exists(), f"Log file '{log_file}' should not already exist"
156
- with log_file.open("w") as f:
157
- json.dump(log_entry, f, indent=2)
155
+ with files.atomic_text_writer(log_file) as file:
156
+ json.dump(log_entry, file, indent=2)
158
157
  except Exception:
159
- logger.info(
160
- f"Unable to write mops function invocation log file at '{log_file}' - you may have multiple callers for the same invocation"
161
- )
158
+ logger.exception(f"Failed to write mops function invocation log file at '{log_file}'")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: thds.mops
3
- Version: 3.9.20251021162756
3
+ Version: 3.9.20251021205037
4
4
  Summary: ML Ops tools for Trilliant Health
5
5
  Author-email: Trilliant Health <info@trillianthealth.com>
6
6
  Project-URL: Repository, https://github.com/TrilliantHealth/ds-monorepo
@@ -2,7 +2,7 @@ thds/mops/__about__.py,sha256=IW_3wy8wEdrVducoBdiVgD7oYOY4J8yO1ezBaPtrc6U,215
2
2
  thds/mops/__init__.py,sha256=dbujDxVVfHpWP7OyfjEdNVHLtKx99rsNQPYfjTKn5Lg,127
3
3
  thds/mops/_compat.py,sha256=fO1YYEu6LF1re-VXl4P_8RXXLeKt4BgI9NTlHTgNpLk,357
4
4
  thds/mops/config.py,sha256=T62YskXvzAfxNgpq2jMatHgoIHfRV_z4cvJ8Rl_TZ6E,2015
5
- thds/mops/parallel.py,sha256=ynzT7uEtF1sfUi7NS9fHg1I5EhQtSs3p5hNzP3xwAWE,931
5
+ thds/mops/parallel.py,sha256=F6vUhSTO--CY82vyYtWFtspmgd0RxoxQ_EUrCnTm93Q,1039
6
6
  thds/mops/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
7
7
  thds/mops/_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
8
8
  thds/mops/_utils/config_tree.py,sha256=wMwkw81FDOo2Ld9rEmtobZMW2ZCUmxWSI2Bp_p0pwa8,7151
@@ -106,11 +106,11 @@ thds/mops/pure/tools/sha256_b64_addressed.py,sha256=SECAiw3xSqpsrBBZix0MgJRTQrbH
106
106
  thds/mops/pure/tools/stress.py,sha256=N7C8kLpaGbImeEYlT5jsEl1metvsUu8cnfyQ8vFN0H8,2541
107
107
  thds/mops/pure/tools/summarize/__init__.py,sha256=MSmt_5Xg84uHqzTN38JwgseJK8rsJn_11A8WD99VtEo,61
108
108
  thds/mops/pure/tools/summarize/cli.py,sha256=7kDtn24ok8oBO3jFjlMmOK3jnZYpMoE_5Y8fmDH8Imc,11524
109
- thds/mops/pure/tools/summarize/run_summary.py,sha256=w45qiQr7elrHDiK9Hgs85gtU3gwLuXa447ih1Y23BBY,5776
109
+ thds/mops/pure/tools/summarize/run_summary.py,sha256=glEN_YxUGADzp2Ofvr4ZDeHvnZ1znNR7HD7EATn1sPI,5644
110
110
  thds/mops/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
111
111
  thds/mops/testing/deferred_imports.py,sha256=f0ezCgQAtzTqW1yAOb0OWgsB9ZrlztLB894LtpWDaVw,3780
112
- thds_mops-3.9.20251021162756.dist-info/METADATA,sha256=qffJSAins5MuaJyx1xePynSOLPbwvEsrZ_y69ifVI4s,2225
113
- thds_mops-3.9.20251021162756.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
114
- thds_mops-3.9.20251021162756.dist-info/entry_points.txt,sha256=qKvCAaB80syXfxVR3xx6x9J0YJdaQWkIbVSw-NwFgMw,322
115
- thds_mops-3.9.20251021162756.dist-info/top_level.txt,sha256=LTZaE5SkWJwv9bwOlMbIhiS-JWQEEIcjVYnJrt-CriY,5
116
- thds_mops-3.9.20251021162756.dist-info/RECORD,,
112
+ thds_mops-3.9.20251021205037.dist-info/METADATA,sha256=dENMbGGCnOkAwVKarFO0vqmHpKXzDuN2qVhM1QnT6K8,2225
113
+ thds_mops-3.9.20251021205037.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
114
+ thds_mops-3.9.20251021205037.dist-info/entry_points.txt,sha256=qKvCAaB80syXfxVR3xx6x9J0YJdaQWkIbVSw-NwFgMw,322
115
+ thds_mops-3.9.20251021205037.dist-info/top_level.txt,sha256=LTZaE5SkWJwv9bwOlMbIhiS-JWQEEIcjVYnJrt-CriY,5
116
+ thds_mops-3.9.20251021205037.dist-info/RECORD,,