in credit-card-fraud-detection/neptune_ml_utils.py [0:0]
def __get_neptune_ml_role(self):
with open(f'{HOME_DIRECTORY}/.bashrc') as f:
data = f.readlines()
for d in data:
if str.startswith(d, 'export NEPTUNE_ML_ROLE_ARN'):
parts = d.split('=')
if len(parts) == 2:
return parts[1].rstrip()
logging.error("Unable to determine the Neptune ML IAM Role.")
return None