Discussion
· Apr 20

Load data into LLM

I read the article by @Rodolfo Pscheidt:

https://community.intersystems.com/post/ollama-ai-iris

I forked his app and copied selected files from @Guillaume Rongier iris-rag-demo to make it containerized:

oliverwilms/ollama-ai-iris
 

I ran load_data.py and I got this output:

irisowner@e10968e4da42:/irisdev/app$ python3 load_data.py
Document ID: cbfa2f20-6627-407b-bbad-31722d18ca13
modules.json: 100%|█████████████████████████████████████████████████████████████| 349/349 [00:00<00:00, 778kB/s]
config_sentence_transformers.json: 100%|████████████████████████████████████████| 123/123 [00:00<00:00, 447kB/s]
README.md: 100%|███████████████████████████████████████████████████████████| 15.8k/15.8k [00:00<00:00, 85.9MB/s]
sentence_bert_config.json: 100%|██████████████████████████████████████████████| 54.0/54.0 [00:00<00:00, 343kB/s]
config.json: 100%|█████████████████████████████████████████████████████████████| 687/687 [00:00<00:00, 5.27MB/s]
pytorch_model.bin: 100%|███████████████████████████████████████████████████| 2.27G/2.27G [00:50<00:00, 44.5MB/s]
tokenizer_config.json: 100%|███████████████████████████████████████████████████| 444/444 [00:00<00:00, 1.61MB/s]
sentencepiece.bpe.model: 100%|█████████████████████████████████████████████| 5.07M/5.07M [00:00<00:00, 27.4MB/s]
tokenizer.json: 100%|██████████████████████████████████████████████████████| 17.1M/17.1M [00:00<00:00, 56.6MB/s]
special_tokens_map.json: 100%|█████████████████████████████████████████████████| 964/964 [00:00<00:00, 9.58MB/s]
config.json: 100%|██████████████████████████████████████████████████████████████| 191/191 [00:00<00:00, 677kB/s]
model.safetensors: 100%|███████████████████████████████████████████████████| 2.27G/2.27G [00:36<00:00, 62.3MB/s]
Parsing nodes: 100%|██████████████████████████████████████████████████████████████| 1/1 [00:02<00:00,  2.46s/it]
Generating embeddings: 100%|████████████████████████████████████████████████████| 21/21 [03:11<00:00,  9.12s/it]
Traceback (most recent call last):
  File "/irisdev/app/load_data.py", line 42, in <module>
    index.storage_context.persist("storageExample")
  File "/home/irisowner/.local/lib/python3.12/site-packages/llama_index/core/storage/storage_context.py", line 178, in persist
    self.docstore.persist(persist_path=docstore_path, fs=fs)
  File "/home/irisowner/.local/lib/python3.12/site-packages/llama_index/core/storage/docstore/simple_docstore.py", line 84, in persist
    self._kvstore.persist(persist_path, fs=fs)
  File "/home/irisowner/.local/lib/python3.12/site-packages/llama_index/core/storage/kvstore/simple_kvstore.py", line 87, in persist
    with fs.open(persist_path, "w") as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/fsspec/spec.py", line 1298, in open
    self.open(
  File "/home/irisowner/.local/lib/python3.12/site-packages/fsspec/spec.py", line 1310, in open
    f = self._open(
        ^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/fsspec/implementations/local.py", line 201, in _open
    return LocalFileOpener(path, mode, fs=self, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/irisowner/.local/lib/python3.12/site-packages/fsspec/implementations/local.py", line 365, in __init__
    self._open()
  File "/home/irisowner/.local/lib/python3.12/site-packages/fsspec/implementations/local.py", line 370, in _open
    self.f = open(self.path, mode=self.mode)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/irisdev/app/storageExample/docstore.json'

 

I think I need to change permissions in the directory where I cloned the repo.

Next I will put my own data into storageExample directory.

Discussion (0)1
Log in or sign up to continue