- 
                Notifications
    
You must be signed in to change notification settings  - Fork 17
 
Drop tqdm in favor of logger; normalize use of tabulate #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    Changes are to accommodate strangetom#25, as webtools will need basic logging to handle websocket logging behavior required for front-end
    
  mcioffi 
      added a commit
        to mcioffi/ingredient-parser
      that referenced
      this pull request
    
      Aug 12, 2025 
    
    
      
  
    
      
    
  
…le output from websockets 1. Work-in-progress new feature for gridsearch 2. Rever to logger.info for websocket output, to be aligned with develop branch 4. Refine the console output, should have originally used <pre> tags to persist reserved str \n, \t, etc Note: This commit refers to a function set_redirect_log_stream, that will be introduced in strangetom#35, since it is required to set a logging stream handle correctly to pipe results to websockets
…b app/tool Refer to notes on other PR at strangetom@371a060
| 
           Thanks @mcioffi A few minor issues: 
  | 
    
| 
           Perfect, thanks!  | 
    
    
  strangetom 
      added a commit
      that referenced
      this pull request
    
      Aug 26, 2025 
    
    
      
  
    
      
    
  
* Drop flask front-end * First batch of vite/react/ts front-end with flask server * Updates for docs and readability * Cleanup * Update assets + readme * Refactoring webtools + integrating flask-socketio * Bump readme * Bump * dev reqs & concurrent pids bash in npm * Change handling of edit mode from modal to inline * cleanup * Labeller help hover * Missed doc notes * Train model tab updates - Cleaned up flask code - Removed train tab interrupt button (limitations) - Added package requirements precheck on app startup - Added time elapsed on training screen * Accidental none check against thread, preventing re-runs * Asset screenshot * Move time tracker on trainer to zustrand state "Time elapsed" tracking needs to live within managed state, and not ui state, due to the training being asynchronous and user can use the app while the model is training in the background * Bump * Add seed input to training * Add seed input to training (server) * Sets up cache reset on model loader Addresses one of the comments by @strangetom on #25 (comment) regarding cache resetting by the @ lru_cache decorator on the model loading. This ensures completed training cycles done via the web app (which impacts the parser) updates the parser optimistically to handle the cache resetting * Bump up third-party package versions against vite and mantine * WIP - add gridsearch options, revert to logger.info, and refine console output from websockets 1. Work-in-progress new feature for gridsearch 2. Rever to logger.info for websocket output, to be aligned with develop branch 4. Refine the console output, should have originally used <pre> tags to persist reserved str \n, \t, etc Note: This commit refers to a function set_redirect_log_stream, that will be introduced in #35, since it is required to set a logging stream handle correctly to pipe results to websockets * Screenshots * Remove remnants * Cleanup, readability, etc * Remove interrupt and keepModels based on maintainer feedback * Pre-commit format fixes, part I * Pre-commit fixes, part II (adds biomejs for webtools linter/formatter/etc) Tacks on to the existing pre-commit hooks in the repo with BiomeJS. BiomeJS is specifically for the web side (typescript/js/css). Local configuration modeled after preconfigs at https://github.com/biomejs/pre-commit. Commit includes all file format fixes necessary. Anticipated that config will be modified as necessary if new web contributors participate in future commits. * Restore training.sqlite3 to previous commit Accidentally included new training.sqlite3 in e01430b * Address bug feedback, round I - [x] Parser: The amount flags are not shown in the results table - [x] Parser: order labels in token tooltip as per old webapp - [x] Parser: Reorder rows in result table as per old webapp - [x] General: Can we avoid use of google fonts? Everything else (after running npm install) is entirely local. - [x] Parser: show % sign in tooltips for scores for each label - [x] Trainer: Output include debug info app.sockets, which isn't relevant to training. - [x] Trainer: html and tsv files saved in webtools directory instead of parent - [x] General: on the parser and labeller pages, the contrast between text and colours is a bit low (particularly for anything on a red background). This is probably best fixed by increasing the font size on those pages, since it's a little small anyway. - [x] Trainer: default model location incorrect (this was changed recently, is should be in ingredient_parser/en/data/) - [x] Trainer: split value does not allow more than one decimal place. There shouldn't really be any limit of the number of decimal places (but in practice, 3 might be a more reasonable limit than 1). - [x] Trainer: saveur dataset is selected by default, but doesn't exist. - [x] Parser: Missing separate_names option * Address bugs feedback, round II - [x] Trainer: Inputs for seed, split do not focus on click so cannot edit without tabbing to the inputs or finding another way to focus them. This might be a wider problem than just those. - [x] Trainer: unable to start another training run after completing a previous one if confusion matrix is generated by the first run. There's a RuntimeError related to Tk. * Address bugs feedback, round III - [x] Labeller: Unable to search unicode fractions - [x] Labeller: Unable to quickly select a label for a token using first letter (as per <select> element) - [x] Labeller: Bug when searching (coarse, dried returns no results but should return sentence id 4718) * Address bugs feedback, round IV - [x] Trainer: The split value seems to be capped at 0.9. That should probably changed 0.999 - [x] Labeller: There's a weird bug when changing the label for a token - an addition PUNC token gets inserted. This seems to effect any sentence containing a comma when you change the label of the first token. * Address bugs feedback, round V - [x] Labeller: Is it possible to be able to tab between tokens in a sentence to change to the next one? * Address bugs feedback, round VI - [x] Trainer: Gridsearch incomplete --------- Co-authored-by: tom <tpstrange@gmail.com>
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
The Updates ✏️
TL;DR — Future web app (PR #25) use websockets for routing training data to the front-end, and
tqdmadds complexity to that with stdout behavior over sockets, so this proposes to remove it; also included are updates totabulateprinting and a decorate functiontqdmdependencylogger.infofor multi-processing tasks liketrain (multiple),gridsearch, andfeaturesearchtabulateacross all tasks —train (single/multiple)now gets this treatment (examples below)set_redirect_log_stream, to be used in web app