geti-sdk icon indicating copy to clipboard operation
geti-sdk copied to clipboard

[Feature]: Geti SDK should always support the code deployment created by previous version

Open hanyingchen opened this issue 1 year ago • 8 comments

Description

Today in the code deployment package, the requirements.txt shows Geti-sdk>=xxx version. But if a newer version Geti SDK is installed, it won't work. User has to install the exact version of Geti SDK to make it work. If the version mis-match, it will just pop up error like "can't find objects" and etc. This error message is very mis-leading. Geti SDK should be able to identify such version mismatch and provide the correct error message. But the best solution is to ensure new version of Geti SDK can manage the old version code deployment.

Suggested Solution

hanyingchen avatar Nov 05 '25 22:11 hanyingchen

@jcchr please update the version in:

  • https://github.com/open-edge-platform/geti/blob/main/interactive_ai/services/resource/app/code_deployment/example_code/requirements.txt
  • https://github.com/open-edge-platform/geti/blob/main/interactive_ai/services/resource/app/code_deployment/example_code/requirements-notebook.txt

leoll2 avatar Nov 06 '25 08:11 leoll2

@hanyingchen , could you provide specific versions where you noticed this behaviour i.e. which version of Geti and which version od Geti SDK did you use?

piotrgrubicki avatar Nov 06 '25 09:11 piotrgrubicki

My recent case is SDK 2.10 with Geti 2.12.

hanyingchen avatar Nov 06 '25 14:11 hanyingchen

I would call this a bug. The deployment fails out of the box.

I also had similar issue. I used: Geti 2.12.1 requirements.txt states 'geti-sdk~=2.10' README states python >=3.9, <=3.12

AttributeError: 'Instance SegmentationResult' object has no attribute 'segmentedObjects' Traceback from prediction = deployment.infer(image_rgb)

To get this to work , I had to install python 3.10; then install geti-sdk==2.10.0; Then install opencv-python (this can be latest version), then run python demo.py

It is also unexpected that there is not a corresponding SDK version for the Geti 2.12.1 version (e.g. geti SDK 2.12.1 does not exist yet on https://pypi.org/project/geti-sdk/ )

jenmwms avatar Nov 06 '25 16:11 jenmwms

Geti SDK depends on Geti REST API, which usually changes a bit on every major Geti release (2.10, 2.11, 2.12, ...). Geti SDK versions match the corresponding Geti releases, for example Geti SDK 2.12 is compatible (and tested) with Geti 2.12.*.

My recent case is SDK 2.10 with Geti 2.12.

For the reasons above, SDK can't guarantee forward-compatibility; to do so, it would need to anticipate the API changes of future Geti versions, which isn't always possible.

I would call this a bug. The deployment fails out of the box. [...] I used: Geti 2.12.1 requirements.txt states 'geti-sdk~=2.10'

This is indeed a bug, caused by the forgotten update of this requirements.txt file in the Geti repo. The geti-sdk referenced in that file shall always match the Geti version.

It is also unexpected that there is not a corresponding SDK version for the Geti 2.12.1 version

Geti 2.12.1 is a minor release, as such it doesn't introduce any feature or API change w.r.t. Geti 2.12.0. In other words, there is no need to release a new SDK version for it - Geti SDK 2.12 is compatible with any Geti 2.12.* release.

Apologies for the confusing versioning scheme. The choice to not adopt the standard, semantic versioning was taken long time ago, and the current maintainers have no control over it. There is a note in the README which recommends to use a SDK version that matches Geti. Nevertheless, the aforementioned bug in Geti should get fixed, and perhaps the README should be extended with more information about the version cross-compatibility.

leoll2 avatar Nov 07 '25 08:11 leoll2

How do we address the issue of having to fall back to python 3.10 to get this to work? Based on the README we should be able to use python 3.12.

jenmwms avatar Dec 02 '25 00:12 jenmwms

How do we address the issue of having to fall back to python 3.10 to get this to work? Based on the README we should be able to use python 3.12.

Both Python 3.10 and 3.12 are supported by the Geti SDK version that you're using (2.12). If you encounter issues with a specific Python version like 3.12, please open a separate issue with steps to reproduce. Thank you!

leoll2 avatar Dec 02 '25 08:12 leoll2

How do we address the issue of having to fall back to python 3.10 to get this to work? Based on the README we should be able to use python 3.12.

Both Python 3.10 and 3.12 are supported by the Geti SDK version that you're using (2.12). If you encounter issues with a specific Python version like 3.12, please open a separate issue with steps to reproduce. Thank you!

Ok, I created a separate issue with the steps to reproduce. Please see: #711

jenmwms avatar Dec 20 '25 03:12 jenmwms