Comments (6)
I'm also getting a similar error here:
from torch_geometric.utils import k_hop_subgraph
# here we take all connected nodes with k hops
k = 1
node_idx, edge_index, mapping, edge_mask = k_hop_subgraph(
node_idx,
k,
data.edge_index,
relabel_nodes=False
)
OSError: dlopen(/Users/ignaciotalaveracepeda/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch_sparse/_convert_cpu.so, 6): Symbol not found: __ZNK2at6Tensor6deviceEv
Referenced from: /Users/ignaciotalaveracepeda/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch_sparse/_convert_cpu.so
Expected in: /Users/ignaciotalaveracepeda/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch/lib/libtorch_cpu.dylib
in /Users/ignaciotalaveracepeda/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch_sparse/_convert_cpu.so
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-36-eb2e6b5dea66> in <module>
----> 1 from torch_geometric.utils import k_hop_subgraph
2 # here we take all connected nodes with k hops
3 k = 1
4 node_idx, edge_index, mapping, edge_mask = k_hop_subgraph(
5 node_idx,
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch_geometric/__init__.py in <module>
3
4 from .debug import is_debug_enabled, debug, set_debug
----> 5 import torch_geometric.data
6 import torch_geometric.transforms
7 import torch_geometric.utils
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch_geometric/data/__init__.py in <module>
----> 1 from .data import Data
2 from .temporal import TemporalData
3 from .batch import Batch
4 from .dataset import Dataset
5 from .in_memory_dataset import InMemoryDataset
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch_geometric/data/data.py in <module>
6 import torch
7 import torch_geometric
----> 8 from torch_sparse import coalesce, SparseTensor
9 from torch_geometric.utils import (contains_isolated_nodes,
10 contains_self_loops, is_undirected)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch_sparse/__init__.py in <module>
13 ]:
14 torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
---> 15 f'{library}_{suffix}', [osp.dirname(__file__)]).origin)
16
17 if torch.cuda.is_available(): # pragma: no cover
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch/_ops.py in load_library(self, path)
102 # static (global) initialization code in order to register custom
103 # operators with the JIT.
--> 104 ctypes.CDLL(path)
105 self.loaded_libraries.add(path)
106
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/ctypes/__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
362
363 if handle is None:
--> 364 self._handle = _dlopen(self._name, mode)
365 else:
366 self._handle = handle
OSError: dlopen(/Users/ignaciotalaveracepeda/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch_sparse/_convert_cpu.so, 6): Symbol not found: __ZNK2at6Tensor6deviceEv
Referenced from: /Users/ignaciotalaveracepeda/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch_sparse/_convert_cpu.so
Expected in: /Users/ignaciotalaveracepeda/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch/lib/libtorch_cpu.dylib
in /Users/ignaciotalaveracepeda/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch_sparse/_convert_cpu.so
from argilla.
Also getting it in Tutorial 4:
import re
from snorkel.labeling import labeling_function, LabelingFunction
from snorkel.labeling.lf.nlp import nlp_labeling_function
from snorkel.preprocess import preprocessor
from snorkel.preprocess.nlp import SpacyPreprocessor
from textblob import TextBlob
ABSTAIN = -1
HAM = 0
SPAM = 1
# Keyword searches
@labeling_function()
def check(x):
return SPAM if "check" in x.text.lower() else ABSTAIN
@labeling_function()
def check_out(x):
return SPAM if "check out" in x.text.lower() else ABSTAIN
# Heuristics
@labeling_function()
def short_comment(x):
"""Ham comments are often short, such as 'cool video!'"""
return HAM if len(x.text.split()) < 5 else ABSTAIN
# List of keywords
def keyword_lookup(x, keywords, label):
if any(word in x.text.lower() for word in keywords):
return label
return ABSTAIN
def make_keyword_lf(keywords, label=SPAM):
return LabelingFunction(
name=f"keyword_{keywords[0]}",
f=keyword_lookup,
resources=dict(keywords=keywords, label=label),
)
"""Spam comments talk about 'my channel', 'my video', etc."""
keyword_my = make_keyword_lf(keywords=["my"])
"""Spam comments ask users to subscribe to their channels."""
keyword_subscribe = make_keyword_lf(keywords=["subscribe"])
"""Spam comments post links to other channels."""
keyword_link = make_keyword_lf(keywords=["http"])
"""Spam comments make requests rather than commenting."""
keyword_please = make_keyword_lf(keywords=["please", "plz"])
"""Ham comments actually talk about the video's content."""
keyword_song = make_keyword_lf(keywords=["song"], label=HAM)
# Pattern matching with regex
@labeling_function()
def regex_check_out(x):
return SPAM if re.search(r"check.*out", x.text, flags=re.I) else ABSTAIN
# Third party models (TextBlob and spaCy)
# TextBlob
@preprocessor(memoize=True)
def textblob_sentiment(x):
scores = TextBlob(x.text)
x.polarity = scores.sentiment.polarity
x.subjectivity = scores.sentiment.subjectivity
return x
@labeling_function(pre=[textblob_sentiment])
def textblob_subjectivity(x):
return HAM if x.subjectivity >= 0.5 else ABSTAIN
@labeling_function(pre=[textblob_sentiment])
def textblob_polarity(x):
return HAM if x.polarity >= 0.9 else ABSTAIN
# spaCy
# There are two different methods to use spaCy:
# Method 1:
spacy = SpacyPreprocessor(text_field="text", doc_field="doc", memoize=True)
@labeling_function(pre=[spacy])
def has_person(x):
"""Ham comments mention specific people and are short."""
if len(x.doc) < 20 and any([ent.label_ == "PERSON" for ent in x.doc.ents]):
return HAM
else:
return ABSTAIN
# Method 2:
@nlp_labeling_function()
def has_person_nlp(x):
"""Ham comments mention specific people."""
if any([ent.label_ == "PERSON" for ent in x.doc.ents]):
return HAM
else:
return ABSTAIN
OSError: dlopen(/Users/ignaciotalaveracepeda/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch_scatter/_scatter_cpu.so, 6): Symbol not found: __ZN2at8GradMode10is_enabledEv
Referenced from: /Users/ignaciotalaveracepeda/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch_scatter/_scatter_cpu.so
Expected in: /Users/ignaciotalaveracepeda/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch/lib/libtorch_cpu.dylib
in /Users/ignaciotalaveracepeda/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch_scatter/_scatter_cpu.so
---------------------------------------------------------------------------
OSError Traceback (most recent call last)
<ipython-input-2-e815fa8a2051> in <module>
84 # There are two different methods to use spaCy:
85 # Method 1:
---> 86 spacy = SpacyPreprocessor(text_field="text", doc_field="doc", memoize=True)
87
88 @labeling_function(pre=[spacy])
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/snorkel/preprocess/nlp.py in __init__(self, text_field, doc_field, language, disable, pre, memoize, memoize_key, gpu)
70 if self.gpu:
71 spacy.prefer_gpu()
---> 72 self._nlp = spacy.load(language, disable=disable or [])
73
74 def run(self, text: str) -> FieldMap: # type: ignore
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/spacy/__init__.py in load(name, vocab, disable, exclude, config)
49 """
50 return util.load_model(
---> 51 name, vocab=vocab, disable=disable, exclude=exclude, config=config
52 )
53
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/spacy/util.py in load_model(name, vocab, disable, exclude, config)
322 return get_lang_class(name.replace("blank:", ""))()
323 if is_package(name): # installed as package
--> 324 return load_model_from_package(name, **kwargs)
325 if Path(name).exists(): # path to model data directory
326 return load_model_from_path(Path(name), **kwargs)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/spacy/util.py in load_model_from_package(name, vocab, disable, exclude, config)
355 """
356 cls = importlib.import_module(name)
--> 357 return cls.load(vocab=vocab, disable=disable, exclude=exclude, config=config)
358
359
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/en_core_web_sm/__init__.py in load(**overrides)
8
9 def load(**overrides):
---> 10 return load_model_from_init_py(__file__, **overrides)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/spacy/util.py in load_model_from_init_py(init_file, vocab, disable, exclude, config)
520 disable=disable,
521 exclude=exclude,
--> 522 config=config,
523 )
524
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/spacy/util.py in load_model_from_path(model_path, meta, vocab, disable, exclude, config)
389 config_path = model_path / "config.cfg"
390 config = load_config(config_path, overrides=dict_to_dot(config))
--> 391 nlp = load_model_from_config(config, vocab=vocab, disable=disable, exclude=exclude)
392 return nlp.from_disk(model_path, exclude=exclude)
393
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/spacy/util.py in load_model_from_config(config, vocab, disable, exclude, auto_fill, validate)
432 exclude=exclude,
433 auto_fill=auto_fill,
--> 434 validate=validate,
435 )
436 return nlp
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/spacy/language.py in from_config(cls, config, vocab, disable, exclude, meta, auto_fill, validate)
1637 # then we would load them twice at runtime: once when we make from config,
1638 # and then again when we load from disk.
-> 1639 nlp = lang_cls(vocab=vocab, create_tokenizer=create_tokenizer, meta=meta)
1640 if after_creation is not None:
1641 nlp = after_creation(nlp)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/spacy/language.py in __init__(self, vocab, max_length, meta, create_tokenizer, batch_size, **kwargs)
148 # points. The factory decorator applied to these functions takes care
149 # of the rest.
--> 150 util.registry._entry_point_factories.get_all()
151
152 self._config = DEFAULT_CONFIG.merge(self.default_config)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/catalogue/__init__.py in get_all(self)
106 result = {}
107 if self.entry_points:
--> 108 result.update(self.get_entry_points())
109 for keys, value in REGISTRY.items():
110 if len(self.namespace) == len(keys) - 1 and all(
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/catalogue/__init__.py in get_entry_points(self)
121 result = {}
122 for entry_point in AVAILABLE_ENTRY_POINTS.get(self.entry_point_namespace, []):
--> 123 result[entry_point.name] = entry_point.load()
124 return result
125
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/catalogue/_importlib_metadata/__init__.py in load(self)
92 """
93 match = self.pattern.match(self.value)
---> 94 module = import_module(match.group('module'))
95 attrs = filter(None, (match.group('attr') or '').split('.'))
96 return functools.reduce(getattr, attrs, module)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/importlib/__init__.py in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
128
129
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/importlib/_bootstrap.py in _gcd_import(name, package, level)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/importlib/_bootstrap.py in _find_and_load(name, import_)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/importlib/_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/importlib/_bootstrap.py in _gcd_import(name, package, level)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/importlib/_bootstrap.py in _find_and_load(name, import_)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/importlib/_bootstrap.py in _find_and_load_unlocked(name, import_)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/importlib/_bootstrap.py in _load_unlocked(spec)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/importlib/_bootstrap_external.py in exec_module(self, module)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/importlib/_bootstrap.py in _call_with_frames_removed(f, *args, **kwds)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/spacy_transformers/__init__.py in <module>
----> 1 from . import architectures
2 from . import annotation_setters
3 from . import span_getters
4 from .layers import TransformerModel
5 from .pipeline_component import Transformer, install_extensions
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/spacy_transformers/architectures.py in <module>
3 from thinc.types import Ragged, Floats2d
4 from spacy.tokens import Doc
----> 5 from .layers import TransformerModel, TransformerListener
6 from .layers import trfs2arrays, split_trf_batch
7 from .util import registry
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/spacy_transformers/layers/__init__.py in <module>
----> 1 from .listener import TransformerListener
2 from .transformer_model import TransformerModel
3 from .split_trf import split_trf_batch
4 from .trfs2arrays import trfs2arrays
5
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/spacy_transformers/layers/listener.py in <module>
2 from thinc.api import Model
3 from spacy.tokens import Doc
----> 4 from ..data_classes import TransformerData
5
6
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/spacy_transformers/data_classes.py in <module>
9 import srsly
10
---> 11 from .util import transpose_list
12 from .align import get_token_positions
13
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/spacy_transformers/util.py in <module>
2 from pathlib import Path
3 import random
----> 4 from transformers import AutoModel, AutoTokenizer
5 from transformers.tokenization_utils import BatchEncoding
6 from transformers.tokenization_utils_fast import PreTrainedTokenizerFast
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/importlib/_bootstrap.py in _handle_fromlist(module, fromlist, import_, recursive)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/transformers/__init__.py in __getattr__(self, name)
2707 if name == "__version__":
2708 return __version__
-> 2709 return super().__getattr__(name)
2710
2711 sys.modules[__name__] = _LazyModule(__name__, _import_structure)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/transformers/file_utils.py in __getattr__(self, name)
1820 elif name in self._class_to_module.keys():
1821 module = self._get_module(self._class_to_module[name])
-> 1822 value = getattr(module, name)
1823 else:
1824 raise AttributeError(f"module {self.__name__} has no attribute {name}")
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/transformers/file_utils.py in __getattr__(self, name)
1819 value = self._get_module(name)
1820 elif name in self._class_to_module.keys():
-> 1821 module = self._get_module(self._class_to_module[name])
1822 value = getattr(module, name)
1823 else:
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/transformers/models/auto/__init__.py in _get_module(self, module_name)
200
201 def _get_module(self, module_name: str):
--> 202 return importlib.import_module("." + module_name, self.__name__)
203
204 sys.modules[__name__] = _LazyModule(__name__, _import_structure)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/importlib/__init__.py in import_module(name, package)
125 break
126 level += 1
--> 127 return _bootstrap._gcd_import(name[level:], package, level)
128
129
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/transformers/models/auto/modeling_auto.py in <module>
251 )
252 from ..t5.modeling_t5 import T5ForConditionalGeneration, T5Model
--> 253 from ..tapas.modeling_tapas import (
254 TapasForMaskedLM,
255 TapasForQuestionAnswering,
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/transformers/models/tapas/modeling_tapas.py in <module>
49 # soft dependency
50 if is_scatter_available():
---> 51 from torch_scatter import scatter
52
53 logger = logging.get_logger(__name__)
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch_scatter/__init__.py in <module>
12 for library in ['_version', '_scatter', '_segment_csr', '_segment_coo']:
13 torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
---> 14 f'{library}_{suffix}', [osp.dirname(__file__)]).origin)
15 except AttributeError as e:
16 if os.getenv('BUILD_DOCS', '0') != '1':
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch/_ops.py in load_library(self, path)
102 # static (global) initialization code in order to register custom
103 # operators with the JIT.
--> 104 ctypes.CDLL(path)
105 self.loaded_libraries.add(path)
106
~/anaconda3/envs/rubrix0.1.1/lib/python3.7/ctypes/__init__.py in __init__(self, name, mode, handle, use_errno, use_last_error)
362
363 if handle is None:
--> 364 self._handle = _dlopen(self._name, mode)
365 else:
366 self._handle = handle
OSError: dlopen(/Users/ignaciotalaveracepeda/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch_scatter/_scatter_cpu.so, 6): Symbol not found: __ZN2at8GradMode10is_enabledEv
Referenced from: /Users/ignaciotalaveracepeda/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch_scatter/_scatter_cpu.so
Expected in: /Users/ignaciotalaveracepeda/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch/lib/libtorch_cpu.dylib
in /Users/ignaciotalaveracepeda/anaconda3/envs/rubrix0.1.1/lib/python3.7/site-packages/torch_scatter/_scatter_cpu.so
from argilla.
from argilla.
What scares me is that I've made all of this from a fresh environment, so we may need some code changing.
from argilla.
Not sure we need to change anything on core Rubrix codebase. It might be the case for the tutorial or the pip install on that tutorial, as is certainly related to core operating system libs for torch* and we dont have torch as a Rubrix dep.
from argilla.
Missmatched pytorch version. See rusty1s/pytorch_sparse#85 (comment)
1.9.0 installed VS 1.8.0 defined in pytorch_geometics
PR incoming
from argilla.
Related Issues (20)
- [FEATURE] streamline `OAuth` deployment on `Spaces` HOT 1
- [FEATURE] Show record status in the UI
- [ENHANCEMENT] Show panels when the record list is empty HOT 1
- [FEATURE] change `black` formatting line-length to the default`88` HOT 1
- [FEATURE] Support highlight with advanced queries HOT 1
- [FEATURE] add `FastAPI` endpoint metrics to `telemetry`
- [DOCS] Task distribution how-to guide
- [DOCS] Update flow to update settings HOT 2
- [FEATURE] Access questions by name
- [BUG-UI/UX] Odd behaviour when deleting Spans when using multiple SpanQuestions HOT 1
- Please add a LICENSE file at the top of the project repo HOT 1
- [DOCS] Update admonitions Token tutorial
- [DOCS] Add server configuration and database migration docs to v2
- [DOCS] update phrasing from readme and docs
- [DOCS] add embedded Datasetviewer examples to blogs and docs
- [FEATURE] define `huggingface_hub` `telemetry` features for UI behavior
- [BUG-python/deployment] Copying records with suggestions produces an `UnprocessableEntityError` HOT 1
- [TASK] Add support for `ImageField` at argilla-server
- [TASK] Add support to `ImageField` at argilla SDK
- [TASK] Check records using `ImageField` with URLs using `HTTP` protocol serving application from `HTTPS`
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from argilla.