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

Implement Version class for third-party dependency version checking. #123

Closed
7 of 8 tasks
Spartee opened this issue Jan 4, 2022 · 0 comments
Closed
7 of 8 tasks
Labels
area: build Issues related to builds, makefiles, installs, etc area: third-party Issues related to Issues related to dependencies and third-part and third-party package integrations type: feature Issues that include feature request or feature idea

Comments

@Spartee
Copy link
Contributor

Spartee commented Jan 4, 2022

Description

In (#122) the _install classes were introduced including the Versioner class which holds the versions for many third-party dependencies in SmartSim, including SmartRedis.

Currently each version is held as a string i.e. "1.2.3", but this is inflexible and can break (see #121). We need operators (> , <, >=) that can handle special versions of these dependencies (i.e 1.2.3.post).

Justification

Provide build classes with better methods to check versions and hence increase the stability of the build.

Implementation Strategy

  • see This for how PyTorch has flexible version classes.
  • Use above and pkg_resources.packging.version.Version to convert listed versions in buildenv.py/Versioner to a SSVersion class similar to torch.
  • Use this class for all listed versions.
    - So RedisAI version would look like
class Versioner:
    """Buildtime configuration of third-party dependencies"""

    # ....

    # RedisAI
    REDISAI = Version(os.environ.get("SMARTSIM_REDISAI", "1.2.3"))
  • enforce version constraints) in the pip build setup.py (redis > 6.0)
  • enforce ML backend constraints based on RedisAI version in CLI build
  • enforce tf and torch runtime contraints in smartsim/tf/__init__.py
  • Check version of user provided redis/redis-cli in config.py and enforce contraints (redis > 6.0)
  • Some tests for the version class itself.
@Spartee Spartee added area: build Issues related to builds, makefiles, installs, etc area: third-party Issues related to Issues related to dependencies and third-part and third-party package integrations type: feature Issues that include feature request or feature idea labels Jan 4, 2022
@Spartee Spartee closed this as completed Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: build Issues related to builds, makefiles, installs, etc area: third-party Issues related to Issues related to dependencies and third-part and third-party package integrations type: feature Issues that include feature request or feature idea
Projects
None yet
Development

No branches or pull requests

1 participant