# MultiDataSet's getExampleMetaData() doesn't work

**URL:** <https://community.konduit.ai/t/multidatasets-getexamplemetadata-doesnt-work/2092>\
**Category:** ND4J\
**Created:** [December 3, 2022, 3:32am UTC](https://community.konduit.ai/t/multidatasets-getexamplemetadata-doesnt-work/2092 "2022-12-03T03:32:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![DonaldAlan](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/donaldalan/32/369_2.png) [@DonaldAlan](https://community.konduit.ai/u/DonaldAlan)\
**Post date:** [December 3, 2022, 3:32am UTC](https://community.konduit.ai/t/multidatasets-getexamplemetadata-doesnt-work/2092/1 "2022-12-03T03:32:32Z")

</div>

I created a MultiDataSet and set its meta data:

```auto
    MultiDataSet mds = new MultiDataSet(features, labels, featuresMask, labelMask);
    mds.setExampleMetaData(Arrays.asList(imageFileName.substring(0,imageFileName.length()-4)));
    multiDataSets.add(mds);

```

But when I later retrieved the meta data via

```auto
    final MultiDataSet mds = iterator.next();
    List<Serializable> multiDatasetList = mds.getExampleMetaData();

```

the `multiDataSetList` was null. Why?

Can I use ExampleMetaData to store arbitrary info? If not, then I think MultiDataSet should have methods setUserData(Object obj) and getUserData().

(Sorry if this is the incorrect forum for discussion of nd4j.)

---

<div class="post-metadata">

**Author:** ![treo](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/treo/32/47_2.png) [@treo](https://community.konduit.ai/u/treo)\
**Post date:** [December 3, 2022, 7:27am UTC](https://community.konduit.ai/t/multidatasets-getexamplemetadata-doesnt-work/2092/2 "2022-12-03T07:27:35Z")

</div>

If I remember correctly, that is exactly how it is meant to be used.

And in principle there shouldn’t be anything that results it in being `null` as nothing special is done to the value you set there:

> <https://github.com/deeplearning4j/deeplearning4j/blob/master/nd4j/nd4j-backends/nd4j-api-parent/nd4j-api/src/main/java/org/nd4j/linalg/dataset/MultiDataSet.java#L108-L121>

However, depending on what is going on in the code you didn’t share, it might get lost.

Because it isn’t a feature that is often used, I guess it is possible that some utility methods don’t take proper care of propagating the metadata.
