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 __call__(self, a, index, shape):
return self.new_tensor([a], shape, indexes=index)
| def __call__(self, a, index, shape):
return self.new_tensor([a, index], shape)
| https://github.com/mars-project/mars/issues/64 | In [1]: from mars.deploy.local import new_cluster
In [2]: cluster = new_cluster(scheduler_n_process=2, worker_n_process=3, web=True)
In [3]: import mars.tensor as mt
In [4]: t = mt.random.rand(10, 10)
In [5]: mt.split(t, 5).execute()
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 716, in gev... | ValueError |
def tile(cls, op):
from ..merge.concatenate import TensorConcatenate
in_tensor = op.input
tensor = op.outputs[0]
indexes = list(op.indexes)
axis = 0
output_axis = 0
output_chunk_shape = []
to_concat_axis_index = []
for i, index in enumerate(indexes):
if isinstance(index, TE... | def tile(cls, op):
from ..merge.concatenate import TensorConcatenate
in_tensor = op.input
tensor = op.outputs[0]
indexes = list(op.indexes)
axis = 0
output_axis = 0
output_chunk_shape = []
to_concat_axis_index = []
for i, index in enumerate(indexes):
if isinstance(index, TE... | https://github.com/mars-project/mars/issues/64 | In [1]: from mars.deploy.local import new_cluster
In [2]: cluster = new_cluster(scheduler_n_process=2, worker_n_process=3, web=True)
In [3]: import mars.tensor as mt
In [4]: t = mt.random.rand(10, 10)
In [5]: mt.split(t, 5).execute()
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 716, in gev... | ValueError |
def new_tensors(self, inputs, shape, **kw):
indexes = kw.pop("indexes", None)
value = kw.pop("value", None)
with self._handle_params(inputs, indexes, value) as mix_inputs:
return super(TensorIndexSetValue, self).new_tensors(mix_inputs, shape, **kw)
| def new_tensors(self, inputs, shape, **kw):
tensor, indexes, value = inputs
self._indexes = indexes
self._value = value
inputs = self._handle_inputs(inputs)
return super(TensorIndexSetValue, self).new_tensors(inputs, shape, **kw)
| https://github.com/mars-project/mars/issues/64 | In [1]: from mars.deploy.local import new_cluster
In [2]: cluster = new_cluster(scheduler_n_process=2, worker_n_process=3, web=True)
In [3]: import mars.tensor as mt
In [4]: t = mt.random.rand(10, 10)
In [5]: mt.split(t, 5).execute()
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 716, in gev... | ValueError |
def new_chunks(self, inputs, shape, **kw):
indexes = kw.pop("indexes", None)
value = kw.pop("value", None)
with self._handle_params(inputs, indexes, value) as mix_inputs:
return super(TensorIndexSetValue, self).new_chunks(mix_inputs, shape, **kw)
| def new_chunks(self, inputs, shape, **kw):
chunk, indexes, value = inputs
self._indexes = indexes
self._value = value
inputs = self._handle_inputs(inputs)
return super(TensorIndexSetValue, self).new_chunks(inputs, shape, **kw)
| https://github.com/mars-project/mars/issues/64 | In [1]: from mars.deploy.local import new_cluster
In [2]: cluster = new_cluster(scheduler_n_process=2, worker_n_process=3, web=True)
In [3]: import mars.tensor as mt
In [4]: t = mt.random.rand(10, 10)
In [5]: mt.split(t, 5).execute()
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 716, in gev... | ValueError |
def __call__(self, a, index, value):
return self.new_tensor([a], a.shape, indexes=index, value=value)
| def __call__(self, a, index, value):
return self.new_tensor([a, index, value], a.shape)
| https://github.com/mars-project/mars/issues/64 | In [1]: from mars.deploy.local import new_cluster
In [2]: cluster = new_cluster(scheduler_n_process=2, worker_n_process=3, web=True)
In [3]: import mars.tensor as mt
In [4]: t = mt.random.rand(10, 10)
In [5]: mt.split(t, 5).execute()
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 716, in gev... | ValueError |
def tile(cls, op):
tensor = op.outputs[0]
value = op.value
is_value_tensor = isinstance(value, TENSOR_TYPE)
index_tensor_op = TensorIndex(dtype=tensor.dtype, sparse=op.sparse)
index_tensor = index_tensor_op.new_tensor(
[op.input], tensor.shape, indexes=op.indexes
).single_tiles()
n... | def tile(cls, op):
tensor = op.outputs[0]
value = op.value
is_value_tensor = isinstance(value, TENSOR_TYPE)
index_tensor_op = TensorIndex(dtype=tensor.dtype, sparse=op.sparse)
index_tensor = index_tensor_op.new_tensor(
[op.input, op.indexes], tensor.shape
).single_tiles()
nsplits =... | https://github.com/mars-project/mars/issues/64 | In [1]: from mars.deploy.local import new_cluster
In [2]: cluster = new_cluster(scheduler_n_process=2, worker_n_process=3, web=True)
In [3]: import mars.tensor as mt
In [4]: t = mt.random.rand(10, 10)
In [5]: mt.split(t, 5).execute()
Traceback (most recent call last):
File "src/gevent/greenlet.py", line 716, in gev... | ValueError |
def delete_meta(self, session_id, chunk_key):
"""
Delete metadata from store and cache
"""
query_key = (session_id, chunk_key)
try:
del self._meta_store[query_key]
if self._kv_store_ref is not None:
self._kv_store_ref.delete(
"/sessions/%s/chunks/%s" % (se... | def delete_meta(self, session_id, chunk_key):
"""
Delete metadata from store and cache
"""
query_key = (session_id, chunk_key)
try:
del self._meta_store[query_key]
except KeyError:
pass
try:
del self._meta_cache[query_key]
except KeyError:
pass
# broa... | https://github.com/mars-project/mars/issues/72 | Traceback (most recent call last):
File "src/gevent/greenlet.py", line 716, in gevent._greenlet.Greenlet.run
File "mars/actors/pool/gevent_pool.pyx", line 88, in mars.actors.pool.gevent_pool.ActorExecutionContext.fire_run
cpdef object fire_run(self):
File "mars/actors/pool/gevent_pool.pyx", line 91, in mars.actors.pool... | KeyError |
def execute(self, session=None, **kw):
from ..session import Session
if session is None:
session = Session.default_or_local()
return session.run(*self, **kw)
| def execute(self, session=None, n_parallel=None):
from ..session import Session
if session is None:
session = Session.default_or_local()
return session.run(*self, n_parallel=n_parallel)
| https://github.com/mars-project/mars/issues/63 | n [1]: from mars.deploy.local import new_cluster
In [2]: cluster = new_cluster(scheduler_n_process=2, worker_n_process=3, web=True)
In [3]: import mars.tensor as mt
In [4]: t = mt.random.rand(10, 10)
In [5]: mt.linalg.svd(t).execute()
---------------------------------------------------------------------------
TypeE... | TypeError |
def build_graph(self, graph=None, cls=DAG, tiled=False, compose=True):
if tiled and self.is_coarse():
self.tiles()
graph = graph if graph is not None else cls()
keys = None
if tiled:
nodes = list(c.data for c in self.chunks)
keys = list(c.key for c in self.chunks)
else:
... | def build_graph(self, graph=None, cls=DAG, tiled=False, compose=True):
if tiled and self.is_coarse():
self.tiles()
graph = graph if graph is not None else cls()
keys = None
if tiled:
nodes = list(c.data for c in self.chunks)
keys = list(c.key for c in self.chunks)
else:
... | https://github.com/mars-project/mars/issues/8 | Traceback (most recent call last):
File "src/gevent/greenlet.py", line 716, in gevent._greenlet.Greenlet.run
File "mars/actors/pool/gevent_pool.pyx", line 88, in mars.actors.pool.gevent_pool.ActorExecutionContext.fire_run
cpdef object fire_run(self):
File "mars/actors/pool/gevent_pool.pyx", line 91, in mars.actors.pool... | KeyError |
def build_graph(self, graph=None, cls=DAG, tiled=False, compose=True):
if tiled and self.is_coarse():
self.tiles()
graph = graph if graph is not None else cls()
keys = None
if tiled:
nodes = list(c.data for c in self.chunks)
keys = list(c.key for c in self.chunks)
else:
... | def build_graph(self, graph=None, cls=DAG, tiled=False, compose=True):
if tiled and self.is_coarse():
self.tiles()
graph = graph if graph is not None else cls()
keys = None
if tiled:
nodes = list(c.data for c in self.chunks)
keys = list(c.key for c in self.chunks)
else:
... | https://github.com/mars-project/mars/issues/8 | Traceback (most recent call last):
File "src/gevent/greenlet.py", line 716, in gevent._greenlet.Greenlet.run
File "mars/actors/pool/gevent_pool.pyx", line 88, in mars.actors.pool.gevent_pool.ActorExecutionContext.fire_run
cpdef object fire_run(self):
File "mars/actors/pool/gevent_pool.pyx", line 91, in mars.actors.pool... | KeyError |
def rand(random_state, *dn, **kw):
"""
Random values in a given shape.
Create a tensor of the given shape and populate it with
random samples from a uniform distributionc
over ``[0, 1)``.
Parameters
----------
d0, d1, ..., dn : int, optional
The dimensions of the returned tenso... | def rand(random_state, *dn, **kw):
"""
Random values in a given shape.
Create a tensor of the given shape and populate it with
random samples from a uniform distributionc
over ``[0, 1)``.
Parameters
----------
d0, d1, ..., dn : int, optional
The dimensions of the returned tenso... | https://github.com/mars-project/mars/issues/1 | In [1]: import numpy as np
In [2]: np.random.rand((2, 3))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-e49eb55bb286> in <module>()
----> 1 np.random.rand((2, 3))
mtrand.pyx in mtrand.RandomState... | TypeError |
def randn(random_state, *dn, **kw):
"""
Return a sample (or samples) from the "standard normal" distribution.
If positive, int_like or int-convertible arguments are provided,
`randn` generates an array of shape ``(d0, d1, ..., dn)``, filled
with random floats sampled from a univariate "normal" (Gau... | def randn(random_state, *dn, **kw):
"""
Return a sample (or samples) from the "standard normal" distribution.
If positive, int_like or int-convertible arguments are provided,
`randn` generates an array of shape ``(d0, d1, ..., dn)``, filled
with random floats sampled from a univariate "normal" (Gau... | https://github.com/mars-project/mars/issues/1 | In [1]: import numpy as np
In [2]: np.random.rand((2, 3))
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-2-e49eb55bb286> in <module>()
----> 1 np.random.rand((2, 3))
mtrand.pyx in mtrand.RandomState... | TypeError |
def assign_average_vars(self, var_list):
"""Assign variables in var_list with their respective averages.
Args:
var_list: List of model variables to be assigned to their average.
Returns:
assign_op: The op corresponding to the assignment operation of
variables to their average.
... | def assign_average_vars(self, var_list):
"""Assign variables in var_list with their respective averages.
Args:
var_list: List of model variables to be assigned to their average.
Returns:
assign_op: The op corresponding to the assignment operation of
variables to their average.
... | https://github.com/tensorflow/addons/issues/2255 | Traceback (most recent call last):
File "/usr/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/usr/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/root/.vscode-server/extensions/ms-python.python-2020.11.371526539/pythonFiles/lib/python/debugpy/__main__... | AttributeError |
def shear_x(image: TensorLike, level: float, replace: TensorLike) -> TensorLike:
"""Perform shear operation on an image (x-axis).
Args:
image: A 3D image `Tensor`.
level: A float denoting shear element along y-axis
replace: A one or three value 1D tensor to fill empty pixels.
Return... | def shear_x(image: TensorLike, level: float, replace: int) -> TensorLike:
"""Perform shear operation on an image (x-axis).
Args:
image: A 3D image Tensor.
level: A float denoting shear element along y-axis
replace: A one or three value 1D tensor to fill empty pixels.
Returns:
... | https://github.com/tensorflow/addons/issues/2092 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-12-50c68fed8a6d> in <module>()
----> 1 sheared_image3 = tfa.image.shear_x(float_image, 0.3, replace=0.5)
2 sheared_image4 = tfa.image.shear_y(float_image... | TypeError |
def shear_y(image: TensorLike, level: float, replace: TensorLike) -> TensorLike:
"""Perform shear operation on an image (y-axis).
Args:
image: A 3D image `Tensor`.
level: A float denoting shear element along x-axis
replace: A one or three value 1D tensor to fill empty pixels.
Return... | def shear_y(image: TensorLike, level: float, replace: int) -> TensorLike:
"""Perform shear operation on an image (y-axis).
Args:
image: A 3D image `Tensor`.
level: A float denoting shear element along x-axis
replace: A one or three value 1D tensor to fill empty pixels.
Returns:
... | https://github.com/tensorflow/addons/issues/2092 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-12-50c68fed8a6d> in <module>()
----> 1 sheared_image3 = tfa.image.shear_x(float_image, 0.3, replace=0.5)
2 sheared_image4 = tfa.image.shear_y(float_image... | TypeError |
def translate_xy(
image: TensorLike, translate_to: TensorLike, replace: TensorLike
) -> TensorLike:
"""Translates image in X or Y dimension.
Args:
image: A 3D image `Tensor`.
translate_to: A 1D `Tensor` to translate `[x, y]`.
replace: A one or three value 1D `Tensor` to fill empty p... | def translate_xy(
image: TensorLike, translate_to: TensorLike, replace: int
) -> TensorLike:
"""Translates image in X or Y dimension.
Args:
image: A 3D image `Tensor`.
translate_to: A 1D `Tensor` to translate [x, y]
replace: A one or three value 1D `Tensor` to fill empty pixels.
... | https://github.com/tensorflow/addons/issues/2092 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-12-50c68fed8a6d> in <module>()
----> 1 sheared_image3 = tfa.image.shear_x(float_image, 0.3, replace=0.5)
2 sheared_image4 = tfa.image.shear_y(float_image... | TypeError |
def unwrap(image, replace):
"""Unwraps an image produced by wrap.
Where there is a 0 in the last channel for every spatial position,
the rest of the three channels in that spatial dimension are grayed
(set to 128). Operations like translate and shear on a wrapped
Tensor will leave 0s in empty loca... | def unwrap(image, replace):
"""Unwraps an image produced by wrap.
Where there is a 0 in the last channel for every spatial position,
the rest of the three channels in that spatial dimension are grayed
(set to 128). Operations like translate and shear on a wrapped
Tensor will leave 0s in empty loca... | https://github.com/tensorflow/addons/issues/2092 | ---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-12-50c68fed8a6d> in <module>()
----> 1 sheared_image3 = tfa.image.shear_x(float_image, 0.3, replace=0.5)
2 sheared_image4 = tfa.image.shear_y(float_image... | TypeError |
def __init__(self, weight_decay: Union[FloatTensorLike, Callable], **kwargs):
"""Extension class that adds weight decay to an optimizer.
Args:
weight_decay: A `Tensor`, a floating point value, or a schedule
that is a `tf.keras.optimizers.schedules.LearningRateSchedule`
to decay ... | def __init__(self, weight_decay: Union[FloatTensorLike, Callable], **kwargs):
"""Extension class that adds weight decay to an optimizer.
Args:
weight_decay: A `Tensor` or a floating point value, the factor by
which a variable is decayed in the update step.
**kwargs: Optional list or... | https://github.com/tensorflow/addons/issues/844 | Traceback (most recent call last):
File "tmp2.py", line 42, in <module>
model.fit(x_train, y_train, epochs=40, validation_split=0.1)
File "/home/yetao/.local/lib/python3.5/site-packages/tensorflow_core/python/keras/engine/training.py", line 728, in fit
use_multiprocessing=use_multiprocessing)
File "/home/yetao/.local/l... | tensorflow.python.framework.errors_impl.InvalidArgumentError |
def _decay_weights_op(self, var):
if not self._decay_var_list or var.ref() in self._decay_var_list:
return var.assign_sub(self._decayed_wd(var.dtype) * var, self._use_locking)
return tf.no_op()
| def _decay_weights_op(self, var):
if not self._decay_var_list or var.ref() in self._decay_var_list:
return var.assign_sub(
self._get_hyper("weight_decay", var.dtype) * var, self._use_locking
)
return tf.no_op()
| https://github.com/tensorflow/addons/issues/844 | Traceback (most recent call last):
File "tmp2.py", line 42, in <module>
model.fit(x_train, y_train, epochs=40, validation_split=0.1)
File "/home/yetao/.local/lib/python3.5/site-packages/tensorflow_core/python/keras/engine/training.py", line 728, in fit
use_multiprocessing=use_multiprocessing)
File "/home/yetao/.local/l... | tensorflow.python.framework.errors_impl.InvalidArgumentError |
def _decay_weights_sparse_op(self, var, indices):
if not self._decay_var_list or var.ref() in self._decay_var_list:
update = -self._decayed_wd(var.dtype) * tf.gather(var, indices)
return self._resource_scatter_add(var, indices, update)
return tf.no_op()
| def _decay_weights_sparse_op(self, var, indices):
if not self._decay_var_list or var.ref() in self._decay_var_list:
update = -self._get_hyper("weight_decay", var.dtype) * tf.gather(var, indices)
return self._resource_scatter_add(var, indices, update)
return tf.no_op()
| https://github.com/tensorflow/addons/issues/844 | Traceback (most recent call last):
File "tmp2.py", line 42, in <module>
model.fit(x_train, y_train, epochs=40, validation_split=0.1)
File "/home/yetao/.local/lib/python3.5/site-packages/tensorflow_core/python/keras/engine/training.py", line 728, in fit
use_multiprocessing=use_multiprocessing)
File "/home/yetao/.local/l... | tensorflow.python.framework.errors_impl.InvalidArgumentError |
def _update_confusion_matrix(self, y_true, y_pred, sample_weight):
y_true = self._safe_squeeze(y_true)
y_pred = self._safe_squeeze(y_pred)
new_conf_mtx = tf.math.confusion_matrix(
labels=y_true,
predictions=y_pred,
num_classes=self.num_classes,
weights=sample_weight,
... | def _update_confusion_matrix(self, y_true, y_pred, sample_weight):
y_true = tf.squeeze(y_true)
y_pred = tf.squeeze(y_pred)
new_conf_mtx = tf.math.confusion_matrix(
labels=y_true,
predictions=y_pred,
num_classes=self.num_classes,
weights=sample_weight,
dtype=tf.float3... | https://github.com/tensorflow/addons/issues/1962 | ValueError Traceback (most recent call last)
<ipython-input-12-7ea8164c36b0> in <module>
9
10 # Batch-size = 1: this will raise an exception due to tf.squeeze
---> 11 kappa.update_state(tf.ones(1), tf.ones(1))
/usr/local/lib/python3.6/dist-packages/tensorflow/python/keras/utils/metrics_u... | ValueError |
def apply_gradients(self, grads_and_vars, name=None, **kwargs):
self._optimizer._iterations = self.iterations # pylint: disable=protected-access
return super().apply_gradients(grads_and_vars, name, **kwargs)
| def apply_gradients(self, grads_and_vars, name=None):
self._optimizer._iterations = self.iterations # pylint: disable=protected-access
return super().apply_gradients(grads_and_vars, name)
| https://github.com/tensorflow/addons/issues/1920 | Epoch 1/5
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-19-841302a83165> in <module>
----> 1 model.fit(
2 train_ds,
3 epochs=1 if lr_finder else 5,
4 callbacks=callbacks,
5 steps_per_... | TypeError |
def cutout(
images: TensorLike,
mask_size: TensorLike,
offset: TensorLike = (0, 0),
constant_values: Number = 0,
data_format: str = "channels_last",
) -> tf.Tensor:
"""Apply cutout (https://arxiv.org/abs/1708.04552) to images.
This operation applies a (mask_height x mask_width) mask of zero... | def cutout(
images: TensorLike,
mask_size: TensorLike,
offset: TensorLike = (0, 0),
constant_values: Number = 0,
data_format: str = "channels_last",
) -> tf.Tensor:
"""Apply cutout (https://arxiv.org/abs/1708.04552) to images.
This operation applies a (mask_height x mask_width) mask of zero... | https://github.com/tensorflow/addons/issues/1824 | Traceback (most recent call last):
File "test.py", line 16, in <module>
model.fit(dataset)
File "/home/clementw/Keras-FewShotLearning/venv/lib/python3.6/site-packages/tensorflow_core/python/keras/engine/training.py", line 819, in fit
use_multiprocessing=use_multiprocessing)
File "/home/clementw/Keras-FewShotLearning/ve... | ValueError |
def pinball_loss(
y_true: TensorLike, y_pred: TensorLike, tau: FloatTensorLike = 0.5
) -> tf.Tensor:
"""Computes the pinball loss between `y_true` and `y_pred`.
`loss = maximum(tau * (y_true - y_pred), (tau - 1) * (y_true - y_pred))`
In the context of regression this, loss yields an estimator of the t... | def pinball_loss(
y_true: TensorLike, y_pred: TensorLike, tau: FloatTensorLike = 0.5
) -> tf.Tensor:
"""Computes the pinball loss between `y_true` and `y_pred`.
`loss = maximum(tau * (y_true - y_pred), (tau - 1) * (y_true - y_pred))`
In the context of regression this, loss yields an estimator of the t... | https://github.com/tensorflow/addons/issues/1202 | (proof_of_concept_pytest) /mnt/c/Users/gdemarmi/Desktop/projects/addons $ pytest -v tensorflow_addons/losses/quantiles_test.py
/home/gdemarmi/softwares/python/anaconda/lib/python3.7/site-packages/pep8.py:110: FutureWarning: Possible nested set at position 1
EXTRANEOUS_WHITESPACE_REGEX = re.compile(r'[[({] | []}),;:]')
... | tensorflow.python.framework.errors_impl.InvalidArgumentError |
def __init__(
self,
metrics_separator: str = " - ",
overall_bar_format: str = "{l_bar}{bar} {n_fmt}/{total_fmt} ETA: "
"{remaining}s, {rate_fmt}{postfix}",
epoch_bar_format: str = "{n_fmt}/{total_fmt}{bar} ETA: {remaining}s - {desc}",
metrics_format: str = "{name}: {value:0.4f}",
update_per... | def __init__(
self,
metrics_separator: str = " - ",
overall_bar_format: str = "{l_bar}{bar} {n_fmt}/{total_fmt} ETA: "
"{remaining}s, {rate_fmt}{postfix}",
epoch_bar_format: str = "{n_fmt}/{total_fmt}{bar} ETA: {remaining}s - {desc}",
metrics_format: str = "{name}: {value:0.4f}",
update_per... | https://github.com/tensorflow/addons/issues/1495 | ---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-23-fdbb03f574a1> in <module>
48 # class_weight=class_weights,
49 verbose=VERBOSE,
---> 50 callbacks=model_callbacks,
51 )
~/.pyenv/versions/3.... | KeyError |
def on_train_begin(self, logs=None):
self.num_epochs = self.params["epochs"]
if self.show_overall_progress:
self.overall_progress_tqdm = self.tqdm(
desc="Training",
total=self.num_epochs,
bar_format=self.overall_bar_format,
leave=self.leave_overall_progre... | def on_train_begin(self, logs=None):
self.num_epochs = self.params["epochs"]
self.metrics = self.params["metrics"]
if self.show_overall_progress:
self.overall_progress_tqdm = self.tqdm(
desc="Training",
total=self.num_epochs,
bar_format=self.overall_bar_format,
... | https://github.com/tensorflow/addons/issues/1495 | ---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-23-fdbb03f574a1> in <module>
48 # class_weight=class_weights,
49 verbose=VERBOSE,
---> 50 callbacks=model_callbacks,
51 )
~/.pyenv/versions/3.... | KeyError |
def format_metrics(self, logs={}, factor=1):
"""Format metrics in logs into a string.
Arguments:
logs: dictionary of metrics and their values. Defaults to
empty dictionary.
factor (int): The factor we want to divide the metrics in logs
by, useful when we are computing th... | def format_metrics(self, logs={}, factor=1):
"""Format metrics in logs into a string.
Arguments:
logs: dictionary of metrics and their values. Defaults to
empty dictionary.
factor (int): The factor we want to divide the metrics in logs
by, useful when we are computing th... | https://github.com/tensorflow/addons/issues/1495 | ---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-23-fdbb03f574a1> in <module>
48 # class_weight=class_weights,
49 verbose=VERBOSE,
---> 50 callbacks=model_callbacks,
51 )
~/.pyenv/versions/3.... | KeyError |
def __init__(
self,
learning_rate: Union[FloatTensorLike, Callable] = 0.001,
beta_1: FloatTensorLike = 0.9,
beta_2: FloatTensorLike = 0.999,
epsilon: FloatTensorLike = 1e-7,
weight_decay: FloatTensorLike = 0.0,
amsgrad: bool = False,
sma_threshold: FloatTensorLike = 5.0,
# float for ... | def __init__(
self,
learning_rate: Union[FloatTensorLike, Callable] = 0.001,
beta_1: FloatTensorLike = 0.9,
beta_2: FloatTensorLike = 0.999,
epsilon: FloatTensorLike = 1e-7,
weight_decay: FloatTensorLike = 0.0,
amsgrad: bool = False,
sma_threshold: FloatTensorLike = 5.0,
total_steps:... | https://github.com/tensorflow/addons/issues/1373 | Traceback (most recent call last):
File "Boucle_IA.py", line 24, in <module>
model = tf.keras.models.load_model('inference_complete-2020-03-18-Mobilenet.h5', custom_objects={'Lookahead': ranger})
File "C:\Program Files\Python37\lib\site-packages\tensorflow_core\python\keras\saving\save.py", line 146, in load_model
retu... | TypeError |
def state_size(self):
"""The `state_size` property of `AttentionWrapper`.
Returns:
An `AttentionWrapperState` tuple containing shapes used
by this object.
"""
return AttentionWrapperState(
cell_state=self._cell.state_size,
attention=self._get_attention_layer_size(),
... | def state_size(self):
"""The `state_size` property of `AttentionWrapper`.
Returns:
An `AttentionWrapperState` tuple containing shapes used
by this object.
"""
return AttentionWrapperState(
cell_state=self._cell.state_size,
time=tf.TensorShape([]),
attention=self._get... | https://github.com/tensorflow/addons/issues/1194 | Test 1 passed
Traceback (most recent call last):
File "/run/media/zenbook/work/phd/work/__/pb1.py", line 26, in <module>
test(masked=True); print('Test 2 passed')
File "/home/zenbook/miniconda3/envs/tfn/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 580, in __call__
result = self._call(*args... | ValueError |
def get_initial_state(self, inputs=None, batch_size=None, dtype=None):
"""Return an initial (zero) state tuple for this `AttentionWrapper`.
**NOTE** Please see the initializer documentation for details of how
to call `get_initial_state` if using an `AttentionWrapper` with a
`BeamSearchDecoder`.
Ar... | def get_initial_state(self, inputs=None, batch_size=None, dtype=None):
"""Return an initial (zero) state tuple for this `AttentionWrapper`.
**NOTE** Please see the initializer documentation for details of how
to call `get_initial_state` if using an `AttentionWrapper` with a
`BeamSearchDecoder`.
Ar... | https://github.com/tensorflow/addons/issues/1194 | Test 1 passed
Traceback (most recent call last):
File "/run/media/zenbook/work/phd/work/__/pb1.py", line 26, in <module>
test(masked=True); print('Test 2 passed')
File "/home/zenbook/miniconda3/envs/tfn/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 580, in __call__
result = self._call(*args... | ValueError |
def call(self, inputs, state, **kwargs):
"""Perform a step of attention-wrapped RNN.
- Step 1: Mix the `inputs` and previous step's `attention` output via
`cell_input_fn`.
- Step 2: Call the wrapped `cell` with this input and its previous
state.
- Step 3: Score the cell's output with `atten... | def call(self, inputs, state, **kwargs):
"""Perform a step of attention-wrapped RNN.
- Step 1: Mix the `inputs` and previous step's `attention` output via
`cell_input_fn`.
- Step 2: Call the wrapped `cell` with this input and its previous
state.
- Step 3: Score the cell's output with `atten... | https://github.com/tensorflow/addons/issues/1194 | Test 1 passed
Traceback (most recent call last):
File "/run/media/zenbook/work/phd/work/__/pb1.py", line 26, in <module>
test(masked=True); print('Test 2 passed')
File "/home/zenbook/miniconda3/envs/tfn/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 580, in __call__
result = self._call(*args... | ValueError |
def sigmoid_focal_crossentropy(
y_true, y_pred, alpha=0.25, gamma=2.0, from_logits=False
):
"""
Args
y_true: true targets tensor.
y_pred: predictions tensor.
alpha: balancing factor.
gamma: modulating factor.
Returns:
Weighted loss float `Tensor`. If `reduction` ... | def sigmoid_focal_crossentropy(
y_true, y_pred, alpha=0.25, gamma=2.0, from_logits=False
):
"""
Args
y_true: true targets tensor.
y_pred: predictions tensor.
alpha: balancing factor.
gamma: modulating factor.
Returns:
Weighted loss float `Tensor`. If `reduction` ... | https://github.com/tensorflow/addons/issues/876 | Model: "mlp"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
hidden (Dense) (None, 100) 100100
__________________________________________________... | ValueError |
def build(self, input_shape):
"""Build `Layer`"""
input_shape = tf.TensorShape(input_shape).as_list()
self.input_spec = tf.keras.layers.InputSpec(shape=[None] + input_shape[1:])
if not self.layer.built:
self.layer.build(input_shape)
if not hasattr(self.layer, "kernel"):
raise Value... | def build(self, input_shape):
"""Build `Layer`"""
input_shape = tf.TensorShape(input_shape).as_list()
self.input_spec = tf.keras.layers.InputSpec(shape=[None] + input_shape[1:])
if not self.layer.built:
self.layer.build(input_shape)
if not hasattr(self.layer, "kernel"):
raise Value... | https://github.com/tensorflow/addons/issues/624 | ['weight_normalization/g:0', 'weight_normalization/kernel:0', 'weight_normalization/bias:0', 'weight_normalization/initialized:0', 'weight_normalization/kernel:0', 'weight_normalization/bias:0']
Traceback (most recent call last):
File "/home/ubuntu/hankcs/laser/tests/playground/wn_bug.py", line 14, in <module>
model.sa... | RuntimeError |
def build(self, input_shape):
super(LayerNormLSTMCell, self).build(input_shape)
self.kernel_norm.build([input_shape[0], self.units * 4])
self.recurrent_norm.build([input_shape[0], self.units * 4])
self.state_norm.build([input_shape[0], self.units])
| def build(self, input_shape):
super(LayerNormLSTMCell, self).build(input_shape)
norm_input_shape = [input_shape[0], self.units]
self.kernel_norm.build(norm_input_shape)
self.recurrent_norm.build(norm_input_shape)
self.state_norm.build(norm_input_shape)
| https://github.com/tensorflow/addons/issues/321 | ERROR: testCellOutput (__main__.LayerNormLSTMCellTest)
testCellOutput (__main__.LayerNormLSTMCellTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmpfs/src/github/tensorflow_addons/tf/local/lib/python2.7/site-packages/absl/third_party/unittest3_backp... | ValueError |
def triplet_semihard_loss(y_true, y_pred, margin=1.0):
"""Computes the triplet loss with semi-hard negative mining.
Args:
y_true: 1-D integer `Tensor` with shape [batch_size] of
multiclass integer labels.
y_pred: 2-D float `Tensor` of embedding vectors. Embeddings should
be l2 norma... | def triplet_semihard_loss(y_true, y_pred, margin=1.0):
"""Computes the triplet loss with semi-hard negative mining.
Args:
y_true: 1-D integer `Tensor` with shape [batch_size] of
multiclass integer labels.
y_pred: 2-D float `Tensor` of embedding vectors. Embeddings should
be l2 norma... | https://github.com/tensorflow/addons/issues/295 | AssertionError Traceback (most recent call last)
<ipython-input-13-f35ffd674f2d> in <module>
5 model = Sequential()
6 model.add(Dense(32, input_dim=784))
----> 7 model.compile(loss=tfa.losses.triplet_semihard_loss, optimizer=tf.keras.optimizers.Adam())
/anaconda3/envs/tf2/lib/python3.6/site-... | AssertionError |
def __init__(self, model, autobalance=False):
super(ComputeLoss, self).__init__()
device = next(model.parameters()).device # get model device
h = model.hyp # hyperparameters
# Define criteria
BCEcls = nn.BCEWithLogitsLoss(pos_weight=torch.tensor([h["cls_pw"]], device=device))
BCEobj = nn.BCEW... | def __init__(self, model, autobalance=False):
super(ComputeLoss, self).__init__()
device = next(model.parameters()).device # get model device
h = model.hyp # hyperparameters
# Define criteria
BCEcls = nn.BCEWithLogitsLoss(pos_weight=torch.tensor([h["cls_pw"]], device=device))
BCEobj = nn.BCEW... | https://github.com/ultralytics/yolov5/issues/2255 | Traceback (most recent call last):
File "/Users/glennjocher/opt/anaconda3/envs/env1/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3331, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-5-be04c762b799>", line 5, in <module>
c = a / 0
RuntimeError: ZeroDivisionError | RuntimeError |
def train(hyp, opt, device, tb_writer=None, wandb=None):
logger.info(
colorstr("hyperparameters: ") + ", ".join(f"{k}={v}" for k, v in hyp.items())
)
save_dir, epochs, batch_size, total_batch_size, weights, rank = (
Path(opt.save_dir),
opt.epochs,
opt.batch_size,
opt.... | def train(hyp, opt, device, tb_writer=None, wandb=None):
logger.info(
colorstr("hyperparameters: ") + ", ".join(f"{k}={v}" for k, v in hyp.items())
)
save_dir, epochs, batch_size, total_batch_size, weights, rank = (
Path(opt.save_dir),
opt.epochs,
opt.batch_size,
opt.... | https://github.com/ultralytics/yolov5/issues/2255 | Traceback (most recent call last):
File "/Users/glennjocher/opt/anaconda3/envs/env1/lib/python3.7/site-packages/IPython/core/interactiveshell.py", line 3331, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-5-be04c762b799>", line 5, in <module>
c = a / 0
RuntimeError: ZeroDivisionError | RuntimeError |
def forward(self, imgs, size=640, augment=False, profile=False):
# Inference from various sources. For height=720, width=1280, RGB images example inputs are:
# filename: imgs = 'data/samples/zidane.jpg'
# URI: = 'https://github.com/ultralytics/yolov5/releases/download/v1.0/zidane.jpg'
... | def forward(self, imgs, size=640, augment=False, profile=False):
# Inference from various sources. For height=720, width=1280, RGB images example inputs are:
# filename: imgs = 'data/samples/zidane.jpg'
# URI: = 'https://github.com/ultralytics/yolov5/releases/download/v1.0/zidane.jpg'
... | https://github.com/ultralytics/yolov5/issues/2246 | ValueError Traceback (most recent call last)
<ipython-input-1-86a3d667ec69> in <module>()
9
10 # Inference
---> 11 results = model(imgs)
12
13 # Results
2 frames
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
725 result... | ValueError |
def display(self, pprint=False, show=False, save=False, render=False, save_dir=""):
colors = color_list()
for i, (img, pred) in enumerate(zip(self.imgs, self.pred)):
str = f"image {i + 1}/{len(self.pred)}: {img.shape[0]}x{img.shape[1]} "
if pred is not None:
for c in pred[:, -1].uniq... | def display(self, pprint=False, show=False, save=False, render=False, save_dir=""):
colors = color_list()
for i, (img, pred) in enumerate(zip(self.imgs, self.pred)):
str = f"image {i + 1}/{len(self.pred)}: {img.shape[0]}x{img.shape[1]} "
if pred is not None:
for c in pred[:, -1].uniq... | https://github.com/ultralytics/yolov5/issues/2246 | ValueError Traceback (most recent call last)
<ipython-input-1-86a3d667ec69> in <module>()
9
10 # Inference
---> 11 results = model(imgs)
12
13 # Results
2 frames
/usr/local/lib/python3.6/dist-packages/torch/nn/modules/module.py in _call_impl(self, *input, **kwargs)
725 result... | ValueError |
def __init__(self, c1, c2, k=3, s=1): # ch_in, ch_out, kernel, stride
super(GhostBottleneck, self).__init__()
c_ = c2 // 2
self.conv = nn.Sequential(
GhostConv(c1, c_, 1, 1), # pw
DWConv(c_, c_, k, s, act=False) if s == 2 else nn.Identity(), # dw
GhostConv(c_, c2, 1, 1, act=False)... | def __init__(self, c1, c2, k, s):
super(GhostBottleneck, self).__init__()
c_ = c2 // 2
self.conv = nn.Sequential(
GhostConv(c1, c_, 1, 1), # pw
DWConv(c_, c_, k, s, act=False) if s == 2 else nn.Identity(), # dw
GhostConv(c_, c2, 1, 1, act=False),
) # pw-linear
self.shortcu... | https://github.com/ultralytics/yolov5/issues/2081 | TypeError Traceback (most recent call last)
<ipython-input-2-7facafecdabb> in <module>()
----> 1 model = Model("./models/yolov5s.yaml")
2
<ipython-input-1-7b447b7ed90c> in __init__(self, cfg, ch, nc)
78 logger.info('Overriding model.yaml nc=%g with nc=%g' % (self.yaml['nc'],... | TypeError |
def parse_model(d, ch): # model_dict, input_channels(3)
logger.info(
"\n%3s%18s%3s%10s %-40s%-30s"
% ("", "from", "n", "params", "module", "arguments")
)
anchors, nc, gd, gw = (
d["anchors"],
d["nc"],
d["depth_multiple"],
d["width_multiple"],
)
na = ... | def parse_model(d, ch): # model_dict, input_channels(3)
logger.info(
"\n%3s%18s%3s%10s %-40s%-30s"
% ("", "from", "n", "params", "module", "arguments")
)
anchors, nc, gd, gw = (
d["anchors"],
d["nc"],
d["depth_multiple"],
d["width_multiple"],
)
na = ... | https://github.com/ultralytics/yolov5/issues/2081 | TypeError Traceback (most recent call last)
<ipython-input-2-7facafecdabb> in <module>()
----> 1 model = Model("./models/yolov5s.yaml")
2
<ipython-input-1-7b447b7ed90c> in __init__(self, cfg, ch, nc)
78 logger.info('Overriding model.yaml nc=%g with nc=%g' % (self.yaml['nc'],... | TypeError |
def color_list():
# Return first 10 plt colors as (r,g,b) https://stackoverflow.com/questions/51350872/python-from-color-name-to-rgb
def hex2rgb(h):
return tuple(int(h[1 + i : 1 + i + 2], 16) for i in (0, 2, 4))
return [
hex2rgb(h) for h in matplotlib.colors.TABLEAU_COLORS.values()
] #... | def color_list():
# Return first 10 plt colors as (r,g,b) https://stackoverflow.com/questions/51350872/python-from-color-name-to-rgb
def hex2rgb(h):
return tuple(int(h[1 + i : 1 + i + 2], 16) for i in (0, 2, 4))
return [hex2rgb(h) for h in plt.rcParams["axes.prop_cycle"].by_key()["color"]]
| https://github.com/ultralytics/yolov5/issues/2066 | Traceback (most recent call last):
File "D:\software\Python38\lib\threading.py", line 932, in _bootstrap_inner
self.run()
File "D:\software\Python38\lib\threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "D:\yolov5\utils\plots.py", line 124, in plot_images
colors = color_list() # list of co... | TypeError |
def cache_labels(self, path=Path("./labels.cache"), prefix=""):
# Cache dataset labels, check images and read shapes
x = {} # dict
nm, nf, ne, nc = 0, 0, 0, 0 # number missing, found, empty, duplicate
pbar = tqdm(
zip(self.img_files, self.label_files),
desc="Scanning images",
t... | def cache_labels(self, path=Path("./labels.cache"), prefix=""):
# Cache dataset labels, check images and read shapes
x = {} # dict
nm, nf, ne, nc = 0, 0, 0, 0 # number missing, found, empty, duplicate
pbar = tqdm(
zip(self.img_files, self.label_files),
desc="Scanning images",
t... | https://github.com/ultralytics/yolov5/issues/195 | Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused
(train.py:19670): Gdk-CRITICAL **: 18:33:23.890: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
Apex recommended for faster mixed precision training: https://github.com/NVI... | AssertionError |
def select_device(device="", batch_size=None):
# device = 'cpu' or '0' or '0,1,2,3'
cpu_request = device.lower() == "cpu"
if device and not cpu_request: # if device requested other than 'cpu'
os.environ["CUDA_VISIBLE_DEVICES"] = device # set environment variable
assert torch.cuda.is_availa... | def select_device(device="", batch_size=None):
# device = 'cpu' or '0' or '0,1,2,3'
cpu_request = device.lower() == "cpu"
if device and not cpu_request: # if device requested other than 'cpu'
os.environ["CUDA_VISIBLE_DEVICES"] = device # set environment variable
assert torch.cuda.is_availa... | https://github.com/ultralytics/yolov5/issues/1760 | $ python train.py --img 640 --batch 16 --epochs 3 --data coco128.yaml --weights yolov5x.pt --device "2"
Using torch 1.7.1 CUDA:0 (GeForce RTX 2080 Ti, 11019MB)
Namespace(adam=False, batch_size=16, bucket='', cache_images=False, cfg='', data='./data/coco128.yaml', device='2', epochs=3, evolve=False, exist_ok=False, glo... | RuntimeError |
def detect(save_img=False):
source, weights, view_img, save_txt, imgsz = (
opt.source,
opt.weights,
opt.view_img,
opt.save_txt,
opt.img_size,
)
webcam = (
source.isnumeric()
or source.endswith(".txt")
or source.lower().startswith(("rtsp://", "r... | def detect(save_img=False):
source, weights, view_img, save_txt, imgsz = (
opt.source,
opt.weights,
opt.view_img,
opt.save_txt,
opt.img_size,
)
webcam = (
source.isnumeric()
or source.endswith(".txt")
or source.lower().startswith(("rtsp://", "r... | https://github.com/ultralytics/yolov5/issues/1625 | ** On entry to DGEBAL parameter number 3 had an illegal value
** On entry to DGEHRD parameter number 2 had an illegal value
** On entry to DORGHR DORGQR parameter number 2 had an illegal value
** On entry to DHSEQR parameter number 4 had an illegal value
Traceback (most recent call last):
File "D:\Softwares\Python... | RuntimeError |
def __init__(self, path, img_size=640):
p = str(Path(path)) # os-agnostic
p = os.path.abspath(p) # absolute path
if "*" in p:
files = sorted(glob.glob(p, recursive=True)) # glob
elif os.path.isdir(p):
files = sorted(glob.glob(os.path.join(p, "*.*"))) # dir
elif os.path.isfile(p):... | def __init__(self, path, img_size=640):
p = str(Path(path)) # os-agnostic
p = os.path.abspath(p) # absolute path
if "*" in p:
files = sorted(glob.glob(p, recursive=True)) # glob
elif os.path.isdir(p):
files = sorted(glob.glob(os.path.join(p, "*.*"))) # dir
elif os.path.isfile(p):... | https://github.com/ultralytics/yolov5/issues/1625 | ** On entry to DGEBAL parameter number 3 had an illegal value
** On entry to DGEHRD parameter number 2 had an illegal value
** On entry to DORGHR DORGQR parameter number 2 had an illegal value
** On entry to DHSEQR parameter number 4 had an illegal value
Traceback (most recent call last):
File "D:\Softwares\Python... | RuntimeError |
def __init__(self, sources="streams.txt", img_size=640):
self.mode = "stream"
self.img_size = img_size
if os.path.isfile(sources):
with open(sources, "r") as f:
sources = [
x.strip() for x in f.read().strip().splitlines() if len(x.strip())
]
else:
... | def __init__(self, sources="streams.txt", img_size=640):
self.mode = "images"
self.img_size = img_size
if os.path.isfile(sources):
with open(sources, "r") as f:
sources = [
x.strip() for x in f.read().strip().splitlines() if len(x.strip())
]
else:
... | https://github.com/ultralytics/yolov5/issues/1625 | ** On entry to DGEBAL parameter number 3 had an illegal value
** On entry to DGEHRD parameter number 2 had an illegal value
** On entry to DORGHR DORGQR parameter number 2 had an illegal value
** On entry to DHSEQR parameter number 4 had an illegal value
Traceback (most recent call last):
File "D:\Softwares\Python... | RuntimeError |
def detect(save_img=False):
source, weights, view_img, save_txt, imgsz = (
opt.source,
opt.weights,
opt.view_img,
opt.save_txt,
opt.img_size,
)
webcam = (
source.isnumeric()
or source.endswith(".txt")
or source.lower().startswith(("rtsp://", "r... | def detect(save_img=False):
source, weights, view_img, save_txt, imgsz = (
opt.source,
opt.weights,
opt.view_img,
opt.save_txt,
opt.img_size,
)
webcam = (
source.isnumeric()
or source.endswith(".txt")
or source.lower().startswith(("rtsp://", "r... | https://github.com/ultralytics/yolov5/issues/1625 | ** On entry to DGEBAL parameter number 3 had an illegal value
** On entry to DGEHRD parameter number 2 had an illegal value
** On entry to DORGHR DORGQR parameter number 2 had an illegal value
** On entry to DHSEQR parameter number 4 had an illegal value
Traceback (most recent call last):
File "D:\Softwares\Python... | RuntimeError |
def __init__(self, sources="streams.txt", img_size=640):
self.mode = "stream"
self.img_size = img_size
if os.path.isfile(sources):
with open(sources, "r") as f:
sources = [
x.strip() for x in f.read().strip().splitlines() if len(x.strip())
]
else:
... | def __init__(self, sources="streams.txt", img_size=640):
self.mode = "stream"
self.img_size = img_size
if os.path.isfile(sources):
with open(sources, "r") as f:
sources = [
x.strip() for x in f.read().strip().splitlines() if len(x.strip())
]
else:
... | https://github.com/ultralytics/yolov5/issues/1625 | ** On entry to DGEBAL parameter number 3 had an illegal value
** On entry to DGEHRD parameter number 2 had an illegal value
** On entry to DORGHR DORGQR parameter number 2 had an illegal value
** On entry to DHSEQR parameter number 4 had an illegal value
Traceback (most recent call last):
File "D:\Softwares\Python... | RuntimeError |
def non_max_suppression(
prediction, conf_thres=0.1, iou_thres=0.6, classes=None, agnostic=False, labels=()
):
"""Performs Non-Maximum Suppression (NMS) on inference results
Returns:
detections with shape: nx6 (x1, y1, x2, y2, conf, cls)
"""
nc = prediction.shape[2] - 5 # number of class... | def non_max_suppression(
prediction, conf_thres=0.1, iou_thres=0.6, classes=None, agnostic=False, labels=()
):
"""Performs Non-Maximum Suppression (NMS) on inference results
Returns:
detections with shape: nx6 (x1, y1, x2, y2, conf, cls)
"""
nc = prediction[0].shape[1] - 5 # number of cl... | https://github.com/ultralytics/yolov5/issues/1617 | ---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-5-e00d4d91b5be> in <module>
11 ]
12
---> 13 det = yolo(images)
~/miniconda3/envs/wstal/lib/python3.8/site-packages/torch/nn/modules/module.py in _call_i... | RuntimeError |
def cache_labels(self, path=Path("./labels.cache")):
# Cache dataset labels, check images and read shapes
x = {} # dict
nm, nf, ne, nc = 0, 0, 0, 0 # number missing, found, empty, duplicate
pbar = tqdm(
zip(self.img_files, self.label_files),
desc="Scanning images",
total=len(se... | def cache_labels(self, path=Path("./labels.cache")):
# Cache dataset labels, check images and read shapes
x = {} # dict
nm, nf, ne, nc = 0, 0, 0, 0 # number missing, found, empty, duplicate
pbar = tqdm(
zip(self.img_files, self.label_files),
desc="Scanning images",
total=len(se... | https://github.com/ultralytics/yolov5/issues/1507 | Traceback (most recent call last):
File "train.py", line 491, in <module>
train(hyp, opt, device, tb_writer, wandb)
File "train.py", line 186, in train
mlc = np.concatenate(dataset.labels, 0)[:, 0].max() # max label class
File "<__array_function__ internals>", line 6, in concatenate
ValueError: all the input arrays mu... | ValueError |
def output_to_target(output):
# Convert model output to target format [batch_id, class_id, x, y, w, h, conf]
targets = []
for i, o in enumerate(output):
for *box, conf, cls in o.cpu().numpy():
targets.append([i, cls, *list(*xyxy2xywh(np.array(box)[None])), conf])
return np.array(targ... | def output_to_target(output, width, height):
# Convert model output to target format [batch_id, class_id, x, y, w, h, conf]
if isinstance(output, torch.Tensor):
output = output.cpu().numpy()
targets = []
for i, o in enumerate(output):
if o is not None:
for pred in o:
... | https://github.com/ultralytics/yolov5/issues/1507 | Traceback (most recent call last):
File "train.py", line 491, in <module>
train(hyp, opt, device, tb_writer, wandb)
File "train.py", line 186, in train
mlc = np.concatenate(dataset.labels, 0)[:, 0].max() # max label class
File "<__array_function__ internals>", line 6, in concatenate
ValueError: all the input arrays mu... | ValueError |
def plot_images(
images,
targets,
paths=None,
fname="images.jpg",
names=None,
max_size=640,
max_subplots=16,
):
# Plot image grid with labels
if isinstance(images, torch.Tensor):
images = images.cpu().float().numpy()
if isinstance(targets, torch.Tensor):
targets ... | def plot_images(
images,
targets,
paths=None,
fname="images.jpg",
names=None,
max_size=640,
max_subplots=16,
):
# Plot image grid with labels
if isinstance(images, torch.Tensor):
images = images.cpu().float().numpy()
if isinstance(targets, torch.Tensor):
targets ... | https://github.com/ultralytics/yolov5/issues/1507 | Traceback (most recent call last):
File "train.py", line 491, in <module>
train(hyp, opt, device, tb_writer, wandb)
File "train.py", line 186, in train
mlc = np.concatenate(dataset.labels, 0)[:, 0].max() # max label class
File "<__array_function__ internals>", line 6, in concatenate
ValueError: all the input arrays mu... | ValueError |
def __init__(self, imgs, pred, names=None):
super(Detections, self).__init__()
self.imgs = imgs # list of images as numpy arrays
self.pred = pred # list of tensors pred[0] = (xyxy, conf, cls)
self.names = names # class names
self.xyxy = pred # xyxy pixels
self.xywh = [xyxy2xywh(x) for x in p... | def __init__(self, imgs, pred, names=None):
super(Detections, self).__init__()
self.imgs = imgs # list of images as numpy arrays
self.pred = pred # list of tensors pred[0] = (xyxy, conf, cls)
self.names = names # class names
self.xyxy = pred # xyxy pixels
self.xywh = [xyxy2xywh(x) for x in p... | https://github.com/ultralytics/yolov5/issues/1454 | Using cache found in /home/appuser/.cache/torch/hub/ultralytics_yolov5_master
from n params module arguments
0 -1 1 7040 models.common.Focus [3, 64, 3]
1 -1 1 73984 models.common.Conv [64, 128, 3, ... | RuntimeError |
def train(hyp, opt, device, tb_writer=None, wandb=None):
logger.info(f"Hyperparameters {hyp}")
log_dir = (
Path(tb_writer.log_dir) if tb_writer else Path(opt.logdir) / "evolve"
) # logging directory
wdir = log_dir / "weights" # weights directory
wdir.mkdir(parents=True, exist_ok=True)
... | def train(hyp, opt, device, tb_writer=None, wandb=None):
logger.info(f"Hyperparameters {hyp}")
log_dir = (
Path(tb_writer.log_dir) if tb_writer else Path(opt.logdir) / "evolve"
) # logging directory
wdir = log_dir / "weights" # weights directory
wdir.mkdir(parents=True, exist_ok=True)
... | https://github.com/ultralytics/yolov5/issues/1356 | Traceback (most recent call last):
File "train.py", line 555, in <module>
results = train(hyp.copy(), opt, device)
File "train.py", line 326, in train
log_imgs=opt.log_imgs)
File "/home/dagasan/Documents/yolov5_source/test.py", line 214, in test
wandb.log({"outputs": wandb_images})
File "/home/dagasany/anaconda3/envs/p... | wandb.errors.error.Error |
def init_seeds(seed=0):
random.seed(seed)
np.random.seed(seed)
init_torch_seeds(seed=seed)
| def init_seeds(seed=0):
random.seed(seed)
np.random.seed(seed)
init_seeds(seed=seed)
| https://github.com/ultralytics/yolov5/issues/822 | RecursionError Traceback (most recent call last)
<ipython-input-2-f6caabb30a03> in <module>
----> 1 init_seeds()
~/git/yolov5/utils/general.py in init_seeds(seed)
57 random.seed(seed)
58 np.random.seed(seed)
---> 59 init_seeds(seed=seed)
60
61
... last 1 frames repeated, from th... | RecursionError |
def train(hyp, opt, device, tb_writer=None):
print(f"Hyperparameters {hyp}")
log_dir = (
Path(tb_writer.log_dir) if tb_writer else Path(opt.logdir) / "evolve"
) # logging directory
wdir = str(log_dir / "weights") + os.sep # weights directory
os.makedirs(wdir, exist_ok=True)
last = wdir... | def train(hyp, opt, device, tb_writer=None):
print(f"Hyperparameters {hyp}")
log_dir = (
Path(tb_writer.log_dir) if tb_writer else Path(opt.logdir) / "evolve"
) # logging directory
wdir = str(log_dir / "weights") + os.sep # weights directory
os.makedirs(wdir, exist_ok=True)
last = wdir... | https://github.com/ultralytics/yolov5/issues/682 | Transferred 370/370 items from yolov5s.pt
Optimizer groups: 62 .bias, 70 conv.weight, 59 other
Transferred 370/370 items from yolov5s.pt
Optimizer groups: 62 .bias, 70 conv.weight, 59 other
Traceback (most recent call last):
File "train.py", line 439, in <module>
Traceback (most recent call last):
File "train.py", line... | torch.nn.modules.module.ModuleAttributeError |
def train(hyp, opt, device, tb_writer=None):
print(f"Hyperparameters {hyp}")
log_dir = tb_writer.log_dir if tb_writer else "runs/evolution" # run directory
wdir = str(Path(log_dir) / "weights") + os.sep # weights directory
os.makedirs(wdir, exist_ok=True)
last = wdir + "last.pt"
best = wdir + ... | def train(hyp, tb_writer, opt, device):
print(f"Hyperparameters {hyp}")
log_dir = tb_writer.log_dir if tb_writer else "runs/evolution" # run directory
wdir = str(Path(log_dir) / "weights") + os.sep # weights directory
os.makedirs(wdir, exist_ok=True)
last = wdir + "last.pt"
best = wdir + "best... | https://github.com/ultralytics/yolov5/issues/566 | Traceback (most recent call last):
File "yolov5/train.py", line 516, in <module>
print_mutation(hyp, results, opt.bucket)
File "/content/drive/.shortcut-targets-by-id/1hQ281-8ogL2dJzHbXZSWEYDIYei6RRbe/YOLOv5/yolov5/utils/utils.py", line 830, in print_mutation
b = '%10.3g' * len(hyp) % tuple(hyp.values()) # hyperparam ... | TypeError |
def train(hyp, opt, device, tb_writer=None):
print(f"Hyperparameters {hyp}")
log_dir = tb_writer.log_dir if tb_writer else "runs/evolve" # run directory
wdir = str(Path(log_dir) / "weights") + os.sep # weights directory
os.makedirs(wdir, exist_ok=True)
last = wdir + "last.pt"
best = wdir + "be... | def train(hyp, opt, device, tb_writer=None):
print(f"Hyperparameters {hyp}")
log_dir = tb_writer.log_dir if tb_writer else "runs/evolution" # run directory
wdir = str(Path(log_dir) / "weights") + os.sep # weights directory
os.makedirs(wdir, exist_ok=True)
last = wdir + "last.pt"
best = wdir + ... | https://github.com/ultralytics/yolov5/issues/566 | Traceback (most recent call last):
File "yolov5/train.py", line 516, in <module>
print_mutation(hyp, results, opt.bucket)
File "/content/drive/.shortcut-targets-by-id/1hQ281-8ogL2dJzHbXZSWEYDIYei6RRbe/YOLOv5/yolov5/utils/utils.py", line 830, in print_mutation
b = '%10.3g' * len(hyp) % tuple(hyp.values()) # hyperparam ... | TypeError |
def print_mutation(hyp, results, yaml_file="hyp_evolved.yaml", bucket=""):
# Print mutation results to evolve.txt (for use with train.py --evolve)
a = "%10s" * len(hyp) % tuple(hyp.keys()) # hyperparam keys
b = "%10.3g" * len(hyp) % tuple(hyp.values()) # hyperparam values
c = (
"%10.4g" * len(... | def print_mutation(hyp, results, bucket=""):
# Print mutation results to evolve.txt (for use with train.py --evolve)
a = "%10s" * len(hyp) % tuple(hyp.keys()) # hyperparam keys
b = "%10.3g" * len(hyp) % tuple(hyp.values()) # hyperparam values
c = "%10.4g" * len(results) % results # results (P, R, mAP... | https://github.com/ultralytics/yolov5/issues/566 | Traceback (most recent call last):
File "yolov5/train.py", line 516, in <module>
print_mutation(hyp, results, opt.bucket)
File "/content/drive/.shortcut-targets-by-id/1hQ281-8ogL2dJzHbXZSWEYDIYei6RRbe/YOLOv5/yolov5/utils/utils.py", line 830, in print_mutation
b = '%10.3g' * len(hyp) % tuple(hyp.values()) # hyperparam ... | TypeError |
def plot_evolution_results(
yaml_file="hyp_evolved.yaml",
): # from utils.utils import *; plot_evolution_results()
# Plot hyperparameter evolution results in evolve.txt
with open(yaml_file) as f:
hyp = yaml.load(f, Loader=yaml.FullLoader)
x = np.loadtxt("evolve.txt", ndmin=2)
f = fitness(x)... | def plot_evolution_results(
hyp,
): # from utils.utils import *; plot_evolution_results(hyp)
# Plot hyperparameter evolution results in evolve.txt
x = np.loadtxt("evolve.txt", ndmin=2)
f = fitness(x)
# weights = (f - f.min()) ** 2 # for weighted results
plt.figure(figsize=(12, 10), tight_layou... | https://github.com/ultralytics/yolov5/issues/566 | Traceback (most recent call last):
File "yolov5/train.py", line 516, in <module>
print_mutation(hyp, results, opt.bucket)
File "/content/drive/.shortcut-targets-by-id/1hQ281-8ogL2dJzHbXZSWEYDIYei6RRbe/YOLOv5/yolov5/utils/utils.py", line 830, in print_mutation
b = '%10.3g' * len(hyp) % tuple(hyp.values()) # hyperparam ... | TypeError |
def hist2d(x, y, n=100):
# 2d histogram used in labels.png and evolve.png
xedges, yedges = np.linspace(x.min(), x.max(), n), np.linspace(y.min(), y.max(), n)
hist, xedges, yedges = np.histogram2d(x, y, (xedges, yedges))
xidx = np.clip(np.digitize(x, xedges) - 1, 0, hist.shape[0] - 1)
yidx = np.clip(... | def hist2d(x, y, n=100):
xedges, yedges = np.linspace(x.min(), x.max(), n), np.linspace(y.min(), y.max(), n)
hist, xedges, yedges = np.histogram2d(x, y, (xedges, yedges))
xidx = np.clip(np.digitize(x, xedges) - 1, 0, hist.shape[0] - 1)
yidx = np.clip(np.digitize(y, yedges) - 1, 0, hist.shape[1] - 1)
... | https://github.com/ultralytics/yolov5/issues/566 | Traceback (most recent call last):
File "yolov5/train.py", line 516, in <module>
print_mutation(hyp, results, opt.bucket)
File "/content/drive/.shortcut-targets-by-id/1hQ281-8ogL2dJzHbXZSWEYDIYei6RRbe/YOLOv5/yolov5/utils/utils.py", line 830, in print_mutation
b = '%10.3g' * len(hyp) % tuple(hyp.values()) # hyperparam ... | TypeError |
def plot_labels(labels, save_dir=""):
# plot dataset labels
c, b = labels[:, 0], labels[:, 1:].transpose() # classes, boxes
nc = int(c.max() + 1) # number of classes
fig, ax = plt.subplots(2, 2, figsize=(8, 8), tight_layout=True)
ax = ax.ravel()
ax[0].hist(c, bins=np.linspace(0, nc, nc + 1) -... | def plot_labels(labels, save_dir=""):
# plot dataset labels
def hist2d(x, y, n=100):
xedges, yedges = (
np.linspace(x.min(), x.max(), n),
np.linspace(y.min(), y.max(), n),
)
hist, xedges, yedges = np.histogram2d(x, y, (xedges, yedges))
xidx = np.clip(np.di... | https://github.com/ultralytics/yolov5/issues/566 | Traceback (most recent call last):
File "yolov5/train.py", line 516, in <module>
print_mutation(hyp, results, opt.bucket)
File "/content/drive/.shortcut-targets-by-id/1hQ281-8ogL2dJzHbXZSWEYDIYei6RRbe/YOLOv5/yolov5/utils/utils.py", line 830, in print_mutation
b = '%10.3g' * len(hyp) % tuple(hyp.values()) # hyperparam ... | TypeError |
def train(hyp, opt, device, tb_writer=None):
print(f"Hyperparameters {hyp}")
log_dir = tb_writer.log_dir if tb_writer else "runs/evolve" # run directory
wdir = str(Path(log_dir) / "weights") + os.sep # weights directory
os.makedirs(wdir, exist_ok=True)
last = wdir + "last.pt"
best = wdir + "be... | def train(hyp, opt, device, tb_writer=None):
print(f"Hyperparameters {hyp}")
log_dir = tb_writer.log_dir if tb_writer else "runs/evolve" # run directory
wdir = str(Path(log_dir) / "weights") + os.sep # weights directory
os.makedirs(wdir, exist_ok=True)
last = wdir + "last.pt"
best = wdir + "be... | https://github.com/ultralytics/yolov5/issues/566 | Traceback (most recent call last):
File "yolov5/train.py", line 516, in <module>
print_mutation(hyp, results, opt.bucket)
File "/content/drive/.shortcut-targets-by-id/1hQ281-8ogL2dJzHbXZSWEYDIYei6RRbe/YOLOv5/yolov5/utils/utils.py", line 830, in print_mutation
b = '%10.3g' * len(hyp) % tuple(hyp.values()) # hyperparam ... | TypeError |
def print_mutation(hyp, results, yaml_file="hyp_evolved.yaml", bucket=""):
# Print mutation results to evolve.txt (for use with train.py --evolve)
a = "%10s" * len(hyp) % tuple(hyp.keys()) # hyperparam keys
b = "%10.3g" * len(hyp) % tuple(hyp.values()) # hyperparam values
c = (
"%10.4g" * len(... | def print_mutation(hyp, results, yaml_file="hyp_evolved.yaml", bucket=""):
# Print mutation results to evolve.txt (for use with train.py --evolve)
a = "%10s" * len(hyp) % tuple(hyp.keys()) # hyperparam keys
b = "%10.3g" * len(hyp) % tuple(hyp.values()) # hyperparam values
c = (
"%10.4g" * len(... | https://github.com/ultralytics/yolov5/issues/566 | Traceback (most recent call last):
File "yolov5/train.py", line 516, in <module>
print_mutation(hyp, results, opt.bucket)
File "/content/drive/.shortcut-targets-by-id/1hQ281-8ogL2dJzHbXZSWEYDIYei6RRbe/YOLOv5/yolov5/utils/utils.py", line 830, in print_mutation
b = '%10.3g' * len(hyp) % tuple(hyp.values()) # hyperparam ... | TypeError |
def print_mutation(hyp, results, yaml_file="hyp_evolved.yaml", bucket=""):
# Print mutation results to evolve.txt (for use with train.py --evolve)
a = "%10s" * len(hyp) % tuple(hyp.keys()) # hyperparam keys
b = "%10.3g" * len(hyp) % tuple(hyp.values()) # hyperparam values
c = (
"%10.4g" * len(... | def print_mutation(hyp, results, yaml_file="hyp_evolved.yaml", bucket=""):
# Print mutation results to evolve.txt (for use with train.py --evolve)
a = "%10s" * len(hyp) % tuple(hyp.keys()) # hyperparam keys
b = "%10.3g" * len(hyp) % tuple(hyp.values()) # hyperparam values
c = (
"%10.4g" * len(... | https://github.com/ultralytics/yolov5/issues/566 | Traceback (most recent call last):
File "yolov5/train.py", line 516, in <module>
print_mutation(hyp, results, opt.bucket)
File "/content/drive/.shortcut-targets-by-id/1hQ281-8ogL2dJzHbXZSWEYDIYei6RRbe/YOLOv5/yolov5/utils/utils.py", line 830, in print_mutation
b = '%10.3g' * len(hyp) % tuple(hyp.values()) # hyperparam ... | TypeError |
def load_solution(
self,
solution,
allow_consistent_values_for_fixed_vars=False,
comparison_tolerance_for_fixed_vars=1e-5,
):
"""
Load a solution.
Args:
solution: A :class:`pyomo.opt.Solution` object with a
symbol map. Optionally, the solution can be tagged
w... | def load_solution(
self,
solution,
allow_consistent_values_for_fixed_vars=False,
comparison_tolerance_for_fixed_vars=1e-5,
):
"""
Load a solution.
Args:
solution: A :class:`pyomo.opt.Solution` object with a
symbol map. Optionally, the solution can be tagged
w... | https://github.com/Pyomo/pyomo/issues/1766 | Welcome to IBM(R) ILOG(R) CPLEX(R) Interactive Optimizer 20.1.0.0
with Simplex, Mixed Integer & Barrier Optimizers
5725-A06 5725-A29 5724-Y48 5724-Y49 5724-Y54 5724-Y55 5655-Y21
Copyright IBM Corp. 1988, 2020. All Rights Reserved.
Type 'help' for a list of available commands.
Type 'help' followed by a command nam... | IndexError |
def process_soln_file(self, results):
# the only suffixes that we extract from CPLEX are
# constraint duals, constraint slacks, and variable
# reduced-costs. scan through the solver suffix list
# and throw an exception if the user has specified
# any others.
extract_duals = False
extract_sla... | def process_soln_file(self, results):
# the only suffixes that we extract from CPLEX are
# constraint duals, constraint slacks, and variable
# reduced-costs. scan through the solver suffix list
# and throw an exception if the user has specified
# any others.
extract_duals = False
extract_sla... | https://github.com/Pyomo/pyomo/issues/1766 | Welcome to IBM(R) ILOG(R) CPLEX(R) Interactive Optimizer 20.1.0.0
with Simplex, Mixed Integer & Barrier Optimizers
5725-A06 5725-A29 5724-Y48 5724-Y49 5724-Y54 5724-Y55 5655-Y21
Copyright IBM Corp. 1988, 2020. All Rights Reserved.
Type 'help' for a list of available commands.
Type 'help' followed by a command nam... | IndexError |
def _apply_solver(self):
if not self._save_results:
for block in self._pyomo_model.block_data_objects(
descend_into=True, active=True
):
for var in block.component_data_objects(
ctype=pyomo.core.base.var.Var,
descend_into=False,
... | def _apply_solver(self):
if not self._save_results:
for block in self._pyomo_model.block_data_objects(
descend_into=True, active=True
):
for var in block.component_data_objects(
ctype=pyomo.core.base.var.Var,
descend_into=False,
... | https://github.com/Pyomo/pyomo/issues/285 | CPXPARAM_Read_DataCheck 1
CPXPARAM_Read_APIEncoding "UTF-8"
CPXPARAM_MIP_Strategy_CallbackReducedLP 0
Tried aggregator 1 time.
LP Presolve eliminated 200 rows and 101 columns.
All rows and columns eliminated.
Presolve time = 0.00 sec. (0.05 ticks)
Traceback (most... | PermissionError |
def _Q_opt(
self,
ThetaVals=None,
solver="ef_ipopt",
return_values=[],
bootlist=None,
calc_cov=False,
):
"""
Set up all thetas as first stage Vars, return resulting theta
values as well as the objective function value.
NOTE: If thetavals is present it will be attached to the
... | def _Q_opt(
self,
ThetaVals=None,
solver="ef_ipopt",
return_values=[],
bootlist=None,
calc_cov=False,
):
"""
Set up all thetas as first stage Vars, return resulting theta
values as well as the objective function value.
NOTE: If thetavals is present it will be attached to the
... | https://github.com/Pyomo/pyomo/issues/1642 | Ipopt 3.12.10:
******************************************************************************
This program contains Ipopt, a library for large-scale nonlinear optimization.
Ipopt is released as open source code under the Eclipse Public License (EPL).
For more information visit http://projects.coin-or.org/Ipopt
*******... | AttributeError |
def _component_data_iter(self, ctype=None, active=None, sort=False):
"""
Generator that returns a 3-tuple of (component name, index value,
and _ComponentData) for every component data in the block.
"""
_sort_indices = SortComponents.sort_indices(sort)
_subcomp = PseudoMap(self, ctype, active, so... | def _component_data_iter(self, ctype=None, active=None, sort=False):
"""
Generator that returns a 3-tuple of (component name, index value,
and _ComponentData) for every component data in the block.
"""
_sort_indices = SortComponents.sort_indices(sort)
_subcomp = PseudoMap(self, ctype, active, so... | https://github.com/Pyomo/pyomo/issues/1435 | Traceback (most recent call last):
File "infinite_set_bug.py", line 8, in <module>
for comp in m.component_data_objects():
File "/home/esjohn/src/pyomo/pyomo/core/base/block.py", line 1415, in component_data_objects
sort=sort):
File "/home/esjohn/src/pyomo/pyomo/core/base/block.py", line 1339, in _component_data_iter
e... | OverflowError |
def _add_temporary_set(self, val):
"""TODO: This method has known issues (see tickets) and needs to be
reviewed. [JDS 9/2014]"""
_component_sets = getattr(val, "_implicit_subsets", None)
#
# FIXME: The name attribute should begin with "_", and None
# should replace "_unknown_"
#
if _com... | def _add_temporary_set(self, val):
"""TODO: This method has known issues (see tickets) and needs to be
reviewed. [JDS 9/2014]"""
_component_sets = getattr(val, "_implicit_subsets", None)
#
# FIXME: The name attribute should begin with "_", and None
# should replace "_unknown_"
#
if _com... | https://github.com/Pyomo/pyomo/issues/191 | m.v_1 = Var(m.s['s1'], m.s2, initialize=10)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/blnicho/Research/pyomo/pyomo/core/base/var.py", line 471, in __init__
IndexedComponent.__init__(self, *args, **kwd)
File "/home/blnicho/Research/pyomo/pyomo/core/base/indexed_component.py", lin... | AttributeError |
def _transform_constraint(self, obj, disjunct, bigMargs, suffix_list):
# add constraint to the transformation block, we'll transform it there.
transBlock = disjunct._transformation_block()
bigm_src = transBlock.bigm_src
constraintMap = self._get_constraint_map_dict(transBlock)
disjunctionRelaxation... | def _transform_constraint(self, obj, disjunct, bigMargs, suffix_list):
# add constraint to the transformation block, we'll transform it there.
transBlock = disjunct._transformation_block()
bigm_src = transBlock.bigm_src
constraintMap = self._get_constraint_map_dict(transBlock)
disjunctionRelaxation... | https://github.com/Pyomo/pyomo/issues/191 | m.v_1 = Var(m.s['s1'], m.s2, initialize=10)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/blnicho/Research/pyomo/pyomo/core/base/var.py", line 471, in __init__
IndexedComponent.__init__(self, *args, **kwd)
File "/home/blnicho/Research/pyomo/pyomo/core/base/indexed_component.py", lin... | AttributeError |
def __call__(self, parent, index):
_val = self._init(parent, index)
if self._dimen in {1, None, UnknownSetDimen}:
return _val
elif _val is Set.Skip:
return _val
elif not _val:
return _val
if not isinstance(_val, collections_Sequence):
_val = tuple(_val)
if len(_v... | def __call__(self, parent, index):
_val = self._init(parent, index)
if self._dimen in {1, None, UnknownSetDimen}:
return _val
elif _val is Set.Skip:
return _val
elif not _val:
return _val
if not isinstance(_val, collections_Sequence):
_val = tuple(_val)
if isinst... | https://github.com/Pyomo/pyomo/issues/1375 | a : Size=1, Index=None, Ordered=Insertion
Key : Dimen : Domain : Size : Members
None : 1 : Any : 0 : {}
ERROR: Constructing component 'b' from data=None failed: IndexError: tuple
index out of range
Traceback (most recent call last):
File "blah.py", line 18, in <module>
m.b = pe.Set(initialize=b_rule, di... | IndexError |
def set_value(self, val):
raise RuntimeError(
textwrap.dedent(
"""\
Block components do not support assignment or set_value().
Use the transfer_attributes_from() method to transfer the
components and public attributes from one block to another:
... | def set_value(self, val):
for k in list(getattr(self, "_decl", {})):
self.del_component(k)
self._ctypes = {}
self._decl = {}
self._decl_order = []
if val:
for k in sorted(iterkeys(val)):
self.add_component(k, val[k])
| https://github.com/Pyomo/pyomo/issues/1106 | Traceback (most recent call last):
File "blockSetValue.py", line 11, in <module>
m.block_list[1] = movingBlock
File "/home/esjohn/src/pyomo/pyomo/core/base/indexed_component.py", line 412, in __setitem__
return self._setitem_when_not_present(index, val)
File "/home/esjohn/src/pyomo/pyomo/core/base/indexed_component.py"... | TypeError |
def add_component(self, name, val):
"""
Add a component 'name' to the block.
This method assumes that the attribute is not in the model.
"""
#
# Error checks
#
if not val.valid_model_component():
raise RuntimeError("Cannot add '%s' as a component to a block" % str(type(val)))
... | def add_component(self, name, val):
"""
Add a component 'name' to the block.
This method assumes that the attribute is not in the model.
"""
#
# Error checks
#
if not val.valid_model_component():
raise RuntimeError("Cannot add '%s' as a component to a block" % str(type(val)))
... | https://github.com/Pyomo/pyomo/issues/1106 | Traceback (most recent call last):
File "blockSetValue.py", line 11, in <module>
m.block_list[1] = movingBlock
File "/home/esjohn/src/pyomo/pyomo/core/base/indexed_component.py", line 412, in __setitem__
return self._setitem_when_not_present(index, val)
File "/home/esjohn/src/pyomo/pyomo/core/base/indexed_component.py"... | TypeError |
def _getitem_when_not_present(self, idx):
return self._setitem_when_not_present(idx)
| def _getitem_when_not_present(self, idx):
return self._setitem_when_not_present(idx, None)
| https://github.com/Pyomo/pyomo/issues/1106 | Traceback (most recent call last):
File "blockSetValue.py", line 11, in <module>
m.block_list[1] = movingBlock
File "/home/esjohn/src/pyomo/pyomo/core/base/indexed_component.py", line 412, in __setitem__
return self._setitem_when_not_present(index, val)
File "/home/esjohn/src/pyomo/pyomo/core/base/indexed_component.py"... | TypeError |
def construct(self, data=None):
"""
Initialize the block
"""
if __debug__ and logger.isEnabledFor(logging.DEBUG):
logger.debug(
"Constructing %s '%s', from data=%s",
self.__class__.__name__,
self.name,
str(data),
)
if self._constructed:... | def construct(self, data=None):
"""
Initialize the block
"""
if __debug__ and logger.isEnabledFor(logging.DEBUG):
logger.debug(
"Constructing %s '%s', from data=%s",
self.__class__.__name__,
self.name,
str(data),
)
if self._constructed:... | https://github.com/Pyomo/pyomo/issues/1106 | Traceback (most recent call last):
File "blockSetValue.py", line 11, in <module>
m.block_list[1] = movingBlock
File "/home/esjohn/src/pyomo/pyomo/core/base/indexed_component.py", line 412, in __setitem__
return self._setitem_when_not_present(index, val)
File "/home/esjohn/src/pyomo/pyomo/core/base/indexed_component.py"... | TypeError |
def _setitem_when_not_present(self, index, value=_NotSpecified):
"""Perform the fundamental component item creation and storage.
Components that want to implement a nonstandard storage mechanism
should override this method.
Implementations may assume that the index has already been
validated and i... | def _setitem_when_not_present(self, index, value):
"""Perform the fundamental component item creation and storage.
Components that want to implement a nonstandard storage mechanism
should override this method.
Implementations may assume that the index has already been
validated and is a legitimate... | https://github.com/Pyomo/pyomo/issues/1106 | Traceback (most recent call last):
File "blockSetValue.py", line 11, in <module>
m.block_list[1] = movingBlock
File "/home/esjohn/src/pyomo/pyomo/core/base/indexed_component.py", line 412, in __setitem__
return self._setitem_when_not_present(index, val)
File "/home/esjohn/src/pyomo/pyomo/core/base/indexed_component.py"... | TypeError |
def set_value(self, val, guarantee_components=set()):
# Copy over everything from the other block. If the other
# block has an indicator_var, it should override this block's.
# Otherwise restore this block's indicator_var.
guarantee_components.add("indicator_var")
super(_DisjunctData, self).set_val... | def set_value(self, val):
_indicator_var = self.indicator_var
# Remove everything
for k in list(getattr(self, "_decl", {})):
self.del_component(k)
self._ctypes = {}
self._decl = {}
self._decl_order = []
# Now copy over everything from the other block. If the other
# block has an... | https://github.com/Pyomo/pyomo/issues/1106 | Traceback (most recent call last):
File "blockSetValue.py", line 11, in <module>
m.block_list[1] = movingBlock
File "/home/esjohn/src/pyomo/pyomo/core/base/indexed_component.py", line 412, in __setitem__
return self._setitem_when_not_present(index, val)
File "/home/esjohn/src/pyomo/pyomo/core/base/indexed_component.py"... | TypeError |
def _transform_block_components(self, block, disjunct, bigM, suffix_list):
# We first need to find any transformed disjunctions that might be here
# because we need to move their transformation blocks up onto the parent
# block before we transform anything else on this block
destinationBlock = disjunct.... | def _transform_block_components(self, block, disjunct, bigM, suffix_list):
# We first need to find any transformed disjunctions that might be here
# because we need to move their transformation blocks up onto the parent
# block before we transform anything else on this block
destinationBlock = disjunct.... | https://github.com/Pyomo/pyomo/issues/1106 | Traceback (most recent call last):
File "blockSetValue.py", line 11, in <module>
m.block_list[1] = movingBlock
File "/home/esjohn/src/pyomo/pyomo/core/base/indexed_component.py", line 412, in __setitem__
return self._setitem_when_not_present(index, val)
File "/home/esjohn/src/pyomo/pyomo/core/base/indexed_component.py"... | TypeError |
def _transfer_transBlock_data(self, fromBlock, toBlock):
# We know that we have a list of transformed disjuncts on both. We need
# to move those over. Then there might be constraints on the block also
# (at this point only the diaggregation constraints from chull,
# but... I'll leave it general for now.... | def _transfer_transBlock_data(self, fromBlock, toBlock):
# We know that we have a list of transformed disjuncts on both. We need
# to move those over. Then there might be constraints on the block also
# (at this point only the diaggregation constraints from chull,
# but... I'll leave it general for now.... | https://github.com/Pyomo/pyomo/issues/1106 | Traceback (most recent call last):
File "blockSetValue.py", line 11, in <module>
m.block_list[1] = movingBlock
File "/home/esjohn/src/pyomo/pyomo/core/base/indexed_component.py", line 412, in __setitem__
return self._setitem_when_not_present(index, val)
File "/home/esjohn/src/pyomo/pyomo/core/base/indexed_component.py"... | TypeError |
def __call__(self, *idx, **kwds):
"""Special handling of the "()" operator for component slices.
Creating a slice of a component returns a _IndexedComponent_slice
object. Subsequent attempts to call items hit this method. We
handle the __call__ method separately based on the item (identifier
imme... | def __call__(self, *idx, **kwds):
"""Special handling of the "()" operator for component slices.
Creating a slice of a component returns a _IndexedComponent_slice
object. Subsequent attempts to call items hit this method. We
handle the __call__ method separately based on the item (identifier
imme... | https://github.com/Pyomo/pyomo/issues/1138 | ======================================================================
ERROR: test_bundles (pyomo.pysp.tests.unit.test_scenariotree.TestScenarioTreeFromNetworkX)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/Pyomo/pyomo/pyomo/pysp/test... | AttributeError |
def _disable_method(fcn, msg=None):
if msg is None:
msg = "access %s on" % (fcn.__name__,)
def impl(self, *args, **kwds):
raise RuntimeError(
"Cannot %s %s '%s' before it has been constructed (initialized)."
% (msg, type(self).__name__, self.name)
)
# functo... | def _disable_method(fcn, msg=None):
if msg is None:
msg = "access %s on" % (fcn.__name__,)
def impl(self, *args, **kwds):
raise RuntimeError(
"Cannot %s %s '%s' before it has been constructed (initialized)."
% (msg, type(self).__name__, self.name)
)
# functo... | https://github.com/Pyomo/pyomo/issues/1138 | ======================================================================
ERROR: test_bundles (pyomo.pysp.tests.unit.test_scenariotree.TestScenarioTreeFromNetworkX)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/Pyomo/pyomo/pyomo/pysp/test... | AttributeError |
def ScenarioTreeModelFromNetworkX(
tree,
node_name_attribute=None,
edge_probability_attribute="weight",
stage_names=None,
scenario_name_attribute=None,
):
"""
Create a scenario tree model from a networkx tree. The
height of the tree must be at least 1 (meaning at least
2 stages).
... | def ScenarioTreeModelFromNetworkX(
tree,
node_name_attribute=None,
edge_probability_attribute="weight",
stage_names=None,
scenario_name_attribute=None,
):
"""
Create a scenario tree model from a networkx tree. The
height of the tree must be at least 1 (meaning at least
2 stages).
... | https://github.com/Pyomo/pyomo/issues/1138 | ======================================================================
ERROR: test_bundles (pyomo.pysp.tests.unit.test_scenariotree.TestScenarioTreeFromNetworkX)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/Pyomo/pyomo/pyomo/pysp/test... | AttributeError |
def _setup(u, succ):
if node_name_attribute is not None:
if node_name_attribute not in tree.nodes[u]:
raise KeyError(
"node '%s' missing node name attribute: '%s'" % (u, node_name_attribute)
)
node_name = tree.nodes[u][node_name_attribute]
else:
no... | def _setup(u, succ):
if node_name_attribute is not None:
if node_name_attribute not in tree.node[u]:
raise KeyError(
"node '%s' missing node name attribute: '%s'" % (u, node_name_attribute)
)
node_name = tree.node[u][node_name_attribute]
else:
node... | https://github.com/Pyomo/pyomo/issues/1138 | ======================================================================
ERROR: test_bundles (pyomo.pysp.tests.unit.test_scenariotree.TestScenarioTreeFromNetworkX)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/Pyomo/pyomo/pyomo/pysp/test... | AttributeError |
def _add_node(u, stage, succ, pred):
node_name = node_to_name[u]
m.NodeStage[node_name] = m.Stages[stage]
if u == root:
m.ConditionalProbability[node_name] = 1.0
else:
assert u in pred
# prior to networkx ~2.0, we used a .edge attribute on DiGraph,
# which no longer exist... | def _add_node(u, stage, succ, pred):
node_name = node_to_name[u]
m.NodeStage[node_name] = m.Stages[stage]
if u == root:
m.ConditionalProbability[node_name] = 1.0
else:
assert u in pred
# prior to networkx ~2.0, we used a .edge attribute on DiGraph,
# which no longer exist... | https://github.com/Pyomo/pyomo/issues/1138 | ======================================================================
ERROR: test_bundles (pyomo.pysp.tests.unit.test_scenariotree.TestScenarioTreeFromNetworkX)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/travis/build/Pyomo/pyomo/pyomo/pysp/test... | AttributeError |
def normalize_index(index):
"""
Flatten a component index. If it has length 1, then
return just the element. If it has length > 1, then
return a tuple.
"""
ans = flatten(index)
if len(ans) == 1:
return ans[0]
return ans
| def normalize_index(index):
"""
Flatten a component index. If it has length 1, then
return just the element. If it has length > 1, then
return a tuple.
"""
idx = pyutilib.misc.flatten(index)
if type(idx) is list:
if len(idx) == 1:
idx = idx[0]
else:
... | https://github.com/Pyomo/pyomo/issues/116 | qichen@QC-CMU-Tower:~$ pyothon
Python 2.7.11+ (default, Apr 17 2016, 14:00:29)
[GCC 5.3.1 20160413] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from pyomo.environ import *
m = ConcreteModel()
m.s = Set(initialize=['one'])
m.c = Constraint(m.s)
m.c[m.s].deactivate()
Traceback (most r... | pyomo.util._config.DeveloperError |
def _processUnhashableIndex(self, idx):
"""Process a call to __getitem__ with unhashable elements
There are three basic ways to get here:
1) the index contains one or more slices or ellipsis
2) the index contains an unhashable type (e.g., a Pyomo
(Simple)Component
3) the index contai... | def _processUnhashableIndex(self, idx):
"""Process a call to __getitem__ with unhashable elements
There are three basic ways to get here:
1) the index contains one or more slices or ellipsis
2) the index contains an unhashable type (e.g., a Pyomo
(Simple)Component
3) the index contai... | https://github.com/Pyomo/pyomo/issues/116 | qichen@QC-CMU-Tower:~$ pyothon
Python 2.7.11+ (default, Apr 17 2016, 14:00:29)
[GCC 5.3.1 20160413] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from pyomo.environ import *
m = ConcreteModel()
m.s = Set(initialize=['one'])
m.c = Constraint(m.s)
m.c[m.s].deactivate()
Traceback (most r... | pyomo.util._config.DeveloperError |
def add(self, value):
if normalize_index.flatten:
if type(value) is tuple:
_value = flatten_tuple(value)
_d = len(_value)
if _d == 1:
_value = _value[0]
else:
_value = value
_d = 1
else:
# If we are not normalizi... | def add(self, value):
if type(value) is tuple:
_value = flatten_tuple(value)
if len(_value) == 1:
_value = _value[0]
_d = 1
else:
_d = len(_value)
else:
_value = value
_d = 1
if _value not in self._domain:
raise ValueError(... | https://github.com/Pyomo/pyomo/issues/116 | qichen@QC-CMU-Tower:~$ pyothon
Python 2.7.11+ (default, Apr 17 2016, 14:00:29)
[GCC 5.3.1 20160413] on linux2
Type "help", "copyright", "credits" or "license" for more information.
from pyomo.environ import *
m = ConcreteModel()
m.s = Set(initialize=['one'])
m.c = Constraint(m.s)
m.c[m.s].deactivate()
Traceback (most r... | pyomo.util._config.DeveloperError |
def load():
import pyomo.scripting.plugins.check
import pyomo.scripting.plugins.convert
import pyomo.scripting.plugins.solve
import pyomo.scripting.plugins.download
import pyomo.scripting.plugins.build_ext
import pyomo.scripting.plugins.extras
| def load():
import pyomo.scripting.plugins.check
import pyomo.scripting.plugins.convert
import pyomo.scripting.plugins.solve
import pyomo.scripting.plugins.download
import pyomo.scripting.plugins.build_ext
| https://github.com/Pyomo/pyomo/issues/243 | Traceback (most recent call last):
File "/XXX/myvenv/bin/get_pyomo_extras", line 7, in <module>
from scripts.get_pyomo_extras import main
ModuleNotFoundError: No module named 'scripts' | ModuleNotFoundError |
def __deepcopy__(self, memo):
# The problem we are addressing is when we want to clone a
# sub-block in a model. In that case, the block can have
# references to both child components and to external
# ComponentData (mostly through expressions pointing to Vars
# and Params outside this block). For... | def __deepcopy__(self, memo):
# The problem we are addressing is when we want to clone a
# sub-block in a model. In that case, the block can have
# references to both child components and to external
# ComponentData (mostly through expressions pointing to Vars
# and Params outside this block). For... | https://github.com/Pyomo/pyomo/issues/912 | import pyomo.environ as pe
m = pe.ConcreteModel()
m.x = pe.Var()
m.x_ref = pe.Reference(m.x)
m2 = m.clone()
m.x_ref._data._slice
<pyomo.core.base.indexed_component_slice._IndexedComponent_slice object at 0x151fa63438>
m2.x_ref._data._slice
[<pyomo.core.base.var.SimpleVar object at 0x152002b048>]
for v in m.component_da... | AttributeError |
def setup_connection(self):
# on *NIX, the proxy can show up either upper or lowercase.
# Prefer lower case, and prefer HTTPS over HTTP if the
# NEOS.scheme is https.
proxy = os.environ.get("http_proxy", os.environ.get("HTTP_PROXY", ""))
if NEOS.scheme == "https":
proxy = os.environ.get("htt... | def setup_connection(self):
# on *NIX, the proxy can show up either upper or lowercase.
# Prefer lower case, and prefer HTTPS over HTTP if the urlscheme
# is https.
proxy = os.environ.get("http_proxy", os.environ.get("HTTP_PROXY", ""))
if urlscheme == "https":
proxy = os.environ.get("https_p... | https://github.com/Pyomo/pyomo/issues/560 | Traceback (most recent call last):
File "/ascldap/users/gseastr/envs/python3.6/bin/pyomo", line 11, in <module>
load_entry_point('Pyomo', 'console_scripts', 'pyomo')()
File "/home/gseastr/envs/pyomo/pyomo/scripting/pyomo_main.py", line 82, in main
retval = _options.func(_options)
File "/home/gseastr/envs/pyomo/pyomo/sc... | TypeError |
def set_proxy(self, host):
self.proxy = urlparse(host)
if not self.proxy.hostname:
# User omitted scheme from the proxy; assume http
self.proxy = urlparse("http://" + proxy)
| def set_proxy(self, proxy):
self.proxy = proxy
| https://github.com/Pyomo/pyomo/issues/560 | Traceback (most recent call last):
File "/ascldap/users/gseastr/envs/python3.6/bin/pyomo", line 11, in <module>
load_entry_point('Pyomo', 'console_scripts', 'pyomo')()
File "/home/gseastr/envs/pyomo/pyomo/scripting/pyomo_main.py", line 82, in main
retval = _options.func(_options)
File "/home/gseastr/envs/pyomo/pyomo/sc... | TypeError |
def make_connection(self, host):
scheme = urlparse(host).scheme
if not scheme:
scheme = NEOS.scheme
# Empirically, the connection class in Python 3.x needs to
# match the final endpoint connection scheme, NOT the proxy
# scheme. The set_tunnel host then should NOT have a scheme
# attac... | def make_connection(self, host):
self.realhost = host
h = six.moves.http_client.HTTP(self.proxy)
return h
| https://github.com/Pyomo/pyomo/issues/560 | Traceback (most recent call last):
File "/ascldap/users/gseastr/envs/python3.6/bin/pyomo", line 11, in <module>
load_entry_point('Pyomo', 'console_scripts', 'pyomo')()
File "/home/gseastr/envs/pyomo/pyomo/scripting/pyomo_main.py", line 82, in main
retval = _options.func(_options)
File "/home/gseastr/envs/pyomo/pyomo/sc... | TypeError |
def send_request(self, connection, handler, request_body):
connection.putrequest("POST", "%s%s" % (self.realhost, handler))
| def send_request(self, connection, handler, request_body):
connection.putrequest("POST", "%s://%s%s" % (urlscheme, self.realhost, handler))
| https://github.com/Pyomo/pyomo/issues/560 | Traceback (most recent call last):
File "/ascldap/users/gseastr/envs/python3.6/bin/pyomo", line 11, in <module>
load_entry_point('Pyomo', 'console_scripts', 'pyomo')()
File "/home/gseastr/envs/pyomo/pyomo/scripting/pyomo_main.py", line 82, in main
retval = _options.func(_options)
File "/home/gseastr/envs/pyomo/pyomo/sc... | TypeError |
def __init__(self, m, package="scipy"):
self._intpackage = package
if self._intpackage not in ["scipy", "casadi"]:
raise DAE_Error(
"Unrecognized simulator package %s. Please select from "
"%s" % (self._intpackage, ["scipy", "casadi"])
)
if self._intpackage == "scipy... | def __init__(self, m, package="scipy"):
self._intpackage = package
if self._intpackage not in ["scipy", "casadi"]:
raise DAE_Error(
"Unrecognized simulator package %s. Please select from "
"%s" % (self._intpackage, ["scipy", "casadi"])
)
if self._intpackage == "scipy... | https://github.com/Pyomo/pyomo/issues/345 | Traceback (most recent call last):
File "temp.py", line 17, in <module>
tsim, profiles = mysim.simulate(numpoints=100)
File "/home/blnicho/Research/pyomo/pyomo/dae/simulator.py", line 773, in simulate
integrator_options)
File "/home/blnicho/Research/pyomo/pyomo/dae/simulator.py", line 813, in _simulate_with_casadi_no_i... | KeyError |
def help_solvers():
import pyomo.environ
wrapper = textwrap.TextWrapper(replace_whitespace=False)
print("")
print("Pyomo Solvers and Solver Managers")
print("---------------------------------")
print(
wrapper.fill(
"Pyomo uses 'solver managers' to execute 'solvers' that per... | def help_solvers():
import pyomo.environ
wrapper = textwrap.TextWrapper(replace_whitespace=False)
print("")
print("Pyomo Solvers and Solver Managers")
print("---------------------------------")
print(
wrapper.fill(
"Pyomo uses 'solver managers' to execute 'solvers' that per... | https://github.com/Pyomo/pyomo/issues/266 | Traceback (most recent call last):
File "/usr/bin/pyomo", line 11, in <module>
sys.exit(main())
File "/usr/lib64/python3.4/site-packages/pyomo/scripting/pyomo_main.py", line 82, in main
retval = _options.func(_options)
File "/usr/lib64/python3.4/site-packages/pyomo/scripting/driver_help.py", line 457, in help_exec
help... | AttributeError |
def __init__(self, **kwds):
self._version = None
self._default_variable_value = None
self._metasolver = False
self._capabilities = Options()
self._capabilities.linear = True
self._capabilities.quadratic_objective = True
self._capabilities.quadratic_constraint = True
self._capabilities.i... | def __init__(self, **kwds):
self._version = None
self._default_variable_value = None
self._capabilities = Options()
self._capabilities.linear = True
self._capabilities.quadratic_objective = True
self._capabilities.quadratic_constraint = True
self._capabilities.integer = True
self._capab... | https://github.com/Pyomo/pyomo/issues/266 | Traceback (most recent call last):
File "/usr/bin/pyomo", line 11, in <module>
sys.exit(main())
File "/usr/lib64/python3.4/site-packages/pyomo/scripting/pyomo_main.py", line 82, in main
retval = _options.func(_options)
File "/usr/lib64/python3.4/site-packages/pyomo/scripting/driver_help.py", line 457, in help_exec
help... | AttributeError |
def update_contset_indexed_component(comp, expansion_map):
"""
Update any model components which are indexed by a ContinuousSet that
has changed
"""
# This implemenation will *NOT* check for or update
# components which use a ContinuousSet implicitly. ex) an
# objective function which itera... | def update_contset_indexed_component(comp):
"""
Update any model components which are indexed by a ContinuousSet
that has changed
"""
# This implemenation will *NOT* check for or update
# components which use a ContinuousSet implicitly. ex) an
# objective function which iterates through a C... | https://github.com/Pyomo/pyomo/issues/353 | $ python -i temp.py
Traceback (most recent call last):
File "temp.py", line 26, in <module>
disc.apply_to(m, nfe=2)
File "/home/blnicho/Research/pyomo/pyomo/core/base/plugin.py", line 334, in apply_to
self._apply_to(model, **kwds)
File "/home/blnicho/Research/pyomo/pyomo/dae/plugins/finitedifference.py", line 187, in _... | AttributeError |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.