Comments (7)
@Ben-Epstein Having a CLI-like interface to train the models makes a lot of sense. Playing devil's advocate here, what are the benefits of having a CLI for training over a simple Makefile?
A makefile is good for internal use, but not for a general cli, because the Makefile needs to be present to use it. The goal of the cli is for it to be global, for example:
pip install on indomain
dalm train new ...
And you can invoke dalm
from anywhere. If we did makefiles, you'd have to be in the root of the DALM repo which isn't as useful for regular end users.
from dalm.
I get the following error when trying to run retriever-only training (which does not have sys.path.append). I found that Python does not add the current working directory to the path (the folder you are running the script from, which is different from the path where the script is located). As a result, the script can't import modules with absolute paths (and have to use import paths relative to the script path).
root@f4ec1ae23983:~/Shamane/DALM# python dalm/training/retriever_only/train_retriever_only.py --dataset_path "/root/DALM/dataset/out/question_answer_pairs_train" --model_name_or_path "BAAI/bge-large-en" --output_dir "./retriever_only_c
heckpoints" --use_peft --with_tracking --report_to all --per_device_train_batch_size 32
Traceback (most recent call last):
File "/root/Shamane/DALM/dalm/training/retriever_only/train_retriever_only.py", line 36, in <module>
from dalm.models.retriever_only_base_model import AutoModelForSentenceEmbedding
ModuleNotFoundError: No module named 'dalm'
root@f4ec1ae23983:~/Shamane/DALM#
from dalm.
@Ben-Epstein Having a CLI-like interface to train the models makes a lot of sense. Playing devil's advocate here, what are the benefits of having a CLI for training over a simple Makefile?
from dalm.
I get the following error when trying to run retriever-only training (which does not have sys.path.append). I found that Python does not add the current working directory to the path (the folder you are running the script from, which is different from the path where the script is located). As a result, the script can't import modules with absolute paths (and have to use import paths relative to the script path).
root@f4ec1ae23983:~/Shamane/DALM# python dalm/training/retriever_only/train_retriever_only.py --dataset_path "/root/DALM/dataset/out/question_answer_pairs_train" --model_name_or_path "BAAI/bge-large-en" --output_dir "./retriever_only_c heckpoints" --use_peft --with_tracking --report_to all --per_device_train_batch_size 32 Traceback (most recent call last): File "/root/Shamane/DALM/dalm/training/retriever_only/train_retriever_only.py", line 36, in <module> from dalm.models.retriever_only_base_model import AutoModelForSentenceEmbedding ModuleNotFoundError: No module named 'dalm' root@f4ec1ae23983:~/Shamane/DALM#
@rsachira yes, you need to run it from the location of the file. We want to document that in the repo. So cd dalm/training/retriever_only
and python train....
- this is how we need to document it. And a cli will help make that easier
from dalm.
@rsachira yes, you need to run it from the location of the file. We want to document that in the repo. So
cd dalm/training/retriever_only
andpython train....
- this is how we need to document it. And a cli will help make that easier
Then, wandb and other log files will be created in the script directory?
from dalm.
We want to document that in the repo. So cd dalm/training/retriever_only and python train.... - this is how we need to document it. And a cli will help make that easier
@Ben-Epstein I tried running it from the directory. Same error. Were you able to run this? There could be some configuration problems in my machine.
from dalm.
We want to document that in the repo. So cd dalm/training/retriever_only and python train.... - this is how we need to document it. And a cli will help make that easier
@Ben-Epstein I tried running it from the directory. Same error. Were you able to run this? There could be some configuration problems in my machine.
This was solved by installing the repo (from readme docs)
from dalm.
Related Issues (20)
- training fails at the end when with-tracking is false HOT 1
- E2E training checkpoint saving doesn't work HOT 1
- Minimum system requirements to train HOT 4
- Desiring Retriever Only Inference HOT 2
- Installation: Why 'indomain' and not 'dalm' ? HOT 5
- TypeError: Argument() missing 1 required positional argument: 'default'
- dalm qa-gen toy_data_train.csv doesn't work out of the box. HOT 4
- Eval e2e Rag raising device mismatch error HOT 2
- Reading comprehension synthetic data regex improvements HOT 1
- Update README to document reading comprehension
- CUDA OOM doing reading comprehension on A10 24GB VRAM GPU
- How to run model + finetuned adapter in LlamaIndex or Langchain? HOT 1
- Large values of casual loss HOT 3
- paper released?
- Rag-end2end didn't achieve any improvement in recall score compared to training only with Retriever HOT 4
- DALM installation fails in my python environment. HOT 1
- Installation problem on main branch HOT 1
- cannot import name '_sentencepiece' from partially initialized module 'sentencepiece'
- how to use title question and passage all together while training retriever only HOT 1
- Incorrect pooling BGE model HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dalm.