Skip to content

Commit 49c3b1d

Browse files
authored
Support remote-run for mlc, fix for logging (#190)
1 parent 66597dc commit 49c3b1d

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

mlc/main.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ def build_parser(pre_args):
144144
p.add_argument('extra', nargs=argparse.REMAINDER)
145145

146146
# Script-only
147-
for action in ['docker', 'docker-run', 'experiment', 'doc', 'lint']:
147+
for action in ['docker', 'docker-run', 'experiment', 'remote-run', 'doc', 'lint']:
148148
p = subparsers.add_parser(action, add_help=False)
149149
p.add_argument('target', choices=['script', 'run'])
150150
p.add_argument('details', nargs='?', help='Details or identifier (optional)')
@@ -161,7 +161,7 @@ def configure_logging(args):
161161
args.extra[:] = [log_flag_aliases.get(a, a) for a in args.extra]
162162
for flag, level in log_levels.items():
163163
if flag in args.extra:
164-
logging.getLogger().setLevel(level)
164+
logger.setLevel(level)
165165
args.extra.remove(flag)
166166

167167

@@ -176,7 +176,7 @@ def build_run_args(args):
176176
if args.command in ['pull', 'rm', 'add', 'find'] and args.target == "repo":
177177
run_args['repo'] = args.details
178178

179-
if args.command in ['docker', 'docker-run', 'experiment', 'doc', 'lint'] and args.target == "run":
179+
if args.command in ['docker', 'docker-run', 'experiment', 'remote-run', 'doc', 'lint'] and args.target == "run":
180180
run_args['target'] = 'script'
181181
args.target = "script"
182182

mlc/script_action.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,6 +235,8 @@ def call_script_module_function(self, function_name, run_args):
235235
result = automation_instance.test(run_args) # Pass args to the run method
236236
elif function_name == "experiment":
237237
result = automation_instance.experiment(run_args) # Pass args to the experiment method
238+
elif function_name == "remote_run":
239+
result = automation_instance.remote_run(run_args) # Pass args to the experiment method
238240
elif function_name == "help":
239241
result = automation_instance.help(run_args) # Pass args to the help method
240242
elif function_name == "doc":

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "mlcflow"
7-
version = "1.1.1"
7+
version = "1.1.6"
88

99

1010

@@ -47,6 +47,7 @@ py-modules = []
4747
[project.scripts]
4848
mlc = "mlc.main:main"
4949
mlcr = "mlc.main:mlcr"
50+
mlcrr = "mlc.main:mlcrr"
5051
mlcd = "mlc.main:mlcd"
5152
mlce = "mlc.main:mlce"
5253
mlct = "mlc.main:mlct"

0 commit comments

Comments
 (0)