Comments (9)
1266th,in 'pre' dict,without 'Subject_Aliasing_acc'
1265th and above,in 'pre' dict,with 'Subject_Aliasing_acc'
from easyedit.
Do you mean that the data for item 1265 doesn't have Subject_Aliasing_acc in the 'pre' , but does have Subject_Aliasing_acc in the 'post' ?
from easyedit.
in Llama-2-7b-ms_recent_pre_edit.json
pre
1266,
Subject_Aliasing_acc
only 629
from easyedit.
this is relevant issue [https://github.com//issues/274#issue-2324392601]
from easyedit.
Hello, Subject_Aliasing_acc is a metric under portability, and not all edited data have this. However, locality evaluates the model's locality, and every data point will have it. Our evaluation script has already handled cases where Subject_Aliasing_acc is missing. Could you please provide your eval function?
from easyedit.
run run_knowedit_llama2.py with Llama-2-7b & Wiki_recent_test
Traceback (most recent call last):
File "EasyEdit/examples/run_knowedit_llama2.py", line 208, in
metrics, edited_model, _ = editor.edit(
File "EasyEdit/easyeditor/editors/editor.py", line 171, in edit
return self.edit_requests(requests, sequential_edit, verbose, **kwargs)
File "EasyEdit/easyeditor/editors/editor.py", line 366, in edit_requests
summary_metrics(all_metrics)
File "EasyEdit/easyeditor/editors/utils.py", line 33, in summary_metrics
[metric[eval][key][lkey] for metric in all_metrics])
File "EasyEdit/easyeditor/editors/utils.py", line 33, in
[metric[eval][key][lkey] for metric in all_metrics])
KeyError: 'Subject_Aliasing_acc'
from easyedit.
def summary_metrics(all_metrics):
if isinstance(all_metrics, dict):
all_metrics = [all_metrics, ]
logs_dir = './logs'
if not os.path.exists(logs_dir):
os.makedirs(logs_dir)
output_file = os.path.join(logs_dir, 'results.json')
with open(output_file, 'w') as f:
json.dump(all_metrics, f, ensure_ascii=False, indent=4)
mean_metrics = dict()
for eval in ["pre", "post"]:
mean_metrics[eval] = dict()
for key in ["rewrite_acc", "rephrase_acc"]:
if key in all_metrics[0][eval].keys():
mean_metrics[eval][key] = np.mean([metric[eval][key] for metric in all_metrics])
for key in ["locality", "portability"]:
if key in all_metrics[0][eval].keys() and all_metrics[0][eval][key] != {}:
mean_metrics[eval][key] = dict()
for lkey in all_metrics[0][eval][key].keys():
if lkey.endswith("acc"):
mean_metrics[eval][key][lkey] = np.mean(
[metric[eval][key][lkey] for metric in all_metrics])
# mean_metrics["time"] = np.mean([metric["time"] for metric in all_metrics])
print("Metrics Summary: ", mean_metrics)
from easyedit.
Hello, Subject_Aliasing_acc is a metric under portability, and not all edited data have this. However, locality evaluates the model's locality, and every data point will have it. Our evaluation script has already handled cases where Subject_Aliasing_acc is missing. Could you please provide your eval function?
Looking forward to your reply
from easyedit.
Thanks for fixing this bug with your updated code.
from easyedit.
Related Issues (20)
- error when cache file exist HOT 6
- When will the WISE pipeline implementation be publicized? HOT 4
- Can i edit quantized model? HOT 1
- LoRA does not work HOT 4
- 关于portability和locality的评估具体应该怎么设置呢 HOT 6
- 使用mend预训练llama时出现的报错 HOT 2
- 数据集问题 HOT 2
- counterfact数据结果 HOT 11
- ROME Question HOT 1
- [Speed issue]: How would you recommend running EasyEdit faster HOT 3
- [Evaluation Issues]: T5 Results are really strange HOT 1
- Evaluation Question HOT 4
- locality and portability evaluation HOT 8
- GRACE sequential edit result HOT 8
- IKE fluency HOT 2
- ccks gpt2-xl 模型 为什么用roberta模型加载? HOT 2
- R-ROME has poor performance when using GPT2-xl HOT 2
- WISE CONTEXT_TEMPLATES_CACHE HOT 7
- WISE tokenize HOT 7
- what is the meaning of archive HOT 2
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.