# How to include python files in tensorflow package build?

**URL:** <https://discuss.ai.google.dev/t/how-to-include-python-files-in-tensorflow-package-build/25406>\
**Category:** General Discussion\
**Tags:** help\_request\
**Created:** [May 27, 2021, 3:36am UTC](https://discuss.ai.google.dev/t/how-to-include-python-files-in-tensorflow-package-build/25406 "2021-05-27T03:36:24Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stonepia](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/stonepia/32/6928_2.png) [@Stonepia](https://discuss.ai.google.dev/u/Stonepia)\
**Post date:** [May 27, 2021, 3:36am UTC](https://discuss.ai.google.dev/t/how-to-include-python-files-in-tensorflow-package-build/25406/1 "2021-05-27T03:36:25Z")

</div>

I want to use the following file :

```Python
from tensorflow.python.grappler import model_analyzer

```

But tensorflow by default does not have the `model_analyzer.py` in pip packages. I can’t find the file under `.../envs/tfenv/lib/python3.8/site-packages/tensorflow/python/grappler/`.

However, the `model_analyzer.py` is indeed under the tensorflow’s source directory at `/tensorflow/tensorflow/blob/master/tensorflow/python/grappler/model_analyzer.py`

Why tensorflow ignores these files under grappler directory? How should I build tensorflow for using these files?

---

<div class="post-metadata">

**Author:** ![can](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/can/32/7531_2.png) [@can](https://discuss.ai.google.dev/u/can)\
**Post date:** [May 27, 2021, 10:00am UTC](https://discuss.ai.google.dev/t/how-to-include-python-files-in-tensorflow-package-build/25406/2 "2021-05-27T10:00:29Z")

</div>

> [@Stonepia](#):
>
> `model_analyzer`

I’m assuming that you need to analyze the model, as seen on file name.  
I don’t know is it just the same things as TFMA but since the beginning I’ve been using TFMA for model analyzer. If you want to give it a try, you can install it with;  
`pip install tensorflow-model-analysis`  
Hope it helps.

---

<div class="post-metadata">

**Author:** ![Stonepia](https://d1dlmcr85iqnpo.cloudfront.net/user_avatar/discuss.ai.google.dev/stonepia/32/6928_2.png) [@Stonepia](https://discuss.ai.google.dev/u/Stonepia)\
**Post date:** [May 27, 2021, 10:02am UTC](https://discuss.ai.google.dev/t/how-to-include-python-files-in-tensorflow-package-build/25406/3 "2021-05-27T10:02:33Z")

</div>

Thanks for the reply!  
Actually, I want a slightly different with this. Because I want to modify some code and compile it to see what happens. So that’s why I cannot just use the pip package.
