dffml icon indicating copy to clipboard operation
dffml copied to clipboard

model: pytorch: base: Update calls to numpy array creation

Open johnandersen777 opened this issue 4 years ago • 5 comments

/home/runner/work/dffml/dffml/model/pytorch/dffml_model_pytorch/pytorch_base.py:181: VisibleDeprecationWarning: Creating an ndarray from ragged nested sequences (which is a list-or-tuple of lists-or-tuples-or ndarrays with different lengths or shapes) is deprecated. If you meant to do this, you must specify 'dtype=object' when creating the ndarray
  x_cols[feature] = np.array(x_cols[feature])

johnandersen777 avatar Feb 17 '21 00:02 johnandersen777

Do you want the warning to be removed simply, since result will still remain the same? or to change the dtype to object? and can i do this?

siddhant150 avatar Feb 18 '21 07:02 siddhant150

@iamapickle yes the issue is up for grabs, see https://intel.github.io/dffml/master/contributing/dev_community.html#who-s-working-on-what

I'm not sure. I haven't looked into it. The numpy docs or source relevant to this deprecation warning should be read to understand what our code should be changed to.

johnandersen777 avatar Feb 18 '21 08:02 johnandersen777

Hi @iamandeepsandhu are you taking up this issue, if not please inform me I will be taking it :)

pratik0316 avatar Feb 18 '21 17:02 pratik0316

@pdxjohnny I think this issue still persists. Can I take up this one ?

snnipetr avatar Feb 17 '22 17:02 snnipetr

Hey @snnipetr !!

Yess!! If you can reproduce the issue then please go ahead... So as I can see there has been some work around this in #1000, so please take a look at that.

Also, as a rule, we don't ask if we can do something, we state our intention to try to do it, then follow these guidelines.

Before making a PR please also take a look at the relevant documentation up here

I hope this helps, please feel free to ask any questions on gitter :)

programmer290399 avatar Feb 18 '22 13:02 programmer290399