Comments (7)
This seems to be a bug in ColBERT.
If for some reason the for batch_idx, BatchSteps in zip(range(start_batch_idx, config.maxsteps), reader):
loop is not executed, then batch_idx
is not defined. This will cause the UnboundLocalError: cannot access local variable 'batch_idx' where it is not associated with a value
.
from ragatouille.
Solved it by just initializing batch_idx in the colbert library, not sure if its right though, but not getting the error anymore with that (in /colbert/training/training.py):
@okhat
start_batch_idx = 0
batch_idx = start_batch_idx
# if config.resume:
# assert config.checkpoint is not None
# start_batch_idx = checkpoint['batch']
# reader.skip_to_batch(start_batch_idx, checkpoint['arguments']['bsize'])
for batch_idx, BatchSteps in zip(range(start_batch_idx, config.maxsteps), reader):
from ragatouille.
Since your query count is quite low, this could be a problem similar to the one here stanford-futuredata/ColBERT#118? Does it still occur if you use a lower batch size? (without modifying the code in the upstream ColBERT)
from ragatouille.
Setting batch size to 4 or 8 also showed the same problem. What is weird is that sometimes this problem occurs, and sometimes not, until batch_idx is initialized before the loop manually.
from ragatouille.
Yeah, this often occurs if there are no valid triplets to train on.
from ragatouille.
Here's a PR to colbert that I believe should alleviate this issue in many cases.
stanford-futuredata/ColBERT#312
from ragatouille.
Shouldnt this be easy to catch earlier up the call stack and emit a warning or error?
from ragatouille.
Related Issues (20)
- Stuck at " Loading segmented_maxsim_cpp extension (set COLBERT_LOAD_TORCH_EXTENSION_VERBOSE=True for more info)..." HOT 1
- ImportError: cannot import name 'PromptTemplate' from 'llama_index' (unknown location)
- Compatibility with LangChain 0.2.0 HOT 3
- How to extract embeddings generated by Colbert? HOT 2
- Idea: Make CorpusProcessor (and splitter_fn / preprocessing_fn) to have access to metadata
- Embedding Model with Existing Index
- How to index collection using generator function?
- Training script is not working as is
- Making deletions will alter the collection.json file, hence the search function unusable because we access the collection using list indices.
- can't access my finetuned model
- Use base model or sentence transformer
- ragatouille requires a version of numpy uncompatible with python
- ValueError: RAGatouille is not installed. Please install it with `pip install ragatouille`.
- Documentation (API Reference): missing params in description tables
- Question -- Symmetric search
- How to use highly capable Decoder only models (LLMs) with RAGatouille -- is it even advisable?
- RuntimeError when indexing with FAISS
- RAGAtouille cpu only installation
- Typescript support of RAGatouille
- Question: rerank does not use index
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 ragatouille.