Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Conversation

@omerwe-eleventx
Copy link

Hi Ross,

As we discussed, this is a big pull request with many modifications and revisions we made to the code. Please let me know what you think!

Best,

Omer

@burtonrj
Copy link
Owner

burtonrj commented Aug 7, 2021

Caching of logicle transform has been added to transform module of v3.0. I've adapted your code to make it scale to multiple dimensions (the transforms in the matplotlib transformer handle either 1 or 2). This means all logicle transforms across the whole library now benefit from caching.

I've also adapted it so that caching can handle different kwargs passed to the Transformer so for example if you perform a logicle transform with m=4.5 but then later change this to m=4.0, the cached results for these two calculations are kept separate from each other.

Finally, the cached results can be saved to disk between sessions using the save_cache function which takes advantage of the configurations tool coming with version 3.0. (the next release has been bumped from a minor to a major due to the large changes planned).

Updated code can be found here: https://github.com/burtonrj/CytoPy/blob/v3.0/cytopy/flow/transform.py
Tests: https://github.com/burtonrj/CytoPy/blob/v3.0/cytopy/tests/transform_test.py

@burtonrj
Copy link
Owner

Caching of logicle transform has been added to transform module of v3.0. I've adapted your code to make it scale to multiple dimensions (the transforms in the matplotlib transformer handle either 1 or 2). This means all logicle transforms across the whole library now benefit from caching.

I've also adapted it so that caching can handle different kwargs passed to the Transformer so for example if you perform a logicle transform with m=4.5 but then later change this to m=4.0, the cached results for these two calculations are kept separate from each other.

Finally, the cached results can be saved to disk between sessions using the save_cache function which takes advantage of the configurations tool coming with version 3.0. (the next release has been bumped from a minor to a major due to the large changes planned).

Updated code can be found here: https://github.com/burtonrj/CytoPy/blob/v3.0/cytopy/flow/transform.py
Tests: https://github.com/burtonrj/CytoPy/blob/v3.0/cytopy/tests/transform_test.py

I've actually dramatically simplified this with lru_cache now

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants