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

Update numpy version 2.0.2 #254

Merged
merged 8 commits into from
Oct 23, 2024
Merged

Conversation

martinResearch
Copy link
Owner

@martinResearch martinResearch commented Oct 23, 2024

Update numpy version 2.0.2, and dropping support for tensorflow for now as the tensorflow-intel package does not support numpy>=2 yet

Summary by Sourcery

Update numpy to version 2.0.2 and drop support for TensorFlow due to incompatibility issues. Modify the virtual environment setup script to use 'uv' for package management and skip TensorFlow-related tests.

Build:

  • Update the virtual environment setup script to use 'uv' for package management.

Tests:

  • Skip TensorFlow-related tests due to incompatibility with numpy 2.0.

Chores:

  • Drop support for TensorFlow due to incompatibility with numpy 2.0.

Copy link

sourcery-ai bot commented Oct 23, 2024

Reviewer's Guide by Sourcery

This pull request updates the numpy version to 2.0.2 and temporarily drops support for TensorFlow due to compatibility issues. The changes involve updating dependencies, modifying test files, and adjusting import statements across multiple files.

Sequence diagram for test execution with TensorFlow skipped

sequenceDiagram
    actor Tester
    participant TestSuite
    participant PyTest
    Tester->>TestSuite: Run tests
    TestSuite->>PyTest: Execute test_rgb_image_hand_fitting_tensorflow
    PyTest-->>TestSuite: Skip test (reason: TensorFlow does not support numpy 2.0)
    TestSuite-->>Tester: Test skipped
Loading

Architecture diagram for updated virtual environment setup

graph TD;
    A[create_venv.bat] -->|Activates| B[python_venv/Scripts/activate.bat];
    B -->|Installs| C[pip install uv];
    C -->|Synchronizes| D[uv pip sync requirements.txt];
    D -->|Installs| E[uv pip install -e .];
Loading

Class diagram for TensorFlow support removal

classDiagram
    class MeshRGBFitterWithPose {
        <<interface>>
    }
    class PyTorchMeshRGBFitterWithPose {
        <<interface>>
    }
    class TensorflowTorchMeshRGBFitterWithPose {
        <<interface>>
        note "Commented out due to TensorFlow support removal"
    }
    class MeshDepthFitter {
        <<interface>>
    }
    class PytorchMeshDepthFitter {
        <<interface>>
    }
    class TensorFlowMeshDepthFitter {
        <<interface>>
        note "Commented out due to TensorFlow support removal"
    }
    class CameraTensorflow {
        <<class>>
        +CameraTensorflow()
        note "Raises NotImplementedError due to TensorFlow support removal"
    }
Loading

File-Level Changes

Change Details Files
Update numpy version to 2.0.2 and drop TensorFlow support
  • Comment out TensorFlow imports and related code
  • Update version number in init.py
  • Add NotImplementedError for TensorFlow support
deodr/examples/rgb_image_hand_fitting.py
deodr/examples/depth_image_hand_fitting.py
deodr/__init__.py
deodr/tensorflow/differentiable_renderer_tensorflow.py
Modify test files to accommodate TensorFlow removal
  • Skip TensorFlow-related tests
  • Remove TensorFlow imports
  • Add pytest import
tests/test_rgb_image_hand_fitting.py
tests/test_depth_image_hand_fitting.py
Update virtual environment creation script
  • Replace pip with uv for package management
  • Modify installation commands
create_venv.bat

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @martinResearch - I've reviewed your changes and they look great!

Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@martinResearch martinResearch merged commit ea19f92 into master Oct 23, 2024
8 of 11 checks passed
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.

1 participant