Add synthetic tool wear environment#16
Conversation
|
Thanks for the contribution — I appreciate the work on the synthetic tool-wear environment. One clarification: I have since re-scoped Issue #15, so this PR no longer matches the current scope of #15. The original “add one synthetic manufacturing environment” task is now tracked under Issue #19, and that issue has already been completed. So this PR should be treated as related to #19 rather than #15. If you would still like to continue with this PR, could you please do two things?
Also, before I can review for merge, please reformat the Python files with standard line breaks and indentation. Right now the raw files appear to have many statements collapsed into very few lines, so the code may not run correctly. Could you also confirm that the following commands pass from the industrial-world-model directory? python examples/run_tool_wear.py Thanks again — I’m happy to review once the PR is aligned with the correct issue and the formatting is fixed. |
|
Thanks for the clarification. I updated the PR body to reference #19 instead of #15 and added a short README note that this is the machine-degradation/tool-wear scenario rather than another process-window environment. I also reformatted the touched Python files with standard Black line breaks and pushed Validation from
The local shell here only has |
Summary
ToolWearEnvironment, a simple synthetic machine-degradation environment with bounded tool wear, temperature, surface quality, and defect-risk state.imwm.envsand add a smallexamples/run_tool_wear.pysmoke example.Related to #19.
Validation
uv venv .venv --python 3.12uv pip install -e '.[dev]' 'numpy<2'PATH=.venv/bin:$PATH python examples/run_tool_wear.py-> ran the 3-step smoke example and reacheddone=TruePATH=.venv/bin:$PATH python -m pytest -q->5 passed in 1.17sgit diff --checkgit diff -- src/imwm/envs/tool_wear.py tests/test_tool_wear_env.py README.md | gitleaks stdin --no-banner --redact --exit-code 1Notes
This is aimed at Issue #19's machine-degradation option. It is distinct from the existing process-window toy environment because the state evolves around accumulated tool wear, coolant/temperature trade-offs, surface quality, and defect risk over repeated steps.
The local shell on this machine does not expose a bare
pythonexecutable until the venv is onPATH, so the requestedpython examples/run_tool_wear.pyandpython -m pytest -qchecks were run with.venv/binfirst onPATH.The local validation environment needed
numpy<2because the resolved Torch wheel on this machine had previously been incompatible with NumPy 2.x. I did not change dependency constraints in this PR.This is an educational synthetic toy environment, not a physical-accuracy model.