Skip to content

Rename aesara to pytensor. #481

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

Merged
merged 1 commit into from
Dec 27, 2022
Merged

Rename aesara to pytensor. #481

merged 1 commit into from
Dec 27, 2022

Conversation

twiecki
Copy link
Member

@twiecki twiecki commented Dec 24, 2022

This used the following script:

#!/bin/bash

if [ -z "$1" ]
  then
    echo "Script to automatically convert code (*.py and *.ipynb) from PyMC3 to 4.0. Use with care."
    echo "Usage: pymc3_to_4.sh <path>"
    exit 1
fi

declare -a replace_strings=(
    "s/from aesara import tensor as at/import pytensor.tensor as at/g"
    "s/import aesara\.tensor as at/import pytensor.tensor as at/g"
    # "s/tt\./at./g"
    "s/aesara/pytensor/g"
    "s/Aesara/PyTensor/g"
    "s/https\:\/\/github.com\/aesara-devs\/aesara/https\:\/\/github.com\/pymc-devs\/pytensor/g"
)

for replace in "${replace_strings[@]}"; do
    find $1 -name "*.ipynb" -type f -exec sed -i -e "/png/!$replace" {} \;
    find $1 -name "*.py" -type f -exec sed -i -e "/png/!$replace" {} \;
done

Then ended up in myst-hell, deleted the myst-dir, and re-committed. Some myst-files were deleted, are those obsolete? Anyway I can tell jupytext to just overwrite whatever is in the myst file? This process is so annoying and confusing.

I also didn't change any at. references, these are a bit tricker and I'd like to do those separately.

@twiecki twiecki requested a review from OriolAbril December 24, 2022 08:52
@review-notebook-app
Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@OriolAbril OriolAbril linked an issue Dec 27, 2022 that may be closed by this pull request
Copy link
Member

@OriolAbril OriolAbril left a comment

Choose a reason for hiding this comment

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

We should still aim to rerun the notebooks, the watermark will be broken now for these notebooks

@OriolAbril OriolAbril merged commit c98bd70 into main Dec 27, 2022
@OriolAbril OriolAbril deleted the aesara_to_pytensor branch December 27, 2022 17:13
@twiecki twiecki mentioned this pull request Dec 27, 2022
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.

API Quickstart still imports aesara
2 participants