mlflow找不到。py fi

2024-09-29 21:54:58 发布

您现在位置:Python中文网/ 问答频道 /正文

我试图通过创建一个非常简单的项目并记录它来学习使用mlflow。在

我尝试过遵循mlflow的示例,并且我的代码在运行主.py作为一个普通的bash命令。在

我无法使用mlflowCLI使用project和一个简单的文件来运行它。 我得到了以下错误。在

(rlearning) yair@pc2016:~/reinforced_learning101$ mlflow run src/main.py 
2019/05/11 10:21:41 ERROR mlflow.cli: === Could not find main among entry points [] or interpret main as a runnable script. Supported script file extensions: ['.py', '.sh'] ===
(rlearning) yair@pc2016:~/reinforced_learning101$ mlflow run .
2019/05/11 10:40:25 INFO mlflow.projects: === Created directory /tmp/tmpe26oernf for downloading remote URIs passed to arguments of type 'path' ===
2019/05/11 10:40:25 INFO mlflow.projects: === Running command 'source activate mlflow-21497056aed7961402b515847613ed9f950fa9fc && python src/main.py 1.0' in run with ID 'ed51446de4c44903ab891d09cfe10e49' === 
bash: activate: No such file or directory
2019/05/11 10:40:25 ERROR mlflow.cli: === Run (ID 'ed51446de4c44903ab891d09cfe10e49') failed ===

不用说我的main有一个.py后缀。在

是否有什么问题导致了这个问题?在

我的主.py是:

^{pr2}$

康达_环境yaml在

name: rlearning
channels:
  - defaults
dependencies:
  - python=3.7
  - numpy
  - pandas
  - tensorflow-gpu
  - pip:
      - mlflow
      - gym

ML项目

name: reinforced learning

conda_env: files/config/conda_environment.yaml

entry_points:
  main:
    parameters:
      right_percent: {type: float, default: 1.0}
    command: "python src/main.py {right_percent}"

Tags: 项目runpysrcbashclimainerror

热门问题