remsky opened a new pull request, #1039: URL: https://github.com/apache/burr/pull/1039
This PR replaces the placeholder ML training example with one that runs. It covers both items in #138: epoch-based training and a human review. Closes #138 ## Changes `examples/ml-training/application.py` trains a scikit-learn model: - One epoch is one action, with a checkpoint for each epoch. - The stop rule is a transition condition. - The run halts before `human_review` and takes the decision as an input. - With `continue`, the reviewer can pass a new `learning_rate`. - A SQLite persister lets a new process resume the run by `app_id`. Around it: - The required example files (notebook, README, diagram, `requirements.txt`) and a test. - `ml-training` is no longer in the skip list in `validate_examples.py`. - The docs page describes the new example and drops the WIP notice. - CI: one step in `validate-examples` installs the requirements of the example and runs its test. ## How I tested this - Clean install of Burr 0.42.0 from `requirements.txt`: the test, a terminal run with stop and resume, notebook all passed. - Source tree: `pre-commit` (without `frontend-lint-staged`, no UI file changed) and `validate_examples.py` passed. - Windows with Python 3.12 only. ## Notes - I used scikit-learn so that the example is lightweight. Let me know if you'd rather I swap to PyTorch. - The CI step is there because `.[tests]` does not include scikit-learn. I can remove it if you prefer. - #1009 edits the README and the docs page of this example; if it merges first it should only be a small mechanical conflict. Follow-up if you'd want it: would be pretty clean to drop in an agent action that reads the summary and picks the next learning rate. The human-in-the-loop would then update the agent's instructions or approve the final model. ## Checklist - [x] PR has an informative and human-readable title (this will be pulled into the release notes) - [x] Changes are limited to a single goal (no scope creep) - [x] Code passed the pre-commit check & code is left cleaner/nicer than when first encountered. - [x] Any _change_ in functionality is tested - [x] New functions are documented (with a description, list of inputs, and expected output) - [x] Placeholder code is flagged / future TODOs are captured in comments - [x] Project documentation has been updated if adding/changing functionality. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
