linkedin / linkedin/pygradle

Definition of an explicit installation sequence of dependencies?

Open
#75 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
603
Forks
142
PR merge metrics
No merged PRs in 30d

Description

Hi all,

this question might be more related to Gradle than to pygradle, so please redirect me if necessary. Anyhow, I think its worth discussing in the context of pygradle here.

Currently, I am trying to build a minimal working example in the setting of Machine Learning (say, a getting started project on the Iris dataset) using:

  • Docker as a build container
  • pygradle to build my python project
  • pivy-importer to have a locally cached pypi repository (I consider moving that to Artifactory in the future, but since we don't own a Pro instance here, I am stuck to the open source version)

It is my aim to make a PR for an other example project once everything runs smoothly. Currently, I am facing one single last problem...

Besides others, I am defining python project dependencies for:

  • scipy (0.18.1) and
  • scikit-learn (0.18).

scikit-learn depends on scipy, but does not mention this dependency in any metadata explicitly.
As a result, If one intends to install scikit-learn (even in a fresh environment), the installation procedure obviously fails due to the missing required scipy library (see the attached log1.txt file for this scenario from within pygradle).

From the same log1.txt file, I deduce that dependencies are installed using alphabetical order ( I have tested some permutations in the build.gradle file without succedd). Since "scikit-learn" < "scipy" (on ASCII level), the build step "installPythonRequirements" will always fail when resolving dependencies in alphabetical order.

As a work around, one can

  1. remove the dependency for scikit-learn for the first build run,
  2. wait for the import error in the source code,
  3. re-add the dependency for scikit-learn, and
  4. run the build step again.

Since the same virtualenv as for the first run is used, scipy is correctly detected. This, in turn, results in a successful installation of scikit-learn s.t. the build finally succeeds.

Therefore my question (in this scenario so one can image multiple others): How to define or configure that scikit-learn is installed after scipy?

Thanks!
André

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the build.gradle configuration and the installPythonRequirements task, then inspect log1.txt for the dependency installation sequence. Determine how dependencies such as scipy and scikit-learn are ordered in a clean environment; the issue is done when the declared dependencies install successfully without the workaround.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python, scikit-learn
Domain
build-system, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.