repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/providers/terraform_plan/test_direct_references.py
tests/providers/terraform_plan/test_direct_references.py
import json import os import pytest import shutil from subprocess import Popen from tirith.core.core import start_policy_evaluation_from_dict from tirith.providers.terraform_plan import handler from utils import load_terraform_plan_json # TODO: Move these helper functions to a utils file def is_on_github_actions(): ...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/providers/terraform_plan/test_action.py
tests/providers/terraform_plan/test_action.py
from tirith.providers.terraform_plan import handler from utils import load_terraform_plan_json def test_action_star_resource_type_should_include_every_resource_types(): provider_args_dict = {"operation_type": "action", "terraform_resource_type": "*"} result = handler.provide(provider_args_dict, load_terraform...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/providers/terraform_plan/utils.py
tests/providers/terraform_plan/utils.py
import json import os def load_terraform_plan_json(json_path): with open(f"{os.path.dirname(os.path.abspath(__file__))}/fixtures/{json_path}", "r") as fp: return json.load(fp)
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/providers/terraform_plan/test_provider_config.py
tests/providers/terraform_plan/test_provider_config.py
from tirith.providers.common import ProviderError from tirith.providers.terraform_plan import handler from utils import load_terraform_plan_json def test_get_terraform_provider_get_region(): provider_args_dict = { "operation_type": "provider_config", "terraform_provider_full_name": "registry.terra...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/providers/terraform_plan/test_dot_star_attr.py
tests/providers/terraform_plan/test_dot_star_attr.py
from tirith.providers.terraform_plan import handler from pytest import mark from tirith.core.core import start_policy_evaluation_from_dict import json import os import pytest checks_passing = [ ( "a.*.b.c.*", { "a": [ {"b": {"c": ["val1", "val3"]}}, {"b":...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/providers/sg_workflow/tests_sg_workflow.py
tests/providers/sg_workflow/tests_sg_workflow.py
import json import os import pytest from tirith.providers.sg_workflow import handler def load_terraform_plan_json(json_path): with open(f"{os.path.dirname(os.path.abspath(__file__))}/{json_path}", "r") as fp: return json.load(fp) input_data = load_terraform_plan_json("input.json") import json import os...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/providers/json/test_get_value.py
tests/providers/json/test_get_value.py
import json import os from tirith.core.core import start_policy_evaluation, start_policy_evaluation_from_dict # TODO: Need to split this into multiple tests def test_get_value(): test_dir = os.path.dirname(os.path.realpath(__file__)) with open(os.path.join(test_dir, "input.json")) as f: input_data = ...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/providers/kubernetes/test_attribute.py
tests/providers/kubernetes/test_attribute.py
import os from tirith.core.core import start_policy_evaluation def test_get_value(): test_dir = os.path.dirname(os.path.realpath(__file__)) input_path = os.path.join(test_dir, "input.yml") policy_path = os.path.join(test_dir, "policy.json") result = start_policy_evaluation(policy_path=policy_path, i...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/core/test_policy_parameterization.py
tests/core/test_policy_parameterization.py
import pytest import json from subprocess import Popen, PIPE from tirith.core.policy_parameterization import get_policy_with_vars_replaced, _VariableNotFound @pytest.fixture def processed_policy(): var_dict = { "var_1": {"A": [1, 2, 3, 4, 5, 6]}, "var_2": "check0", "providers": {"json": "...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/core/test_core.py
tests/core/test_core.py
# Maintain all core related tests here from pytest import mark import pytest from tirith.core.core import final_evaluator, generate_evaluator_result from tirith.providers.common import ProviderError from unittest.mock import patch, MagicMock @mark.passing def test_final_evaluator_skipped_check_should_be_removed(): ...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/core/evaluators/test_less_than.py
tests/core/evaluators/test_less_than.py
from tirith.core.evaluators import LessThan from pytest import mark evaluator_input1 = 5 evaluator_data1 = 10 evaluator_input2 = 5 evaluator_data2 = 2 evaluator = LessThan() # pytest -v -m passing @mark.passing def test_evaluate_passing(): result = evaluator.evaluate(evaluator_input1, evaluator_data1) asse...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/core/evaluators/test_equals.py
tests/core/evaluators/test_equals.py
from tirith.core.evaluators import Equals from pytest import mark checks_passing = [({1, 2, 3, 4}, {1, 2, 3, 4}), ([2, 4, 3], [2, 3, 4])] checks_failing = [({1, 2, 3, 4}, {2, 3, 4}), ({2, 3, 4}, [2, 3, 4])] evaluator = Equals() # pytest -v -m passing @mark.passing @mark.parametrize("evaluator_input,evaluator_data"...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/core/evaluators/test_greater_than_equal_to.py
tests/core/evaluators/test_greater_than_equal_to.py
from tirith.core.evaluators import GreaterThanEqualTo from pytest import mark evaluator_input1 = 27 evaluator_data1 = 26 evaluator_input2 = 26 evaluator_data2 = 27 evaluator = GreaterThanEqualTo() # pytest -v -m passing @mark.passing def test_evaluate_passing(): result = evaluator.evaluate(evaluator_input1, ev...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/core/evaluators/test_not_contains.py
tests/core/evaluators/test_not_contains.py
from tirith.core.evaluators import NotContains from pytest import mark checks_failing = [ (["a", "b", "c", "d"], "a"), ("a", "a"), ("minura", "a"), ({"a": "val1", "b": "val2"}, "a"), ({"b": 6, "a": 2, "c": 16}, {"a": 2, "b": 6}), ({"b": 6, "a": 2, "c": 16}, {"a": 2}), ({"b": 6, "a": ["a", ...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/core/evaluators/test_is_not_empty.py
tests/core/evaluators/test_is_not_empty.py
from tirith.core.evaluators import IsNotEmpty from pytest import mark from tirith.utils import json_format_value evaluator_input1 = "abc" evaluator_input2 = "" evaluator = IsNotEmpty() # pytest -v -m passing @mark.passing def test_evaluate_passing(): result = evaluator.evaluate(evaluator_input1) assert resu...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/core/evaluators/test_contained_in.py
tests/core/evaluators/test_contained_in.py
from tirith.core.evaluators import ContainedIn from pytest import mark checks_passing = [ ("a", ["a", "b", "c", "d"]), ("a", "a"), ("a", "minura"), ("a", {"a": "val1", "b": "val2"}), ({"a": 2, "b": 6}, {"b": 6, "a": 2, "c": 16}), ({"a": 2}, {"b": 6, "a": 2, "c": 16}), ({"a": ["a", "d"], "b...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/core/evaluators/test_not_equals.py
tests/core/evaluators/test_not_equals.py
from tirith.core.evaluators import NotEquals from pytest import mark checks_failing = [({1, 2, 3, 4}, {1, 2, 3, 4}), ([2, 4, 3], [2, 3, 4])] checks_passing = [({1, 2, 3, 4}, {2, 3, 4}), ({2, 3, 4}, [2, 3, 4])] evaluator = NotEquals() # pytest -v -m passing @mark.passing @mark.parametrize("evaluator_input,evaluator...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/core/evaluators/test_regex_match.py
tests/core/evaluators/test_regex_match.py
from tirith.core.evaluators import RegexMatch from pytest import mark from tirith.utils import json_format_value evaluator_data1 = "^(?=[a-zA-Z0-9._]{8,20}$)(?!.*[_.]{2})[^_.].*[^_.]$" evaluator_input1 = "amitrakshar01" evaluator_data2 = "^(?=[a-zA-Z0-9._]{8,20}$)(?!.*[_.]{2})[^_.].*[^_.]$" evaluator_input2 = "@01ami...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/core/evaluators/test_is_empty.py
tests/core/evaluators/test_is_empty.py
from tirith.core.evaluators import IsEmpty from pytest import mark from tirith.utils import json_format_value checks_passing = ("", None, [], dict()) checks_failing = ("stackguardian", 1, [None], dict(a=1)) evaluator = IsEmpty() @mark.passing @mark.parametrize("evaluator_input", checks_passing) def test_evaluate_pa...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/core/evaluators/test_less_than_equal_to.py
tests/core/evaluators/test_less_than_equal_to.py
from tirith.core.evaluators import LessThanEqualTo from pytest import mark from tirith.utils import json_format_value evaluator_input1 = 26 evaluator_data1 = 27 evaluator_input2 = 27 evaluator_data2 = 26 evaluator = LessThanEqualTo() # pytest -v -m passing @mark.passing def test_evaluate_passing(): result = ev...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/core/evaluators/test_greater_than.py
tests/core/evaluators/test_greater_than.py
from tirith.core.evaluators import GreaterThan from pytest import mark evaluator_input1 = 5 evaluator_data1 = 2 evaluator_input2 = 5 evaluator_data2 = 9 evaluator = GreaterThan() # pytest -v -m passing @mark.passing def test_evaluate_passing(): result = evaluator.evaluate(evaluator_input1, evaluator_data1) ...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/core/evaluators/test_not_contained_in.py
tests/core/evaluators/test_not_contained_in.py
from tirith.core.evaluators import NotContainedIn from pytest import mark checks_failing = [ ("a", ["a", "b", "c", "d"]), ("a", "a"), ("a", "minura"), ("a", {"a": "val1", "b": "val2"}), ({"a": 2, "b": 6}, {"b": 6, "a": 2, "c": 16}), ({"a": 2}, {"b": 6, "a": 2, "c": 16}), ({"a": ["a", "d"],...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
StackGuardian/tirith
https://github.com/StackGuardian/tirith/blob/c0675040d00d56a19bfbf009024a47026276abd5/tests/core/evaluators/test_contains.py
tests/core/evaluators/test_contains.py
from tirith.core.evaluators import Contains from pytest import mark checks_passing = [ (["a", "b", "c", "d"], "a"), ("a", "a"), ("minura", "a"), ("hello world", "world"), ({"a": "val1", "b": "val2"}, "a"), ({"b": 6, "a": 2, "c": 16}, {"a": 2, "b": 6}), ({"b": 6, "a": 2, "c": 16}, {"a": 2})...
python
Apache-2.0
c0675040d00d56a19bfbf009024a47026276abd5
2026-01-05T07:10:13.936244Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/finetune.py
finetune.py
# this code is modified from lora_alpaca https://github.com/tloen/alpaca-lora under Apache-2.0 license import os from typing import List import fire import torch import transformers from datasets import load_dataset from transformers import BertTokenizerFast """ Unused imports: import torch.nn as nn import bitsandbyt...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/gama_inf_single_audio.py
gama_inf_single_audio.py
import sys import os default_cuda_devices = "0" if len(sys.argv) > 1: argument = sys.argv[1] if argument == '4': argument = default_cuda_devices else: argument = default_cuda_devices os.environ["CUDA_VISIBLE_DEVICES"] = argument import numpy as np import os import torchaudio import fire import json...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/gama_inf.py
gama_inf.py
import sys import os default_cuda_devices = "0" if len(sys.argv) > 1: argument = sys.argv[1] if argument == '4': argument = default_cuda_devices else: argument = default_cuda_devices os.environ["CUDA_VISIBLE_DEVICES"] = argument import numpy as np import os import torchaudio import fire import json...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/inference_gradio_gama_it.py
inference_gradio_gama_it.py
import os import gradio as gr import torch import torchaudio from peft import ( LoraConfig, get_peft_model, get_peft_model_state_dict, prepare_model_for_int8_training, set_peft_model_state_dict, ) from transformers import GenerationConfig, LlamaForCausalLM, LlamaTokenizer, LlamaConfig from utils.pro...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/inference_gradio_gama.py
inference_gradio_gama.py
import os import gradio as gr import torch import torchaudio from peft import ( LoraConfig, get_peft_model, get_peft_model_state_dict, prepare_model_for_int8_training, set_peft_model_state_dict, ) from transformers import GenerationConfig, LlamaForCausalLM, LlamaTokenizer, LlamaConfig from utils.pro...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/setup.py
peft-main/setup.py
# Copyright 2023 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/scripts/stale.py
peft-main/scripts/stale.py
# Copyright 2023 The HuggingFace Team, the AllenNLP library authors. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # ...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/src/peft/mapping.py
peft-main/src/peft/mapping.py
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/src/peft/peft_model.py
peft-main/src/peft/peft_model.py
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
true
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/src/peft/__init__.py
peft-main/src/peft/__init__.py
# flake8: noqa # There's no way to ignore "F401 '...' imported but unused" warnings in this # module, but to preserve other warnings. So, don't check this module at all. # coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not ...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/src/peft/import_utils.py
peft-main/src/peft/import_utils.py
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/src/peft/tuners/prompt_tuning.py
peft-main/src/peft/tuners/prompt_tuning.py
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/src/peft/tuners/adalora.py
peft-main/src/peft/tuners/adalora.py
import importlib import re import warnings from dataclasses import dataclass, field from typing import Optional import torch import torch.nn as nn import torch.nn.functional as F from transformers.pytorch_utils import Conv1D from ..utils import ( TRANSFORMERS_MODELS_TO_ADALORA_TARGET_MODULES_MAPPING, PeftType...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/src/peft/tuners/prefix_tuning.py
peft-main/src/peft/tuners/prefix_tuning.py
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/src/peft/tuners/lora.py
peft-main/src/peft/tuners/lora.py
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/src/peft/tuners/p_tuning.py
peft-main/src/peft/tuners/p_tuning.py
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/src/peft/tuners/__init__.py
peft-main/src/peft/tuners/__init__.py
# flake8: noqa # There's no way to ignore "F401 '...' imported but unused" warnings in this # module, but to preserve other warnings. So, don't check this module at all # coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not u...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/src/peft/utils/save_and_load.py
peft-main/src/peft/utils/save_and_load.py
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/src/peft/utils/other.py
peft-main/src/peft/utils/other.py
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/src/peft/utils/config.py
peft-main/src/peft/utils/config.py
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/src/peft/utils/__init__.py
peft-main/src/peft/utils/__init__.py
# flake8: noqa # There's no way to ignore "F401 '...' imported but unused" warnings in this # module, but to preserve other warnings. So, don't check this module at all # coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not u...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/tests/test_common_gpu.py
peft-main/tests/test_common_gpu.py
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/tests/test_config.py
peft-main/tests/test_config.py
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/tests/test_gpu_examples.py
peft-main/tests/test_gpu_examples.py
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/tests/test_decoder_models.py
peft-main/tests/test_decoder_models.py
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/tests/testing_common.py
peft-main/tests/testing_common.py
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/tests/testing_utils.py
peft-main/tests/testing_utils.py
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/tests/__init__.py
peft-main/tests/__init__.py
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/tests/test_encoder_decoder_models.py
peft-main/tests/test_encoder_decoder_models.py
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/docs/source/_config.py
peft-main/docs/source/_config.py
# docstyle-ignore INSTALL_CONTENT = """ # PEFT installation ! pip install peft accelerate transformers # To install from source instead of the last release, comment the command above and uncomment the following one. # ! pip install git+https://github.com/huggingface/peft.git """
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/examples/conditional_generation/peft_lora_seq2seq_accelerate_fsdp.py
peft-main/examples/conditional_generation/peft_lora_seq2seq_accelerate_fsdp.py
import os import torch from accelerate import Accelerator from datasets import load_dataset from torch.utils.data import DataLoader from tqdm import tqdm from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, default_data_collator, get_linear_schedule_with_warmup from peft import LoraConfig, TaskType, get_pef...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/examples/conditional_generation/peft_lora_seq2seq_accelerate_ds_zero3_offload.py
peft-main/examples/conditional_generation/peft_lora_seq2seq_accelerate_ds_zero3_offload.py
import gc import os import sys import threading import numpy as np import psutil import torch from accelerate import Accelerator from datasets import load_dataset from torch.utils.data import DataLoader from tqdm import tqdm from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, get_linear_schedule_with_warmup...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/examples/conditional_generation/peft_adalora_seq2seq.py
peft-main/examples/conditional_generation/peft_adalora_seq2seq.py
import os import torch from datasets import load_dataset from torch.utils.data import DataLoader from tqdm import tqdm from transformers import AutoModelForSeq2SeqLM, AutoTokenizer, default_data_collator, get_linear_schedule_with_warmup from peft import AdaLoraConfig, PeftConfig, PeftModel, TaskType, get_peft_model ...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/examples/int8_training/fine_tune_blip2_int8.py
peft-main/examples/int8_training/fine_tune_blip2_int8.py
# coding=utf-8 # Copyright 2023-present the HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by ap...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/examples/int8_training/peft_adalora_whisper_large_training.py
peft-main/examples/int8_training/peft_adalora_whisper_large_training.py
import argparse import gc import json import logging import math import os from dataclasses import dataclass from datetime import datetime from pathlib import Path from random import randint from typing import Any, Dict, List, Union # datasets imports import datasets # metric imports import evaluate import numpy as n...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/examples/causal_language_modeling/peft_lora_clm_accelerate_ds_zero3_offload.py
peft-main/examples/causal_language_modeling/peft_lora_clm_accelerate_ds_zero3_offload.py
import gc import os import sys import threading import numpy as np import psutil import torch from accelerate import Accelerator from datasets import load_dataset from torch.utils.data import DataLoader from tqdm import tqdm from transformers import ( AutoModelForCausalLM, AutoTokenizer, default_data_colla...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/peft-main/examples/lora_dreambooth/train_dreambooth.py
peft-main/examples/lora_dreambooth/train_dreambooth.py
import argparse import gc import hashlib import itertools import logging import math import os import threading import warnings from pathlib import Path from typing import Optional import datasets import diffusers import numpy as np import psutil import torch import torch.nn.functional as F import torch.utils.checkpoi...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
true
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/extra_scripts/convert_qformer_safetensors.py
extra_scripts/convert_qformer_safetensors.py
import argparse import json import os import shutil from collections import defaultdict from tempfile import TemporaryDirectory from typing import Dict, List, Optional, Set, Tuple import torch from huggingface_hub import CommitInfo, CommitOperationAdd, Discussion, HfApi, hf_hub_download from huggingface_hub.file_down...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/extra_scripts/evaluate_caption_gpt.py
extra_scripts/evaluate_caption_gpt.py
# -!- coding: utf-8 -!- import json import os import requests from nltk.tokenize import sent_tokenize import openai import pandas as pd openai.api_key = '' #FILL IN YOUR OWN HERE prompt_abstract="I want you to act as a Caption Evaluator. I will provide you with an audio caption generated by an AI agent. The agent wa...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/extra_scripts/convert_clap_safetensors.py
extra_scripts/convert_clap_safetensors.py
import argparse import json import os import shutil from collections import defaultdict from tempfile import TemporaryDirectory from typing import Dict, List, Optional, Set, Tuple import torch from huggingface_hub import CommitInfo, CommitOperationAdd, Discussion, HfApi, hf_hub_download from huggingface_hub.file_down...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/extra_scripts/convert_pretrained_weights.py
extra_scripts/convert_pretrained_weights.py
import os import torch def process_file(file_path): state_dict = torch.load(file_path) filtered_state_dict = {name: param for name, param in state_dict.items() if 'lora' in name or 'audio' in name} print(f"Parameters in file {file_path}:") for name in filtered_state_dict.keys(): print(name) ...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/check_doctest_list.py
utils/check_doctest_list.py
# coding=utf-8 # Copyright 2023 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/get_previous_daily_ci.py
utils/get_previous_daily_ci.py
import os import zipfile import requests from get_ci_error_statistics import download_artifact, get_artifacts_links def get_daily_ci_runs(token, num_runs=7): """Get the workflow runs of the scheduled (daily) CI. This only selects the runs triggered by the `schedule` event on the `main` branch. """ h...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/prompter.py
utils/prompter.py
""" A dedicated helper to manage templates and prompt building. """ import json import os.path as osp from typing import Union class Prompter(object): __slots__ = ("template", "_verbose") def __init__(self, template_name: str = "", verbose: bool = False): self._verbose = verbose if not templ...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/add_pipeline_model_mapping_to_test.py
utils/add_pipeline_model_mapping_to_test.py
# coding=utf-8 # Copyright 2023 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/update_tiny_models.py
utils/update_tiny_models.py
# coding=utf-8 # Copyright 2023 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/check_config_docstrings.py
utils/check_config_docstrings.py
# coding=utf-8 # Copyright 2022 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/check_repo.py
utils/check_repo.py
# coding=utf-8 # Copyright 2020 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
true
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/check_doc_toc.py
utils/check_doc_toc.py
# coding=utf-8 # Copyright 2022 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/check_inits.py
utils/check_inits.py
# coding=utf-8 # Copyright 2020 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/check_task_guides.py
utils/check_task_guides.py
# coding=utf-8 # Copyright 2023 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/extract_warnings.py
utils/extract_warnings.py
import argparse import json import os import time import zipfile from get_ci_error_statistics import download_artifact, get_artifacts_links from transformers import logging logger = logging.get_logger(__name__) def extract_warnings_from_single_artifact(artifact_path, targets): """Extract warnings from a downl...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/check_copies.py
utils/check_copies.py
# coding=utf-8 # Copyright 2020 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
true
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/notification_service.py
utils/notification_service.py
# Copyright 2020 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
true
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/check_dummies.py
utils/check_dummies.py
# coding=utf-8 # Copyright 2020 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/custom_init_isort.py
utils/custom_init_isort.py
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/check_config_attributes.py
utils/check_config_attributes.py
# coding=utf-8 # Copyright 2023 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/check_table.py
utils/check_table.py
# coding=utf-8 # Copyright 2020 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/get_modified_files.py
utils/get_modified_files.py
# coding=utf-8 # Copyright 2020 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/sort_auto_mappings.py
utils/sort_auto_mappings.py
# coding=utf-8 # Copyright 2022 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/create_dummy_models.py
utils/create_dummy_models.py
# coding=utf-8 # Copyright 2022 The HuggingFace Inc. team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless r...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
true
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/get_ci_error_statistics.py
utils/get_ci_error_statistics.py
import argparse import json import math import os import time import traceback import zipfile from collections import Counter import requests def get_job_links(workflow_run_id, token=None): """Extract job names and their job links in a GitHub Actions workflow run""" headers = None if token is not None: ...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/notification_service_doc_tests.py
utils/notification_service_doc_tests.py
# Copyright 2022 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/past_ci_versions.py
utils/past_ci_versions.py
import argparse import os past_versions_testing = { "pytorch": { "1.13": { "torch": "1.13.1", "torchvision": "0.14.1", "torchaudio": "0.13.1", "python": 3.9, "cuda": "cu116", "install": ( "python3 -m pip install --no-c...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/update_metadata.py
utils/update_metadata.py
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/check_self_hosted_runner.py
utils/check_self_hosted_runner.py
import argparse import json import subprocess def get_runner_status(target_runners, token): offline_runners = [] cmd = ( f'curl -H "Accept: application/vnd.github+json" -H "Authorization: Bearer {token}"' " https://api.github.com/repos/huggingface/transformers/actions/runners" ) outpu...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/check_build.py
utils/check_build.py
# coding=utf-8 # Copyright 2023 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/tests_fetcher.py
utils/tests_fetcher.py
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
true
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/check_docstrings.py
utils/check_docstrings.py
# coding=utf-8 # Copyright 2023 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
true
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/get_test_info.py
utils/get_test_info.py
# coding=utf-8 # Copyright 2023 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/get_github_job_time.py
utils/get_github_job_time.py
import argparse import math import traceback import dateutil.parser as date_parser import requests def extract_time_from_single_job(job): """Extract time info from a single job in a GitHub Actions workflow run""" job_info = {} start = job["started_at"] end = job["completed_at"] start_datetime ...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/check_model_tester.py
utils/check_model_tester.py
# coding=utf-8 # Copyright 2023 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/check_support_list.py
utils/check_support_list.py
# coding=utf-8 # Copyright 2023 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/print_env.py
utils/print_env.py
#!/usr/bin/env python3 # coding=utf-8 # Copyright 2020 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unles...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/release.py
utils/release.py
# coding=utf-8 # Copyright 2021 The HuggingFace Team. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/check_tf_ops.py
utils/check_tf_ops.py
# coding=utf-8 # Copyright 2020 The HuggingFace Inc. team. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false
Sreyan88/GAMA
https://github.com/Sreyan88/GAMA/blob/041c3a623c6c635e65463cef16ce0cfde72e5c57/utils/download_glue_data.py
utils/download_glue_data.py
""" Script for downloading all GLUE data. Original source: https://gist.github.com/W4ngatang/60c2bdb54d156a41194446737ce03e2e Note: for legal reasons, we are unable to host MRPC. You can either use the version hosted by the SentEval team, which is already tokenized, or you can download the original data from (https://...
python
Apache-2.0
041c3a623c6c635e65463cef16ce0cfde72e5c57
2026-01-05T07:09:59.331526Z
false