Comments (4)
Hi @benrutter, I agree that we don't need to take on the whole repo and there is plenty of low hanging fruit. The errors I am running into are:
da.from_array
-chunks
is inferred as astr
array.rechunk
-chunks
is inferred as astr
dd.from_delayed
returnsDataFrame | Series
and will always require a cast. Not sure how to fix that other than adding helpers.map_blocks
seems to not behave properly as a method in the eyes ofpyright
:
da.from_zarr(core.core_img).map_blocks(
segment_tissue,
dtype=np.uint8,
drop_axis=0,
downsample_factor=tissue_masks_params.downsample_factor,
)
Error:
Argument missing for parameter "func"
If you add explicit func=segment_tissue
, then get an error about self
:
Argument missing for parameter "self"
Perhaps something wacky with @wraps
:
@wraps(map_blocks)
def map_blocks(self, func, *args, **kwargs):
return map_blocks(func, self, *args, **kwargs)
map_blocks
is of the following type. Looks like it is no longer recognized as a method or something.
map_blocks: _Wrapped[(func: Unknown, *args: Unknown, name: Unknown | None = None, token: Unknown | None = None, dtype: Unknown | None = None, chunks: Unknown | None = None, drop_axis: Unknown | None = None, new_axis: Unknown | None = None, enforce_ndim: bool = False, meta: Unknown | None = None, **kwargs: Unknown), Unknown, (self: Array, func: Unknown, *args: Unknown, **kwargs: Unknown), Unknown] | Any
from dask.
We are aware of the issue but there is currently no plan on addressing this from within the currently active contributors. We currently have other (higher) priorities to focus our effort on. Contributions are welcome though if you are interested in helping out.
from dask.
We've been adding type annotations continuously over the past 1-2 years but the code base is very large and ensuring that everything is typed is very difficult. This is rather an incremental process. As was already mentioned, contributions are welcome and I guess this is a comparatively easy topic for a first couple of contributions.
We're using mypy for type checking and the modules that are already fully typed are listed here (not many yet)
Lines 180 to 184 in b2ec1e1
FWIW we're already much further along for dask/distributed https://github.com/dask/distributed/blob/66ced13b33aeafe0d684b4424364c69f0b5a0d43/pyproject.toml#L201-L212
from dask.
@sam-goodwin (or anyone else having issues with type hinting) - are there any specific functions causing problems for you aside from array.rechunk
? I'd be up for spending a little time working through some type annotations at some point - this issues currently labelled 'Add static type annotations' implying for the whole project, which is a great goal, but would be awesome to have a couple priority areas to target.
from dask.
Related Issues (20)
- dask-expr with drop_duplicates messes with dtypes HOT 4
- Azure Functions using dask raise unexpected "AttributeError: 'function' object has no attribute 'fs'" for io operations HOT 6
- Incompatibility with python 3.11.9 HOT 2
- Weird behavior of `rename` HOT 3
- Add determinant(like scipy.linalg.det/slogdet) to dask.array.linalg
- FileExpired exception when reading parquet from a Minio bucket using Dask HOT 6
- ValueError: memoryview is too large (dask.array.histogram) HOT 4
- KeyError on existing column after executing `reset_index` and `set_index` HOT 2
- db.to_dataframe, throws: TypeError: 'coroutine' object is not iterable HOT 2
- Substantial memory usage in dask.order
- Some DataFrame API methods don't have docstrings HOT 1
- Handle 10GB CSV file in 8GB Ram machine
- NumPy 2.0 support HOT 14
- Control order of execution with query planner HOT 2
- Unable to get series when previously filtered with datetime slice HOT 3
- Backport Python import error patch to 2024.2.1
- Turning off query planning is difficult HOT 1
- Unique Operation fails on dataframe repartitioned using set index after resetting the index HOT 1
- dd.concat returns empty tuple when axis=1 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dask.