我尝试使用零参数创建 MLproject:
name: test
conda_env: conda.yaml
entry_points:
main:
parameters:
command: "python test.py"
当我收到错误时:
Traceback (most recent call last):
File "/home/ubuntu/.local/bin/mlflow", line 11, in <module>
sys.exit(cli())
File "/home/ubuntu/.local/lib/python2.7/site-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/home/ubuntu/.local/lib/python2.7/site-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/home/ubuntu/.local/lib/python2.7/site-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/ubuntu/.local/lib/python2.7/site-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/ubuntu/.local/lib/python2.7/site-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/ubuntu/.local/lib/python2.7/site-packages/mlflow/cli.py", line 137, in run
run_id=run_id,
File "/home/ubuntu/.local/lib/python2.7/site-packages/mlflow/projects/__init__.py", line 230, in run
use_conda=use_conda, storage_dir=storage_dir, synchronous=synchronous, run_id=run_id)
File "/home/ubuntu/.local/lib/python2.7/site-packages/mlflow/projects/__init__.py", line 85, in _run
project = _project_spec.load_project(work_dir)
File "/home/ubuntu/.local/lib/python2.7/site-packages/mlflow/projects/_project_spec.py", line 40, in load_project
entry_points[name] = EntryPoint(name, parameters, command)
File "/home/ubuntu/.local/lib/python2.7/site-packages/mlflow/projects/_project_spec.py", line 87, in __init__
self.parameters = {k: Parameter(k, v) for (k, v) in parameters.items()}
AttributeError: 'NoneType' object has no attribute 'items'
我是否遗漏了什么或 mlflow 不允许零参数的项目?
如果有人想尝试,我也在我的公共回购中发布了这个:https ://github.com/sameermahajan/mlflow-try:
mlflow run https://github.com/sameermahajan/mlflow-try.git