-
Notifications
You must be signed in to change notification settings - Fork 5
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
Cytotable convert fails to reload config file outside for
loop
#90
Comments
seeking to address cytomining#90
Thanks @jenna-tomkinson for raising this issue! I was able to reproduce your findings. My analysis found there may be a bug with Parsl (or perhaps how Parsl is implemented by CytoTable). As a result I raised the following issue with the Parsl project to resolve the bug or gather more information on how best to use the tool in this case: Parsl/parsl#2871 . As a workaround for the time being, I recommend creating new Parsl configurations when implementing CytoTable in a loop. For example: import pathlib
import parsl
from parsl.config import Config
from parsl.executors import HighThroughputExecutor
from cytotable import convert
# other work here ...
for plate_folder in sqlite_dir.iterdir():
output_path = pathlib.Path(f"{output_dir}/{plate_folder.stem}_converted.parquet")
# merge single cells and output as parquet file
convert(
source_path=str(plate_folder),
dest_path=str(output_path),
dest_datatype=dest_datatype,
metadata=["image"],
compartments=["nuclei"],
identifying_columns=["ImageNumber"],
joins=preset_join,
parsl_config=Config(
executors=[HighThroughputExecutor()],
),
chunk_size=10000,
) |
seeking to address cytomining#90
* detect parsl load and reuse existing config seeking to address #90 * attempt gc * release unused for arrow test * modify comment about warning * add note to docstring * isort linting * raise other runtimeerrors * Apply suggestions from code review Co-authored-by: Gregory Way <[email protected]> --------- Co-authored-by: Gregory Way <[email protected]>
Thanks again @jenna-tomkinson for raising this issue. I'm marking this as closed with the recent additions from #93 to address this issue. Moving forward, when using CytoTable in a loop it will use the first configuration passed to it, emitting a warning message when reusing an existing configuration to make sure this is observable. I recommend forming any custom |
Hi @d33bs , following a fix for #102 , I have updated CytoTable and trying to run a tutorial from cytotable import convert
# using a local path with cellprofiler csv presets
convert(
source_path="./tests/data/cellprofiler/ExampleHuman",
source_datatype="csv",
dest_path="ExampleHuman.parquet",
dest_datatype="parquet",
preset="cellprofiler_csv",
) and getting this error, likely related to current issue #90.
Is there a specific ? parsl-compliant config I needed to pass for plate level csv files I have on my local disk? |
Hi @sbamin, thanks for reaching out about this! This is occurring due to release As a workaround, you could pin your Parsl installation to As a fix for CytoTable, I'll create a PR for this to avoid the unexpected exception with this new version of Parsl. Related: #94 |
Thanks and downgrading parsl to <=2023.9.11 worked. Side note: error persisted when I rebuild pkg per pull request change on line 11. |
Thank you for confirming and the follow up @sbamin ! I'm unsure, but wonder if the persisted error you mentioned may have come from environment Parsl version discrepancies with the new changes (#109 will now require Parsl version |
My mistake! I did some quick and dirty Anyways, for now, I have apptainer image based on older version of parsl and that is able to run example Which line 11 you are referencing too?
|
Thank you for the clarification @sbamin ! When convenient, please update to the newly merged work on |
Problem
When creating a parsl config variable outside of a for loop running
convert
on multiple SQLite files, it is not able to reload the config when running on the next file producing this error:I am using this code as an example for getting this error:
The text was updated successfully, but these errors were encountered: