Skip to content

Commit 92f2b09

Browse files
authored
Misc updates prior to v1.2.0 release (#341)
Signed-off-by: Abolfazl Shahbazi <[email protected]>
1 parent 98beb5c commit 92f2b09

File tree

73 files changed

+74
-74
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+74
-74
lines changed

DATASETS.md

+1-1

MODELS.md

+1-1

docker/Dockerfile.mcg

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,4 @@ RUN pip install --no-cache-dir -r requirements.txt
113113

114114
EXPOSE 8501
115115

116-
CMD ["streamlit", "run", "home.py", "--server.port=8501", "--server.address=0.0.0.0"]
116+
CMD ["streamlit", "run", "home.py", "--server.port=8501", "--server.address=0.0.0.0"]

docker/docker-compose.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,4 @@ services:
9999
test: ["CMD-SHELL", "curl --fail http://localhost:8501 || exit 1"]
100100
interval: 1m
101101
timeout: 5s
102-
retries: 5
102+
retries: 5

docker/helm-runner/.dockerignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
benchmark_output
2-
huggingface
2+
huggingface

docker/helm-runner/README.md

+1-1

docker/helm-runner/spec_conf_files/run_spec_helm_lite_with_efficiency.conf

+1-1
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,4 @@ entries: [
134134
{description: "wmt_14:language_pair=fr-en,model=Intel/neural-chat-7b-v3-2", priority: 2}
135135
{description: "wmt_14:language_pair=hi-en,model=Intel/neural-chat-7b-v3-2", priority: 2}
136136
{description: "wmt_14:language_pair=ru-en,model=Intel/neural-chat-7b-v3-2", priority: 2}
137-
]
137+
]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
entries: [{description: "mmlu:subject=philosophy,model=Intel/neural-chat-7b-v3-2", priority: 1}]
1+
entries: [{description: "mmlu:subject=philosophy,model=Intel/neural-chat-7b-v3-2", priority: 1}]
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
entries: [{description: "real_toxicity_prompts_intel:model=Intel/neural-chat-7b-v3-2", priority: 1}]
1+
entries: [{description: "real_toxicity_prompts_intel:model=Intel/neural-chat-7b-v3-2", priority: 1}]

docker/helm-runner/tokenizer_configs_intel.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
tokenizer_spec:
44
class_name: "helm.proxy.tokenizers.huggingface_tokenizer.HuggingFaceTokenizer"
55
end_of_text_token: "</s>"
6-
prefix_token: "<s>"
6+
prefix_token: "<s>"

docs/datasets.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"path": "../../notebooks/explainer/imagenet_with_cam/ExplainingImageClassification.ipynb"
3-
}
3+
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"path": "../../notebooks/explainer/multimodal_cancer_detection/Multimodal_Cancer_Detection.ipynb"
3-
}
3+
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"path": "../../notebooks/explainer/transfer_learning_text_classification/PyTorch_Text_Classifier_fine_tuning_with_Attributions.ipynb"
3-
}
3+
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"path": "../../notebooks/explainer/cifar_with_attributions/TorchVision_CIFAR_Interpret.ipynb"
3-
}
3+
}

docs/notebooks/heart_disease.nblink

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"path": "../../notebooks/explainer/heart_disease_with_attributions/heart_disease.ipynb"
3-
}
3+
}

docs/notebooks/mnist.nblink

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"path": "../../notebooks/explainer/mnist_with_attributions_and_metrics/mnist.ipynb"
3-
}
3+
}
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
22
"path": "../../notebooks/explainer/newsgroups_with_attributions_and_metrics/partitionexplainer.ipynb"
3-
}
3+
}

explainer/intel_ai_safety/explainer/base_explainer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024 Intel Corporation
2+
# Copyright (c) 2022 Intel Corporation
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

explainer/intel_ai_safety/explainer/blackbox.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024 Intel Corporation
2+
# Copyright (c) 2022 Intel Corporation
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

explainer/intel_ai_safety/explainer/context/agnostic/attributions_explainer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# Copyright (c) 2022 Intel Corporation
4+
# Copyright (c) 2024 Intel Corporation
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.

explainer/intel_ai_safety/explainer/utils/graphics/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# Copyright (c) 2023 Intel Corporation
4+
# Copyright (c) 2022 Intel Corporation
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.

explainer/intel_ai_safety/explainer/utils/types.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# Copyright (c) 2023 Intel Corporation
4+
# Copyright (c) 2022 Intel Corporation
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.

explainer/poetry.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[virtualenvs]
2-
in-project = true
2+
in-project = true

explainer/tests/pytest.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ markers =
1717
# ignore::ImportWarning
1818

1919
# Temporary solution while we figure out how to filter out shap warning above
20-
addopts = -p no:warnings
20+
addopts = -p no:warnings

fuzz/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ pandas==1.5.3
66
plotly==5.20.0
77
semantic-version==2.10.0
88
tensorflow-data-validation==1.14.0
9-
tensorflow-model-analysis==0.45.0
9+
tensorflow-model-analysis==0.45.0

intel_ai_safety/common/plugins.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# Copyright (c) 2024 Intel Corporation
4+
# Copyright (c) 2022 Intel Corporation
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.

intel_ai_safety/common/types.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# Copyright (c) 2023 Intel Corporation
4+
# Copyright (c) 2022 Intel Corporation
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.

model_card_gen/intel_ai_safety/model_card_gen/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2024 Intel Corporation
2+
# Copyright (c) 2022 Intel Corporation
33
#
44
# Licensed under the Apache License, Version 2.0 (the "License");
55
# you may not use this file except in compliance with the License.

model_card_gen/intel_ai_safety/model_card_gen/docs/examples/json/model_card_compas.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@
6565
]
6666
}
6767
}
68-
}
68+
}

model_card_gen/intel_ai_safety/model_card_gen/docs/examples/json/model_card_example.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -160,4 +160,4 @@
160160
}
161161
]
162162
}
163-
}
163+
}

model_card_gen/intel_ai_safety/model_card_gen/graphics/graphics_data_transform.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# Copyright (c) 2024 Intel Corporation
4+
# Copyright (c) 2022 Intel Corporation
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.

model_card_gen/intel_ai_safety/model_card_gen/model_card_gen.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# Copyright (c) 2024 Intel Corporation
4+
# Copyright (c) 2022 Intel Corporation
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.
@@ -333,4 +333,4 @@ def export_model_card(self, filename):
333333
if self.template_type == "md":
334334
f.write(self._repr_md_())
335335
else:
336-
f.write(self._repr_html_())
336+
f.write(self._repr_html_())

model_card_gen/intel_ai_safety/model_card_gen/template/html/js/plotly_js_header.html.jinja

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
});
1616
}
1717
</script>
18-
{% endblock %}
18+
{% endblock %}

model_card_gen/intel_ai_safety/model_card_gen/template/html/style/default_style.html.jinja

+1-1
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@
7878
table, th, td { border: 1px solid black; }
7979
th, td { border: 1px solid #CCC; height: 30px; }
8080
caption { font-weight: bold; }
81-
</style>
81+
</style>

model_card_gen/intel_ai_safety/model_card_gen/template/md/macros/default_macros.md.jinja

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,4 @@
113113
{% endif %}
114114

115115
{{ render_graphics(graphics.collection) }}
116-
{% endmacro %}
116+
{% endmacro %}
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[client]
2-
showSidebarNavigation = false
2+
showSidebarNavigation = false

model_card_gen/model_card_ui/README.md

+1-1

model_card_gen/model_card_ui/generate_model_card_json.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,4 @@ def generate_json_template():
7676

7777

7878
def main():
79-
return
79+
return

model_card_gen/model_card_ui/home.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,4 @@ def main_page():
6060
navigate_menu()
6161
if "runpage" not in st.session_state:
6262
st.session_state.runpage = main_page
63-
st.session_state.runpage()
63+
st.session_state.runpage()

model_card_gen/model_card_ui/model_card_html_generator.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ def generate_model_card_html(model_card, metric_threshold_csv=None, metric_grp_c
5757
model_card_html = ModelCardGen.generate(model_card, metric_threshold_csv, metric_grp_csv)
5858
return model_card_html._repr_html_()
5959
except Exception as e:
60-
handle_exception(str(e))
60+
handle_exception(str(e))

model_card_gen/model_card_ui/pages/considerations.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,4 +105,4 @@ def main():
105105

106106
if __name__ == "__main__":
107107
load_widget_state()
108-
main()
108+
main()

model_card_gen/model_card_ui/pages/model_details.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -233,4 +233,4 @@ def main():
233233

234234
if __name__ == "__main__":
235235
load_widget_state()
236-
main()
236+
main()

model_card_gen/model_card_ui/pages/model_parameters.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -70,4 +70,4 @@ def main():
7070

7171
if __name__ == "__main__":
7272
load_widget_state()
73-
main()
73+
main()

model_card_gen/model_card_ui/pages/quantitative_analysis.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,4 +93,4 @@ def main():
9393

9494
if __name__ == "__main__":
9595
load_widget_state()
96-
main()
96+
main()

model_card_gen/model_card_ui/pages/view_model_card.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,4 +85,4 @@ def view_model_card():
8585

8686
if __name__ == "__main__":
8787
load_widget_state()
88-
view_model_card()
88+
view_model_card()

model_card_gen/model_card_ui/persist.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ def persist(key: str) -> str:
1818
def load_widget_state():
1919
"""Load persistent widget state."""
2020
if _PERSIST_STATE_KEY in _state:
21-
_state.update({key: value for key, value in _state.items() if key in _state[_PERSIST_STATE_KEY]})
21+
_state.update({key: value for key, value in _state.items() if key in _state[_PERSIST_STATE_KEY]})

model_card_gen/model_card_ui/session_state_initializer.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,4 @@ def initialize_session_state():
8080
"performance_graphics_dict": {}, # Dictionary of performance graphics
8181
"performance_graphics": [], # Performance graphics image collection
8282
}
83-
)
83+
)

model_card_gen/model_card_ui/utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -357,4 +357,4 @@ def navigate_menu():
357357
st.sidebar.page_link("pages/model_parameters.py", label="⚙️ Model Parameters")
358358
st.sidebar.page_link("pages/considerations.py", label="⚖️ Considerations")
359359
st.sidebar.page_link("pages/quantitative_analysis.py", label="📊 Quantitative Analysis")
360-
st.sidebar.page_link("pages/view_model_card.py", label="🔍 View or Download Model Card")
360+
st.sidebar.page_link("pages/view_model_card.py", label="🔍 View or Download Model Card")

model_card_gen/poetry.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[virtualenvs]
2-
in-project = true
2+
in-project = true

model_card_gen/tests/test_model_card.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@ def test_missing_threshold_column_exception():
9090
with pytest.raises(AssertionError) as exception_error:
9191
example_df = pd.DataFrame(data={'col1': [1, 2]})
9292
ModelCardGen.generate(metrics_by_threshold=example_df)
93-
assert "No column named 'threshold'" in str(exception_error.value)
93+
assert "No column named 'threshold'" in str(exception_error.value)

notebooks/explainer/heart_disease_with_attributions/README.md

+1-1

notebooks/explainer/mnist_with_attributions_and_metrics/README.md

+1-1

notebooks/explainer/multimodal_cancer_detection/data_utils.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env python
22
# -*- coding: utf-8 -*-
33
#
4-
# Copyright (c) 2022 Intel Corporation
4+
# Copyright (c) 2023 Intel Corporation
55
#
66
# Licensed under the Apache License, Version 2.0 (the "License");
77
# you may not use this file except in compliance with the License.

notebooks/explainer/newsgroups_with_attributions_and_metrics/README.md

+1-1

notebooks/explainer/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ pydot==2.0.0
22
pydot_ng==2.0.0
33
scikit-image==0.22.0
44
ultralytics==8.1.36
5-
sentencepiece==0.2.0
5+
sentencepiece==0.2.0

notebooks/model_card_gen/hugging_face_model_card/README.md

+1-1

0 commit comments

Comments
 (0)