Skip to content

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
@sonarqubecloud
Copy link

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
@alvarolopez alvarolopez deleted the backport-3.6-new branch September 26, 2025 12:12
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