GithubHelp home page GithubHelp logo

snorkel-team / snorkel-extraction Goto Github PK

View Code? Open in Web Editor NEW
33.0 33.0 27.0 392.69 MB

A previous version of Snorkel focused on information extraction

License: Apache License 2.0

Python 31.06% Shell 0.28% JavaScript 0.86% Jupyter Notebook 67.80%

snorkel-extraction's People

Contributors

4d4stra avatar ajratner avatar aliskin avatar alldefector avatar bhancock8 avatar bryanhe avatar catalinvoss avatar cbockman avatar danich1 avatar debnil avatar dhimmel avatar fsonntag avatar ghaccount avatar hangyao avatar henryre avatar jason-fries avatar jasontlam avatar larskarg avatar lukehsiao avatar moreymat avatar netj avatar paidi avatar paroma avatar pmlandwehr avatar regoldman avatar stephenbach avatar thammegowda avatar vincentschen avatar xiaoling avatar yayitswei avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

snorkel-extraction's Issues

cannot import name 'SnorkelSession'

Just to clarify, my question is in regards to snorkel-extraction package as I am trying to run tutorial notebooks in this repo.

I looked at the other issues about the same problem in Snorkel repo. However I am still not able to figure it out.

I followed all the steps in the installation instruction successfully for snorkel extraction. When I load the tutorials notebook, none of the 'from snorkel' import works. Only 'import snorkel' command works.

I also downloaded the original Snorkel package and the notebooks there works without any problem. I am wondering if it's something new because of the change in Snorkel version? I was interested in running the advanced tutorials under Snorkel Extraction.

Thank you!

A little change about dataloader

When I try to run this tutorial, I found some bugs so I make a little change to dataloader
In numpy.load, the parameter 'allow_pickle' is false, if so, the dataloader will crack, so I changed it.
`class DataLoader(object):
def init(self, data_path='/data/'):
# fix SSL certificate issues when loading images via HTTPS
import ssl; ssl._create_default_https_context = ssl._create_unverified_context

    current_dir = os.getcwd()
    self.data_path = current_dir + data_path

    def load_train_attr(self):
        self.train_mscoco = np.load(self.data_path + 'train_mscoco.npy',allow_pickle=True)
        self.train_vg = np.load(self.data_path + 'train_vg.npy',allow_pickle=True)
        self.train_vg_idx = np.load(self.data_path + 'train_vg_idx.npy',allow_pickle=True)
        self.train_ground = np.load(self.data_path + 'train_ground.npy',allow_pickle=True)

        self.train_object_names = np.load(self.data_path + 'train_object_names.npy',allow_pickle=True)
        self.train_object_x = np.load(self.data_path + 'train_object_x.npy',allow_pickle=True)
        self.train_object_y = np.load(self.data_path + 'train_object_y.npy',allow_pickle=True)
        self.train_object_height = np.load(self.data_path + 'train_object_height.npy',allow_pickle=True)
        self.train_object_width = np.load(self.data_path + 'train_object_width.npy',allow_pickle=True)

    def load_val_attr(self):
        self.val_mscoco = np.load(self.data_path + 'val_mscoco.npy',allow_pickle=True)
        self.val_vg = np.load(self.data_path + 'val_vg.npy',allow_pickle=True)
        self.val_vg_idx = np.load(self.data_path + 'val_vg_idx.npy',allow_pickle=True)
        self.val_ground = np.load(self.data_path + 'val_ground.npy',allow_pickle=True)

        self.val_object_names = np.load(self.data_path + 'val_object_names.npy',allow_pickle=True)
        self.val_object_x = np.load(self.data_path + 'val_object_x.npy',allow_pickle=True)
        self.val_object_y = np.load(self.data_path + 'val_object_y.npy',allow_pickle=True)
        self.val_object_height = np.load(self.data_path + 'val_object_height.npy',allow_pickle=True)
        self.val_object_width = np.load(self.data_path + 'val_object_width.npy',allow_pickle=True)

    load_train_attr(self)
    self.train_num = np.shape(self.train_object_names)[0]
    load_val_attr(self)
    self.val_num = np.shape(self.val_object_names)[0]
    
    with open(self.data_path + 'image_data.json') as json_data:
        self.data = json.load(json_data`

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.