Skip to content

mlflow run {any url to this repo} fails with "fatal: repository not found" #4

@hdotking

Description

@hdotking

Details

Code (cloned the repo as instructed): https://github.com/PacktPublishing/Machine-Learning-Engineering-with-MLflow/tree/master/Chapter01/stockpred
OS Platform and Distribution: Windows 10 - 64 bit
MLflow installed from (source or binary): conda create --channel conda-forge --name mlflow_env mlflow
MLflow version (run mlflow --version): 1.20.2
Python version: 3.7.12
Exact command to reproduce: mlflow run https://github.com/PacktPublishing/Machine-Learning-Engineering-with-MLflow/tree/master/Chapter01/stockpred
Describe the problem: After installing mlflow with conda-forge I am unable to run any of the examples in this repository. External repos work fine (See bottom of page)
Expected behaviour: Python file is executed and tracked and run is added in mlruns.
Actual behaviour: mlflow/GIT throws an error -->

2021/11/04 14:11:24 INFO mlflow.projects.utils: === Fetching project from https://github.com/PacktPublishing/Machine-Learning-Engineering-with-MLflow/tree/master/Chapter01/stockpred into C:\Users\Haps\AppData\Local\Temp\tmpawr8l5_r ===
Traceback (most recent call last):
  File "C:\Users\Haps\anaconda3\envs\mlflow_env\Scripts\mlflow-script.py", line 10, in <module>
    sys.exit(cli())
  File "C:\Users\Haps\anaconda3\envs\mlflow_env\lib\site-packages\click\core.py", line 1128, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\Haps\anaconda3\envs\mlflow_env\lib\site-packages\click\core.py", line 1053, in main
    rv = self.invoke(ctx)
  File "C:\Users\Haps\anaconda3\envs\mlflow_env\lib\site-packages\click\core.py", line 1659, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\Haps\anaconda3\envs\mlflow_env\lib\site-packages\click\core.py", line 1395, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\Haps\anaconda3\envs\mlflow_env\lib\site-packages\click\core.py", line 754, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\Haps\anaconda3\envs\mlflow_env\lib\site-packages\mlflow\cli.py", line 181, in run
    run_id=run_id,
  File "C:\Users\Haps\anaconda3\envs\mlflow_env\lib\site-packages\mlflow\projects\__init__.py", line 304, in run
    synchronous=synchronous,
  File "C:\Users\Haps\anaconda3\envs\mlflow_env\lib\site-packages\mlflow\projects\__init__.py", line 99, in _run
    experiment_id,
  File "C:\Users\Haps\anaconda3\envs\mlflow_env\lib\site-packages\mlflow\projects\backend\local.py", line 45, in run
    work_dir = fetch_and_validate_project(project_uri, version, entry_point, params)
  File "C:\Users\Haps\anaconda3\envs\mlflow_env\lib\site-packages\mlflow\projects\utils.py", line 124, in fetch_and_validate_project
    work_dir = _fetch_project(uri=uri, version=version)
  File "C:\Users\Haps\anaconda3\envs\mlflow_env\lib\site-packages\mlflow\projects\utils.py", line 158, in _fetch_project
    _fetch_git_repo(parsed_uri, version, dst_dir)
  File "C:\Users\Haps\anaconda3\envs\mlflow_env\lib\site-packages\mlflow\projects\utils.py", line 185, in _fetch_git_repo
    origin.fetch()
  File "C:\Users\Haps\anaconda3\envs\mlflow_env\lib\site-packages\git\remote.py", line 868, in fetch
    kill_after_timeout=kill_after_timeout)
  File "C:\Users\Haps\anaconda3\envs\mlflow_env\lib\site-packages\git\remote.py", line 732, in _get_fetch_info_from_stderr
    proc.wait(stderr=stderr_text)
  File "C:\Users\Haps\anaconda3\envs\mlflow_env\lib\site-packages\git\cmd.py", line 501, in wait
    raise GitCommandError(remove_password_if_present(self.args), status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git fetch -v origin
  stderr: 'fatal: repository 'https://github.com/PacktPublishing/Machine-Learning-Engineering-with-MLflow/tree/master/Chapter01/stockpred/' not found'

This is particularly strange because pulling from other repositories works without a problem.

E.g.)
The following line works perfectly. It runs to completion and creates the logged values in the mlruns/ directory as expected.
mlflow run https://github.com/mlflow/mlflow-example.git -P alpha=5.0

Returning the following:

2021/11/04 14:15:57 INFO mlflow.projects.utils: === Fetching project from https://github.com/mlflow/mlflow-example.git into C:\Users\Haps\AppData\Local\Temp\tmpycy7kden ===
2021/11/04 14:16:02 INFO mlflow.projects.utils: === Created directory C:\Users\Haps\AppData\Local\Temp\tmpttkcntxv for downloading remote URIs passed to arguments of type 'path' ===
2021/11/04 14:16:02 INFO mlflow.projects.backend.local: === Running command 'conda activate mlflow-1abc00771765dd9dd15731cbda4938c765fbb90b && python train.py 0.4 0.1' in run with ID 'a93fafe1cda649de9012f7d069bb6e56' ===
C:\Users\Haps\anaconda3\envs\mlflow-1abc00771765dd9dd15731cbda4938c765fbb90b\lib\site-packages\sklearn\utils\__init__.py:4: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
  from collections import Sequence
C:\Users\Haps\anaconda3\envs\mlflow-1abc00771765dd9dd15731cbda4938c765fbb90b\lib\site-packages\sklearn\model_selection\_split.py:18: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
  from collections import Iterable
C:\Users\Haps\anaconda3\envs\mlflow-1abc00771765dd9dd15731cbda4938c765fbb90b\lib\site-packages\sklearn\model_selection\_search.py:16: DeprecationWarning: Using or importing the ABCs from 'collections' instead of from 'collections.abc' is deprecated since Python 3.3,and in 3.9 it will stop working
  from collections import Mapping, namedtuple, defaultdict, Sequence
Elasticnet model (alpha=0.400000, l1_ratio=0.100000):
  RMSE: 0.7909069124367867
  MAE: 0.6174288492244517
  R2: 0.19207580388574486
2021/11/04 14:16:10 INFO mlflow.projects: === Run (ID 'a93fafe1cda649de9012f7d069bb6e56') succeeded ===

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions