after_merge stringlengths 28 79.6k | before_merge stringlengths 20 79.6k | url stringlengths 38 71 | full_traceback stringlengths 43 922k | traceback_type stringclasses 555
values |
|---|---|---|---|---|
def to_representation(self, obj):
serializer_class = None
if type(self) is UnifiedJobTemplateSerializer:
if isinstance(obj, Project):
serializer_class = ProjectSerializer
elif isinstance(obj, InventorySource):
serializer_class = InventorySourceSerializer
elif isin... | def to_representation(self, obj):
serializer_class = None
if type(self) is UnifiedJobTemplateSerializer:
if isinstance(obj, Project):
serializer_class = ProjectSerializer
elif isinstance(obj, InventorySource):
serializer_class = InventorySourceSerializer
elif isin... | https://github.com/ansible/awx/issues/1546 | AttributeError: 'super' object has no attribute 'accessible_pk_qs'
2018-03-13 19:49:42,026 ERROR django.request Internal Server Error: /api/v2/inventory_sources/
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response =... | AttributeError |
def to_internal_value(self, data):
# TODO: remove when API v1 is removed
if "credential_type" not in data and self.version == 1:
# If `credential_type` is not provided, assume the payload is a
# v1 credential payload that specifies a `kind` and a flat list
# of field values
#
... | def to_internal_value(self, data):
# TODO: remove when API v1 is removed
if "credential_type" not in data and self.version == 1:
# If `credential_type` is not provided, assume the payload is a
# v1 credential payload that specifies a `kind` and a flat list
# of field values
#
... | https://github.com/ansible/awx/issues/1546 | AttributeError: 'super' object has no attribute 'accessible_pk_qs'
2018-03-13 19:49:42,026 ERROR django.request Internal Server Error: /api/v2/inventory_sources/
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response =... | AttributeError |
def __enum_validate__(validator, enums, instance, schema):
if instance not in enums:
yield jsonschema.exceptions.ValidationError(
_("'{value}' is not one of ['{allowed_values}']").format(
value=instance, allowed_values="', '".join(enums)
)
)
| def __enum_validate__(validator, enums, instance, schema):
if instance not in enums:
yield jsonschema.exceptions.ValidationError(
_("'%s' is not one of ['%s']") % (instance, "', '".join(enums))
)
| https://github.com/ansible/awx/issues/1546 | AttributeError: 'super' object has no attribute 'accessible_pk_qs'
2018-03-13 19:49:42,026 ERROR django.request Internal Server Error: /api/v2/inventory_sources/
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response =... | AttributeError |
def validate(self, value, model_instance):
if (
isinstance(value, dict)
and "dependencies" in value
and not model_instance.managed_by_tower
):
raise django_exceptions.ValidationError(
_("'dependencies' is not supported for custom credentials."),
code="inva... | def validate(self, value, model_instance):
if (
isinstance(value, dict)
and "dependencies" in value
and not model_instance.managed_by_tower
):
raise django_exceptions.ValidationError(
_("'dependencies' is not supported for custom credentials."),
code="inva... | https://github.com/ansible/awx/issues/1546 | AttributeError: 'super' object has no attribute 'accessible_pk_qs'
2018-03-13 19:49:42,026 ERROR django.request Internal Server Error: /api/v2/inventory_sources/
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response =... | AttributeError |
def validate(self, value, model_instance):
super(CredentialTypeInjectorField, self).validate(value, model_instance)
# make sure the inputs are valid first
try:
CredentialTypeInputField().validate(model_instance.inputs, model_instance)
except django_exceptions.ValidationError:
# If `mode... | def validate(self, value, model_instance):
super(CredentialTypeInjectorField, self).validate(value, model_instance)
# make sure the inputs are valid first
try:
CredentialTypeInputField().validate(model_instance.inputs, model_instance)
except django_exceptions.ValidationError:
# If `mode... | https://github.com/ansible/awx/issues/1546 | AttributeError: 'super' object has no attribute 'accessible_pk_qs'
2018-03-13 19:49:42,026 ERROR django.request Internal Server Error: /api/v2/inventory_sources/
Traceback (most recent call last):
File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/exception.py", line 41, in inner
response =... | AttributeError |
def update_raw_data(self, data):
data = super(JobRelaunch, self).update_raw_data(data)
try:
obj = self.get_object()
except PermissionDenied:
return data
if obj:
needed_passwords = obj.passwords_needed_to_start
if needed_passwords:
data["credential_passwords"] ... | def update_raw_data(self, data):
data = super(JobRelaunch, self).update_raw_data(data)
try:
obj = self.get_object()
except PermissionDenied:
return data
if obj:
needed_passwords = obj.passwords_needed_to_start
if needed_passwords:
data["credential_passwords"] ... | https://github.com/ansible/awx/issues/1393 | web_1 | error: [Errno 111] Connection refused
web_1 | 2018-02-28 15:04:22,988 ERROR django.request Internal Server Error: /api/v2/instances/1/
web_1 | Traceback (most recent call last):
web_1 | File "/var/lib/awx/venv/awx/lib/python2.7/site-packages/django/core/handlers/exception.py", l... | socket.error |
def _get_enabled(self, from_dict, default=None):
"""
Retrieve the enabled state from the given dict of host variables.
The enabled variable may be specified as 'foo.bar', in which case
the lookup will traverse into nested dicts, equivalent to:
from_dict.get('foo', {}).get('bar', default)
"""
... | def _get_enabled(self, from_dict, default=None):
"""
Retrieve the enabled state from the given dict of host variables.
The enabled variable may be specified as 'foo.bar', in which case
the lookup will traverse into nested dicts, equivalent to:
from_dict.get('foo', {}).get('bar', default)
"""
... | https://github.com/ansible/awx/issues/705 | 2017-11-23 01:44:04,433 INFO awx.main.commands.inventory_import Updating inventory 2: CF
2017-11-23 01:44:04,472 INFO awx.main.commands.inventory_import Reading Ansible inventory source: /usr/lib/python2.7/site-packages/awx/plugins/inventory/cloudforms.py
2017-11-23 01:44:34,698 INFO awx.main.commands.inven... | django.core.exceptions.ValidationError |
def _default_steadystate_args():
def_args = {
"sparse": True,
"use_rcm": False,
"use_wbm": False,
"weight": None,
"use_precond": False,
"all_states": False,
"M": None,
"x0": None,
"drop_tol": 1e-4,
"fill_factor": 100,
"diag_pivo... | def _default_steadystate_args():
def_args = {
"sparse": True,
"use_rcm": False,
"use_wbm": False,
"weight": None,
"use_precond": False,
"all_states": False,
"M": None,
"x0": None,
"drop_tol": 1e-4,
"fill_factor": 100,
"diag_pivo... | https://github.com/qutip/qutip/issues/862 | ..................................................
======================================================================
ERROR: Steady state: Thermal qubit - power-gmres solver
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/shahnawaz/miniconda3/li... | ValueError |
def _mkl_steadystate_args():
def_args = {
"max_iter_refine": 10,
"scaling_vectors": True,
"weighted_matching": True,
"return_info": False,
"info": _empty_info_dict(),
"verbose": False,
"solver": "mkl",
"use_rcm": False,
"use_wbm": False,
... | def _mkl_steadystate_args():
def_args = {
"max_iter_refine": 10,
"scaling_vectors": True,
"weighted_matching": True,
"return_info": False,
"info": _empty_info_dict(),
"verbose": False,
"solver": "mkl",
"use_rcm": False,
"use_wbm": False,
... | https://github.com/qutip/qutip/issues/862 | ..................................................
======================================================================
ERROR: Steady state: Thermal qubit - power-gmres solver
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/shahnawaz/miniconda3/li... | ValueError |
def steadystate(A, c_op_list=[], method="direct", solver=None, **kwargs):
"""Calculates the steady state for quantum evolution subject to the
supplied Hamiltonian or Liouvillian operator and (if given a Hamiltonian) a
list of collapse operators.
If the user passes a Hamiltonian then it, along with the ... | def steadystate(A, c_op_list=[], method="direct", solver=None, **kwargs):
"""Calculates the steady state for quantum evolution subject to the
supplied Hamiltonian or Liouvillian operator and (if given a Hamiltonian) a
list of collapse operators.
If the user passes a Hamiltonian then it, along with the ... | https://github.com/qutip/qutip/issues/862 | ..................................................
======================================================================
ERROR: Steady state: Thermal qubit - power-gmres solver
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/shahnawaz/miniconda3/li... | ValueError |
def _steadystate_direct_sparse(L, ss_args):
"""
Direct solver that uses scipy sparse matrices
"""
if settings.debug:
logger.debug("Starting direct LU solver.")
dims = L.dims[0]
n = int(np.sqrt(L.shape[0]))
b = np.zeros(n**2, dtype=complex)
b[0] = ss_args["weight"]
if ss_arg... | def _steadystate_direct_sparse(L, ss_args):
"""
Direct solver that uses scipy sparse matrices
"""
if settings.debug:
logger.debug("Starting direct LU solver.")
dims = L.dims[0]
n = int(np.sqrt(L.shape[0]))
b = np.zeros(n**2, dtype=complex)
b[0] = ss_args["weight"]
if ss_arg... | https://github.com/qutip/qutip/issues/862 | ..................................................
======================================================================
ERROR: Steady state: Thermal qubit - power-gmres solver
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/shahnawaz/miniconda3/li... | ValueError |
def _steadystate_iterative(L, ss_args):
"""
Iterative steady state solver using the GMRES, LGMRES, or BICGSTAB
algorithm and a sparse incomplete LU preconditioner.
"""
ss_iters = {"iter": 0}
def _iter_count(r):
ss_iters["iter"] += 1
return
if settings.debug:
logger.... | def _steadystate_iterative(L, ss_args):
"""
Iterative steady state solver using the GMRES, LGMRES, or BICGSTAB
algorithm and a sparse incomplete LU preconditioner.
"""
ss_iters = {"iter": 0}
def _iter_count(r):
ss_iters["iter"] += 1
return
if settings.debug:
logger.... | https://github.com/qutip/qutip/issues/862 | ..................................................
======================================================================
ERROR: Steady state: Thermal qubit - power-gmres solver
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/shahnawaz/miniconda3/li... | ValueError |
def _steadystate_power(L, ss_args):
"""
Inverse power method for steady state solving.
"""
ss_args["info"].pop("weight", None)
if settings.debug:
logger.debug("Starting iterative inverse-power method solver.")
tol = ss_args["tol"]
mtol = ss_args["mtol"]
if mtol is None:
m... | def _steadystate_power(L, ss_args):
"""
Inverse power method for steady state solving.
"""
ss_args["info"].pop("weight", None)
if settings.debug:
logger.debug("Starting iterative inverse-power method solver.")
tol = ss_args["tol"]
maxiter = ss_args["maxiter"]
use_solver(assumeSo... | https://github.com/qutip/qutip/issues/862 | ..................................................
======================================================================
ERROR: Steady state: Thermal qubit - power-gmres solver
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/shahnawaz/miniconda3/li... | ValueError |
def build_preconditioner(A, c_op_list=[], **kwargs):
"""Constructs a iLU preconditioner necessary for solving for
the steady state density matrix using the iterative linear solvers
in the 'steadystate' function.
Parameters
----------
A : qobj
A Hamiltonian or Liouvillian operator.
... | def build_preconditioner(A, c_op_list=[], **kwargs):
"""Constructs a iLU preconditioner necessary for solving for
the steady state density matrix using the iterative linear solvers
in the 'steadystate' function.
Parameters
----------
A : qobj
A Hamiltonian or Liouvillian operator.
... | https://github.com/qutip/qutip/issues/862 | ..................................................
======================================================================
ERROR: Steady state: Thermal qubit - power-gmres solver
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/shahnawaz/miniconda3/li... | ValueError |
def _pseudo_inverse_sparse(L, rhoss, w=None, **pseudo_args):
"""
Internal function for computing the pseudo inverse of an Liouvillian using
sparse matrix methods. See pseudo_inverse for details.
"""
N = np.prod(L.dims[0][0])
rhoss_vec = operator_to_vector(rhoss)
tr_op = tensor([identity(n... | def _pseudo_inverse_sparse(L, rhoss, w=None, **pseudo_args):
"""
Internal function for computing the pseudo inverse of an Liouvillian using
sparse matrix methods. See pseudo_inverse for details.
"""
N = np.prod(L.dims[0][0])
rhoss_vec = operator_to_vector(rhoss)
tr_op = tensor([identity(n... | https://github.com/qutip/qutip/issues/862 | ..................................................
======================================================================
ERROR: Steady state: Thermal qubit - power-gmres solver
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/shahnawaz/miniconda3/li... | ValueError |
def pseudo_inverse(L, rhoss=None, w=None, sparse=True, **kwargs):
"""
Compute the pseudo inverse for a Liouvillian superoperator, optionally
given its steady state density matrix (which will be computed if not
given).
Returns
-------
L : Qobj
A Liouvillian superoperator for which to... | def pseudo_inverse(L, rhoss=None, w=None, sparse=True, **kwargs):
"""
Compute the pseudo inverse for a Liouvillian superoperator, optionally
given its steady state density matrix (which will be computed if not given).
Returns
-------
L : Qobj
A Liouvillian superoperator for which to com... | https://github.com/qutip/qutip/issues/862 | ..................................................
======================================================================
ERROR: Steady state: Thermal qubit - power-gmres solver
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/shahnawaz/miniconda3/li... | ValueError |
def _rhs_rho_milstein_implicit(L, rho_t, t, A, dt, ddW, d1, d2, args):
"""
Drift implicit Milstein (theta = 1/2, eta = 0)
Wang, X., Gan, S., & Wang, D. (2012).
A family of fully implicit Milstein methods for stiff stochastic differential
equations with multiplicative noise.
BIT Numerical Mathema... | def _rhs_rho_milstein_implicit(L, rho_t, t, A, dt, ddW, d1, d2, args):
"""
Drift implicit Milstein (theta = 1/2, eta = 0)
Wang, X., Gan, S., & Wang, D. (2012).
A family of fully implicit Milstein methods for stiff stochastic differential
equations with multiplicative noise.
BIT Numerical Mathema... | https://github.com/qutip/qutip/issues/862 | ..................................................
======================================================================
ERROR: Steady state: Thermal qubit - power-gmres solver
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/shahnawaz/miniconda3/li... | ValueError |
def _rhs_rho_taylor_15_implicit(L, rho_t, t, A, dt, ddW, d1, d2, args):
"""
Drift implicit Taylor 1.5 (alpha = 1/2, beta = doesn't matter)
Chaptert 12.2 Eq. (2.18) in Numerical Solution of Stochastic Differential Equations
By Peter E. Kloeden, Eckhard Platen
"""
dW = ddW[:, 0]
A = A[0]
... | def _rhs_rho_taylor_15_implicit(L, rho_t, t, A, dt, ddW, d1, d2, args):
"""
Drift implicit Taylor 1.5 (alpha = 1/2, beta = doesn't matter)
Chaptert 12.2 Eq. (2.18) in Numerical Solution of Stochastic Differential Equations
By Peter E. Kloeden, Eckhard Platen
"""
dW = ddW[:, 0]
A = A[0]
... | https://github.com/qutip/qutip/issues/862 | ..................................................
======================================================================
ERROR: Steady state: Thermal qubit - power-gmres solver
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/shahnawaz/miniconda3/li... | ValueError |
def _blas_info():
config = np.__config__
blas_info = config.blas_opt_info
_has_lib_key = "libraries" in blas_info.keys()
blas = None
if hasattr(config, "mkl_info") or (
_has_lib_key and any("mkl" in lib for lib in blas_info["libraries"])
):
blas = "INTEL MKL"
elif hasattr(con... | def _blas_info():
config = np.__config__
blas_info = config.blas_opt_info
blas = None
if hasattr(config, "mkl_info") or any(
"mkl" in lib for lib in blas_info["libraries"]
):
blas = "INTEL MKL"
elif hasattr(config, "openblas_info") or any(
"openblas" in lib for lib in bla... | https://github.com/qutip/qutip/issues/552 | Python 3.5.2 (v3.5.2:4def2a2901a5, Jun 26 2016, 10:47:25)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
import qutip
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/oliviadimatteo/tomo_test/qutip/qutip/__i... | KeyError |
def __init__(
self,
inpt=None,
dims=[[], []],
shape=[],
type=None,
isherm=None,
fast=False,
superrep=None,
):
"""
Qobj constructor.
"""
self._isherm = None
self._type = None
self.superrep = None
if fast == "mc":
# fast Qobj construction for use in mcs... | def __init__(
self,
inpt=None,
dims=[[], []],
shape=[],
type=None,
isherm=None,
fast=False,
superrep=None,
):
"""
Qobj constructor.
"""
self._isherm = None
if fast == "mc":
# fast Qobj construction for use in mcsolve with ket output
self.data = sp.csr... | https://github.com/qutip/qutip/issues/96 | rho_psi = operator_to_vector(Qobj(np.diag(np.array([0.9, 0.1], dtype=complex))))>>> E_psi = rho_psi.dag()
S = to_super(sigmax())
(E_psi * S) * rho_psi
Traceback (most recent call last):
File "<ipython-input-22-90cbfac2a43e>", line 1, in <module>
(E_psi * S) * rho_psi
File "qutip/qobj.py", line 416, in __mul__
raise Typ... | TypeError |
def __add__(self, other): # defines left addition for Qobj class
"""
ADDITION with Qobj on LEFT [ ex. Qobj+4 ]
"""
if _checkeseries(other) == "eseries":
return other.__radd__(self)
if not isinstance(other, Qobj):
other = Qobj(other)
if np.prod(other.shape) == 1 and np.prod(sel... | def __add__(self, other): # defines left addition for Qobj class
"""
ADDITION with Qobj on LEFT [ ex. Qobj+4 ]
"""
if _checkeseries(other) == "eseries":
return other.__radd__(self)
if not isinstance(other, Qobj):
other = Qobj(other)
if np.prod(other.shape) == 1 and np.prod(sel... | https://github.com/qutip/qutip/issues/96 | rho_psi = operator_to_vector(Qobj(np.diag(np.array([0.9, 0.1], dtype=complex))))>>> E_psi = rho_psi.dag()
S = to_super(sigmax())
(E_psi * S) * rho_psi
Traceback (most recent call last):
File "<ipython-input-22-90cbfac2a43e>", line 1, in <module>
(E_psi * S) * rho_psi
File "qutip/qobj.py", line 416, in __mul__
raise Typ... | TypeError |
def __mul__(self, other):
"""
MULTIPLICATION with Qobj on LEFT [ ex. Qobj*4 ]
"""
if isinstance(other, Qobj):
if self.shape[1] == other.shape[0] and self.dims[1] == other.dims[0]:
out = Qobj()
out.data = self.data * other.data
dims = [self.dims[0], other.dims[... | def __mul__(self, other):
"""
MULTIPLICATION with Qobj on LEFT [ ex. Qobj*4 ]
"""
if isinstance(other, Qobj):
if self.shape[1] == other.shape[0] and self.dims[1] == other.dims[0]:
out = Qobj()
out.data = self.data * other.data
dims = [self.dims[0], other.dims[... | https://github.com/qutip/qutip/issues/96 | rho_psi = operator_to_vector(Qobj(np.diag(np.array([0.9, 0.1], dtype=complex))))>>> E_psi = rho_psi.dag()
S = to_super(sigmax())
(E_psi * S) * rho_psi
Traceback (most recent call last):
File "<ipython-input-22-90cbfac2a43e>", line 1, in <module>
(E_psi * S) * rho_psi
File "qutip/qobj.py", line 416, in __mul__
raise Typ... | TypeError |
def __rmul__(self, other):
"""
MULTIPLICATION with Qobj on RIGHT [ ex. 4*Qobj ]
"""
if isinstance(other, Qobj): # if both are quantum objects
if self.shape[1] == other.shape[0] and self.dims[1] == other.dims[0]:
out = Qobj()
out.data = other.data * self.data
... | def __rmul__(self, other):
"""
MULTIPLICATION with Qobj on RIGHT [ ex. 4*Qobj ]
"""
if isinstance(other, Qobj): # if both are quantum objects
if self.shape[1] == other.shape[0] and self.dims[1] == other.dims[0]:
out = Qobj()
out.data = other.data * self.data
... | https://github.com/qutip/qutip/issues/96 | rho_psi = operator_to_vector(Qobj(np.diag(np.array([0.9, 0.1], dtype=complex))))>>> E_psi = rho_psi.dag()
S = to_super(sigmax())
(E_psi * S) * rho_psi
Traceback (most recent call last):
File "<ipython-input-22-90cbfac2a43e>", line 1, in <module>
(E_psi * S) * rho_psi
File "qutip/qobj.py", line 416, in __mul__
raise Typ... | TypeError |
def __div__(self, other):
"""
DIVISION (by numbers only)
"""
if isinstance(other, Qobj): # if both are quantum objects
raise TypeError(
"Incompatible Qobj shapes " + "[division with Qobj not implemented]"
)
if isinstance(other, (int, float, complex, np.int64)):
... | def __div__(self, other):
"""
DIVISION (by numbers only)
"""
if isinstance(other, Qobj): # if both are quantum objects
raise TypeError(
"Incompatible Qobj shapes " + "[division with Qobj not implemented]"
)
if isinstance(other, (int, float, complex, np.int64)):
... | https://github.com/qutip/qutip/issues/96 | rho_psi = operator_to_vector(Qobj(np.diag(np.array([0.9, 0.1], dtype=complex))))>>> E_psi = rho_psi.dag()
S = to_super(sigmax())
(E_psi * S) * rho_psi
Traceback (most recent call last):
File "<ipython-input-22-90cbfac2a43e>", line 1, in <module>
(E_psi * S) * rho_psi
File "qutip/qobj.py", line 416, in __mul__
raise Typ... | TypeError |
def __neg__(self):
"""
NEGATION operation.
"""
out = Qobj()
out.data = -self.data
out.dims = self.dims
out.shape = self.shape
out.superrep = self.superrep
out._isherm = self._isherm
return out.tidyup() if qset.auto_tidyup else out
| def __neg__(self):
"""
NEGATION operation.
"""
out = Qobj()
out.data = -self.data
out.dims = self.dims
out.shape = self.shape
out.type = self.type
out._isherm = self._isherm
return out.tidyup() if qset.auto_tidyup else out
| https://github.com/qutip/qutip/issues/96 | rho_psi = operator_to_vector(Qobj(np.diag(np.array([0.9, 0.1], dtype=complex))))>>> E_psi = rho_psi.dag()
S = to_super(sigmax())
(E_psi * S) * rho_psi
Traceback (most recent call last):
File "<ipython-input-22-90cbfac2a43e>", line 1, in <module>
(E_psi * S) * rho_psi
File "qutip/qobj.py", line 416, in __mul__
raise Typ... | TypeError |
def __str__(self):
s = ""
if self.type in ["oper", "super"]:
s += (
"Quantum object: "
+ "dims = "
+ str(self.dims)
+ ", shape = "
+ str(self.shape)
+ ", type = "
+ self.type
+ ", isherm = "
+ str... | def __str__(self):
s = ""
if self.type == "oper" or self.type == "super":
s += (
"Quantum object: "
+ "dims = "
+ str(self.dims)
+ ", shape = "
+ str(self.shape)
+ ", type = "
+ self.type
+ ", isherm = "
... | https://github.com/qutip/qutip/issues/96 | rho_psi = operator_to_vector(Qobj(np.diag(np.array([0.9, 0.1], dtype=complex))))>>> E_psi = rho_psi.dag()
S = to_super(sigmax())
(E_psi * S) * rho_psi
Traceback (most recent call last):
File "<ipython-input-22-90cbfac2a43e>", line 1, in <module>
(E_psi * S) * rho_psi
File "qutip/qobj.py", line 416, in __mul__
raise Typ... | TypeError |
def _repr_latex_(self):
"""
Generate a LaTeX representation of the Qobj instance. Can be used for
formatted output in ipython notebook.
"""
s = r"$\text{"
if self.type in ["oper", "super"]:
s += (
"Quantum object: "
+ "dims = "
+ str(self.dims)
... | def _repr_latex_(self):
"""
Generate a LaTeX representation of the Qobj instance. Can be used for
formatted output in ipython notebook.
"""
s = r"$\text{"
if self.type == "oper" or self.type == "super":
s += (
"Quantum object: "
+ "dims = "
+ str(self.... | https://github.com/qutip/qutip/issues/96 | rho_psi = operator_to_vector(Qobj(np.diag(np.array([0.9, 0.1], dtype=complex))))>>> E_psi = rho_psi.dag()
S = to_super(sigmax())
(E_psi * S) * rho_psi
Traceback (most recent call last):
File "<ipython-input-22-90cbfac2a43e>", line 1, in <module>
(E_psi * S) * rho_psi
File "qutip/qobj.py", line 416, in __mul__
raise Typ... | TypeError |
def dag(self):
"""Adjoint operator of quantum object."""
out = Qobj()
out.data = self.data.T.conj().tocsr()
out.dims = [self.dims[1], self.dims[0]]
out.shape = [self.shape[1], self.shape[0]]
out._isherm = self._isherm
return out
| def dag(self):
"""Adjoint operator of quantum object."""
out = Qobj()
out.data = self.data.T.conj().tocsr()
out.dims = [self.dims[1], self.dims[0]]
out.shape = [self.shape[1], self.shape[0]]
out._isherm = self._isherm
out.type = _typecheck(out)
return out
| https://github.com/qutip/qutip/issues/96 | rho_psi = operator_to_vector(Qobj(np.diag(np.array([0.9, 0.1], dtype=complex))))>>> E_psi = rho_psi.dag()
S = to_super(sigmax())
(E_psi * S) * rho_psi
Traceback (most recent call last):
File "<ipython-input-22-90cbfac2a43e>", line 1, in <module>
(E_psi * S) * rho_psi
File "qutip/qobj.py", line 416, in __mul__
raise Typ... | TypeError |
def conj(self):
"""Conjugate operator of quantum object."""
out = Qobj()
out.data = self.data.conj()
out.dims = [self.dims[1], self.dims[0]]
out.shape = [self.shape[1], self.shape[0]]
return out
| def conj(self):
"""Conjugate operator of quantum object."""
out = Qobj(type=self.type)
out.data = self.data.conj()
out.dims = [self.dims[1], self.dims[0]]
out.shape = [self.shape[1], self.shape[0]]
return out
| https://github.com/qutip/qutip/issues/96 | rho_psi = operator_to_vector(Qobj(np.diag(np.array([0.9, 0.1], dtype=complex))))>>> E_psi = rho_psi.dag()
S = to_super(sigmax())
(E_psi * S) * rho_psi
Traceback (most recent call last):
File "<ipython-input-22-90cbfac2a43e>", line 1, in <module>
(E_psi * S) * rho_psi
File "qutip/qobj.py", line 416, in __mul__
raise Typ... | TypeError |
def norm(self, norm=None, sparse=False, tol=0, maxiter=100000):
"""Norm of a quantum object.
Default norm is L2-norm for kets and trace-norm for operators.
Other ket and operator norms may be specified using the
`ket_norm` and `oper_norm` arguments.
Parameters
----------
norm : str
... | def norm(self, norm=None, sparse=False, tol=0, maxiter=100000):
"""Norm of a quantum object.
Default norm is L2-norm for kets and trace-norm for operators.
Other ket and operator norms may be specified using the
`ket_norm` and `oper_norm` arguments.
Parameters
----------
norm : str
... | https://github.com/qutip/qutip/issues/96 | rho_psi = operator_to_vector(Qobj(np.diag(np.array([0.9, 0.1], dtype=complex))))>>> E_psi = rho_psi.dag()
S = to_super(sigmax())
(E_psi * S) * rho_psi
Traceback (most recent call last):
File "<ipython-input-22-90cbfac2a43e>", line 1, in <module>
(E_psi * S) * rho_psi
File "qutip/qobj.py", line 416, in __mul__
raise Typ... | TypeError |
def transform(self, inpt, inverse=False):
"""Basis transform defined by input array.
Input array can be a ``matrix`` defining the transformation,
or a ``list`` of kets that defines the new basis.
Parameters
----------
inpt : array_like
A ``matrix`` or ``list`` of kets defining the tra... | def transform(self, inpt, inverse=False):
"""Basis transform defined by input array.
Input array can be a ``matrix`` defining the transformation,
or a ``list`` of kets that defines the new basis.
Parameters
----------
inpt : array_like
A ``matrix`` or ``list`` of kets defining the tra... | https://github.com/qutip/qutip/issues/96 | rho_psi = operator_to_vector(Qobj(np.diag(np.array([0.9, 0.1], dtype=complex))))>>> E_psi = rho_psi.dag()
S = to_super(sigmax())
(E_psi * S) * rho_psi
Traceback (most recent call last):
File "<ipython-input-22-90cbfac2a43e>", line 1, in <module>
(E_psi * S) * rho_psi
File "qutip/qobj.py", line 416, in __mul__
raise Typ... | TypeError |
def trans(self):
"""Transposed operator.
Returns
-------
oper : qobj
Transpose of input operator.
"""
out = Qobj()
out.data = self.data.T.tocsr()
out.dims = [self.dims[1], self.dims[0]]
out.shape = [self.shape[1], self.shape[0]]
return out
| def trans(self):
"""Transposed operator.
Returns
-------
oper : qobj
Transpose of input operator.
"""
out = Qobj()
out.data = self.data.T.tocsr()
out.dims = [self.dims[1], self.dims[0]]
out.shape = [self.shape[1], self.shape[0]]
out.type = _typecheck(out)
return out... | https://github.com/qutip/qutip/issues/96 | rho_psi = operator_to_vector(Qobj(np.diag(np.array([0.9, 0.1], dtype=complex))))>>> E_psi = rho_psi.dag()
S = to_super(sigmax())
(E_psi * S) * rho_psi
Traceback (most recent call last):
File "<ipython-input-22-90cbfac2a43e>", line 1, in <module>
(E_psi * S) * rho_psi
File "qutip/qobj.py", line 416, in __mul__
raise Typ... | TypeError |
def iscp(self):
# FIXME: this needs to be cached in the same ways as isherm.
if self.type in ["super", "oper"]:
try:
q_oper = sr.to_choi(self)
eigs = q_oper.eigenenergies()
return all(eigs >= 0)
except:
return False
else:
return False
| def iscp(self):
# FIXME: this needs to be cached in the same ways as isherm.
if self.type == "super" or self.type == "oper":
try:
q_oper = sr.to_choi(self)
eigs = q_oper.eigenenergies()
return all(eigs >= 0)
except:
return False
else:
r... | https://github.com/qutip/qutip/issues/96 | rho_psi = operator_to_vector(Qobj(np.diag(np.array([0.9, 0.1], dtype=complex))))>>> E_psi = rho_psi.dag()
S = to_super(sigmax())
(E_psi * S) * rho_psi
Traceback (most recent call last):
File "<ipython-input-22-90cbfac2a43e>", line 1, in <module>
(E_psi * S) * rho_psi
File "qutip/qobj.py", line 416, in __mul__
raise Typ... | TypeError |
def istp(self):
if self.type in ["super", "oper"]:
try:
q_oper = sr.to_choi(self)
# We use the condition from John Watrous' lecture notes,
# Tr_1(J(Phi)) = identity_2.
tr_oper = ptrace(q_oper, (0,))
ident = ops.identity(tr_oper.shape[0])
... | def istp(self):
if self.type == "super" or self.type == "oper":
try:
q_oper = sr.to_choi(self)
# We use the condition from John Watrous' lecture notes,
# Tr_1(J(Phi)) = identity_2.
tr_oper = ptrace(q_oper, (0,))
ident = ops.identity(tr_oper.shape[0... | https://github.com/qutip/qutip/issues/96 | rho_psi = operator_to_vector(Qobj(np.diag(np.array([0.9, 0.1], dtype=complex))))>>> E_psi = rho_psi.dag()
S = to_super(sigmax())
(E_psi * S) * rho_psi
Traceback (most recent call last):
File "<ipython-input-22-90cbfac2a43e>", line 1, in <module>
(E_psi * S) * rho_psi
File "qutip/qobj.py", line 416, in __mul__
raise Typ... | TypeError |
def iscptp(self):
if self.type in ["super", "oper"]:
q_oper = sr.to_choi(self)
return q_oper.iscp and q_oper.istp
else:
return False
| def iscptp(self):
if self.type == "super" or self.type == "oper":
q_oper = sr.to_choi(self)
return q_oper.iscp and q_oper.istp
else:
return False
| https://github.com/qutip/qutip/issues/96 | rho_psi = operator_to_vector(Qobj(np.diag(np.array([0.9, 0.1], dtype=complex))))>>> E_psi = rho_psi.dag()
S = to_super(sigmax())
(E_psi * S) * rho_psi
Traceback (most recent call last):
File "<ipython-input-22-90cbfac2a43e>", line 1, in <module>
(E_psi * S) * rho_psi
File "qutip/qobj.py", line 416, in __mul__
raise Typ... | TypeError |
def isbra(self):
return (
np.prod(self.dims[0]) == 1
and isinstance(self.dims[1], list)
and isinstance(self.dims[1][0], int)
)
| def isbra(self):
return isinstance(self.dims[1], list) and np.prod(self.dims[0]) == 1
| https://github.com/qutip/qutip/issues/96 | rho_psi = operator_to_vector(Qobj(np.diag(np.array([0.9, 0.1], dtype=complex))))>>> E_psi = rho_psi.dag()
S = to_super(sigmax())
(E_psi * S) * rho_psi
Traceback (most recent call last):
File "<ipython-input-22-90cbfac2a43e>", line 1, in <module>
(E_psi * S) * rho_psi
File "qutip/qobj.py", line 416, in __mul__
raise Typ... | TypeError |
def isket(self):
return (
np.prod(self.dims[1]) == 1
and isinstance(self.dims[0], list)
and isinstance(self.dims[0][0], int)
)
| def isket(self):
return isinstance(self.dims[0], list) and np.prod(self.dims[1]) == 1
| https://github.com/qutip/qutip/issues/96 | rho_psi = operator_to_vector(Qobj(np.diag(np.array([0.9, 0.1], dtype=complex))))>>> E_psi = rho_psi.dag()
S = to_super(sigmax())
(E_psi * S) * rho_psi
Traceback (most recent call last):
File "<ipython-input-22-90cbfac2a43e>", line 1, in <module>
(E_psi * S) * rho_psi
File "qutip/qobj.py", line 416, in __mul__
raise Typ... | TypeError |
def __init__(
self,
geometry,
settings,
chain_file=None,
prev_results=None,
diff_burnable_mats=False,
fission_q=None,
dilute_initial=1.0e3,
):
super().__init__(chain_file, fission_q, dilute_initial, prev_results)
self.round_number = False
self.prev_res = None
self.setting... | def __init__(
self,
geometry,
settings,
chain_file=None,
prev_results=None,
diff_burnable_mats=False,
fission_q=None,
dilute_initial=1.0e3,
):
super().__init__(chain_file, fission_q, dilute_initial, prev_results)
self.round_number = False
self.settings = settings
self.geo... | https://github.com/openmc-dev/openmc/issues/1275 | Reading c_H_in_H2O from /home/drew/nndc_hdf5/c_H_in_H2O.h5
Maximum neutron transport energy: 20000000.000000 eV for U235
Reading tallies XML file...
Writing summary.h5 file...
Time to matexp: 0.1556260585784912
Traceback (most recent call last):
File "restart.py", line 20, in <module>
openmc.deplete.integrator.predict... | IndexError |
def __init__(
self,
geometry,
settings,
chain_file=None,
prev_results=None,
diff_burnable_mats=False,
fission_q=None,
dilute_initial=1.0e3,
):
super().__init__(chain_file, fission_q, dilute_initial)
self.round_number = False
self.prev_res = None
self.settings = settings
... | def __init__(
self,
geometry,
settings,
chain_file=None,
prev_results=None,
diff_burnable_mats=False,
fission_q=None,
dilute_initial=1.0e3,
):
super().__init__(chain_file, fission_q, dilute_initial)
self.round_number = False
self.settings = settings
self.geometry = geomet... | https://github.com/openmc-dev/openmc/issues/1275 | Reading c_H_in_H2O from /home/drew/nndc_hdf5/c_H_in_H2O.h5
Maximum neutron transport energy: 20000000.000000 eV for U235
Reading tallies XML file...
Writing summary.h5 file...
Time to matexp: 0.1556260585784912
Traceback (most recent call last):
File "restart.py", line 20, in <module>
openmc.deplete.integrator.predict... | IndexError |
def load_from_statepoint(self, statepoint):
"""Extracts tallies in an OpenMC StatePoint with the data needed to
compute multi-group cross sections.
This method is needed to compute cross section data from tallies
in an OpenMC StatePoint object.
NOTE: The statepoint must first be linked with an Ope... | def load_from_statepoint(self, statepoint):
"""Extracts tallies in an OpenMC StatePoint with the data needed to
compute multi-group cross sections.
This method is needed to compute cross section data from tallies
in an OpenMC StatePoint object.
NOTE: The statepoint must first be linked with an Ope... | https://github.com/openmc-dev/openmc/issues/663 | # Initialize MGXS Library with OpenMC statepoint data
mgxs_lib.load_from_statepoint(sp)
---------------------------------------------------------------------------
LookupError Traceback (most recent call last)
<ipython-input-28-76d7abb36a81> in <module>()
1 # Initialize MGXS Library with ... | LookupError |
def get_tally(
self,
scores=[],
filters=[],
nuclides=[],
name=None,
id=None,
estimator=None,
exact_filters=False,
exact_nuclides=False,
exact_scores=False,
):
"""Finds and returns a Tally object with certain properties.
This routine searches the list of Tallies and retur... | def get_tally(
self,
scores=[],
filters=[],
nuclides=[],
name=None,
id=None,
estimator=None,
exact=False,
):
"""Finds and returns a Tally object with certain properties.
This routine searches the list of Tallies and returns the first Tally
found which satisfies all of the in... | https://github.com/openmc-dev/openmc/issues/663 | # Initialize MGXS Library with OpenMC statepoint data
mgxs_lib.load_from_statepoint(sp)
---------------------------------------------------------------------------
LookupError Traceback (most recent call last)
<ipython-input-28-76d7abb36a81> in <module>()
1 # Initialize MGXS Library with ... | LookupError |
def make_sentry_teller(env):
if env.sentry_dsn:
try:
release = get_version()
if "-" in release:
release = None
except Exception:
release = None
sentry = raven.Client(
env.sentry_dsn,
environment=env.instance_type,
... | def make_sentry_teller(env):
if env.sentry_dsn:
try:
release = get_version()
if "-" in release:
release = None
except Exception:
release = None
sentry = raven.Client(
env.sentry_dsn,
environment=env.instance_type,
... | https://github.com/liberapay/liberapay.com/issues/846 | Traceback (most recent call last):
...
File "env/lib/python3.6/site-packages/postgres/__init__.py", line 451, in get_cursor
return CursorContextManager(self.pool, **kw)
File "env/lib/python3.6/site-packages/postgres/context_managers.py", line 35, in __init__
conn = self.pool.getconn()
File "env/lib/python3.6/site-packa... | psycopg2_pool.PoolError |
def tell_sentry(exception, state, allow_reraise=True):
if isinstance(exception, pando.Response) and exception.code < 500:
# Only log server errors
return
if isinstance(exception, NeedDatabase):
# Don't flood Sentry when DB is down
return
if isinstance(exception, PoolError):... | def tell_sentry(exception, state, allow_reraise=True):
if isinstance(exception, pando.Response) and exception.code < 500:
# Only log server errors
return
if isinstance(exception, NeedDatabase):
# Don't flood Sentry when DB is down
return
if isinstance(exception, psycopg2.Er... | https://github.com/liberapay/liberapay.com/issues/846 | Traceback (most recent call last):
...
File "env/lib/python3.6/site-packages/postgres/__init__.py", line 451, in get_cursor
return CursorContextManager(self.pool, **kw)
File "env/lib/python3.6/site-packages/postgres/context_managers.py", line 35, in __init__
conn = self.pool.getconn()
File "env/lib/python3.6/site-packa... | psycopg2_pool.PoolError |
def start(self, engine):
self.play_result = PlayResult(None, None)
self.stopped = False
self.pong_after_move = None
self.pong_after_ponder = None
# Set game, position and configure.
engine._new(board, game, options)
# Limit or time control.
increment = limit.white_inc if board.turn els... | def start(self, engine):
self.info = {}
self.stopped = False
self.final_pong = None
self.draw_offered = False
# Set game, position and configure.
engine._new(board, game, options)
# Limit or time control.
increment = limit.white_inc if board.turn else limit.black_inc
if limit.remai... | https://github.com/niklasf/python-chess/issues/379 | Exception in callback EngineProtocol.pipe_data_received(1, b'you play bo...Drawn game}\n')
handle: <Handle EngineProtocol.pipe_data_received(1, b'you play bo...Drawn game}\n')>
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/events.py", line 126, in _run
self._callback(*self._args)
File "/home/pasca... | asyncio.futures.InvalidStateError |
def line_received(self, engine, line):
if line.startswith("move "):
self._move(engine, line.split(" ", 1)[1])
elif line.startswith("Hint: "):
self._hint(engine, line.split(" ", 1)[1])
elif line == self.pong_after_move:
if not self.result.done():
self.result.set_result(sel... | def line_received(self, engine, line):
if line.startswith("move "):
self._move(engine, line.split(" ", 1)[1])
elif line == self.final_pong:
if not self.result.done():
self.result.set_exception(
EngineError("xboard engine answered final pong before sending move")
... | https://github.com/niklasf/python-chess/issues/379 | Exception in callback EngineProtocol.pipe_data_received(1, b'you play bo...Drawn game}\n')
handle: <Handle EngineProtocol.pipe_data_received(1, b'you play bo...Drawn game}\n')>
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/events.py", line 126, in _run
self._callback(*self._args)
File "/home/pasca... | asyncio.futures.InvalidStateError |
def cancel(self, engine):
if self.stopped:
return
self.stopped = True
if self.result.cancelled():
engine.send_line("?")
if ponder:
engine.send_line("easy")
n = (id(self) + 1) & 0xFFFF
self.pong_after_ponder = "pong {}".format(n)
engine._ping(n)
| def cancel(self, engine):
if self.stopped:
return
self.stopped = True
if self.result.cancelled():
engine.send_line("?")
if ponder:
engine.send_line("easy")
n = id(self) & 0xFFFF
self.final_pong = "pong {}".format(n)
engine._ping(n)
| https://github.com/niklasf/python-chess/issues/379 | Exception in callback EngineProtocol.pipe_data_received(1, b'you play bo...Drawn game}\n')
handle: <Handle EngineProtocol.pipe_data_received(1, b'you play bo...Drawn game}\n')>
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/events.py", line 126, in _run
self._callback(*self._args)
File "/home/pasca... | asyncio.futures.InvalidStateError |
def play(
self,
board,
limit,
*,
game=None,
info=INFO_NONE,
ponder=False,
root_moves=None,
options={},
):
if root_moves is not None:
raise EngineError(
"play with root_moves, but xboard supports 'include' only in analysis mode"
)
class Command(Bas... | def play(
self,
board,
limit,
*,
game=None,
info=INFO_NONE,
ponder=False,
root_moves=None,
options={},
):
if root_moves is not None:
raise EngineError(
"play with root_moves, but xboard supports include only in analysis mode"
)
class Command(BaseC... | https://github.com/niklasf/python-chess/issues/379 | Exception in callback EngineProtocol.pipe_data_received(1, b'you play bo...Drawn game}\n')
handle: <Handle EngineProtocol.pipe_data_received(1, b'you play bo...Drawn game}\n')>
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/events.py", line 126, in _run
self._callback(*self._args)
File "/home/pasca... | asyncio.futures.InvalidStateError |
def _move(self, engine, arg):
if not self.result.done() and self.play_result.move is None:
try:
self.play_result.move = engine.board.push_xboard(arg)
except ValueError as err:
self.result.set_exception(EngineError(err))
else:
self._ping_after_move(engine)
... | def _move(self, engine, arg):
if not self.result.cancelled():
try:
move = engine.board.push_xboard(arg)
except ValueError as err:
self.result.set_exception(EngineError(err))
else:
self.result.set_result(
PlayResult(move, None, self.info, dr... | https://github.com/niklasf/python-chess/issues/379 | Exception in callback EngineProtocol.pipe_data_received(1, b'you play bo...Drawn game}\n')
handle: <Handle EngineProtocol.pipe_data_received(1, b'you play bo...Drawn game}\n')>
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/events.py", line 126, in _run
self._callback(*self._args)
File "/home/pasca... | asyncio.futures.InvalidStateError |
def _post(self, engine, line):
if not self.result.done():
self.play_result.info = _parse_xboard_post(line, engine.board, info)
| def _post(self, engine, line):
if not self.result.done():
self.info = _parse_xboard_post(line, engine.board, info)
| https://github.com/niklasf/python-chess/issues/379 | Exception in callback EngineProtocol.pipe_data_received(1, b'you play bo...Drawn game}\n')
handle: <Handle EngineProtocol.pipe_data_received(1, b'you play bo...Drawn game}\n')>
Traceback (most recent call last):
File "/usr/lib/python3.5/asyncio/events.py", line 126, in _run
self._callback(*self._args)
File "/home/pasca... | asyncio.futures.InvalidStateError |
async def content_as_text(self, max_concurrency=1, encoding="UTF-8"):
"""Download the contents of this blob, and decode as text.
This operation is blocking until all data is downloaded.
:param int max_concurrency:
The number of parallel connections with which to download.
:param str encoding:
... | async def content_as_text(self, max_concurrency=1, encoding="UTF-8"):
"""Download the contents of this blob, and decode as text.
This operation is blocking until all data is downloaded.
:keyword int max_concurrency:
The number of parallel connections with which to download.
:param str encoding... | https://github.com/Azure/azure-sdk-for-python/issues/14319 | ERROR:Task exception was never retrieved
future: <Task finished coro=<_AsyncChunkDownloader.process_chunk() done, defined at /usr/local/lib/python3.6/dist-packages/azure/storage/blob/aio/_download_async.py:53> exception=ResourceModifiedError('The condition specified using HTTP conditional header(s) is not met.\nReques... | azure.storage.blob._generated.models._models_py3.StorageErrorException |
async def readinto(self, stream):
"""Download the contents of this blob to a stream.
:param stream:
The stream to download to. This can be an open file-handle,
or any writable stream. The stream must be seekable if the download
uses more than one parallel connection.
:returns: The n... | async def readinto(self, stream):
"""Download the contents of this blob to a stream.
:param stream:
The stream to download to. This can be an open file-handle,
or any writable stream. The stream must be seekable if the download
uses more than one parallel connection.
:returns: The n... | https://github.com/Azure/azure-sdk-for-python/issues/14319 | ERROR:Task exception was never retrieved
future: <Task finished coro=<_AsyncChunkDownloader.process_chunk() done, defined at /usr/local/lib/python3.6/dist-packages/azure/storage/blob/aio/_download_async.py:53> exception=ResourceModifiedError('The condition specified using HTTP conditional header(s) is not met.\nReques... | azure.storage.blob._generated.models._models_py3.StorageErrorException |
async def download_to_stream(self, stream, max_concurrency=1):
"""Download the contents of this blob to a stream.
:param stream:
The stream to download to. This can be an open file-handle,
or any writable stream. The stream must be seekable if the download
uses more than one parallel co... | async def download_to_stream(self, stream, max_concurrency=1):
"""Download the contents of this blob to a stream.
:param stream:
The stream to download to. This can be an open file-handle,
or any writable stream. The stream must be seekable if the download
uses more than one parallel co... | https://github.com/Azure/azure-sdk-for-python/issues/14319 | ERROR:Task exception was never retrieved
future: <Task finished coro=<_AsyncChunkDownloader.process_chunk() done, defined at /usr/local/lib/python3.6/dist-packages/azure/storage/blob/aio/_download_async.py:53> exception=ResourceModifiedError('The condition specified using HTTP conditional header(s) is not met.\nReques... | azure.storage.blob._generated.models._models_py3.StorageErrorException |
def _create_pipeline(self, credential, **kwargs):
# type: (Any, **Any) -> Tuple[Configuration, Pipeline]
self._credential_policy = None
if hasattr(credential, "get_token"):
self._credential_policy = BearerTokenCredentialPolicy(
credential, STORAGE_OAUTH_SCOPE
)
elif isinstanc... | def _create_pipeline(self, credential, **kwargs):
# type: (Any, **Any) -> Tuple[Configuration, Pipeline]
self._credential_policy = None
if hasattr(credential, "get_token"):
self._credential_policy = BearerTokenCredentialPolicy(
credential, STORAGE_OAUTH_SCOPE
)
elif isinstanc... | https://github.com/Azure/azure-sdk-for-python/issues/14067 | Fatal read error on socket transport
protocol: <asyncio.sslproto.SSLProtocol object at 0x7f1cf667a5c0>
transport: <_SelectorSocketTransport fd=121 read=polling write=<idle, bufsize=0>>
Traceback (most recent call last):
File "/home/azureuser/genfiles/external/python_runtime/python3/lib/python3.6/asyncio/selector_events... | TimeoutError |
def apply_gradients(self, grads_and_vars, name: Optional[str] = None, **kwargs):
"""Apply gradients to variables for each optimizer.
On the first call to `apply_gradients()`, compute the mapping from variables to
optimizers and cache it in the `self.var_opt_mapping` dict for serialization and
faster ac... | def apply_gradients(self, grads_and_vars, name: Optional[str] = None, **kwargs):
"""Apply gradients to variables for each optimizer.
On the first call to `apply_gradients()`, compute the mapping from variables to
optimizers and cache it in the `self.var_opt_mapping` dict for serialization and
faster ac... | https://github.com/larq/larq/issues/396 | WARNING:tensorflow:There is non-GPU devices in `tf.distribute.Strategy`, not using nccl allreduce.
distributed training: False
Train on 60000 samples
60000/60000 [==============================] - 4s 61us/sample - loss: 8.2390
Successfully fitted model
distributed training: True
Train on 60000 samples
INFO:tensorflo... | IndexError |
def __init__(self, layer: tf.keras.layers.Layer):
self._layer = layer
weights = layer.weights
if isinstance(layer, tf.keras.layers.BatchNormalization):
fused_pairs = [("beta", "moving_mean"), ("gamma", "moving_variance")]
for pair in fused_pairs:
names = [w.name.split("/")[-1].r... | def __init__(self, layer: tf.keras.layers.Layer):
self._layer = layer
weights = layer.weights
if isinstance(layer, tf.keras.layers.BatchNormalization):
fused_pairs = [("beta", "moving_mean"), ("gamma", "moving_variance")]
for pair in fused_pairs:
names = [w.name.split("/")[-1].r... | https://github.com/larq/larq/issues/479 | Traceback (most recent call last):
File "C:/Users/User/PycharmProjects/BNN-Playground/summary_bug.py", line 68, in <module>
cli()
File "C:\Users\User\Anaconda3\lib\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "C:\Users\User\Anaconda3\lib\site-packages\click\core.py", line 7... | TypeError |
def op_count(
self, op_type: Optional[str] = None, precision: Optional[int] = None
) -> Optional[int]:
if op_type != "mac":
raise ValueError("Currently only counting of MAC-operations is supported.")
if isinstance(self._layer, op_count_supported_layer_types) and self.output_pixels:
count = ... | def op_count(
self, op_type: Optional[str] = None, precision: Optional[int] = None
) -> Optional[int]:
if op_type != "mac":
raise ValueError("Currently only counting of MAC-operations is supported.")
if isinstance(self._layer, op_count_supported_layer_types):
count = 0
for op in sel... | https://github.com/larq/larq/issues/479 | Traceback (most recent call last):
File "C:/Users/User/PycharmProjects/BNN-Playground/summary_bug.py", line 68, in <module>
cli()
File "C:\Users\User\Anaconda3\lib\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "C:\Users\User\Anaconda3\lib\site-packages\click\core.py", line 7... | TypeError |
def output_pixels(self) -> Optional[int]:
"""Number of pixels for a single feature map (1 for fully connected layers)."""
if not self.output_shape:
return None
if len(self.output_shape) == 4:
return int(np.prod(self.output_shape[1:3]))
if len(self.output_shape) == 2:
return 1
... | def output_pixels(self) -> int:
"""Number of pixels for a single feature map (1 for fully connected layers)."""
if len(self.output_shape) == 4:
return int(np.prod(self.output_shape[1:3]))
elif len(self.output_shape) == 2:
return 1
else:
raise NotImplementedError()
| https://github.com/larq/larq/issues/479 | Traceback (most recent call last):
File "C:/Users/User/PycharmProjects/BNN-Playground/summary_bug.py", line 68, in <module>
cli()
File "C:\Users\User\Anaconda3\lib\site-packages\click\core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "C:\Users\User\Anaconda3\lib\site-packages\click\core.py", line 7... | TypeError |
def apply_gradients(self, grads_and_vars, name=None):
bin_grads_and_vars, fp_grads_and_vars = [], []
for grad, var in grads_and_vars:
if self.is_binary(var):
bin_grads_and_vars.append((grad, var))
else:
fp_grads_and_vars.append((grad, var))
bin_train_op = super().app... | def apply_gradients(self, grads_and_vars, name=None):
bin_grads_and_vars = [(g, v) for g, v in grads_and_vars if self.is_binary(v)]
fp_grads_and_vars = [(g, v) for g, v in grads_and_vars if not self.is_binary(v)]
bin_train_op = super().apply_gradients(bin_grads_and_vars, name=name)
fp_train_op = self.f... | https://github.com/larq/larq/issues/286 | 2019-10-11 13:45:47 UTC -- Epoch 1/150
2019-10-11 13:45:50 UTC -- Traceback (most recent call last):
2019-10-11 13:45:50 UTC -- File "/usr/local/bin/nf", line 11, in <module>
2019-10-11 13:45:50 UTC -- load_entry_point('project-final', 'console_scripts', 'nf')()
2019-10-11 13:45:50 UTC -- File "/usr/local/lib/p... | IndexError |
def dense_passage_retrieval():
logging.basicConfig(
format="%(asctime)s - %(levelname)s - %(name)s - %(message)s",
datefmt="%m/%d/%Y %H:%M:%S",
level=logging.INFO,
)
ml_logger = MLFlowLogger(tracking_uri="https://public-mlflow.deepset.ai/")
ml_logger.init_experiment(
e... | def dense_passage_retrieval():
logging.basicConfig(
format="%(asctime)s - %(levelname)s - %(name)s - %(message)s",
datefmt="%m/%d/%Y %H:%M:%S",
level=logging.INFO,
)
ml_logger = MLFlowLogger(tracking_uri="https://public-mlflow.deepset.ai/")
ml_logger.init_experiment(
e... | https://github.com/deepset-ai/FARM/issues/714 | Traceback (most recent call last):
File "/home/ubuntu/pycharm/FARM/examples/dpr_encoder.py", line 155, in <module>
dense_passage_retrieval()
File "/home/ubuntu/pycharm/FARM/examples/dpr_encoder.py", line 91, in dense_passage_retrieval
data_silo = DataSilo(processor=processor, batch_size=batch_size, distributed=distribu... | AttributeError |
def _calculate_statistics(self):
"""Calculate and log simple summary statistics of the datasets"""
logger.info("")
logger.info("DATASETS SUMMARY")
logger.info("================")
self.counts = {}
if self.data["train"]:
self.counts["train"] = len(self.data["train"])
if "input_id... | def _calculate_statistics(self):
"""Calculate and log simple summary statistics of the datasets"""
logger.info("")
logger.info("DATASETS SUMMARY")
logger.info("================")
self.counts = {}
if self.data["train"]:
self.counts["train"] = len(self.data["train"])
else:
se... | https://github.com/deepset-ai/FARM/issues/714 | Traceback (most recent call last):
File "/home/ubuntu/pycharm/FARM/examples/dpr_encoder.py", line 155, in <module>
dense_passage_retrieval()
File "/home/ubuntu/pycharm/FARM/examples/dpr_encoder.py", line 91, in dense_passage_retrieval
data_silo = DataSilo(processor=processor, batch_size=batch_size, distributed=distribu... | AttributeError |
def convert_features_to_dataset(features):
"""
Converts a list of feature dictionaries (one for each sample) into a PyTorch Dataset.
:param features: A list of dictionaries. Each dictionary corresponds to one sample. Its keys are the
names of the type of feature and the keys are the fe... | def convert_features_to_dataset(features):
"""
Converts a list of feature dictionaries (one for each sample) into a PyTorch Dataset.
:param features: A list of dictionaries. Each dictionary corresponds to one sample. Its keys are the
names of the type of feature and the keys are the fe... | https://github.com/deepset-ai/FARM/issues/714 | Traceback (most recent call last):
File "/home/ubuntu/pycharm/FARM/examples/dpr_encoder.py", line 155, in <module>
dense_passage_retrieval()
File "/home/ubuntu/pycharm/FARM/examples/dpr_encoder.py", line 91, in dense_passage_retrieval
data_silo = DataSilo(processor=processor, batch_size=batch_size, distributed=distribu... | AttributeError |
def train(self):
"""
Perform the training procedure.
The training is visualized by a progress bar. It counts the epochs in a zero based manner.
For example, when you specify ``epochs=20`` it starts to count from 0 to 19.
If trainer evaluates the model with a test set the result of the
evaluati... | def train(self):
"""
Perform the training procedure.
The training is visualized by a progress bar. It counts the epochs in a zero based manner.
For example, when you specify ``epochs=20`` it starts to count from 0 to 19.
If trainer evaluates the model with a test set the result of the
evaluati... | https://github.com/deepset-ai/FARM/issues/714 | Traceback (most recent call last):
File "/home/ubuntu/pycharm/FARM/examples/dpr_encoder.py", line 155, in <module>
dense_passage_retrieval()
File "/home/ubuntu/pycharm/FARM/examples/dpr_encoder.py", line 91, in dense_passage_retrieval
data_silo = DataSilo(processor=processor, batch_size=batch_size, distributed=distribu... | AttributeError |
def load(cls, pretrained_model_name_or_path, language=None, **kwargs):
"""
Load a pretrained model by supplying
* the name of a remote model on s3 ("distilbert-base-german-cased" ...)
* OR a local path of a model trained via transformers ("some_dir/huggingface_model")
* OR a local path of a model t... | def load(cls, pretrained_model_name_or_path, language=None, **kwargs):
"""
Load a pretrained model by supplying
* the name of a remote model on s3 ("distilbert-base-german-cased" ...)
* OR a local path of a model trained via transformers ("some_dir/huggingface_model")
* OR a local path of a model t... | https://github.com/deepset-ai/FARM/issues/553 | ---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-83-b2a730b6ac24> in <module>
----> 1 convert_to_transformers()
<ipython-input-82-8ab35f02f804> in convert_to_transformers()
12
13 # convert to trans... | RuntimeError |
def convert_to_transformers(self):
if (
len(self.prediction_heads) == 2
and self.prediction_heads[0].model_type == "language_modelling"
):
logger.warning(
"Currently only the Masked Language Modeling component of the prediction head is converted, "
"not the Next S... | def convert_to_transformers(self):
if len(self.prediction_heads) != 1:
raise ValueError(
f"Currently conversion only works for models with a SINGLE prediction head. "
f"Your model has {len(self.prediction_heads)}"
)
elif len(self.prediction_heads[0].layer_dims) != 2:
... | https://github.com/deepset-ai/FARM/issues/533 | Traceback (most recent call last):
File "conversion_huggingface_models.py", line 88, in <module>
convert_to_transformers("./farm_saved_models/bert-english-lm",
File "conversion_huggingface_models.py", line 46, in convert_to_transformers
transformer_model = model.convert_to_transformers()
File "/home/himanshu/.conda/env... | torch.nn.modules.module.ModuleAttributeError |
def __init__(
self, hidden_size, vocab_size, hidden_act="gelu", task_name="lm", **kwargs
):
super(BertLMHead, self).__init__()
self.hidden_size = hidden_size
self.hidden_act = hidden_act
self.vocab_size = vocab_size
self.loss_fct = CrossEntropyLoss(reduction="none", ignore_index=-1)
self.nu... | def __init__(
self, hidden_size, vocab_size, hidden_act="gelu", task_name="lm", **kwargs
):
super(BertLMHead, self).__init__()
self.hidden_size = hidden_size
self.hidden_act = hidden_act
self.vocab_size = vocab_size
self.loss_fct = CrossEntropyLoss(reduction="none", ignore_index=-1)
self.nu... | https://github.com/deepset-ai/FARM/issues/533 | Traceback (most recent call last):
File "conversion_huggingface_models.py", line 88, in <module>
convert_to_transformers("./farm_saved_models/bert-english-lm",
File "conversion_huggingface_models.py", line 46, in convert_to_transformers
transformer_model = model.convert_to_transformers()
File "/home/himanshu/.conda/env... | torch.nn.modules.module.ModuleAttributeError |
def question_answering():
logging.basicConfig(
format="%(asctime)s - %(levelname)s - %(name)s - %(message)s",
datefmt="%m/%d/%Y %H:%M:%S",
level=logging.INFO,
)
ml_logger = MLFlowLogger(tracking_uri="https://public-mlflow.deepset.ai/")
ml_logger.init_experiment(
experi... | def question_answering():
logging.basicConfig(
format="%(asctime)s - %(levelname)s - %(name)s - %(message)s",
datefmt="%m/%d/%Y %H:%M:%S",
level=logging.INFO,
)
ml_logger = MLFlowLogger(tracking_uri="https://public-mlflow.deepset.ai/")
ml_logger.init_experiment(
experi... | https://github.com/deepset-ai/FARM/issues/520 | """
Traceback (most recent call last):
File "/usr/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/fabio/src/git_repositories/FARM/farm/infer.py", line 569, in _create_datasets_chunkwise
dataset, tensor_names, baskets = processor.dataset_from_dicts(dicts, indi... | TypeError |
def try_get(keys, dictionary):
try:
for key in keys:
if key in dictionary:
ret = dictionary[key]
if type(ret) == list:
ret = ret[0]
return ret
except Exception as e:
logger.warning(f"Cannot extract from dict {diction... | def try_get(keys, dictionary):
for key in keys:
if key in dictionary:
ret = dictionary[key]
if type(ret) == list:
ret = ret[0]
return ret
return None
| https://github.com/deepset-ai/FARM/issues/520 | """
Traceback (most recent call last):
File "/usr/lib/python3.8/multiprocessing/pool.py", line 125, in worker
result = (True, func(*args, **kwds))
File "/home/fabio/src/git_repositories/FARM/farm/infer.py", line 569, in _create_datasets_chunkwise
dataset, tensor_names, baskets = processor.dataset_from_dicts(dicts, indi... | TypeError |
def split_file(
filepath, output_dir, docs_per_file=1_000, delimiter="", encoding="utf-8"
):
total_lines = sum(1 for line in open(filepath, encoding=encoding))
output_file_number = 1
doc_count = 0
lines_to_write = []
with ExitStack() as stack:
input_file = stack.enter_context(open(filepa... | def split_file(
filepath, output_dir, docs_per_file=1_000, delimiter="", encoding="utf-8"
):
total_lines = sum(1 for line in open(filepath, encoding=encoding))
output_file_number = 1
doc_count = 0
lines_to_write = []
with ExitStack() as stack:
input_file = stack.enter_context(open(filepa... | https://github.com/deepset-ai/FARM/issues/462 | Splitting file ...: 5%|5 | 127877/2407713 [00:00<00:02, 869200.61it/s]
Traceback (most recent call last):
File "finetune_lm.py", line 43, in <module>
split_file(data_dir / "train.txt", output_dir=Path('/data/german_old_texts/processed/lm/split_files'), docs_per_file=20)
File "/home/user/farm/data_handler/util... | UnicodeEncodeError |
def load(
cls,
model_name_or_path,
batch_size=4,
gpu=False,
task_type=None,
return_class_probs=False,
strict=True,
max_seq_len=256,
doc_stride=128,
extraction_layer=None,
extraction_strategy=None,
):
"""
Load an Inferencer incl. all relevant components (model, tokeniz... | def load(
cls,
model_name_or_path,
batch_size=4,
gpu=False,
task_type=None,
return_class_probs=False,
strict=True,
max_seq_len=256,
doc_stride=128,
extraction_layer=None,
extraction_strategy=None,
):
"""
Load an Inferencer incl. all relevant components (model, tokeniz... | https://github.com/deepset-ai/FARM/issues/299 | 03/28/2020 22:25:07 - INFO - farm.utils - device: cpu n_gpu: 0, distributed training: False, automatic mixed precision training: None
03/28/2020 22:25:07 - INFO - farm.modeling.adaptive_model - Found files for loading 1 prediction heads
03/28/2020 22:25:07 - WARNING - farm.modeling.prediction_head - Some unused p... | TypeError |
def __init__(
self,
tokenizer,
max_seq_len,
data_dir,
train_filename="train.txt",
dev_filename="dev.txt",
test_filename="test.txt",
dev_split=0.0,
next_sent_pred=True,
max_docs=None,
proxies=None,
**kwargs,
):
"""
:param tokenizer: Used to split a sentence (str) i... | def __init__(
self,
tokenizer,
max_seq_len,
data_dir,
train_filename="train.txt",
dev_filename="dev.txt",
test_filename="test.txt",
dev_split=0.0,
next_sent_pred=True,
max_docs=None,
proxies=None,
**kwargs,
):
"""
:param tokenizer: Used to split a sentence (str) i... | https://github.com/deepset-ai/FARM/issues/193 | Train epoch 1/1 (Cur. train loss: 0.6664): 18%|█▊ | 30/170 [00:48<03:43, 1.60s/it]
Evaluating: 0%| | 0/319 [00:00<?, ?it/s]
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-3-f9d4de4... | IndexError |
def eval(self, model):
"""
Performs evaluation on a given model.
:param model: The model on which to perform evaluation
:type model: AdaptiveModel
:return all_results: A list of dictionaries, one for each prediction head. Each dictionary contains the metrics
and reports gen... | def eval(self, model):
"""
Performs evaluation on a given model.
:param model: The model on which to perform evaluation
:type model: AdaptiveModel
:return all_results: A list of dictionaries, one for each prediction head. Each dictionary contains the metrics
and reports gen... | https://github.com/deepset-ai/FARM/issues/148 | ${PYTHONENVHOME}/lib/python3.6/site-packages/numpy/lib/arraysetops.py:564: FutureWarning: elementwise comparison failed; returning scalar instead, but in the future will perform elementwise comparison
mask &= (ar1 != a)
Traceback (most recent call last):
File "doc_classification_multilabel.py", line 97, in <module>... | TypeError |
def __init__(
self,
tokenizer,
max_seq_len,
data_dir,
label_list=None,
metric=None,
train_filename="train.tsv",
dev_filename=None,
test_filename="test.tsv",
dev_split=0.1,
delimiter="\t",
quote_char="'",
skiprows=None,
label_column_name="label",
multilabel=Fal... | def __init__(
self,
tokenizer,
max_seq_len,
data_dir,
label_list=None,
metric=None,
train_filename="train.tsv",
dev_filename=None,
test_filename="test.tsv",
dev_split=0.1,
delimiter="\t",
quote_char="'",
skiprows=None,
label_column_name="label",
multilabel=Fal... | https://github.com/deepset-ai/FARM/issues/120 | 10/17/2019 20:16:51 - INFO - pytorch_transformers.modeling_utils - load
ing weights file https://s3.amazonaws.com/models.huggingface.co/bert/bert
-base-cased-pytorch_model.bin from cache at /root/.cache/torch/pytorch_tr
ansformers/35d8b9d36faaf46728a0192d82bf7d00137490cd6074e8500778afed552a67
e5.3fadbea36527ae472139f... | KeyError |
def __init__(
self,
tokenizer,
max_seq_len,
data_dir,
label_list=None,
metric=None,
train_filename="train.txt",
dev_filename="dev.txt",
test_filename="test.txt",
dev_split=0.0,
delimiter="\t",
**kwargs,
):
# Custom processor attributes
self.delimiter = delimiter
... | def __init__(
self,
tokenizer,
max_seq_len,
data_dir,
label_list=None,
metric=None,
train_filename="train.txt",
dev_filename="dev.txt",
test_filename="test.txt",
dev_split=0.0,
delimiter="\t",
**kwargs,
):
# Custom processor attributes
self.delimiter = delimiter
... | https://github.com/deepset-ai/FARM/issues/120 | 10/17/2019 20:16:51 - INFO - pytorch_transformers.modeling_utils - load
ing weights file https://s3.amazonaws.com/models.huggingface.co/bert/bert
-base-cased-pytorch_model.bin from cache at /root/.cache/torch/pytorch_tr
ansformers/35d8b9d36faaf46728a0192d82bf7d00137490cd6074e8500778afed552a67
e5.3fadbea36527ae472139f... | KeyError |
def __init__(
self,
tokenizer,
max_seq_len,
data_dir,
labels=None,
metric=None,
train_filename="train-v2.0.json",
dev_filename="dev-v2.0.json",
test_filename=None,
dev_split=0,
doc_stride=128,
max_query_length=64,
**kwargs,
):
"""
:param tokenizer: Used to spl... | def __init__(
self,
tokenizer,
max_seq_len,
data_dir,
labels=None,
metric=None,
train_filename="train-v2.0.json",
dev_filename="dev-v2.0.json",
test_filename=None,
dev_split=0,
doc_stride=128,
max_query_length=64,
**kwargs,
):
"""
:param tokenizer: Used to spl... | https://github.com/deepset-ai/FARM/issues/120 | 10/17/2019 20:16:51 - INFO - pytorch_transformers.modeling_utils - load
ing weights file https://s3.amazonaws.com/models.huggingface.co/bert/bert
-base-cased-pytorch_model.bin from cache at /root/.cache/torch/pytorch_tr
ansformers/35d8b9d36faaf46728a0192d82bf7d00137490cd6074e8500778afed552a67
e5.3fadbea36527ae472139f... | KeyError |
def __init__(
self,
tokenizer,
max_seq_len,
data_dir,
label_list=None,
metric=None,
train_filename="train-v2.0.json",
dev_filename="dev-v2.0.json",
test_filename=None,
dev_split=0,
doc_stride=128,
max_query_length=64,
**kwargs,
):
"""
:param tokenizer: Used to... | def __init__(
self,
tokenizer,
max_seq_len,
data_dir,
labels=None,
metric=None,
train_filename="train-v2.0.json",
dev_filename="dev-v2.0.json",
test_filename=None,
dev_split=0,
doc_stride=128,
max_query_length=64,
**kwargs,
):
"""
:param tokenizer: Used to spl... | https://github.com/deepset-ai/FARM/issues/120 | 10/17/2019 20:16:51 - INFO - pytorch_transformers.modeling_utils - load
ing weights file https://s3.amazonaws.com/models.huggingface.co/bert/bert
-base-cased-pytorch_model.bin from cache at /root/.cache/torch/pytorch_tr
ansformers/35d8b9d36faaf46728a0192d82bf7d00137490cd6074e8500778afed552a67
e5.3fadbea36527ae472139f... | KeyError |
def __init__(self, processor, batch_size, distributed=False):
"""
:param processor: A dataset specific Processor object which will turn input (file or dict) into a Pytorch Dataset.
:type processor: Processor
:param batch_size: The size of batch that should be returned by the DataLoaders.
:type batch... | def __init__(
self, processor, batch_size, distributed=False, multiprocessing_chunk_size=100
):
"""
:param processor: A dataset specific Processor object which will turn input (file or dict) into a Pytorch Dataset.
:type processor: Processor
:param batch_size: The size of batch that should be return... | https://github.com/deepset-ai/FARM/issues/113 | 10/11/2019 17:12:47 - INFO - farm.data_handler.data_silo - Loading dev set as a slice of train set
Traceback (most recent call last):
File ".../train.py", line 436, in <module>
augmentation=True)
File ".../train.py", line 348, in continue_finetuning
data_silo = DataSilo(processor=processor, batch_size=batch_size, mul... | AssertionError |
def _get_dataset(self, filename):
dicts = self.processor.file_to_dicts(filename)
# shuffle list of dicts here if we later want to have a random dev set splitted from train set
if self.processor.train_filename in filename:
if not self.processor.dev_filename:
if self.processor.dev_split > ... | def _get_dataset(self, filename):
dicts = self.processor.file_to_dicts(filename)
# shuffle list of dicts here if we later want to have a random dev set splitted from train set
if self.processor.train_filename in filename:
if not self.processor.dev_filename:
if self.processor.dev_split > ... | https://github.com/deepset-ai/FARM/issues/113 | 10/11/2019 17:12:47 - INFO - farm.data_handler.data_silo - Loading dev set as a slice of train set
Traceback (most recent call last):
File ".../train.py", line 436, in <module>
augmentation=True)
File ".../train.py", line 348, in continue_finetuning
data_silo = DataSilo(processor=processor, batch_size=batch_size, mul... | AssertionError |
def _create_dev_from_train(self):
n_dev = int(self.processor.dev_split * len(self.data["train"]))
n_train = len(self.data["train"]) - n_dev
train_dataset, dev_dataset = self.random_split_ConcatDataset(
self.data["train"], lengths=[n_train, n_dev]
)
self.data["train"] = train_dataset
if ... | def _create_dev_from_train(self):
# TODO checks to ensure dev is loaded the right way
n_dev = int(self.processor.dev_split * len(self.data["train"]))
n_train = len(self.data["train"]) - n_dev
# Todo: Seed
# if(isinstance(self.data["train"], Dataset)):
# train_dataset, dev_dataset = random_s... | https://github.com/deepset-ai/FARM/issues/113 | 10/11/2019 17:12:47 - INFO - farm.data_handler.data_silo - Loading dev set as a slice of train set
Traceback (most recent call last):
File ".../train.py", line 436, in <module>
augmentation=True)
File ".../train.py", line 348, in continue_finetuning
data_silo = DataSilo(processor=processor, batch_size=batch_size, mul... | AssertionError |
def random_split_ConcatDataset(self, ds, lengths):
"""
Roughly split a Concatdataset into non-overlapping new datasets of given lengths.
Samples inside Concatdataset should already be shuffled
Arguments:
ds (Dataset): Dataset to be split
lengths (sequence): lengths of splits to be produ... | def random_split_ConcatDataset(self, ds, lengths):
"""
Roughly split a Concatdataset into non-overlapping new datasets of given lengths.
Samples inside Concatdataset should already be shuffled
Arguments:
ds (Dataset): Dataset to be split
lengths (sequence): lengths of splits to be produ... | https://github.com/deepset-ai/FARM/issues/113 | 10/11/2019 17:12:47 - INFO - farm.data_handler.data_silo - Loading dev set as a slice of train set
Traceback (most recent call last):
File ".../train.py", line 436, in <module>
augmentation=True)
File ".../train.py", line 348, in continue_finetuning
data_silo = DataSilo(processor=processor, batch_size=batch_size, mul... | AssertionError |
def _dict_to_samples(self, dictionary, all_dicts=None):
assert len(all_dicts) > 1, (
"Need at least 2 documents to sample random sentences from"
)
doc = dictionary["doc"]
samples = []
for idx in range(len(doc) - 1):
text_a, text_b, is_next_label = get_sentence_pair(doc, all_dicts, id... | def _dict_to_samples(self, dictionary, all_dicts=None):
doc = dictionary["doc"]
samples = []
for idx in range(len(doc) - 1):
text_a, text_b, is_next_label = get_sentence_pair(doc, all_dicts, idx)
sample_in_clear_text = {
"text_a": text_a,
"text_b": text_b,
... | https://github.com/deepset-ai/FARM/issues/113 | 10/11/2019 17:12:47 - INFO - farm.data_handler.data_silo - Loading dev set as a slice of train set
Traceback (most recent call last):
File ".../train.py", line 436, in <module>
augmentation=True)
File ".../train.py", line 348, in continue_finetuning
data_silo = DataSilo(processor=processor, batch_size=batch_size, mul... | AssertionError |
def eval(self, model):
"""
Performs evaluation on a given model.
:param model: The model on which to perform evaluation
:type model: AdaptiveModel
:return all_results: A list of dictionaries, one for each prediction head. Each dictionary contains the metrics
and reports gen... | def eval(self, model):
"""
Performs evaluation on a given model.
:param model: The model on which to perform evaluation
:type model: AdaptiveModel
:return all_results: A list of dictionaries, one for each prediction head. Each dictionary contains the metrics
and reports gen... | https://github.com/deepset-ai/FARM/issues/113 | 10/11/2019 17:12:47 - INFO - farm.data_handler.data_silo - Loading dev set as a slice of train set
Traceback (most recent call last):
File ".../train.py", line 436, in <module>
augmentation=True)
File ".../train.py", line 348, in continue_finetuning
data_silo = DataSilo(processor=processor, batch_size=batch_size, mul... | AssertionError |
def __init__(
self, model, processor, batch_size=4, gpu=False, name=None, return_class_probs=False
):
"""
Initializes Inferencer from an AdaptiveModel and a Processor instance.
:param model: AdaptiveModel to run in inference mode
:type model: AdaptiveModel
:param processor: A dataset specific P... | def __init__(
self,
model,
processor,
batch_size=4,
gpu=False,
name=None,
return_class_probs=False,
multiprocessing_chunk_size=100,
):
"""
Initializes Inferencer from an AdaptiveModel and a Processor instance.
:param model: AdaptiveModel to run in inference mode
:type mo... | https://github.com/deepset-ai/FARM/issues/113 | 10/11/2019 17:12:47 - INFO - farm.data_handler.data_silo - Loading dev set as a slice of train set
Traceback (most recent call last):
File ".../train.py", line 436, in <module>
augmentation=True)
File ".../train.py", line 348, in continue_finetuning
data_silo = DataSilo(processor=processor, batch_size=batch_size, mul... | AssertionError |
def load(
cls,
load_dir,
batch_size=4,
gpu=False,
embedder_only=False,
return_class_probs=False,
):
"""
Initializes Inferencer from directory with saved model.
:param load_dir: Directory where the saved model is located.
:type load_dir: str
:param batch_size: Number of sampl... | def load(
cls,
load_dir,
batch_size=4,
gpu=False,
embedder_only=False,
return_class_probs=False,
multiprocessing_chunk_size=100,
):
"""
Initializes Inferencer from directory with saved model.
:param load_dir: Directory where the saved model is located.
:type load_dir: str
... | https://github.com/deepset-ai/FARM/issues/113 | 10/11/2019 17:12:47 - INFO - farm.data_handler.data_silo - Loading dev set as a slice of train set
Traceback (most recent call last):
File ".../train.py", line 436, in <module>
augmentation=True)
File ".../train.py", line 348, in continue_finetuning
data_silo = DataSilo(processor=processor, batch_size=batch_size, mul... | AssertionError |
def inference_from_dicts(self, dicts, rest_api_schema=False):
"""
Runs down-stream inference using the prediction head.
:param dicts: Samples to run inference on provided as a list of dicts. One dict per sample.
:type dicts: [dict]
:param rest_api_schema: whether conform to the schema used for dict... | def inference_from_dicts(self, dicts, rest_api_schema=False):
"""
Runs down-stream inference using the prediction head.
:param dicts: Samples to run inference on provided as a list of dicts. One dict per sample.
:type dicts: [dict]
:param rest_api_schema: whether conform to the schema used for dict... | https://github.com/deepset-ai/FARM/issues/113 | 10/11/2019 17:12:47 - INFO - farm.data_handler.data_silo - Loading dev set as a slice of train set
Traceback (most recent call last):
File ".../train.py", line 436, in <module>
augmentation=True)
File ".../train.py", line 348, in continue_finetuning
data_silo = DataSilo(processor=processor, batch_size=batch_size, mul... | AssertionError |
def __init__(
self,
tokenizer,
max_seq_len,
label_list,
metrics,
train_filename,
dev_filename,
test_filename,
dev_split,
data_dir,
label_dtype=torch.long,
multiprocessing_chunk_size=1_000,
max_processes=128,
share_all_baskets_for_multiprocessing=False,
use_mul... | def __init__(
self,
tokenizer,
max_seq_len,
label_list,
metrics,
train_filename,
dev_filename,
test_filename,
dev_split,
data_dir,
label_dtype=torch.long,
multiprocessing_chunk_size=1_000,
max_processes=128,
share_all_baskets_for_multiprocessing=False,
):
"""
... | https://github.com/deepset-ai/FARM/issues/70 | 08/28/2019 07:47:35 - INFO - farm.utils - device: cuda n_gpu: 1, distributed training: False, 16-bits training: False
08/28/2019 07:47:35 - INFO - pytorch_transformers.tokenization_utils - loading file https://int-deepset-models-bert.s3.eu-central-1.amazonaws.com/pytorch/bert-base-german-cased-vocab.txt from cache ... | AttributeError |
def _init_samples_in_baskets(self):
with ExitStack() as stack:
if self.use_multiprocessing:
chunks_to_process = int(len(self.baskets) / self.multiprocessing_chunk_size)
num_cpus = min(mp.cpu_count(), self.max_processes, chunks_to_process) or 1
logger.info(
... | def _init_samples_in_baskets(self):
chunks_to_process = int(len(self.baskets) / self.multiprocessing_chunk_size)
num_cpus = min(mp.cpu_count(), self.max_processes, chunks_to_process) or 1
logger.info(
f"Got ya {num_cpus} parallel workers to fill the baskets with samples (chunksize = {self.multiproc... | https://github.com/deepset-ai/FARM/issues/70 | 08/28/2019 07:47:35 - INFO - farm.utils - device: cuda n_gpu: 1, distributed training: False, 16-bits training: False
08/28/2019 07:47:35 - INFO - pytorch_transformers.tokenization_utils - loading file https://int-deepset-models-bert.s3.eu-central-1.amazonaws.com/pytorch/bert-base-german-cased-vocab.txt from cache ... | AttributeError |
def _featurize_samples(self):
with ExitStack() as stack:
if self.use_multiprocessing:
chunks_to_process = int(len(self.baskets) / self.multiprocessing_chunk_size)
num_cpus = min(mp.cpu_count(), self.max_processes, chunks_to_process) or 1
logger.info(
f"Got... | def _featurize_samples(self):
chunks_to_process = int(len(self.baskets) / self.multiprocessing_chunk_size)
num_cpus = min(mp.cpu_count(), self.max_processes, chunks_to_process) or 1
logger.info(
f"Got ya {num_cpus} parallel workers to featurize samples in baskets (chunksize = {self.multiprocessing_c... | https://github.com/deepset-ai/FARM/issues/70 | 08/28/2019 07:47:35 - INFO - farm.utils - device: cuda n_gpu: 1, distributed training: False, 16-bits training: False
08/28/2019 07:47:35 - INFO - pytorch_transformers.tokenization_utils - loading file https://int-deepset-models-bert.s3.eu-central-1.amazonaws.com/pytorch/bert-base-german-cased-vocab.txt from cache ... | AttributeError |
def _featurize_samples(self):
try:
if "train" in self.baskets[0].id:
train_labels = []
for basket in self.baskets:
for sample in basket.samples:
train_labels.append(sample.clear_text["label"])
scaler = StandardScaler()
scale... | def _featurize_samples(self):
chunks_to_process = int(len(self.baskets) / self.multiprocessing_chunk_size)
num_cpus = min(mp.cpu_count(), self.max_processes, chunks_to_process) or 1
logger.info(
f"Got ya {num_cpus} parallel workers to featurize samples in baskets (chunksize = {self.multiprocessing_c... | https://github.com/deepset-ai/FARM/issues/70 | 08/28/2019 07:47:35 - INFO - farm.utils - device: cuda n_gpu: 1, distributed training: False, 16-bits training: False
08/28/2019 07:47:35 - INFO - pytorch_transformers.tokenization_utils - loading file https://int-deepset-models-bert.s3.eu-central-1.amazonaws.com/pytorch/bert-base-german-cased-vocab.txt from cache ... | AttributeError |
def processSubscribe(self, session, subscribe):
"""
Implements :func:`crossbar.router.interfaces.IBroker.processSubscribe`
"""
if self._router.is_traced:
if not subscribe.correlation_id:
subscribe.correlation_id = self._router.new_correlation_id()
subscribe.correlation_is... | def processSubscribe(self, session, subscribe):
"""
Implements :func:`crossbar.router.interfaces.IBroker.processSubscribe`
"""
if self._router.is_traced:
if not subscribe.correlation_id:
subscribe.correlation_id = self._router.new_correlation_id()
subscribe.correlation_is... | https://github.com/crossbario/crossbar/issues/1576 | Unhandled error in Deferred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/autobahn/wamp/protocol.py", line 888, in onMessage
txaio.resolve(on_reply, msg.args[0])
File "/usr/local/lib/python3.6/dist-packages/txaio/tx.py", line 468, in resolve
future.callback(result)
File "/usr/local/li... | builtins.KeyError |
def on_authorize_success(authorization):
if not authorization["allow"]:
# error reply since session is not authorized to subscribe
#
replies = [
message.Error(
message.Subscribe.MESSAGE_TYPE,
subscribe.request,
ApplicationError.NOT_... | def on_authorize_success(authorization):
if not authorization["allow"]:
# error reply since session is not authorized to subscribe
#
replies = [
message.Error(
message.Subscribe.MESSAGE_TYPE,
subscribe.request,
ApplicationError.NOT_... | https://github.com/crossbario/crossbar/issues/1576 | Unhandled error in Deferred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/autobahn/wamp/protocol.py", line 888, in onMessage
txaio.resolve(on_reply, msg.args[0])
File "/usr/local/lib/python3.6/dist-packages/txaio/tx.py", line 468, in resolve
future.callback(result)
File "/usr/local/li... | builtins.KeyError |
def processRegister(self, session, register):
"""
Implements :func:`crossbar.router.interfaces.IDealer.processRegister`
"""
# check topic URI: for SUBSCRIBE, must be valid URI (either strict or loose), and all
# URI components must be non-empty other than for wildcard subscriptions
#
if self... | def processRegister(self, session, register):
"""
Implements :func:`crossbar.router.interfaces.IDealer.processRegister`
"""
# check topic URI: for SUBSCRIBE, must be valid URI (either strict or loose), and all
# URI components must be non-empty other than for wildcard subscriptions
#
if self... | https://github.com/crossbario/crossbar/issues/1576 | Unhandled error in Deferred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/autobahn/wamp/protocol.py", line 888, in onMessage
txaio.resolve(on_reply, msg.args[0])
File "/usr/local/lib/python3.6/dist-packages/txaio/tx.py", line 468, in resolve
future.callback(result)
File "/usr/local/li... | builtins.KeyError |
def on_authorize_success(authorization):
# check the authorization before ANYTHING else, otherwise
# we may leak information about already-registered URIs
# etc.
if not authorization["allow"]:
# error reply since session is not authorized to register
#
reply = message.Error(
... | def on_authorize_success(authorization):
# check the authorization before ANYTHING else, otherwise
# we may leak information about already-registered URIs
# etc.
if not authorization["allow"]:
# error reply since session is not authorized to register
#
reply = message.Error(
... | https://github.com/crossbario/crossbar/issues/1576 | Unhandled error in Deferred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/autobahn/wamp/protocol.py", line 888, in onMessage
txaio.resolve(on_reply, msg.args[0])
File "/usr/local/lib/python3.6/dist-packages/txaio/tx.py", line 468, in resolve
future.callback(result)
File "/usr/local/li... | builtins.KeyError |
def processCall(self, session, call):
"""
Implements :func:`crossbar.router.interfaces.IDealer.processCall`
"""
if self._router.is_traced:
if not call.correlation_id:
call.correlation_id = self._router.new_correlation_id()
call.correlation_is_anchor = True
cal... | def processCall(self, session, call):
"""
Implements :func:`crossbar.router.interfaces.IDealer.processCall`
"""
if self._router.is_traced:
if not call.correlation_id:
call.correlation_id = self._router.new_correlation_id()
call.correlation_is_anchor = True
cal... | https://github.com/crossbario/crossbar/issues/1576 | Unhandled error in Deferred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/autobahn/wamp/protocol.py", line 888, in onMessage
txaio.resolve(on_reply, msg.args[0])
File "/usr/local/lib/python3.6/dist-packages/txaio/tx.py", line 468, in resolve
future.callback(result)
File "/usr/local/li... | builtins.KeyError |
def on_authorize_success(authorization):
# the call to authorize the action _itself_ succeeded. now go on depending on whether
# the action was actually authorized or not ..
#
if not authorization["allow"]:
reply = message.Error(
message.Call.MESSAGE_TYPE,
call.request,
... | def on_authorize_success(authorization):
# the call to authorize the action _itself_ succeeded. now go on depending on whether
# the action was actually authorized or not ..
#
if not authorization["allow"]:
reply = message.Error(
message.Call.MESSAGE_TYPE,
call.request,
... | https://github.com/crossbario/crossbar/issues/1576 | Unhandled error in Deferred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/autobahn/wamp/protocol.py", line 888, in onMessage
txaio.resolve(on_reply, msg.args[0])
File "/usr/local/lib/python3.6/dist-packages/txaio/tx.py", line 468, in resolve
future.callback(result)
File "/usr/local/li... | builtins.KeyError |
def onMessage(self, msg):
"""
Implements :func:`autobahn.wamp.interfaces.ITransportHandler.onMessage`
"""
if self._session_id is None:
if not self._pending_session_id:
self._pending_session_id = util.id()
def welcome(
realm,
authid=None,
a... | def onMessage(self, msg):
"""
Implements :func:`autobahn.wamp.interfaces.ITransportHandler.onMessage`
"""
if self._session_id is None:
if not self._pending_session_id:
self._pending_session_id = util.id()
def welcome(
realm,
authid=None,
a... | https://github.com/crossbario/crossbar/issues/1576 | Unhandled error in Deferred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/autobahn/wamp/protocol.py", line 888, in onMessage
txaio.resolve(on_reply, msg.args[0])
File "/usr/local/lib/python3.6/dist-packages/txaio/tx.py", line 468, in resolve
future.callback(result)
File "/usr/local/li... | builtins.KeyError |
def success(res):
msg = None
# it is possible this session has disconnected
# while authentication was taking place
if self._transport is None:
self.log.info(
"Client session disconnected during authentication",
)
return
if isinstance(res, types.Accept):
... | def success(res):
msg = None
if isinstance(res, types.Accept):
custom = {"x_cb_node_id": self._router_factory._node_id}
welcome(
res.realm,
res.authid,
res.authrole,
res.authmethod,
res.authprovider,
res.authextra,
... | https://github.com/crossbario/crossbar/issues/1576 | Unhandled error in Deferred:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/autobahn/wamp/protocol.py", line 888, in onMessage
txaio.resolve(on_reply, msg.args[0])
File "/usr/local/lib/python3.6/dist-packages/txaio/tx.py", line 468, in resolve
future.callback(result)
File "/usr/local/li... | builtins.KeyError |
def create(transport, path, config):
personality = transport.worker.personality
personality.WEB_SERVICE_CHECKERS["publisher"](personality, config)
# create a vanilla session: the publisher will use this to inject events
#
publisher_session_config = ComponentConfig(realm=config["realm"], extra=None)... | def create(transport, path, config):
personality = transport.worker.personality
personality.WEB_SERVICE_CHECKERS["publisher"](personality, config)
# create a vanilla session: the publisher will use this to inject events
#
publisher_session_config = ComponentConfig(realm=config["realm"], extra=None)... | https://github.com/crossbario/crossbar/issues/1590 | 2019-05-18T14:50:35+0000 [Router 18] Starting "publisher" Web service on path "pub" of transport "transport001" <crossbar.worker.router.RouterController.start_web_transport_service>
2019-05-18T14:50:35+0000 [Router 18] RouterController.onUserError(): "TypeError: add() missing 1 required positional argum... | builtins.TypeError |
def create(transport, path, config):
personality = transport.worker.personality
personality.WEB_SERVICE_CHECKERS["caller"](personality, config)
# create a vanilla session: the caller will use this to inject calls
#
caller_session_config = ComponentConfig(realm=config["realm"], extra=None)
calle... | def create(transport, path, config):
personality = transport.worker.personality
personality.WEB_SERVICE_CHECKERS["caller"](personality, config)
# create a vanilla session: the caller will use this to inject calls
#
caller_session_config = ComponentConfig(realm=config["realm"], extra=None)
calle... | https://github.com/crossbario/crossbar/issues/1590 | 2019-05-18T14:50:35+0000 [Router 18] Starting "publisher" Web service on path "pub" of transport "transport001" <crossbar.worker.router.RouterController.start_web_transport_service>
2019-05-18T14:50:35+0000 [Router 18] RouterController.onUserError(): "TypeError: add() missing 1 required positional argum... | builtins.TypeError |
def create(transport, path, config):
personality = transport.worker.personality
personality.WEB_SERVICE_CHECKERS["webhook"](personality, config)
# create a vanilla session: the webhook will use this to inject events
#
webhook_session_config = ComponentConfig(realm=config["realm"], extra=None)
w... | def create(transport, path, config):
personality = transport.worker.personality
personality.WEB_SERVICE_CHECKERS["webhook"](personality, config)
# create a vanilla session: the webhook will use this to inject events
#
webhook_session_config = ComponentConfig(realm=config["realm"], extra=None)
w... | https://github.com/crossbario/crossbar/issues/1590 | 2019-05-18T14:50:35+0000 [Router 18] Starting "publisher" Web service on path "pub" of transport "transport001" <crossbar.worker.router.RouterController.start_web_transport_service>
2019-05-18T14:50:35+0000 [Router 18] RouterController.onUserError(): "TypeError: add() missing 1 required positional argum... | builtins.TypeError |
def start(self):
"""
Starts this node. This will start a node controller and then spawn new worker
processes as needed.
"""
if not self._config:
raise Exception("No node configuration set")
# get controller config/options
#
controller_config = self._config.get("controller", {})
... | def start(self):
"""
Starts this node. This will start a node controller and then spawn new worker
processes as needed.
"""
if not self._config:
raise Exception("No node configuration set")
# get controller config/options
#
controller_config = self._config.get("controller", {})
... | https://github.com/crossbario/crossbar/issues/1179 | 2017-09-05T14:52:34+0200 [Controller 15960] Starting 2 workers ...
2017-09-05T14:52:34+0200 [Controller 15960] Router worker "worker-001" starting ..
2017-09-05T14:52:34+0200 [Router 15969] Started Router worker "worker-001" [crossbar.worker.router.RouterWorkerSession / CPython-EPollReactor]
2017-09-05T14:52:34+... | builtins.AssertionError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.