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

feat: support back again Python 3.6 modules #193

Merged
merged 3 commits into from
Nov 11, 2024

Conversation

IgnacioHeredia
Copy link
Collaborator

This PR is to backport deepaas-cli fixes to Python 3.6, in order to allow old modules from the marketplace to be deployed with OSCAR.

I have started form the latest 2.5.2 version (branch releases/2.x) and done the following changes:

  • removed groups from TOML (only used for testing purposes), because not compatible with the Poetry version available in 3.6 (1.1.15) (ref, ref)
  • downgraded dependencies in TOML until reaching Python 3.6-compatible versions
  • commented importlib.metadata (not available in 3.6-compatible version of importlib)

⚠️ Note: I haven't modified Github workflows because I understand this will be a one-time backport.

Tested: This has been tested with the ai4os-image-classification package (Python 3.6.8), with:

  • model metadata
  • train
  • predict
  • deepaas-cli
root@b81b8cb2f65f:/srv/deepaas# deepaas-cli predict --files "/srv/ai4os-image-classification-tf/data/samples/labrador.jpeg" 

[...]

1/1 [==============================] - 1s 740ms/step
{'status': 'OK', 'labels': ['golden_retriever', 'Irish_setter', 'gibbon', 'Saluki', 'Chihuahua'], 'probabilities': [0.61965012550354, 0.09341743588447571, 0.04869064316153526, 0.04133171588182449, 0.028836732730269432]}

Poetry groups where introduced in Poetry 1.2. The same version that stopped supporting Python 3.6 ([ref](https://python-poetry.org/blog/announcing-poetry-1.2.0/#dropping-support-for-python-27-35-and-36-as-runtimes))
That raises the following error when installing.
```
  RuntimeError: The Poetry configuration is invalid:
    - Additional properties are not allowed ('group' was unexpected)
```
https://stackoverflow.com/questions/73876790/poetry-configuration-is-invalid-additional-properties-are-not-allowed-group
Copy link

sonarcloud bot commented Oct 29, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
D Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

@alvarolopez alvarolopez merged commit c0178b7 into releases/2.x Nov 11, 2024
1 of 10 checks passed
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