-
Notifications
You must be signed in to change notification settings - Fork 16
Adding artifacts upload through S3/Minio #71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 4 commits
a9b53d5
5322504
e61470d
c8c1e3e
ebfcaee
b3dc479
e7b047f
b617b1d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,21 +22,23 @@ jobs: | |
| - x64 | ||
| steps: | ||
| - uses: actions/checkout@v2 | ||
| - name: Setup custom python requirements | ||
| if: hashFiles('**/requirements.txt', '**/pyproject.toml') == '' | ||
| run: | | ||
| touch ./requirements.txt | ||
| echo "mlflow[auth]==3.2.0" > ./requirements.txt | ||
| - uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.12.3' | ||
| cache: 'pip' | ||
| - name: Setup mlflow locally | ||
| run: | | ||
| export MLFLOW_FLASK_SERVER_SECRET_KEY='mlflowclient.jl' | ||
| pip install -r ./requirements.txt | ||
| python3 /opt/hostedtoolcache/Python/3.12.3/x64/bin/mlflow server --app-name basic-auth --host 0.0.0.0 --port 5000 & | ||
| sleep 5 | ||
| - name: Start services | ||
| run: docker-compose -f docker compose.test.yaml up -d | ||
| # - name: Setup custom python requirements | ||
| # if: hashFiles('**/requirements.txt', '**/pyproject.toml') == '' | ||
| # run: | | ||
| # touch ./requirements.txt | ||
| # echo "mlflow[auth]==3.2.0" > ./requirements.txt | ||
| # - uses: actions/setup-python@v4 | ||
| # with: | ||
| # python-version: '3.12.3' | ||
| # cache: 'pip' | ||
| # - name: Setup mlflow locally | ||
| # run: | | ||
| # export MLFLOW_FLASK_SERVER_SECRET_KEY='mlflowclient.jl' | ||
| # pip install -r ./requirements.txt | ||
| # python3 /opt/hostedtoolcache/Python/3.12.3/x64/bin/mlflow server --app-name basic-auth --host 0.0.0.0 --port 5000 & | ||
| # sleep 5 | ||
| - uses: julia-actions/setup-julia@v1 | ||
| with: | ||
| version: ${{ matrix.version }} | ||
|
|
@@ -54,8 +56,11 @@ jobs: | |
| - uses: julia-actions/julia-buildpkg@v1 | ||
| - uses: julia-actions/julia-runtest@v1 | ||
| env: | ||
| JULIA_NUM_THREADS: '2' | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this change required? Also the |
||
| MLFLOW_TRACKING_URI: "http://localhost:5000/api" | ||
| JULIA_NUM_THREADS: '1' | ||
| MLFLOW_TRACKING_URI: "http://localhost:5050/api" | ||
| MLFLOW_S3_ENDPOINT_URL: "http://minio:9000" | ||
| AWS_ACCESS_KEY_ID: minioadmin | ||
| AWS_SECRET_ACCESS_KEY: minioadmin | ||
| - uses: julia-actions/julia-processcoverage@v1 | ||
| - uses: codecov/codecov-action@v3 | ||
| with: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| version: '3.8' | ||
|
|
||
| services: | ||
| minio: | ||
| image: minio/minio | ||
| ports: | ||
| - "9000:9000" # S3 API | ||
| - "9001:9001" # Minio Console | ||
| environment: | ||
| - MINIO_ROOT_USER=minioadmin | ||
| - MINIO_ROOT_PASSWORD=minioadmin | ||
| command: server /data --console-address ":9001" | ||
|
|
||
| create-buckets: | ||
| image: minio/mc | ||
| depends_on: | ||
| - minio | ||
| entrypoint: > | ||
| /bin/sh -c " | ||
| sleep 10; | ||
| /usr/bin/mc alias set myminio http://minio:9000 minioadmin minioadmin; | ||
| /usr/bin/mc mb myminio/mlflow; | ||
| exit 0; | ||
| " | ||
|
|
||
| mlflow: | ||
| image: ghcr.io/mlflow/mlflow:v2.14.1 | ||
| depends_on: | ||
| - create-buckets | ||
| ports: | ||
| - "5050:5050" | ||
| environment: | ||
| - AWS_ACCESS_KEY_ID=minioadmin | ||
| - AWS_SECRET_ACCESS_KEY=minioadmin | ||
| - MLFLOW_S3_ENDPOINT_URL=http://minio:9000 | ||
| command: > | ||
| /bin/sh -c " | ||
| pip install boto3 && | ||
| mlflow server | ||
| --host 0.0.0.0 | ||
| --port 5050 | ||
| --default-artifact-root s3://mlflow | ||
| " |
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,34 @@ | ||
| if ~haskey(ENV, "MLFLOW_TRACKING_URI") | ||
| error("WARNING: MLFLOW_TRACKING_URI is not set. To run this tests, you need to set the URI of your MLFlow server API") | ||
| error("""WARNING: MLFLOW_TRACKING_URI is not set. | ||
| To run the unit tests, you need to set the URI of your MLFlow server API. | ||
|
|
||
| A test environment is provided in .devcontainers/compose.yaml, start it as | ||
| `docker-compose .devcontainers/compose.yaml up`. | ||
|
|
||
| Then set the environment variables | ||
| MLFLOW_TRACKING_URI="http://localhost:5050/api" | ||
|
||
| AWS_ACCESS_KEY_ID="minioadmin" | ||
| AWS_SECRET_ACCESS_KEY="minioadmin" | ||
| MLFLOW_S3_ENDPOINT_URL="http://localhost:9000" | ||
| """) | ||
| end | ||
|
|
||
|
|
||
| # Set up access to testing environment defined in docker-compose.test.yaml | ||
| const TEST_MLFLOW_URI = "http://localhost:5050/" | ||
| const TEST_MLFLOW_TRACKING_URI = "http://127.0.0.1:5050/api" | ||
| const TEST_MLFLOW_S3_ENDPOINT_URL = get(ENV, "MLFLOW_S3_ENDPOINT_URL", "http://127.0.0.1:9000") | ||
| const TEST_AWS_ACCESS_KEY_ID = get(ENV, "AWS_ACCESS_KEY_ID", "minioadmin") | ||
| const TEST_AWS_SECRET_ACCESS_KEY = get(ENV, "AWS_SECRET_ACCESS_KEY", "minioadmin") | ||
|
|
||
|
|
||
|
|
||
|
|
||
| include("base.jl") | ||
|
|
||
| const minio_cfg = MinioConfig(TEST_MLFLOW_S3_ENDPOINT_URL; username=TEST_AWS_ACCESS_KEY_ID, password=TEST_AWS_SECRET_ACCESS_KEY) | ||
| include("setup.jl") | ||
|
|
||
| include("types/mlflow.jl") | ||
|
|
||
| include("services/run.jl") | ||
|
|
@@ -13,4 +38,4 @@ include("services/artifact.jl") | |
| include("services/experiment.jl") | ||
| include("services/registered_model.jl") | ||
| include("services/model_version.jl") | ||
| include("services/user.jl") | ||
| #include("services/user.jl") | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The custom
mlflowsetup is related to the wayltsandreleaseCI pipelines treat the instance. Instead of changing it, you could setupMiniOusing minio-action.