How can I access the variables in config.py in the objective function of ray.tune?

I want to use file2.py by passing a config file from file1.py and change the config.py to run different models. The experiment_name variable in the ray_tune function can be used, but I am unable to use the config.project_dir inside the objective function. How can I use the config file inside the objective.

config.py
project_dir = “/home/ubuntu/”
experiment_name = f’Project_name’

file1.py
import config
file2.main(cfg=config)

file2.py
def objective(model_params):
train_set = pd.read_parquet(f"{config.project_dir}train_set.parquet")

def ray_tune(concurrent_trials,experiment_name,config):
model_params = {
“seed”: 2,
“n_jobs”: psutil.cpu_count() - 1,
“objective”: “binary:logistic”,
“eta”: tune.quniform( 0.005, 0.3,0.001),
‘eval_metric’:‘auc’,
“mlflow”: {“experiment_name”: experiment_name, “tracking_uri”: mlflow.get_tracking_uri()},
}

 tune.run(
     objective,
     num_samples=120,  # number of trials
     config=model_params,

 )

@timer
def main(cfg):
global config
config = cfg
try:
experiment_name = config.experiment_name
ray.init(address=“auto”)
ray_tune(concurrent_trials,experiment_name,config)

Getting error.
train_set = pd.read_parquet(f"{config.project_dir}train_set.parquet")
NameError: name ‘config’ is not defined

How can I access the variables in config.py in the objective function of ray.tune?

cc: @kai for thoughts