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)
- TypeError: can only concatenate str (not "traceback") to str
- ⚠️ Upstream CI failed ⚠️
- Add support for `pip install dask[jobqueue]` HOT 4
- Mean fails to compute for very large column of pyarrow type HOT 1
- Previously working time series resampling breaks in new version of Dask HOT 3
- When using PyArrow dtypes, aggregations create NaNs of unexpected type HOT 1
- Column with object dtype get converted to string when selecting the column HOT 1
- aggregate function that operates on vector(array of numeric) data
- Dask .head() returns error as .compute returns ok! HOT 2
- API docs missing for `read_csv`, `read_fwf` and `read_table` HOT 3
- New CI failure showing up in fsspec HOT 2
- Overlap with `new_axis` option is not trimmed correctly HOT 1
- ValueError: An error occurred while calling the read_csv method registered to the pandas backend HOT 2
- add a api load dataset from [huggingface datasets] HOT 4
- map_blocks returning pd.DataFrame fails with block_info parameter HOT 4
- Couple of sparse tests are failing HOT 1
- I'm not sure what ’b_dict‘ is, I couldn't find any relevant content HOT 1
- Release GH action needs to be run twice HOT 1
- gpuCI failing due to `pytest` warning HOT 5
- pandas>=2.0.0 incompatibility ?
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.