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

Why do I get this issue when I try to read the "training_maze_database.pkl" but not "maze_configuration_database.pkl"?! #23

Open
j2figuer opened this issue Oct 28, 2024 · 1 comment
Assignees
Labels
version-issue Issue with my environment or other dependencies

Comments

@j2figuer
Copy link
Contributor

j2figuer commented Oct 28, 2024

See?

image

It also happens for "barrier_sequence_database"😠😠😠

image

@calderast calderast added the bug Something isn't working label Oct 28, 2024
@calderast calderast self-assigned this Oct 28, 2024
@calderast
Copy link
Owner

calderast commented Oct 28, 2024

This is a numpy version issue - the numpy version you are using to load the database isn't playing nicely with the numpy version I used to create it.

Easiest thing to do is just update your numpy to version 2.0.0 and everything should work.

If you like the current numpy version you're using for other projects, you can make a separate virtual environment for the hex maze project where everything has the correct versions (recommended anyway, instructions below)


I like having a separate virtual environment for each project to dependencies don't clash:

  1. Navigate to the Hex-Maze project folder (you're probably already inside it)

  2. To create the virtual environment, run python -m venv name_of_my_env

(Make name_of_my_env whatever you want to name it. Do this only once, now the environment is created forever and you should see a folder name_of_my_env in the folder you created the environment in)

  1. To activate the virtual environment:
    source name_of_my_env/bin/activate (on MacOS or Linux)
    or
    name_of_my_env\Scripts\activate (on Windows)

(You should now see (name_of_my_env) appear in your terminal prompt, which indicates that the virtual environment is active)

  1. Install dependencies (like numpy 2.0.0)

When you first create an environment it doesn't have anything in it yet, so you'll need to re-install dependencies for this project. You can use the requirements.txt folder to install everything at once.

  1. Deactivate the environment when you're done working on hex maze things:
    deactivate

(You should see (name_of_my_env) no longer appears in your terminal prompt, which indicates that the virtual environment is not active)

Any time you want to work on the hex maze project, just re-run the command from 3. in the project folder to reactivate your environment! Make sure to select your virtual environment for your kernel in VSCode or whatever other IDE you're using


You can also load the csv version of the databases if you just want to be able to visually read them

Because spyglass only works with numpy <=1.24 (I think) I'll eventually create some subfolders for the maze databases like numpy2.0/ and numpy1.24/ so we have the databases for both versions.

@calderast calderast added version-issue Issue with my environment or other dependencies and removed bug Something isn't working labels Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
version-issue Issue with my environment or other dependencies
Projects
None yet
Development

No branches or pull requests

2 participants