Changelog¶
Release notes for xyzpy.
v1.4.0 (unreleased)¶
Breaking changes:
Require Python 3.11 or newer.
grow_cluster()now grows each batch in its own process and logs its output by default, see cluster jobs. Passsubprocess=Falsefor the old behavior.clean_slurm_outputsandmanage_slurm_outputsnow take the crop as their first argument.
Growing crops¶
Enhancements:
Add the
xyzpy-auto-growCLI. It watches all crops in a directory and takes one batch from each crop in turn. A TOML file can change worker, thread, GPU and CPU affinity settings while it runs.xyzpy-auto-growandgrow_subprocess()kill running batches whose crop directory is deleted or replaced. Re-sowing in place leaves running batches alone.Add
sow()andsow(), which write missing cases to grow later. Stable coordinate keys reuse matching crops. Re-sowing updates the function and constants of batches without results, and keeps existing results.Disk-backed
Harvesterdatasets reload when their files or Zarr stores change. A reused in-memory sow submission reaps into the calling Harvester and keeps its saved output metadata.xyzpy-grow:--subprocessnow defaults toauto, which turns subprocess mode on if--gpus,--affinitiesor--logis given, and errors if any of them is given with--subprocess false.--num-threadsdoesn’t count, since the CLI applies it to its own process.grow()also treatslogas a trigger forsubprocess="auto".grow_subprocess(): addappend_logsanddebugging.xyzpy-growgains a matching--debuggingflag.Crop files are written atomically, so watchers only read complete files.
Cached datasets are no longer saved into crop settings files.
is_prepared()now requires a saved function.
Cluster jobs¶
These are for grow_cluster() and gen_cluster_script().
Enhancements:
Each batch now runs in its own process by default, saving its output to
logs/batch-{batch_id}.login the crop directory, and adding to the log of any earlier attempt.Add
log,raise_errors,max_memory,gpusandaffinities, which are passed togrow()rather than written as header options.raise_errorsdefaults toTruein'array'mode, so a failed batch shows as a failed task.Jobs are submitted from
output_directory, which now defaults to the crop directory, so the scheduler’s output files land there. The submitted script is kept there as__cluster_script__.sh.With slurm, jobs are submitted with
sbatch --parsableand the job id is returned. A failed submission raises an error.Slurm header options: underscores become hyphens, e.g.
mail_type="END"gives--mail-type=END, andcpus_per_taskandnodescan be given in place ofnum_procsandnum_nodes.--nodes,--cpus-per-taskand--memare only written if given. Withoutnum_procs, the thread count comes fromSLURM_CPUS_PER_TASK.conda_envnow defaults toFalse, since the script runs the current Python interpreter directly.clean_slurm_outputscounts a task as finished once its batch has a result.
Bug fixes:
With
subprocess=True, each batch process now usesnum_threadsthreads rather than 1.set -einshell_setupno longer stops the job before Python starts.setupcode is no longer expanded by the shell.VECLIB_MAXIMUM_THREADSandNUMEXPR_NUM_THREADSare now also set, matchingxyzpy-grow.Fix
timegiven as a"H:M:S"string or as fractional hours."D-H:M:S"strings are now also accepted.Fix
memandmem_per_cpuclashing with the default memory. Giving both for slurm now raises an error.Fix
subprocess="auto".SGE and PBS: fix
Nonevalues in headers when options are left out. A stringmemsuch as"8G"now raises a clear error, since these need a number of gigabytes.SGE: fix a syntax error in scripts for growing missing batches. The script no longer tries to create
output_directoryafter-wdneeds it,grow_cluster()creates it before submitting instead.clean_slurm_outputs: fix detecting finished tasks when growing missing batches, or whendirectoryis not the current directory. The word “error” in a task’s output, e.g. from a setting namederror_rate, no longer marks the task as failed.
Plotting¶
These are for infiniplot(), which also backs ds.xyz.plot.
Enhancements:
The
hues,colors,markers,linestyles,markersizes,linewidthsandmarkeredgecolorsoptions now also accept a dict, mapping only the given coordinate values. Every other value keeps its default style.xscale="symlog"andyscale="symlog"now usexbaseandybase, with ticks at powers of the base.Add
zbase, the log base for the heatmap colorbar whenzscaleis"log"or"symlog", likexbaseandybase.rowandcolpanel titles shrink to fit above their axes, so long titles or thin panels no longer overlap.Float values in panel titles and legends no longer show rounding noise, e.g.
0.30000000000000004shows as0.3.
Bug fixes:
Fix a crash when
hue,coloror another style property is given as a constant(r, g, b)or(r, g, b, a)tuple, which was mistaken for a sequence of dimension names to fuse.Fix a crash when
hueis given as a constant whilecoloris mapped to a dimension. The constant now sets the single colormap thatcolorsweeps the intensity of.Fix log axis tick labels below 1 showing as
0for whole number bases other than 10, e.g.xbase=2.rowandcolnow raise an error for names that aren’t dimensions.A missing
x,yorzvariable now raises an error naming it.Heatmaps no longer warn about aggregating over unmapped dimensions of size 1.
Panel titles now use
row_ticklabelsandcol_ticklabels.
Other¶
benchmark(): addtorch_cuda_sync=True, which synchronizes the current CUDA device at each timing boundary, for accurately timing asynchronous PyTorch work.Pass
compatand other combine options explicitly toxarray.mergeandxarray.concat, so behavior doesn’t change when xarray switches to its new defaults.
v1.3.5 (2026-08-31)¶
Enhancements:
Add top-level
xyz.plotfor directly plotting array-like y-data or x/y pairs, including multiple series and per-series x-values. Plotting options are passed through toinfiniplot().
Bug fixes:
Default to importing
cloudpickledirectly rather thanjoblib.externals.cloudpickle, which recentjoblibversions no longer vendor. The old location is still used as a fallback.
Other:
Add
cloudpickleas an explicit dependency, and demotedaskto a test dependency, since it is only needed for the optional chunked/lazyxarrayloading path.
v1.3.4 (2026-04-30)¶
Enhancements:
Expose
parent_dironcultivate()andcultivate()so the on-disk crop folder can be placed somewhere other than the current working directory.
Bug fixes:
Fix
parse_into_cases()raisingIndexError(or silently returning wrong cases) when bothcombosandcasesare supplied alongside adswhose internal dimension order differs from the case-keys-then-combo-keys insertion order. Per-variable indexers are now built in the variable’s own dim order, and dims not present indsare now treated as new coordinate locations rather than crashing.
v1.3.3 (2026-04-30)¶
Bug fixes:
Fix cultivate silently ignoring
cases.
v1.3.2 (2026-04-30)¶
Bug fixes:
Fix
xyzpy_grownot being shipped in the built wheel/sdist after the v1.3.1 entry-point relocation, which causedxyzpy-growto fail withModuleNotFoundError: No module named 'xyzpy_grow'on the conda-forge feedstock CI. The hatchling build now usesforce-includeto ship the top-levelxyzpy_grow.pyalongside thexyzpypackage.
v1.3.1 (2026-04-29)¶
Bug fixes:
Fix
xyzpy-grow --num-threads Nhaving no effect on numpy / BLAS / OpenMP threading. The CLI entry point lived inside thexyzpypackage, so importing it ranxyzpy/__init__.py(which eagerly importsxarray/numpy) beforemain()could setOMP_NUM_THREADSetc. — the env vars were assigned too late. The entry point is now a top-levelxyzpy_growmodule, so the threading env vars land before any numerical library is imported. The recursive subprocess invocation ingrow_subprocess()was updated to match.
v1.3.0 (2026-03-30)¶
New features:
Add
cultivate()for handling the entire crop lifecycle (annotate, sow, grow, reap) in one function.Add
grow_subprocess()for running batches in isolated subprocesses with resource control — supportsgpus(GPU device pooling viaCUDA_VISIBLE_DEVICES),affinities(CPU pinning viataskset),log(save stdout/stderr per batch),num_workers,num_threads,raise_errors, and custombatch_ids(GH 20)Add
xyzpy-growCLI entry point for drivinggrow_subprocess()from the command lineAdd
RayExecutorandRayGPUExecutorfor Ray-based parallel execution, also usable viaxyzpy-grow --rayAdd
infiniplot()— a new unified plotting interface accessible viads.xyz.plot()that auto-detects plot type (line, scatter, heatmap) from data dimensions - see Plotting for detailsAdd scatter plot support (
data_varvsdata_var) toxyz.plotAdd
cmoke()(OKLCH-based) andcimluv()(HSLuv-based) perceptually uniform single-hue colormap generatorsAdd
MemoryMonitorcontext manager for peak memory tracking, plusget_peak_memory_usage(),report_memory(), andreport_memory_gpu()utilitiesAdd
visualize_tensor()for visualizing arbitrarily high dimensional tensors via 2D projectionsAdd
format_number_with_error()for nicely formatting numbers with known errors
Enhancements:
Add
parse_into_cases(),find_missing_cases(), andis_case_missing()for case-aware dataset filtering, with vectorized internals for large speedups on big parameter spacesAdd
load_batch(),load_result(),save_result()methods for direct batch data accessAdd
delete_all()to cleanly remove a crop directory and reset object stateAdd
missing_onlyoption toharvest_combos()Allow functions to return plain
dict, including for mixed cases+combosAdd
background_color,label,xticks,yticks,xticklabels,yticklabelsoptions toxyz.plotAllow
hlines/vlinesto be strings referencingdata_varsso spans can vary by row and columnLegend and colorbar improvements in
xyz.plotExport
neutral_style()andget_neutral_style()for matplotlib stylingMake various SLURM header options optional in
grow_cluster()Warn instead of erroring on non-picklable constants
Catch confusing bug when combos involve duplicated values
Move build to
pyproject.tomlwith hatchling + hatch-vcs
Bug fixes:
Fix saving of complex datasets with
engine='netcdf'(GH 15)Fix
reap()with incomplete crops when the final batch has fewer items thanbatchsizeFix for recent
joblib(cachedir→locationkwarg)Fix Ellipsis handling bug in crop preparation
v1.2.1 (12th August 2021)¶
Bug fixes:
fix a few bugs related to crops and batchsizes
v1.2.0 (12th August 2021)¶
Enhancements
unified interface for mixing both
casesandcombosadd random shuffling of growing order to load balance on batch systems etc
add
expand_dims()anddrop_sel()
v1.1.0 (25th July 2021)¶
Enhancements
Defer
Crop.reapclean up until after dataset sync (useful if you forget to setoverwrite=True)Capture and print
Crop.grow_clusteroutputadd
visualize_matrixtooladd
cimplecolormap generatorallow
@xyz.labeldecorator to specifyharvester=spruce docs
Bug fixes:
Fix sowing, reaping and merging multiple sets of cases (GH 13)
Fix incomplete crop reaping when there is a non-zero batch remainder size
Fix for futures that raise attribute errors themselves
v1.0.0 (24th October 2020)¶
Breaking changes
Remove all the data processing functionality which can now pretty much all be found in
xarray. This also removes thenumba,scipyandcytoolzdependencies completely.
Enhancements
Generalize (and deprecate)
xyzpy.Crop.qsub_grow()toxyzpy.Crop.grow_cluster()(PR 10)Add SLURM support to
xyzpy.Crop.grow_cluster()(PR 10)Add PBS support to
xyzpy.Crop.grow_cluster()Fix PBS crop submission for job arrays of size 1
Add
xyzpy.save_merge_ds()for manually aggregating datasets to diskAdd
allow_incomplete=Trueoption toxyzpy.Crop.reap()for gathering data even if the crop is not fully grown (GH 7)Make new
Cropinstances by default automatically load information from disk if they have been already prepared/sown (GH 7)Automatically load Crops in the current (or specified) directory with
xyzpy.load_crops().Add
'joblib'and'zarr'as possible engines for saving and loading datasetsAdd utility
xyzpy.getsizeof()to quite accurately get a python objects sizeKeep a running track of covariance using
RunningCovariance.
v0.3.1 (25th January 2019)¶
Bug fixes:
Make sure license is included in sdist/wheel distributions (PR 6)
v0.3.0 (21st January 2019)¶
Breaking changes
Changed plot option
markersize->marker_sizeto match other keywords.
Enhancements
New
Samplerobject - sparsely samplecombosinto apandas.DataFrameDecorate functions directly into
Runnerinstances usinglabel()
v0.2.5 (3rd December 2018)¶
Breaking changes
(GH 5)
combo_runnerkey argumentpoolrenamed toexecutor
Enhancements
(GH 5) Support
multiprocessing.poolincombo_runnerDocument timing and estimation utilities
Use
lokyas the default parallel executorplotting: add
xjitterandyjitter
Bug fixes:
make sure
Crop._batch_remaindersynced with disk.update pytest marking parametrizations to xfail for recent pytest
compatibility updates for dask and numba
fix farming example which wasn’t appearing
v0.2.4 (1st November 2018)¶
Bug fixes:
Various compatibility fixes for plotting functionality
v0.2.3 (4th October 2018)¶
Enhancements:
add
Timeradd
benchmark()add
Benchmarkeradd
RunningStatisticsadd
estimate_from_repeats()
Bug fixes:
various fixes to batch growing and
Cropvarious fixes to plotting
v0.2.2 (7th June 2018)¶
Enhancements:
allow
case_runnerto returnDataset
Bug fixes:
(GH 1) make
numbaan optional dependency
v0.2.1 (27th May 2018)¶
Bug fixes:
docs updates
distribute crop batches more evenly