Skip to content

Commit c0f47d1

Browse files
authored
added self ref to total_dir_path
1 parent 201ee6d commit c0f47d1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

adk/mlops.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ def init(self):
3030
os.environ['MLOPS_SPOOLER_TYPE'] = "FILESYSTEM"
3131
os.environ['MLOPS_FILESYSTEM_DIRECTORY'] = self.spool_dir
3232

33-
with open(total_dir_path + '/conf/mlops.agent.conf.yaml') as f:
33+
with open(self.total_dir_path + '/conf/mlops.agent.conf.yaml') as f:
3434
documents = yaml.load(f, Loader=yaml.FullLoader)
3535
documents['mlopsUrl'] = self.endpoint
3636
documents['apiToken'] = self.token
37-
with open(total_dir_path + '/conf/mlops.agent.conf.yaml', 'w') as f:
37+
with open(self.total_dir_path + '/conf/mlops.agent.conf.yaml', 'w') as f:
3838
yaml.dump(documents, f)
3939

40-
subprocess.call(total_dir_path + '/bin/start-agent.sh')
41-
check = subprocess.Popen([total_dir_path + '/bin/status-agent.sh'], stdout=subprocess.PIPE)
40+
subprocess.call(self.total_dir_path + '/bin/start-agent.sh')
41+
check = subprocess.Popen([self.total_dir_path + '/bin/status-agent.sh'], stdout=subprocess.PIPE)
4242
output = check.stdout.readlines()[0]
4343
check.terminate()
4444
if b"DataRobot MLOps-Agent is running as a service." in output:

0 commit comments

Comments
 (0)