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

Conda/Python Package Process Creation and CI #2

Merged
merged 32 commits into from
Sep 16, 2024
Merged

Conversation

mpatrou
Copy link
Collaborator

@mpatrou mpatrou commented Aug 30, 2024

Short description of the changes:

The code includes changes in order to create python wheel and conda package.
Also, the default file paths are updated.

Long description of the changes:

The code adds:

  • environment.yaml with conda dependencies
  • pyproject.toml
  • conda.recipe/meta.yaml
  • github actions to create and upload conda packages to anaconda
  • folder reorganization and imports updates
  • file paths for models/dataset to show default at /SNS/ locations
  • VERSION removed

Check list for the pull request

  • I have read the [CONTRIBUTING]
  • I have read the [CODE_OF_CONDUCT]
  • I have added tests for my changes
  • I have updated the documentation accordingly

Check list for the reviewer

  • I have read the [CONTRIBUTING]
  • I have verified the proposed changes
  • best software practices
    • all internal functions have an underbar, as is python standard
    • clearly named variables (better to be verbose in variable names)
    • code comments explaining the intent of code blocks
  • All the tests are passing
  • The documentation is up to date
  • code comments added when explaining intent

Manual test for the reviewer

Create and activate the environment

  • conda env create
  • conda activate inspired-dev

Python wheel

  • python -m build --wheel --no-isolation
  • check-wheel-contents dist/inspired-*.whl

Conda package

  1. create a conda package
  • cd conda.recipe
  • echo "versioningit $(versioningit ../)"
  • CHANNELS="--channel conda-forge --channel pytorch --channel pyg"
  • VERSION=$(versioningit ../) conda mambabuild $CHANNELS --output-folder . .
  • conda verify noarch/inspired-*.tar.bz2
  1. install a local conda package
  • conda install noarch/<inspired .tar.bz2 file>
  1. start the application
  • inspired

References

6827

Copy link
Collaborator

@cyqjh cyqjh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I followed the manual installation procedure. Everything went smoothly. However, when I am at the last step (run inspired), I got the following error message: "OSError: /home/yyc/miniconda3/envs/inspired-dev/lib/python3.11/site-packages/torch_cluster/_version_cpu.so: undefined symbol: _ZN5torch3jit17parseSchemaOrNameERKSs".

Copy link
Member

@peterfpeterson peterfpeterson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The configuration of the github actions and the conda recipe look reasonable. The packages do indeed build and run through their respective "verify" steps as shown by CI.

I did not attempt to install the package.

@mpatrou mpatrou merged commit 2ab4ced into next Sep 16, 2024
1 check passed
@mpatrou mpatrou deleted the conda_python_pkg branch September 16, 2024 14:51
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

Successfully merging this pull request may close these issues.

3 participants