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

Packing of local Python modules #222

Open
jklaise opened this issue Mar 25, 2022 · 1 comment
Open

Packing of local Python modules #222

jklaise opened this issue Mar 25, 2022 · 1 comment

Comments

@jklaise
Copy link
Contributor

jklaise commented Mar 25, 2022

As far as I can see, the packing of standalone Python local modules is unsupported. The only way I can see the packing to be picked up is by making the local modules into a local package and then specifying an absolute path to it. However, this isn't good enough as the absolute path is dependent on the local development environment (i.e. it would included my personal directory layout) and as far as I can see conda.yaml doesn't support relative paths to the location of the package. For portability of conda.yaml between environments this would necessitate releasing the local package to some sort of package index which is a fairly big obstacle, especially for private packages.

A current workaround would be to forgo creating a conda.yaml beforehand and packing the environment automatically (assuming #21 fallback works properly), but this then has the side-effect of having to manually specify the requirements using some other format (e.g. by contrast requirements.txt does support relative paths to local packages).

@jklaise
Copy link
Contributor Author

jklaise commented Mar 25, 2022

Unfortunately after testing with requirements.txt file containing a relative path to a local package and with no presence of conda.yaml file, the save(model) command fails because it (rightfully) can't resolve the location of the installed local package.

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

No branches or pull requests

1 participant