Skip to content

Commit 290bd0e

Browse files
Fixes for errors when running the AzureML pipeline (#741)
Background: I was trying to run the Azure ML pipeline following the docs and ran into a couple of errors that required fixes. - When using `parallel_run_function`, "run() method should return a Pandas DataFrame or an array." - I was getting errors in [this line](https://github.com/microsoft/rag-experiment-accelerator/blob/721a50dde5c41c07587d8ab8562888be6c74cb37/rag_experiment_accelerator/utils/logging.py#L34): where the log level was an empty string. Not sure what is the root cause. --------- Co-authored-by: Julia Meshcheryakova <juliame@microsoft.com>
1 parent e7e2f88 commit 290bd0e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

azureml/index.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import os
33
import sys
44
import argparse
5-
from typing import List
65

76
import mlflow
87

@@ -57,7 +56,7 @@ def init():
5756
mlflow_client = mlflow.MlflowClient(args.mlflow_tracking_uri)
5857

5958

60-
def run(input_paths: List[str]) -> str:
59+
def run(input_paths: list[str]) -> list[str]:
6160
global args
6261
global config
6362
global environment
@@ -66,4 +65,4 @@ def run(input_paths: List[str]) -> str:
6665

6766
index_run(environment, config, index_config, input_paths, mlflow_client)
6867

69-
return args.index_name
68+
return [args.index_name]

rag_experiment_accelerator/utils/logging.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def get_logger(name: str) -> logging.Logger:
2020
return logger
2121

2222
global _cached_logging_level
23-
if _cached_logging_level is None:
23+
if not _cached_logging_level:
2424
_cached_logging_level = os.getenv("LOGGING_LEVEL", "INFO").upper()
2525

2626
handler = logging.StreamHandler(sys.stdout)

0 commit comments

Comments
 (0)