Code Monkey home page Code Monkey logo

Comments (5)

m-beau avatar m-beau commented on August 24, 2024

Hi Chris,

Yes I realized this could become a problem, I am in the process of completely getting rid of my 'home-made caching' inherited form a time when I didn't know better to replace it with joblib - I will implement this feature asap, and have the default be in the same directory of the dataset. It would distribute the data more.

from neuropyxels.

chris-angeloni avatar chris-angeloni commented on August 24, 2024

Sounds exciting! In the meantime a hacky way for me to get around this would be to change the path in cachedir = Path(op.expanduser("~")) / ".NeuroPyxels" in the import section of a bunch of functions?

from neuropyxels.

m-beau avatar m-beau commented on August 24, 2024

Yes that is the quick hack! Just search all the repo for ".NeuroPyxels", I am not sure in how many places I have set it (it will be in a single place in the future, I promise!). It seems it is at the top of the following modules: behav.py, coor.py, spk_t.py and spk_wvf.py.

from neuropyxels.

m-beau avatar m-beau commented on August 24, 2024

Implemented in the last PR (not yet available on pip, only on the git master branch - I want to make sure it doesn't break anything for a bit longer)!

Now, you can now simply edit the directory in .../npyx/CONFIG.py, which is __cachedir__ = "~/.NeuroPyxels" by default, with any path.

I would stick to a fast SSD though!

(It isn't actually possible to have the joblib cache directory sit in individual datasets, because this directory needs to be defined at module initialization time. However, some of the caching already relies on dataset-wise directories, this is what 'npyxMemory' is! But it is 'hand-made caching' using numpy, which is more error-prone and a pain to implement everywhere. If it causes more issues in the future, I will work harder on it.)

from neuropyxels.

m-beau avatar m-beau commented on August 24, 2024

FYI, I implemented a solution (turned it into a python package because it turned out to be much more work than anticipated): https://github.com/m-beau/cachecache

Testing it for a couple of weeks before pushing it to the master branch.

from neuropyxels.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.