Giter Club home page Giter Club logo

Comments (12)

jimdowling avatar jimdowling commented on August 24, 2024 2

I broke this out into a new project for our use. It's a branch here:
https://github.com/hopshadoop/facets/tree/pip_install
The pip package is here (package name is 'hopsfacets'):
https://pypi.python.org/pypi/hopsfacets/0.0.2

pip install hopsfacets

Then code looks like this:

from hopsfacets.generic_feature_statistics_generator import GenericFeatureStatisticsGenerator
import base64

gfsg = GenericFeatureStatisticsGenerator()
proto = gfsg.ProtoFromDataFrames([{'name': 'train', 'table': train_data},
{'name': 'test', 'table': test_data}])
protostr = base64.b64encode(proto.SerializeToString()).decode("utf-8")

from IPython.core.display import display, HTML

HTML_TEMPLATE = """

<script>
document.querySelector("#elem").protoInput = "{protostr}";
</script>"""
html = HTML_TEMPLATE.format(protostr=protostr)
display(HTML(html))

from facets.

varunsimhab avatar varunsimhab commented on August 24, 2024 2

Noob here..
When i try to install using what @jimdowling has provided i get :
---->No matching distribution found for tensorflow (from hopsfacets)

Update :works after I did it using anaconda prompt.

But my new error is:

ImportError Traceback (most recent call last)
in ()
----> 1 from hopsfacets.generic_feature_statistics_generator import GenericFeatureStatisticsGenerator
2 import base64
3
4 gfsg = GenericFeatureStatisticsGenerator()
5 proto = gfsg.ProtoFromDataFrames([{'name': 'train', 'table': train_data},

C:\Users\Varun\Anaconda3\lib\site-packages\hopsfacets\generic_feature_statistics_generator.py in ()
19
20 import warnings
---> 21 from base_generic_feature_statistics_generator import BaseGenericFeatureStatisticsGenerator
22 import feature_statistics_pb2 as fs
23

@jimdowling ImportError: No module named 'base_generic_feature_statistics_generator'

from facets.

NitinAgg avatar NitinAgg commented on August 24, 2024 2

Following up on this. Should be an easy fix.

from facets.

kvalev avatar kvalev commented on August 24, 2024 1

Any plans to create an official PyPI package? It seems that the latest version provided by @jimdowling is broken and the one before that is over a year old.

from facets.

dsmilkov avatar dsmilkov commented on August 24, 2024

I did this for https://github.com/PAIR-code/saliency. You can copy setup.cfg and make small edits to setup.py from that repo. Then follow instructions in https://packaging.python.org/en/latest/distributing.html

from facets.

jimdowling avatar jimdowling commented on August 24, 2024

It would also be great to make the python code also available in the default Conda repository. That way we can use the Jupyter extension with our version of Jupyter that doesn't store notebooks on the local filesystem.

from facets.

brandondutra avatar brandondutra commented on August 24, 2024

+1 to a pip install version. Issue #15 recommends a bad user experience for using this in a notebook: no one wants to write html to plot a dataframe.

from facets.

dartdog avatar dartdog commented on August 24, 2024

+1 for a conda package.. It is the main way many Data scientists are managing their environments.. I'm staring at the instructions now and trying to figure out where to put the git clone and how to proceed and for instance whether to installation only to my base coda env (which I use to run the notebook itself or to install in my py36 environment which actually runs most notebooks (while the server runs the base jupyter environment) Any guidance? In short without better install instructions and better example notebooks, I can't even start, specifically with Jupyter notebooks (using Anaconda), which is my primary environment. Is suspect that this may be holding up many others as well.

from facets.

kwlzn avatar kwlzn commented on August 24, 2024

this would be great.

from facets.

jimdowling avatar jimdowling commented on August 24, 2024

@kvalev - our version works with python 2.7. Need to fix it to work with python 3.

from facets.

jameswex avatar jameswex commented on August 24, 2024

Sorry that this issue hasn't been resolved. I've been putting most of my effort into the What-If Tool which is pip-installable and includes the Facets visualizations (but not the python code to generate statistics for Facets Overview).

I would like to create an official pip package for Facets for py2 and py3, but haven't had the bandwidth to take it on yet.

from facets.

jameswex avatar jameswex commented on August 24, 2024

Created facets-overview pip package, uploaded demo notebooks and readme for its usage. Works in py2 and py3. Sorry for the huge delay in this.

from facets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.