Skip to content
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

Updated python dependencies & configurable docker builds #325

Merged
merged 6 commits into from
Jan 10, 2024

Conversation

josvandervelde
Copy link
Member

Goal

Running different versions of the OpenML website: one in production (k8s), one in test.
To make that possible, all urls should be configurable, both in the Python backend as in the React frontend.

Changes

In this PR (sorry, I could've splitted it in separate PRs):

  1. Updated python requirements. This needed to be done anyway, and I encountered some errors with the old requirements.txt (for example, the newer pandas does not allow df.append, while no version of pandas was specified). Also, many dependencies in requirements.txt were dependencies of dependencies - I removed them.
  2. Updated python code, reflecting the updated requirements, avoiding deprecated or removed functionality
  • pandas: df.append -> pd.concat
  • dash: renamed imports
  • flask_jwt_extended: @jwt_required -> @jwt_required() and rename of blacklist to blocklist
  1. Updated the environment variables: moved from .flaskenv to .env (easy to use for both react and flask), renamed some and added some (e.g., DO_SEND_EMAIL)
  2. Updated python & React code so that all URLs are configurable using env vars
  3. Updated React so that it's compatible with ElasticSearch version 6 (current prod), 7 and 8 (new prod), using env var REACT_APP_ELASTICSEARCH_VERSION_MAYOR
  4. Updated docker

Similar to PR 274

This PR is duplicate with most of the work of PR #274. I took the liberty to take inspiration from that PR, but not use it directly, because it's old. We should probably close that PR if we merge this - although there are some additions in that PR that I did not include here:

How to test

The python unittests seemed to not be up-to-date. They didn't seem to be easily runnable, and the coverage seemed small. I ignored them (let me know if they should be up-to-date).
I tested this by running it locally (the .env variant) and deploying it to https://k8s.openml.org (the .env.k8s variant), and:

  1. Listing datasets, tasks etc.
  2. Clicking on a dataset/task etc.
  3. Downloading dataset + json + xml + croissant
  4. Running analysis of dataset/task

Current deployment

Docker image openml/frontend:k8s (see https://hub.docker.com/r/openml/frontend/tags) runs on https://k8s.openml.org/. Docker image openml/frontent:latest is currently not used (it could be used for the current production). I didn't create a test image yet, I'll do that in a separate PR.

… can use a single env file for both flask and react); Some changes: newer pandas does not support df.append, dash deprecated some imports
…ity based on the ElasticSearch version, changed env variable names to be consistent with Python
@joaquinvanschoren joaquinvanschoren merged commit af32225 into master Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants