From d98d755ade4e7d39abd3446b73de791b43bc306b Mon Sep 17 00:00:00 2001 From: EllaBootQC Date: Thu, 7 Nov 2024 15:48:53 +0100 Subject: [PATCH 1/9] add mlflow-export-import --- recipes/mlflow-export-import/recipe.yaml | 88 ++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 recipes/mlflow-export-import/recipe.yaml diff --git a/recipes/mlflow-export-import/recipe.yaml b/recipes/mlflow-export-import/recipe.yaml new file mode 100644 index 0000000000000..fc7ee7c59c87b --- /dev/null +++ b/recipes/mlflow-export-import/recipe.yaml @@ -0,0 +1,88 @@ +# This example shows how to define a recipe using the new YAML based recipe format introduced by +# CEP 13. + +# For more information about this format see: https://prefix-dev.github.io/rattler-build/latest/reference/recipe_file/ + +# The main differences with the old format is that no preprocessing is required for the file to be valid YAML. +# This means: +# - No "selectors", use YAML if-then-else expressions instead (https://prefix-dev.github.io/rattler-build/latest/selectors/) +# - Jinja expressions are formatted with a leading `$` to make them valid YAML + +# Note: there are many handy hints in comments in this example -- remove them when you've finalized your recipe + +# Define variables in this section that you can use in other parts. +context: + name: mlflow-export-import + version: "1.1.2" + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + url: https://github.com/mlflow/${{ name }}/archive/refs/tags/v${{ version}}.tar.gz + sha256: 336bd0fe3a16ac2198774f89d2642df5d103d306a5a6d3b48f3eed90dbddf9c3 + +build: + script: python -m pip install . -vv + number: 0 + +requirements: + build: + - ${{ compiler('c') }} + # - ${{ stdlib('c') }} # If you need any compiler, add the C standard library ("stdlib") too + - mlflow + # - databricks_cli ==0.18.0 + - databricks-cli ==0.18.0 + - pandas >=1.5.2 + - tabulate ==0.9.0 + - wheel + - pip + host: + - python + - setuptools + run: + - python + +# tests: +# # - script: mlflow_export_import/tests/run_tests.sh +# - script: mlflow_export_import/tests/open_source/run_tests.sh + +# tests: +# - script: +# - if: unix or emscripten +# then: +# - test ${PREFIX}/ +# - test -d ${PREFIX}/include/xtensor +# - test -f ${PREFIX}/include/xtensor/xarray.hpp +# - test -f ${PREFIX}/share/cmake/xtensor/xtensorConfig.cmake +# - test -f ${PREFIX}/share/cmake/xtensor/xtensorConfigVersion.cmake +# - if: win +# then: +# - if not exist %LIBRARY_PREFIX%\include\xtensor\xarray.hpp (exit 1) +# - if not exist %LIBRARY_PREFIX%\share\cmake\xtensor\xtensorConfig.cmake (exit 1) +# - if not exist %LIBRARY_PREFIX%\share\cmake\xtensor\xtensorConfigVersion.cmake (exit 1) + + +tests: + - script: + - test ${PREFIX}/include/mlflow-export-import + +# tests: +# - script: +# - mlflow-export-import --help + + # - scripts: mlflow_export_import + +about: + homepage: https://github.com/mlflow/mlflow-export-import + summary: 'Tools to copy MLflow objects' + description: | + The MLflow Export Import package provides tools to copy MLflow objects (runs, experiments or registered models) from one MLflow tracking server (Databricks workspace) to another. Using the MLflow REST API, the tools export MLflow objects to an intermediate directory and then import them into the target tracking server. + license: Apache-2.0 + license_file: LICENSE.txt + repository: https://github.com/mlflow/mlflow-export-import + +extra: + recipe-maintainers: + - EllaBootQC From a78fc16515a86452bc945470aacdbb71674855a5 Mon Sep 17 00:00:00 2001 From: EllaBootQC Date: Thu, 7 Nov 2024 15:53:09 +0100 Subject: [PATCH 2/9] fixes --- recipes/mlflow-export-import/recipe.yaml | 44 ++---------------------- 1 file changed, 2 insertions(+), 42 deletions(-) diff --git a/recipes/mlflow-export-import/recipe.yaml b/recipes/mlflow-export-import/recipe.yaml index fc7ee7c59c87b..0169b2a54a4fc 100644 --- a/recipes/mlflow-export-import/recipe.yaml +++ b/recipes/mlflow-export-import/recipe.yaml @@ -1,16 +1,3 @@ -# This example shows how to define a recipe using the new YAML based recipe format introduced by -# CEP 13. - -# For more information about this format see: https://prefix-dev.github.io/rattler-build/latest/reference/recipe_file/ - -# The main differences with the old format is that no preprocessing is required for the file to be valid YAML. -# This means: -# - No "selectors", use YAML if-then-else expressions instead (https://prefix-dev.github.io/rattler-build/latest/selectors/) -# - Jinja expressions are formatted with a leading `$` to make them valid YAML - -# Note: there are many handy hints in comments in this example -- remove them when you've finalized your recipe - -# Define variables in this section that you can use in other parts. context: name: mlflow-export-import version: "1.1.2" @@ -20,7 +7,7 @@ package: version: ${{ version }} source: - url: https://github.com/mlflow/${{ name }}/archive/refs/tags/v${{ version}}.tar.gz + url: https://github.com/mlflow/${{ name }}/archive/refs/tags/v${{ version }}.tar.gz sha256: 336bd0fe3a16ac2198774f89d2642df5d103d306a5a6d3b48f3eed90dbddf9c3 build: @@ -30,9 +17,8 @@ build: requirements: build: - ${{ compiler('c') }} - # - ${{ stdlib('c') }} # If you need any compiler, add the C standard library ("stdlib") too + - ${{ stdlib('c') }} - mlflow - # - databricks_cli ==0.18.0 - databricks-cli ==0.18.0 - pandas >=1.5.2 - tabulate ==0.9.0 @@ -44,36 +30,10 @@ requirements: run: - python -# tests: -# # - script: mlflow_export_import/tests/run_tests.sh -# - script: mlflow_export_import/tests/open_source/run_tests.sh - -# tests: -# - script: -# - if: unix or emscripten -# then: -# - test ${PREFIX}/ -# - test -d ${PREFIX}/include/xtensor -# - test -f ${PREFIX}/include/xtensor/xarray.hpp -# - test -f ${PREFIX}/share/cmake/xtensor/xtensorConfig.cmake -# - test -f ${PREFIX}/share/cmake/xtensor/xtensorConfigVersion.cmake -# - if: win -# then: -# - if not exist %LIBRARY_PREFIX%\include\xtensor\xarray.hpp (exit 1) -# - if not exist %LIBRARY_PREFIX%\share\cmake\xtensor\xtensorConfig.cmake (exit 1) -# - if not exist %LIBRARY_PREFIX%\share\cmake\xtensor\xtensorConfigVersion.cmake (exit 1) - - tests: - script: - test ${PREFIX}/include/mlflow-export-import -# tests: -# - script: -# - mlflow-export-import --help - - # - scripts: mlflow_export_import - about: homepage: https://github.com/mlflow/mlflow-export-import summary: 'Tools to copy MLflow objects' From 1962f07c97b2f364093e44f302ad1b8dd76e8faa Mon Sep 17 00:00:00 2001 From: EllaBootQC Date: Thu, 7 Nov 2024 16:49:32 +0100 Subject: [PATCH 3/9] edits --- recipes/mlflow-export-import/recipe.yaml | 40 +++++++++++++++++++----- 1 file changed, 32 insertions(+), 8 deletions(-) diff --git a/recipes/mlflow-export-import/recipe.yaml b/recipes/mlflow-export-import/recipe.yaml index 0169b2a54a4fc..f7c4bec8b9ada 100644 --- a/recipes/mlflow-export-import/recipe.yaml +++ b/recipes/mlflow-export-import/recipe.yaml @@ -12,16 +12,34 @@ source: build: script: python -m pip install . -vv + noarch: python number: 0 + python: + entry_points: + - export-all = mlflow_export_import.bulk.export_all:main + - import-all = mlflow_export_import.bulk.import_models:main + - export-models = mlflow_export_import.bulk.export_models:main + - import-models = mlflow_export_import.bulk.import_models:main + - export-run = mlflow_export_import.run.export_run:main + - import-run = mlflow_export_import.run.import_run:main + - export-experiment = mlflow_export_import.experiment.export_experiment:main + - import-experiment = mlflow_export_import.experiment.import_experiment:main + - export-experiments = mlflow_export_import.bulk.export_experiments:main + - import-experiments = mlflow_export_import.bulk.import_experiments:main + - export-model = mlflow_export_import.model.export_model:main + - import-model = mlflow_export_import.model.import_model:main + - export-model-version = mlflow_export_import.model_version.export_model_version:main + - import-model-version = mlflow_export_import.model_version.import_model_version:main + - download-notebook = mlflow_export_import.notebook.download_notebook:main + - copy-model-version = mlflow_export_import.copy.copy_model_version:main + - copy-run = mlflow_export_import.copy.copy_run:main + - get-model-signature = mlflow_export_import.tools.get_model_signature:main + - set-model-signature = mlflow_export_import.tools.set_model_signature:main + - list-model-versions-without-sigantures = mlflow_export_import.tools.list_model_versions_without_signatures:main + - http-client = mlflow_export_import.client.http_client:main requirements: build: - - ${{ compiler('c') }} - - ${{ stdlib('c') }} - - mlflow - - databricks-cli ==0.18.0 - - pandas >=1.5.2 - - tabulate ==0.9.0 - wheel - pip host: @@ -29,10 +47,16 @@ requirements: - setuptools run: - python + - mlflow + - databricks-cli ==0.18.0 + - pandas >=1.5.2 + - tabulate ==0.9.0 tests: - - script: - - test ${PREFIX}/include/mlflow-export-import + - python: + imports: + - mlflow_export_import + pip_check: true about: homepage: https://github.com/mlflow/mlflow-export-import From 029d67017e27af6d551322be44f723cbc6784d56 Mon Sep 17 00:00:00 2001 From: EllaBootQC Date: Wed, 20 Nov 2024 14:39:56 +0100 Subject: [PATCH 4/9] add mlflow-export-import --- recipes/mlflow-export-import/recipe.yaml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/recipes/mlflow-export-import/recipe.yaml b/recipes/mlflow-export-import/recipe.yaml index f7c4bec8b9ada..d31ebea1c1c37 100644 --- a/recipes/mlflow-export-import/recipe.yaml +++ b/recipes/mlflow-export-import/recipe.yaml @@ -39,23 +39,26 @@ build: - http-client = mlflow_export_import.client.http_client:main requirements: - build: - - wheel - - pip host: - - python + - pip + - python >=3.8 - setuptools + - mlflow >=2.9.2 run: - - python + - python >=3.8 - mlflow - databricks-cli ==0.18.0 - pandas >=1.5.2 - tabulate ==0.9.0 + - wheel + - pytest + - pytest-html >=3.2.0 + - shortuuid >=1.0.11 tests: - python: imports: - - mlflow_export_import + - mlflow_export_import pip_check: true about: From fa46063e15a761d604ffb5c99c6f75ae553b44df Mon Sep 17 00:00:00 2001 From: EllaBootQC Date: Wed, 20 Nov 2024 15:05:29 +0100 Subject: [PATCH 5/9] skip win build --- recipes/mlflow-export-import/recipe.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/recipes/mlflow-export-import/recipe.yaml b/recipes/mlflow-export-import/recipe.yaml index d31ebea1c1c37..b736e020287f8 100644 --- a/recipes/mlflow-export-import/recipe.yaml +++ b/recipes/mlflow-export-import/recipe.yaml @@ -37,16 +37,15 @@ build: - set-model-signature = mlflow_export_import.tools.set_model_signature:main - list-model-versions-without-sigantures = mlflow_export_import.tools.list_model_versions_without_signatures:main - http-client = mlflow_export_import.client.http_client:main + skip: win requirements: host: - pip - python >=3.8 - - setuptools - - mlflow >=2.9.2 run: - python >=3.8 - - mlflow + - mlflow >=2.9.2 - databricks-cli ==0.18.0 - pandas >=1.5.2 - tabulate ==0.9.0 From 3149da470a5abf9b733dec220d1b70f92084689c Mon Sep 17 00:00:00 2001 From: EllaBootQC Date: Wed, 20 Nov 2024 15:15:29 +0100 Subject: [PATCH 6/9] don't skip win build --- recipes/mlflow-export-import/recipe.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/mlflow-export-import/recipe.yaml b/recipes/mlflow-export-import/recipe.yaml index b736e020287f8..875a36266362c 100644 --- a/recipes/mlflow-export-import/recipe.yaml +++ b/recipes/mlflow-export-import/recipe.yaml @@ -37,12 +37,12 @@ build: - set-model-signature = mlflow_export_import.tools.set_model_signature:main - list-model-versions-without-sigantures = mlflow_export_import.tools.list_model_versions_without_signatures:main - http-client = mlflow_export_import.client.http_client:main - skip: win requirements: host: - pip - python >=3.8 + - setuptools run: - python >=3.8 - mlflow >=2.9.2 From a089d4ed269377873ea7a2f886265afb39360125 Mon Sep 17 00:00:00 2001 From: EllaBootQC Date: Wed, 20 Nov 2024 15:41:20 +0100 Subject: [PATCH 7/9] add mlflow to host requirements --- recipes/mlflow-export-import/recipe.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/recipes/mlflow-export-import/recipe.yaml b/recipes/mlflow-export-import/recipe.yaml index 875a36266362c..6ae65950c1f47 100644 --- a/recipes/mlflow-export-import/recipe.yaml +++ b/recipes/mlflow-export-import/recipe.yaml @@ -43,6 +43,7 @@ requirements: - pip - python >=3.8 - setuptools + - mlflow >=2.9.2 run: - python >=3.8 - mlflow >=2.9.2 From 63b0225972995835dc4dea43d2066b3f22b70bc2 Mon Sep 17 00:00:00 2001 From: EllaBootQC Date: Wed, 20 Nov 2024 16:22:32 +0100 Subject: [PATCH 8/9] different mlflow version --- recipes/mlflow-export-import/recipe.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/recipes/mlflow-export-import/recipe.yaml b/recipes/mlflow-export-import/recipe.yaml index 6ae65950c1f47..2dfc6cc05c2a8 100644 --- a/recipes/mlflow-export-import/recipe.yaml +++ b/recipes/mlflow-export-import/recipe.yaml @@ -43,10 +43,9 @@ requirements: - pip - python >=3.8 - setuptools - - mlflow >=2.9.2 run: - python >=3.8 - - mlflow >=2.9.2 + - mlflow >=2.9.2, <2.18.0 - databricks-cli ==0.18.0 - pandas >=1.5.2 - tabulate ==0.9.0 From 1c605d737f04fd6b8e8e9b6fcbd603416883ac5e Mon Sep 17 00:00:00 2001 From: EllaBootQC Date: Wed, 20 Nov 2024 16:31:26 +0100 Subject: [PATCH 9/9] different mlflow version --- recipes/mlflow-export-import/recipe.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/mlflow-export-import/recipe.yaml b/recipes/mlflow-export-import/recipe.yaml index 2dfc6cc05c2a8..18d5b496514cc 100644 --- a/recipes/mlflow-export-import/recipe.yaml +++ b/recipes/mlflow-export-import/recipe.yaml @@ -45,7 +45,7 @@ requirements: - setuptools run: - python >=3.8 - - mlflow >=2.9.2, <2.18.0 + - mlflow >=2.9.2, <2.10.2 - databricks-cli ==0.18.0 - pandas >=1.5.2 - tabulate ==0.9.0