snorkel-team / snorkel-extraction Goto Github PK
View Code? Open in Web Editor NEWA previous version of Snorkel focused on information extraction
License: Apache License 2.0
A previous version of Snorkel focused on information extraction
License: Apache License 2.0
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!
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`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.