diff --git a/.github/workflows/code_scan.yml b/.github/workflows/code_scan.yml index 19a112b6..bd148bd4 100644 --- a/.github/workflows/code_scan.yml +++ b/.github/workflows/code_scan.yml @@ -28,7 +28,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - job_name: ["bandit", "hadolint"] + job_name: ["bandit"] fail-fast: false steps: - name: Checkout out Repo diff --git a/.github/workflows/dockers/code-scan.dockerfile b/.github/workflows/docker/code-scan.dockerfile similarity index 100% rename from .github/workflows/dockers/code-scan.dockerfile rename to .github/workflows/docker/code-scan.dockerfile diff --git a/GenAIEval/evaluation/bigcode_evaluation_harness/__init__.py b/GenAIEval/evaluation/bigcode_evaluation_harness/__init__.py index 7e907562..ec5c198f 100644 --- a/GenAIEval/evaluation/bigcode_evaluation_harness/__init__.py +++ b/GenAIEval/evaluation/bigcode_evaluation_harness/__init__.py @@ -1,2 +1,4 @@ from .accuracy import evaluate from .arguments import BigcodeEvalParser, setup_parser + +__all__ = [evaluate, BigcodeEvalParser, setup_parser] \ No newline at end of file diff --git a/GenAIEval/evaluation/lm_evaluation_harness/__init__.py b/GenAIEval/evaluation/lm_evaluation_harness/__init__.py index 076f93b3..80bba90b 100644 --- a/GenAIEval/evaluation/lm_evaluation_harness/__init__.py +++ b/GenAIEval/evaluation/lm_evaluation_harness/__init__.py @@ -1,2 +1,4 @@ from .accuracy import cli_evaluate as evaluate from .arguments import LMEvalParser, setup_parser + +__all__ = [evaluate, LMEvalParser, setup_parser] \ No newline at end of file diff --git a/GenAIEval/evaluation/lm_evaluation_harness/lm_eval/evaluator.py b/GenAIEval/evaluation/lm_evaluation_harness/lm_eval/evaluator.py index 3e7de033..eb775434 100644 --- a/GenAIEval/evaluation/lm_evaluation_harness/lm_eval/evaluator.py +++ b/GenAIEval/evaluation/lm_evaluation_harness/lm_eval/evaluator.py @@ -299,7 +299,7 @@ def simple_evaluate( results["date"] = start_date try: add_env_info(results) # additional environment info to results - except: + except Exception: eval_logger.info(f"get env info failed.") return results else: diff --git a/GenAIEval/evaluation/lm_evaluation_harness/lm_eval/models/__init__.py b/GenAIEval/evaluation/lm_evaluation_harness/lm_eval/models/__init__.py index a7544388..6797d6eb 100644 --- a/GenAIEval/evaluation/lm_evaluation_harness/lm_eval/models/__init__.py +++ b/GenAIEval/evaluation/lm_evaluation_harness/lm_eval/models/__init__.py @@ -11,3 +11,5 @@ huggingface_hub.constants.HF_HUB_ENABLE_HF_TRANSFER = True except ImportError: pass + +__all__ = [huggingface] \ No newline at end of file diff --git a/GenAIEval/evaluation/lm_evaluation_harness/lm_eval/models/huggingface.py b/GenAIEval/evaluation/lm_evaluation_harness/lm_eval/models/huggingface.py index 7b8babb2..7cdc8aa4 100644 --- a/GenAIEval/evaluation/lm_evaluation_harness/lm_eval/models/huggingface.py +++ b/GenAIEval/evaluation/lm_evaluation_harness/lm_eval/models/huggingface.py @@ -679,7 +679,7 @@ def forward_batch(batch_size): (batch_size, max_length), device=self.device ).long() for _ in range(5): - out = F.log_softmax( + F.log_softmax( self._model_call(test_batch, **call_kwargs), dim=-1 ) # noqa: F841 diff --git a/main.py b/main.py index 79542a95..0f935399 100644 --- a/main.py +++ b/main.py @@ -6,6 +6,7 @@ def main(): eval_args = setup_parser() results = evaluate(eval_args) + print(results) if __name__ == "__main__":