From e2acae15fefa411e256a068cf1954b503a83193f Mon Sep 17 00:00:00 2001 From: vyaivo Date: Tue, 5 Nov 2024 14:39:19 -0800 Subject: [PATCH] Adding Intel copyright notices (#24) --- file_utils.py | 3 +++ plots/plot_gold-search-recall.py | 3 +++ plots/plot_ndoc-recall.py | 3 +++ plots/plot_noise_percentile.py | 3 +++ plots/plot_utils.py | 3 +++ preprocessing/alce/convert_alce_colbert.py | 3 +++ preprocessing/alce/convert_alce_dense.py | 3 +++ preprocessing/alce/convert_alce_utils.py | 3 +++ preprocessing/convert_nq_dense.py | 3 +++ preprocessing/create_groundtruth_calibration.py | 3 +++ preprocessing/sample_retrieved_neighbors.py | 3 +++ preprocessing/set_gold_recall.py | 3 +++ reader/compute_ci.py | 3 +++ reader/eval.py | 3 +++ reader/eval_per_query.py | 3 +++ reader/plot_per_k.py | 3 +++ reader/run.py | 3 +++ reader/utils.py | 3 +++ retriever/eval.py | 3 +++ retriever/index.py | 3 +++ retriever/ret_utils.py | 3 +++ retriever/run.py | 3 +++ retriever/run_colbert.py | 3 +++ utils.py | 3 +++ 24 files changed, 72 insertions(+) diff --git a/file_utils.py b/file_utils.py index fd6e994..10d8cfa 100644 --- a/file_utils.py +++ b/file_utils.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + import json import pickle diff --git a/plots/plot_gold-search-recall.py b/plots/plot_gold-search-recall.py index b23ffda..59ba5e5 100644 --- a/plots/plot_gold-search-recall.py +++ b/plots/plot_gold-search-recall.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + import matplotlib import matplotlib.pyplot as plt import numpy as np diff --git a/plots/plot_ndoc-recall.py b/plots/plot_ndoc-recall.py index 93baa25..73f52cd 100644 --- a/plots/plot_ndoc-recall.py +++ b/plots/plot_ndoc-recall.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + import matplotlib import matplotlib.pyplot as plt import numpy as np diff --git a/plots/plot_noise_percentile.py b/plots/plot_noise_percentile.py index 0e9c2a1..13ee103 100644 --- a/plots/plot_noise_percentile.py +++ b/plots/plot_noise_percentile.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + import numpy as np import matplotlib.pyplot as plt import plot_utils diff --git a/plots/plot_utils.py b/plots/plot_utils.py index ae8ec1d..3eb839a 100644 --- a/plots/plot_utils.py +++ b/plots/plot_utils.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + import json import numpy as np import os diff --git a/preprocessing/alce/convert_alce_colbert.py b/preprocessing/alce/convert_alce_colbert.py index f360ad9..83c0747 100644 --- a/preprocessing/alce/convert_alce_colbert.py +++ b/preprocessing/alce/convert_alce_colbert.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + from file_utils import load_json import convert_alce_utils diff --git a/preprocessing/alce/convert_alce_dense.py b/preprocessing/alce/convert_alce_dense.py index 2ff9cb7..b7d3d71 100644 --- a/preprocessing/alce/convert_alce_dense.py +++ b/preprocessing/alce/convert_alce_dense.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + from file_utils import load_json, save_json, save_jsonl import convert_alce_utils diff --git a/preprocessing/alce/convert_alce_utils.py b/preprocessing/alce/convert_alce_utils.py index 534fc35..08129e8 100644 --- a/preprocessing/alce/convert_alce_utils.py +++ b/preprocessing/alce/convert_alce_utils.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + from tqdm import tqdm import pandas as pd diff --git a/preprocessing/convert_nq_dense.py b/preprocessing/convert_nq_dense.py index ae7b4b8..313d06a 100644 --- a/preprocessing/convert_nq_dense.py +++ b/preprocessing/convert_nq_dense.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + import argparse import datasets import json diff --git a/preprocessing/create_groundtruth_calibration.py b/preprocessing/create_groundtruth_calibration.py index 5fd348c..28952e1 100644 --- a/preprocessing/create_groundtruth_calibration.py +++ b/preprocessing/create_groundtruth_calibration.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + """ After exhaustive search with a flat search index has been run, you will have files that contain the nearest neighbors for every single query. diff --git a/preprocessing/sample_retrieved_neighbors.py b/preprocessing/sample_retrieved_neighbors.py index 00318e6..3778bef 100644 --- a/preprocessing/sample_retrieved_neighbors.py +++ b/preprocessing/sample_retrieved_neighbors.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + import os import argparse from tqdm import tqdm diff --git a/preprocessing/set_gold_recall.py b/preprocessing/set_gold_recall.py index 804031a..65cca91 100644 --- a/preprocessing/set_gold_recall.py +++ b/preprocessing/set_gold_recall.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + import os import argparse from tqdm import tqdm diff --git a/reader/compute_ci.py b/reader/compute_ci.py index 7ea13b5..1245945 100644 --- a/reader/compute_ci.py +++ b/reader/compute_ci.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + import argparse import numpy as np import pathlib diff --git a/reader/eval.py b/reader/eval.py index 005ea91..5a14ed4 100644 --- a/reader/eval.py +++ b/reader/eval.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + # Some of this code is based on prior work under the MIT License: # Copyright (c) 2023 Princeton Natural Language Processing # Copyright (c) Carnegie Mellon University diff --git a/reader/eval_per_query.py b/reader/eval_per_query.py index f5bc6dc..b8d0687 100644 --- a/reader/eval_per_query.py +++ b/reader/eval_per_query.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + import argparse import collections from collections import Counter diff --git a/reader/plot_per_k.py b/reader/plot_per_k.py index fc01389..990ba17 100644 --- a/reader/plot_per_k.py +++ b/reader/plot_per_k.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + import argparse import os import logging diff --git a/reader/run.py b/reader/run.py index b73e480..14de5d9 100644 --- a/reader/run.py +++ b/reader/run.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + # Some of this code is based on prior work under the MIT License: # Copyright (c) 2023 Princeton Natural Language Processing diff --git a/reader/utils.py b/reader/utils.py index 8254c5d..cb1123b 100644 --- a/reader/utils.py +++ b/reader/utils.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + # Some of this code is based on prior work under the MIT License: # Copyright (c) 2023 Princeton Natural Language Processing diff --git a/retriever/eval.py b/retriever/eval.py index 91edb62..893b7c2 100644 --- a/retriever/eval.py +++ b/retriever/eval.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + # Some of this code is based on prior work under the MIT License: # Copyright (c) 2023 Princeton Natural Language Processing diff --git a/retriever/index.py b/retriever/index.py index ddfd2cd..8ccc783 100644 --- a/retriever/index.py +++ b/retriever/index.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + import logging import numpy as np import os diff --git a/retriever/ret_utils.py b/retriever/ret_utils.py index 9305ec5..94431ad 100644 --- a/retriever/ret_utils.py +++ b/retriever/ret_utils.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + import numpy as np import torch import os diff --git a/retriever/run.py b/retriever/run.py index 28ca301..7d9b2a0 100644 --- a/retriever/run.py +++ b/retriever/run.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + # Some of this code is based on prior work under the MIT License: # Copyright (c) 2023 Princeton Natural Language Processing diff --git a/retriever/run_colbert.py b/retriever/run_colbert.py index dec808e..f458b08 100644 --- a/retriever/run_colbert.py +++ b/retriever/run_colbert.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + import argparse import sys import logging diff --git a/utils.py b/utils.py index 55c2567..8b94e69 100644 --- a/utils.py +++ b/utils.py @@ -1,3 +1,6 @@ +# Copyright (C) 2024 Intel Corporation +# SPDX-License-Identifier: Apache-2.0 + class InvalidArgument(Exception): """raise when user input arguments are invalid""" pass