Comments (8)
Hello, we release the data we used in huggingface, you can see it in our README.md and the example in https://github.com/zjunlp/EasyEdit/blob/main/examples/KnowEdit.md
from easyedit.
Thank you for the reply.
When I am trying to run this code it is giving me Assertion error
python run_knowedit_llama2.py --editing_method=ROME --hparams_dir=./hparams/ROME/llama-7b.yaml --data_dir=./data/wiki_counterfact/test_cf.json --datatype='counterfact'
2024-01-20 12:05:57,321 - easyeditor.editors.editor - INFO - Instantiating model
01/20/2024 12:05:57 - INFO - easyeditor.editors.editor - Instantiating model
Loading checkpoint shards: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:02<00:00, 1.25s/it]
One Edit instance needs one locality input.....
Traceback (most recent call last):
File "/EasyEdit-main/examples/run_knowedit_llama2.py", line 235, in
metrics, edited_model, _ = editor.edit(
File "/EasyEdit-main/examples/../easyeditor/editors/editor.py", line 156, in edit
requests = self._prepare_requests(prompts, target_new, ground_truth, rephrase_prompts,
File "/EasyEdit-main/examples/../easyeditor/editors/editor.py", line 508, in _prepare_requests
assert len(locality_inputs[locality_key]['prompt']) == len(locality_inputs[locality_key]['ground_truth'])
AssertionError
I have data in this format
data-->wiki_counterfact --> test_cf.json & train_cf.json
Also for data_dir, instead of data_dir=./data/wiki_counterfact/test_cf.json if I give data_dir=./data/ it gives me "Is a directory error". Using test_cf.json, gives assertion error.
What do I do to resolve the error and get the result?
from easyedit.
please pull the newest code, we have fix this bug.
from easyedit.
I am now working with the latest code and when running
python run_knowedit_llama2.py --editing_method=ROME --hparams_dir=/EasyEdit-main/hparams/ROME/llama-7b.yaml --data_dir=./data/wiki_counterfact/test_cf.json --datatype='counterfact'
This is generating the below error
Traceback (most recent call last):
File "/EasyEdit-main/examples/run_knowedit_llama2.py", line 73, in
an=pr["ground_truth"][0][0]
IndexError: list index out of range
from easyedit.
I checked and found that the list at this location is empty. Could you manually add an empty string to the data with 'subject': 'Hong Chau'? We may update the dataset after our discussion.
from easyedit.
We've just updated the datasets on Hugging Face. Please download the latest version to ensure compatibility.
Thank you for bringing this to our attention!
from easyedit.
Hi, have you solved your issue?
from easyedit.
We've just updated the datasets on Hugging Face. Please download the latest version to ensure compatibility. Thank you for bringing this to our attention!
You are welcome! Thank you so much for the super quick fixes.
I have tried just with ROME for Llama2-7b. Yes the issue has been resolved. Thank you!
from easyedit.
Related Issues (20)
- MEND model after editing HOT 1
- RuntimeError: probability tensor contains either `inf`, `nan` or element < 0 HOT 4
- MEMIT and PMET torch.linalg.solve stuck HOT 5
- ROME vs r-ROME and obtaining generalization metric HOT 6
- Question about finetuning the backbone(mulitmodal editing) HOT 3
- KeyError: 'Subject_Aliasing_acc' HOT 9
- R-ROME RuntimeError: expected scalar type Half but found Float HOT 10
- [BUG] GRACE editor with large eps. HOT 9
- Is SEARC's training loss same with paper? HOT 5
- SERAC的portability在edit之后降低了? HOT 6
- About KE and KN in edit.py HOT 3
- Finding a Bug HOT 5
- Finding a Bug HOT 23
- MEND running error HOT 1
- run llama2 ROME error HOT 2
- run llama2 ROME error HOT 4
- How to compute locality? HOT 3
- why need download wiki , has 18G ? HOT 2
- error when cache file exist HOT 5
- When will the WISE pipeline implementation be publicized?
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 easyedit.