Commit graph

40 commits

Author SHA1 Message Date
wyx-hhhh
65ce8d4309 Update the model service startup logic, add integrity check for the model path, and support obtaining the model path from different fields 2025-05-21 15:32:59 +08:00
yanmuyuan
cb5d0cb4da Add gguf path to json file 2025-05-20 19:42:17 +08:00
wyx-hhhh
2c8cd6cc0e Change the data type of the is_trained field to boolean and update the related logic to reflect this change 2025-05-20 19:06:35 +08:00
wyx-hhhh
33952c1ef6 Change the data type of the is_trained field to boolean and update the related logic to reflect this change 2025-05-20 17:41:30 +08:00
yanmuyuan
94e960e1c8 Enhance GGUF model handling with timestamps, metadata and memory training status 2025-05-12 10:24:18 +08:00
KKKKKKKevin
245bb1e27b
fix:hotfix use_previous_params problem (#320)
Co-authored-by: Ye Xiangle <yexiangle@mail.mindverse.ai>
2025-04-30 16:13:18 +08:00
yexiangle
b3dcdd8ed5
fix:fix monitor model download log problem (#305) 2025-04-28 17:12:41 +08:00
yingapple
c88d2362e5 fix for gpu 2025-04-27 11:54:45 +08:00
KKKKKKKevin
1d8b48e6bc
preserve training param (#292) 2025-04-25 18:56:26 +08:00
KKKKKKKevin
de8370ba0d
fix move trainprocess to solve loop (#288) 2025-04-25 16:26:36 +08:00
KKKKKKKevin
37553fb23b
Feature/fix training model switch bug2 (#281)
* feature: use uv to setup python environment

* TrainProcessService add singleten method: get_instance

* feat: fix code

* Added CUDA support (#228)

* Add CUDA support

- CUDA detection
- Memory handling
- Ollama model release after training

* Fix logging issue

added cuda support flag so log accurately reflected cuda toggle

* Update llama.cpp rebuild

Changed llama.cpp to only check if cuda support is enabled and if so rebuild during the first build rather than each run

* Improved vram management

Enabled memory pinning and optimizer state offload

* Fix CUDA check

rewrote llama.cpp rebuild logic, added manual y/n toggle if user wants to enable cuda support

* Added fast restart and fixed CUDA check command

Added make docker-restart-backend-fast to restart the backend and reflect code changes without causing a full llama.cpp rebuild

Fixed make docker-check-cuda command to correctly reflect cuda support

* Added docker-compose.gpu.yml

Added docker-compose.gpu.yml to fix error on machines without nvidia gpu and made sure "\n" is added before .env modification

* Fixed cuda toggle

Last push accidentally broke cuda toggle

* Code review fixes

Fixed errors resulting from removed code:
- Added return save_path to end of save_hf_model function
- Rolled back download_file_with_progress function

* Update Makefile

Use cuda by default when using docker-restart-backend-fast

* Minor cleanup

Removed unnecessary makefile command and fixed gpu logging

* Delete .gpu_selected

* Simplified cuda training code

- Removed dtype setting to let torch automatically handle it
- Removed vram logging
- Removed Unnecessary/old comments

* Fixed gpu/cpu selection

Made "make docker-use-gpu/cpu" command work with .gpu_selected flag and changed "make docker-restart-backend-fast" command to respect flag instead of always using gpu

* Fix Ollama embedding error

Added custom exception class for Ollama embeddings, which seemed to be returning keyword arguments while the Python exception class only accepts positional ones

* Fixed model selection & memory error

Fixed training defaulting to 0.5B model regardless of selection and fixed "free(): double free detected in tcache 2" error caused by cuda flag being passed incorrectly

* fix: train service singlten

---------

Co-authored-by: Zachary Pitroda <30330004+zpitroda@users.noreply.github.com>
2025-04-25 15:27:52 +08:00
KKKKKKKevin
29a17c8615
Optimize TrainProcessService Singleton Pattern Implementation (#279)
* feature: use uv to setup python environment

* TrainProcessService add singleten method: get_instance
2025-04-25 14:17:15 +08:00
Zachary Pitroda
053090937d
Added CUDA support (#228)
* Add CUDA support

- CUDA detection
- Memory handling
- Ollama model release after training

* Fix logging issue

added cuda support flag so log accurately reflected cuda toggle

* Update llama.cpp rebuild

Changed llama.cpp to only check if cuda support is enabled and if so rebuild during the first build rather than each run

* Improved vram management

Enabled memory pinning and optimizer state offload

* Fix CUDA check

rewrote llama.cpp rebuild logic, added manual y/n toggle if user wants to enable cuda support

* Added fast restart and fixed CUDA check command

Added make docker-restart-backend-fast to restart the backend and reflect code changes without causing a full llama.cpp rebuild

Fixed make docker-check-cuda command to correctly reflect cuda support

* Added docker-compose.gpu.yml

Added docker-compose.gpu.yml to fix error on machines without nvidia gpu and made sure "\n" is added before .env modification

* Fixed cuda toggle

Last push accidentally broke cuda toggle

* Code review fixes

Fixed errors resulting from removed code:
- Added return save_path to end of save_hf_model function
- Rolled back download_file_with_progress function

* Update Makefile

Use cuda by default when using docker-restart-backend-fast

* Minor cleanup

Removed unnecessary makefile command and fixed gpu logging

* Delete .gpu_selected

* Simplified cuda training code

- Removed dtype setting to let torch automatically handle it
- Removed vram logging
- Removed Unnecessary/old comments

* Fixed gpu/cpu selection

Made "make docker-use-gpu/cpu" command work with .gpu_selected flag and changed "make docker-restart-backend-fast" command to respect flag instead of always using gpu

* Fix Ollama embedding error

Added custom exception class for Ollama embeddings, which seemed to be returning keyword arguments while the Python exception class only accepts positional ones

* Fixed model selection & memory error

Fixed training defaulting to 0.5B model regardless of selection and fixed "free(): double free detected in tcache 2" error caused by cuda flag being passed incorrectly
2025-04-25 10:20:36 +08:00
ryangyuan
9fe511f0f2
Feature/0416/add thinking mode (#264)
* fix: modify thinking_model loading configuration

* feat: realize thinkModel ui

* feat:store

* feat: add combined_llm_config_dto

* add thinking_model_config & database migration

* directly add thinking model to user_llm_config

* delete thinking model repo dto service

* delete thinkingmodel table migration

* add is_cot config

* feat: allow define  is_cot

* feat: simplify logs info

* feat: add training model

* feat: fix is_cot problem

* fix: fix chat message

* fix: fix progress error

* fix: disable no settings thinking

* feat: add thinking warning

* fix: fix start service error

* feat:fix init trainparams problem

* feat: change playGround prompt

* feat: Add Dimension Mismatch Handling for ChromaDB (#157) (#207)

* Fix Issue #157

Add chroma_utils.py to manage chromaDB and added docs for explanation

* Add logging and debugging process

- Enhanced the`reinitialize_chroma_collections` function in`chroma_utils.py` to properly check if collections exist before attempting to delete them, preventing potential errors when collections don't exist.
- Improved error handling in the`_handle_dimension_mismatch` method in`embedding_service.py` by adding more robust exception handling and verification steps after reinitialization.
- Enhanced the collection initialization process in`embedding_service.py` to provide more detailed error messages and better handle cases where collections still have incorrect dimensions after reinitialization.
- Added additional verification steps to ensure that collection dimensions match the expected dimension after creation or retrieval.
- Improved logging throughout the code to provide more context in error messages, making debugging easier.

* Change topics_generator timeout to 30 (#263)

* quick fix

* fix: shade -> shade_merge_info (#265)

* fix: shade -> shade_merge_info

* add convert array

* quick fix import error

* add log

* add heartbeat

* new strategy

* sse version

* add heartbeat

* zh to en

* optimize code

* quick fix convert function

* Feat/new branch management (#267)

* feat: new branch management

* feat: fix multi-upload

* optimize contribute management

---------

Co-authored-by: Crabboss Mr <1123357821@qq.com>
Co-authored-by: Ye Xiangle <yexiangle@mail.mindverse.ai>
Co-authored-by: Xinghan Pan <sampan090611@gmail.com>
Co-authored-by: doubleBlack2 <108928143+doubleBlack2@users.noreply.github.com>
Co-authored-by: kevin-mindverse <kevin@mindverse.ai>
Co-authored-by: KKKKKKKevin <115385420+kevin-mindverse@users.noreply.github.com>
2025-04-24 14:19:23 +08:00
KKKKKKKevin
ce9cfcb4a8
Feature/fix update instace (#272)
* fix password update logic, if there's more than one load

* update fix
2025-04-23 20:47:41 +08:00
kevinaimonster
6118a133f1
Feat/optimize train process2 (#250)
* split train process service

* split train process service

* split train param

* save train param to file

---------

Co-authored-by: kevin-mindverse <kevin@mindverse.ai>
2025-04-17 11:41:33 +08:00
KKKKKKKevin
a5942c7095
feat: fix multi-upload (#230) 2025-04-16 21:22:53 +08:00
KKKKKKKevin
cedcf9917a
Feat/optimize process service (#247)
* split process_step

* optimize

* fix

* optimizeCode
2025-04-16 16:59:15 +08:00
kevin-mindverse
2ab854cc19 feat:move train service into a seperated dir 2025-04-16 14:57:20 +08:00
kevin-mindverse
e50fbc5737 feat:split train progress into two different files 2025-04-16 14:54:32 +08:00
kevin-mindverse
0d6194179b rename class 2025-04-16 14:45:47 +08:00
yexiangle
64dc1bba78
feat: add step generate_biography (#243) 2025-04-16 14:07:42 +08:00
yexiangle
bd64514048
optimize trainprocess (#239)
Co-authored-by: kevin-mindverse <kevin@mindverse.ai>
2025-04-15 20:29:22 +08:00
KKKKKKKevin
0e442ed17c
Fix/make meta data field optional (#237)
* fix:metadata to optional

* docker command check

* add exception stack
2025-04-15 19:51:33 +08:00
ryangyuan
000b39ac60
Fix: optimize progress order (#182)
* change progress order

* feat: change progress frontend type

* feat: update _load_progress for progress's new format

* fix: fix formatUnderscoreToName

* fix:simplify TrainProgress with direct JSON structure and mapping

* fix:add necessary accessors (getters and setters) to maintain compatibility with existing code while adopting the new data structure.

* fix: train log jump

* fix: fix current step update failed

* fix:fix stop problem

* fix trainprogress has no attribute status problem

* fix: merge master

---------

Co-authored-by: Ye Xiangle <yexiangle@mail.mindverse.ai>
2025-04-14 16:38:13 +08:00
GoForceX
9ac11344b1
fix: Find correct llama-server location (#186) 2025-04-14 13:10:49 +08:00
yexiangle
4cbcc946aa
Adjustable Training Parameters & Checkpoint/Restore (#191)
* feat(trainprocess):add receive & get training params

* feat: support low/standard option for L2 data generate

* feat:improve training script invocation with direct bash command and internationalize comments

* fix: restore code

* feat: add error handling for GraphRAG index and modify model save frequency(epoch -> steps)

* feat: support low/medium/high mode for L2 data generation

* feat: set defaut value

* feat: add train params

* feat: use ScriptExecutor for training process and check return code

* fix: fix params round

* feat:use subprocess instead of script_executor to keep logs

* feat:hot fix name 'monitor_result' is not defined

* fix: delete useless message

* fix: fix params status

* feat: add status suspended

* feat:fix stop status

* fix: fix resume status

* fix: disable error

---------

Co-authored-by: Crabboss Mr <1123357821@qq.com>
Co-authored-by: ryangyuan <ryangyuan@mail.mindverse.ai>
2025-04-11 16:23:12 +08:00
KKKKKKKevin
4c71dce682
Feat: Remove conda from setup (#195)
* feat:remove conda from setup

* cool. more code about removing conda & env

* optimize script

* add python check

* optimize setup

* optimize setup

* add warning info

* optimize check

* add node check & npm check

* add cmake install suggestion

* add poetry suggestion

* add python command check

* add python tools

* add poetry

* add graphrag poetry install command optimization

* active poetry shell

* fix duplicated log

* avoid poetry multipul active

* add sqlite3 check

* optimize sqlite3 setup suggestion

* optimize

* add gitignore

* reverse compose detect
2025-04-10 19:39:26 +08:00
GoForceX
59c4a6397f
fix: Wrong encoding on reading backend.log (#171) 2025-04-09 10:20:07 +08:00
yexiangle
dcf99e60fe
fix: optimize trainprocess (#141) 2025-04-02 15:50:08 +08:00
yuchengzhou
8741ef364e
Feature/0327/adapter chat to openai (#121)
* feat(chat): Chat Interface Protocol Modification to Align with OpenAI
2025-03-31 15:49:11 +08:00
KKKKKKKevin
27c76ae29c
Fix:Env detect & Fix Missing Merge Step (#113)
* hotfix: Fix missing final data merge & Fix Env Detect In Script Runner

---------

Co-authored-by: yingapple <yingxiang835@gmail.com>
2025-03-30 18:03:52 +08:00
KKKKKKKevin
f64ddc108b
feat: Add docker support (#99)
* feat:Add Docker Support

* translate
2025-03-30 15:15:32 +08:00
Airmomo
def134ee70
fix: Replace os.path with pathlib for robust path handling (#86)
- Fix f-string syntax error caused by backslashes
- Use Path().as_posix() for consistent path formatting
- Improve cross-platform compatibility
2025-03-28 10:09:40 +08:00
omahs
ca01a9e73f
Fix typos (#60)
* fix typo

* fix typo

* fix typos

* fix typos

* fix typos

* fix typo

* fix typos

* fix typos

* fix typos
2025-03-27 10:18:39 +08:00
justcrab
e778ebf82f
feat(logging): separate training log (#83)
* desparate part of traing logs v1

* fix train.py log

* optimize logging manage && fix monitor log

* feat(logging): desparate part of training logs v2

* delete no use code

* merge conflic

* delete chinese

---------

Co-authored-by: Ye Xiangle <yexiangle@mail.mindverse.ai>
Co-authored-by: Crabboss Mr <crabbossmr@CrabbossdeMacBook-Air.local>
2025-03-27 10:12:11 +08:00
umutcrs
552ee09fce
security! (#62)
* Potential fix for code scanning alert no. 110: Uncontrolled data used in path expression

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* Potential fix for code scanning alert no. 109: Uncontrolled data used in path expression

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

---------

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-03-26 10:13:34 +08:00
yexiangle
3f2a286e7e
Featrue/0324/fix start train (#50)
* fix: add train condition check

* feat: check if user upload new file before start train again
2025-03-24 11:40:44 +08:00
Ye Xiangle
4b7a9e7f64 feat:delete no use code 2025-03-21 13:13:47 +08:00
Kevin
7f7d64210e Initial commit 2025-03-20 00:37:54 +08:00