You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@systemds.apache.org by "christinadionysio (via GitHub)" <gi...@apache.org> on 2024/12/04 13:48:28 UTC

[PR] [MINOR] Exclude Scuro if dependencies not installed [systemds]

christinadionysio opened a new pull request, #2150:
URL: https://github.com/apache/systemds/pull/2150

   This patch checks if the dependent packages for Scuro including their correct versions are installed and otherwise skips importing Scuro. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@systemds.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Exclude Scuro if dependencies not installed [systemds]

Posted by "Baunsgaard (via GitHub)" <gi...@apache.org>.
Baunsgaard commented on code in PR #2150:
URL: https://github.com/apache/systemds/pull/2150#discussion_r1870050715


##########
src/main/python/systemds/__init__.py:
##########
@@ -18,10 +18,46 @@
 # under the License.
 #
 # -------------------------------------------------------------
-
+from importlib.metadata import version, PackageNotFoundError
 from systemds import context
 from systemds import operator
 from systemds import examples
-from systemds import scuro
 
-__all__ = ["context", "operator", "examples", "scuro"]
+__all__ = ["context", "operator", "examples"]
+
+required_packages = [
+    ("torch", "2.5.1"),
+    ("torchvision", "0.20.1"),
+    ("librosa", "0.10.2"),
+    ("opencv-python", "4.10.0.84"),
+    ("opt-einsum", "3.3.0"),
+    ("h5py", "3.11.0"),
+    ("transformers", "4.46.3"),
+    ("nltk", "3.9.1"),
+    ("gensim", "4.3.3"),
+]
+
+
+def check_package_version(package_name, required_version):
+    try:
+        return version(package_name) >= required_version

Review Comment:
   i see, missed it was greater than, 
   
   LGTM



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@systemds.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Exclude Scuro if dependencies not installed [systemds]

Posted by "Baunsgaard (via GitHub)" <gi...@apache.org>.
Baunsgaard commented on PR #2150:
URL: https://github.com/apache/systemds/pull/2150#issuecomment-2518753640

   Thanks for the commit, It is now merged.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@systemds.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Exclude Scuro if dependencies not installed [systemds]

Posted by "Baunsgaard (via GitHub)" <gi...@apache.org>.
Baunsgaard closed pull request #2150: [MINOR] Exclude Scuro if dependencies not installed
URL: https://github.com/apache/systemds/pull/2150


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@systemds.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Exclude Scuro if dependencies not installed [systemds]

Posted by "christinadionysio (via GitHub)" <gi...@apache.org>.
christinadionysio commented on PR #2150:
URL: https://github.com/apache/systemds/pull/2150#issuecomment-2518147384

   > I like it, to make it even better can we make the requirements open ended, such that if someone has newer versions installed it is also valid?
   
   Sure, that's why I check if the installed version is `>=` the specified version. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@systemds.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [MINOR] Exclude Scuro if dependencies not installed [systemds]

Posted by "Baunsgaard (via GitHub)" <gi...@apache.org>.
Baunsgaard commented on PR #2150:
URL: https://github.com/apache/systemds/pull/2150#issuecomment-2518120695

   I like it, to make it even better can we make the requirements open ended, such that if someone has newer versions installed it is also valid?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@systemds.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org