MAINT: simplify data cleaning logic

What does this PR implement?
This PR cleans logic around initialization. Now, instead of reset parameter being passed to various functions, initialization is done once. Now, there's this branch:
def _initialize(self, X, y):
    # validate data, preprocess, etc
    return X, y, meta

if should_init:
    X, y, meta = self._initialize(X, y)
else:
    X, meta = self.preprocess_X(X)
    y = self.preprocess_y(y)

In addition, these simplifications were made:

Fixes typo ("MultiOuputClassifier" → "MultiOutputClassifier")
Simplification of KerasClassifier.preprocess_y. Now, convoluted if-statements are avoided.
Uses y.ndim instead of len(y.shape)

TODO:

[ ] Remove scikeras.utils.type_of_target pending https://github.com/adriangb/scikeras/pull/88/files#r499172803.

A couple of comments:

I would have a flat namespace in scikeras.utils (so no utils.transformers namespace). I don't think the utils are complex enough to warrant more namespaces.
I strongly recommend that you do not implement complex custom classes for your tests (i.e., MultiOutputClassifier). The tests are supposed to test the code in the scikeras/ directory, not the code in the tests/ directory.

I would have a flat namespace in scikeras.utils (so no utils.transformers namespace). I don't think the utils are complex enough to warrant more namespaces.

Sure, no problem changing that, we can do it after merging this PR into the other dev branch.

I strongly recommend that you do not implement complex custom classes for your tests (i.e., MultiOutputClassifier). The tests are supposed to test the code in the scikeras/ directory, not the code in the tests/ directory.

I totally agree, but one of the key features SciKeras promises to support that the old TF implementation did not is multi-input/output models. We need to ensure that our entire ecosystem (losses, paramter routing, class_weights, etc.) is compatible with that. How do we test all of that without implementing the tests the way I have? Previously it was straightforward because MultiOutputClassifier was in the scikeras/ directory, but now that we are moving it out we should question the testing strategy. Do you have any ideas on how we can keep all of the tests for multi-input/output models that we have?

@stsievert I have fixes for some of the minor nits above (https://github.com/adriangb/scikeras/pull/93#discussion_r500461198, https://github.com/adriangb/scikeras/pull/93#discussion_r500440493, https://github.com/adriangb/scikeras/pull/93#discussion_r500434979). Let me know if I can push it to this branch.

Yeah, feel free to push to this branch.

I think I ironed out some of the kinks.
Here are the things I'm not 100% on:

We got rid of the reset argument in preprocess_{X,y} but we traded that for a new function _get_meta. Now it's hard to check meta params necessarily created in preprocess_{X,y} like classes_ because we can't just say hasattr(self, "classes_") since that wouldn't differentiate between a partial_fit call (where you do want the check) or a second call to fit (where you don't want the check). Using a reset parameter is how sklearn handles this very same problem (BaseEstimator. _check_n_features, BaseEstimator. _validate_data ).
The dictionary-based mapping of transformers is nice, but we still have if/elif/else logic that we can't get rid of, and the logic in preprocess_y no longer directly mirrors the logic in postprocess_y.

What's the purpose of preprocess_y now? Right now it chooses an encoder, collects metadata, and performs validation. Why not refactor preprocess_y into three functions?
It shouldn't be necessary to change the API to let the user specify the encoder. That might be a separate discussion.

Using a reset parameter is how sklearn handles this very same problem

I don't think SciKeras needs that complication. I think the above will boil down to this code:
def _fit(self, X, y, warm_start=False):
    should_init = True
    if (self.warm_start or warm_start) and self._initialized():
        shoud_init = False
    if should_init:
        meta = self._get_meta(X=X, y=y)  # only get array metadata
        target_type = type_of_target(y)
        encoder = self._get_target_encoder(target_type).fit(y)
        vars(self).update({"target_type_": target_type, "target_encoder_": encoder, **meta})

        model, meta = self._build_keras_model()
        vars(self).update({"model_": model, **meta})

    # now, BaseWrapper has all the necessary attributes (X_dtype_, etc)
    self._check_targets(y)  # only raise errors
    self._check_features(X)  # only raise errors
    y = self.target_encoder_.transform(y)
    self._check_model_compat(X, y)  # only raise errors

    ...

I might be might be missing some functions/arguments/etc, but I think this dataflow should work.

It shouldn't be necessary to change the API to let the user specify the encoder

I agree. But what about the reset parameter forces users to change the API? In #88 MultiOutputClassifier uses the reset parameter without any API changes (link).

What's the purpose of preprocess_y now? Right now it chooses an encoder, collects metadata, and performs validation

I'd say the 3 functions are:

Collect metadata
Perform validation.
Prepare {X,y} for Keras.

The key points here are:

Preparing {X,y} should not require implementing or using a Scikit-Learn style transformer. Users may want to just do def preprocess_y(self, y, ...): return np.split(y, y.shape[1]), dict().
Metadata collection and validation is up to the user. If they collect no metadata, they don't have to implement any validation. SciKeras should not assume any specific metadata outside of it's default implementations of {pre,post}process_{X,y}.

This means I would want to make _get_meta public and somehow get rid of _get_target_encoder.
And I still don't see how that API would allow setting and validating of attributes that are dependent on whatever processing is going on within preprocess_{X,y}, an implementation-specific example of this being classes_.

Codecov Report

:exclamation: No coverage uploaded for pull request base (data-processing-ref@843192f). Click here to learn what that means.
The diff coverage is 100.00%.

@@                  Coverage Diff                   @@
##             data-processing-ref      #93   +/-   ##
======================================================
  Coverage                       ?   97.99%
======================================================
  Files                          ?        4
  Lines                          ?      548
  Branches                       ?        0
======================================================
  Hits                           ?      537
  Misses                         ?       11
  Partials                       ?        0

Impacted Files
Coverage Δ

scikeras/utils/__init__.py
100.00% <100.00%> (ø)

scikeras/utils/transformers.py
95.00% <100.00%> (ø)

scikeras/wrappers.py
98.64% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 843192f...d8b1c47. Read the comment docs.

I've changed the example in https://github.com/adriangb/scikeras/pull/93#issuecomment-704557571 to reflect some of your concerns:

_get_meta and _get_target_transformer are now public (and renamed to fit_metadata and target_transformer respectively).
fit_metadata is passed an encoder= argument. This allows pulling classes_/etc from the encoder.

I'm not seeing the big barrier to using transformers. They require a little more structure, but it's pretty minimal:
class MultiOutputRegressor(KerasRegressor):
    def encode(self, y):  # aka preprocess
        self.foo = "bar"
        return [y[:, i] for i in range(y.shape[1])]

    def target_transformer(self, y):
        return FunctionTransformer(forward=encode, inverse_transform=np.column_stack)

I think this could easily replace preprocess_{X,y}, especially with some good documentation.

And I still don't see how that API would allow setting and validating of attributes that are dependent on whatever processing is going on within preprocess_{X,y}

I would prefer to see the user override target_transformer if they have a stateful transform because it supports the fit/transform protocol. I think that {pre,post}process_* should be stateless or a static method (so in my example, self.foo isn't declared).
If you really want to support user doing anything in pre/postprocess, you have a good suggestion with renaming reset. In my example, I've added pre/postprocess back in and have added an attribute BaseWrapper.initializing_. That means this code is possible:
class NormalizedMultiOutputRegressor(KerasRegressor):
    def preprocess_y(self, y: ArrayLike) -> List[ArrayLike]:
        if self.initializing_:
            self.normalizers_ = [StandardScaler().fit(y[:, i] for i in range(y.shape[1])]
        return [norm.transform(y[:, i]) for i, norm in enumerate(self.normalizers_)]

    def postprocess_y(self, y: List[ArrayLike]) -> ArrayLike:
        y2 = [norm.inverse_transform(yi) for yi, norm in zip(y, self.normalizers_)]
        return np.column_stack(y2)

To be clear, I don't think BaseWrapper.initializing_ should be used anywhere in the SciKeras codebase. I don't think it's necessary given that encoders are used in KerasClassifier and KerasRegressor. It's a nice documentation note (it will likely help extending SciKeras to multi input/output models), but that's all it should be. It's still not even necessary; here's some equivalent code:

class MultiNormalizer(Transformer):
    def fit(self, y: ArrayLike):
        self.normalizers_ = [StandardScaler().fit(y[:, i] for i in range(y.shape[1])]
        return self

    def transform(self, y: ArrayLike) -> List[ArrayLike]:
        return [norm.transform(y[:, i]) for i, norm in enumerate(self.normalizers_)]

    def inverse_transform(self, y: List[ArrayLike]) -> ArrayLike:
        y2 = [norm.inverse_transform(yi) for yi, norm in zip(y, self.normalizers_)]
        return np.column_stack(y2)

class NormalizedMultiOutputRegressor(KerasRegressor):
    def target_encoder(self, target_type):
        return MultiNormalizer()

That is great @stsievert, I think it addresses a lot if not all of my concerns, but let me re-read with fresh eyes in the morning and give it a go at implementing into this branch and I'll loop back before pushing.

I generally really like the idea of encapsulating state within transformers, but I feel like if we're going to go that route, we should fully commit by completely replacing {pre,post}process_{X,y} with something like:
def _fit(self, X, y, warm_start=False):
    ...
    if should_init:
       # this branch could live inside self._initialize() or something, that's internal detail
        self.target_type_ = type_of_target(y)
        ...  # other collection of metadata like self.target_type_, so that all of it is available to get_target_encoder
        self.target_encoder_ = self.get_target_encoder().fit(y)
        self.input_encoder_ = self.get_input_encoder().fit(X)
        vars(self).update(**self.target_encoder.get_meta())  # do we want this? or are the encoders themselves now the metadata?
        ...
    y = self.target_encoder_.transform(y)
    X = self.input_encoder_.transform(X)
   ...

Where get_target_encoder is a public function with full access to all SciKeras metadata, so the default implementation would look something like:
class KerasClassifier:
    def get_target_encoder(self):
        # users can pass metadata to their TF and the TF decides which branch to use
        return KerasClassifierTransformer(loss=self.loss, type_of_target=self.target_type_)
        # or they could put that logic here and return different transformers
        tfs = {"multiclass": KerasClassifierMulticlassTF(loss=self.loss), "binary": KerasClassifierBinaryTF(loss=self.loss), ...)
        return tfs[self.target_type_]

And obviously we would completely delete {pre,post}process_{X,y}.
What do you think?

we should fully commit by completely replacing {pre,post}process_{X,y}

:+1: yes, please. Your implementation looks good.
I only included {pre,post}process_* in https://github.com/adriangb/scikeras/pull/93#issuecomment-704682009 because https://github.com/adriangb/scikeras/pull/93#issuecomment-704579608 expressed a desire to keep that API.

vars(self).update(**self.target_encoder.get_meta())  # do we want this? or are the encoders themselves now the metadata?

I think KerasClassifier should still have classes_. Here's the interface I'm thinking of for fit_metadata:
class BaseEstimator(BaseEstimator):
    def fit_metadata(self, X, y, target_encoder):
        meta = {"X_dtype_": X.dtype, ...}  # X metadata
        meta.update({"y_dtype_": y.dtype, ...})  # y metadata
        meta.update({"target_encoder_": target_encoder})
        return meta

class KerasClassifier(BaseWrapper):
    def fit_metadata(self, *args, **kwargs):
        meta = super().fit_metadata(*args, **kwargs)
        meta["classes_"] = meta["target_encoder_"][-1].classes_  # I think indexing is correct with Ensure2DTransformer
        return meta

Where get_target_encoder is a public function w

A better name might be target_encoder and feature_encoder and with a property:
class BaseWrapper(BaseEstimator):
    @property
    def target_encoder(self):
        return make_pipeline(...)

    def _fit(...):
        ...
        if should_init:
            ...
            self.target_transformer_ = self.target_transformer.fit(y)

I've written this entire comment without a feature_encoder; I don't think that function is necessary or even required. I could only find a meaningful preprocess_X in MultiOutputClassifier, and I think that can be taken care of outside of SciKeras with the "multiple output transformer" in https://github.com/adriangb/scikeras/pull/93#issuecomment-704682009 and this code:
from scikeras import KerasClassifier
from sklearn.pipeline import Pipeline
from sklearn.datasets import make_classification

classifier = KerasClassifier(...)
feature_transformer = MultiNormalizer()  # definition in "Multiple output transformer" of https://github.com/adriangb/scikeras/pull/93#issuecomment-704682009

estimator = make_pipeline(feature_transformer, classifier)
X, y = make_classification()
estimator.fit(X, y)

👍 yes, please. Your implementation looks good.

Awesome will start working on it.

#93 (comment) expressed a desire to keep that API.

Yeah, sorry if I sound flip-floppy on that. If we can do it all with TFs then that is a cleaner interface.

I think KerasClassifier should still have classes_

I wouldn't want to hardcode retrieval of any specific parameters. I think we should either get them all or none. At the end of the day, the only direct consumer of those parameters is going to be model_build_fn.

A better name might be target_encoder and feature_encoder and with a property:

Agreed.

I think that can be taken care of outside of SciKeras

I actually don't think it can, because SciKeras can't accept a list of arrays or a dict of arrays as an input. If you do the transform before SciKeras, you'll get validation errors.

I have an initial working prototype. Still need to rework all of the tests that relied on the old API, so I'm not going to push just yet.

I think KerasClassifier should still have classes_

Regarding this problem, here is what I ended up implementing:
class BaseScikerasDataTransformer(TransformerMixin, BaseEstimator, ABC):

    @abstractmethod
    def fit(self, X: np.ndarray) -> "BaseScikerasDataTransformer":
        pass

    @abstractmethod
    def transform(self, X: np.ndarray) -> Union[np.ndarray, List[np.ndarray], Dict[str, np.ndarray]]:
        pass

    @abstractmethod
    def inverse_transform(self, X: Union[List[np.ndarray], np.ndarray]) -> np.ndarray:
        pass

    @abstractmethod
    def get_meta_params(self) -> Dict[str, Any]:
        pass

class BaseWrapper(...):
    def _initialize(self, X, y):
        ...
        self.target_encoder_ = self.target_encoder.fit(y)
        target_meta = self.target_encoder_.get_meta_params()
        vars(self).update(**target_meta)
        self._meta.update(set(target_meta.keys()))
        self.feature_encoder_ = self.feature_encoder.fit(X)
        feature_meta = self.feature_encoder_.get_meta_params()
        vars(self).update(**feature_meta)
        self._meta.update(set(feature_meta.keys()))
       ...

This achieves the goal of letting users generate and set their own meta-params. In our default implementation, we use it to set all of the ones that used to be set in preprocess_y.

@stsievert  I just pushed here, heads up because I think you had some diverging changes, just in case you want to keep those.

I just pushed here

It looks like you've removed the commits with messages "Update tests.yaml" and "try to make test suite run." They're still on my machine, so I can force push those commits again. Let me know when I should do that.

No worries, I realized that after I commented, I edited my comment above but it seems like we crossed comments, sorry for the hassle 😄

I've got it down to just failures in test_errors.py corresponding to a bunch of # TODO: validate here in the code, I'll fix those later, but the gist of it is there if you want to take a look Scott.
The one thing I'll mention is that I re-added reset to _validate_data, but at least now it's a single function that uses that parameter, and it's private. I also removed the meta dict from _validate_data and instead set attributes directly. I don't care too much about the latter, so if you really think we should go with a meta dict we can do that, but to me it seemed like needless complexity. _validate_data now basically mirrors  sklearn.base.BaseEstimator.

Codecov Report

Merging #93 into data-processing-ref will decrease coverage by 5.88%.
The diff coverage is 94.11%.

@@                   Coverage Diff                   @@
##           data-processing-ref      #93      +/-   ##
=======================================================
- Coverage               100.00%   94.11%   -5.89%
=======================================================
  Files                        5        1       -4
  Lines                      552      136     -416
=======================================================
- Hits                       552      128     -424
- Misses                       0        8       +8

Impacted Files
Coverage Δ

scikeras/utils/_transformers.py
94.11% <94.11%> (ø)

scikeras/__init__.py

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 843192f...9b7090a. Read the comment docs.

Tests are passing, coverage looks good and I think the interface is good too.
This should also be amenable to working with #69. I think we just propagate the classes param from partial_fit to _fit and then to the transformer's __init__ as categories (rename it to match other sklearn TFs). And then since the default implementations are now using OneHotEncoder and OrdinalEncoder which take a categories parameter, we can just pass categories=self.categories.
I like it enough that I think we should merge and get back to #88 and discuss scikeras.utils.type_of_target there (which I think is the main issue left), but I'll leave this open until tomorrow in case you have any objections.

Thanks for the review @stsievert. I addressed the easy points. Can we merge this and continue working on it in #88 since it seems that we both agree that generally this is the way forward?

Can we merge this and continue working on it in #88 since it seems that we both agree that generally this is the way forward?

I'd like to finish the review here first so existing conversations/threads can be resolved (and not lost). Is this PR blocking anything?

No worries then. I did want to start working on #89 and #69. My thought process was that the issues here are not very different than the issues in #88, but I guess yeah the conversations would be los. Let's finish up here first then.

TODO:

[ ]  Remove scikeras.utils.type_of_target pending https://github.com/adriangb/scikeras/pull/88/files#r499172803.

What do you think we should do with this issue?


Fix SVG icon position inside Grid Card items

Bug/issue #, if applicable: 101020636
Summary
Fixes a small bug where SVG icons were offset when rendered inside the @Links directive with the Card component.
Before

After

Dependencies
NA
Testing
docc-build.zip
Steps:

Use the @Links directive to link to a few pages which use native SVGs as icons, or visit this link from the attached archive.
Assert that all icons are properly aligned.

Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.

[x] Added tests
[x] Ran npm test, and it succeeded
[x] Updated documentation if necessary

@swift-ci test


Can not jit-compile piecewise linear function

Here is a code that does not work.
import jax

def f(x):
    return jax.numpy.piecewise(x, [x<0,0<x<1], [-x, x])

f_jit=jax.jit(f)

f(0.5) # 0.5
f_jit(0.5) # Error

Function f is working fine but throws an error when jit-compiled. If the second condition is replaced from $0<x<1$ to a single inequality like $0<x$ everything works. Is it intended behavior? How should one define a function on several intervals then?
Full traceback:

UnfilteredStackTrace                      Traceback (most recent call last)
 in
8 f(0.5)
----> 9 f_jit(0.5)
~/.local/lib/python3.8/site-packages/jax/_src/traceback_util.py in reraise_with_filtered_traceback(*args, **kwargs)
142     try:
--> 143       return fun(*args, **kwargs)
144     except Exception as e:
~/.local/lib/python3.8/site-packages/jax/_src/api.py in cache_miss(*args, **kwargs)
425     flat_fun, out_tree = flatten_fun(f, in_tree)
--> 426     out_flat = xla.xla_call(
427         flat_fun,
~/.local/lib/python3.8/site-packages/jax/core.py in bind(self, fun, *args, **params)
1564   def bind(self, fun, *args, **params):
-> 1565     return call_bind(self, fun, *args, **params)
1566
~/.local/lib/python3.8/site-packages/jax/core.py in call_bind(primitive, fun, *args, **params)
1555   with maybe_new_sublevel(top_trace):
-> 1556     outs = primitive.process(top_trace, fun, tracers, params)
1557   return map(full_lower, apply_todos(env_trace_todo(), outs))
~/.local/lib/python3.8/site-packages/jax/core.py in process(self, trace, fun, tracers, params)
1567   def process(self, trace, fun, tracers, params):
-> 1568     return trace.process_call(self, fun, tracers, params)
1569
~/.local/lib/python3.8/site-packages/jax/core.py in process_call(self, primitive, f, tracers, params)
608   def process_call(self, primitive, f, tracers, params):
--> 609     return primitive.impl(f, *tracers, **params)
610   process_map = process_call
~/.local/lib/python3.8/site-packages/jax/interpreters/xla.py in _xla_call_impl(fun, device, backend, name, donated_invars, *args)
577 def _xla_call_impl(fun: lu.WrappedFun, *args, device, backend, name, donated_invars):
--> 578   compiled_fun = _xla_callable(fun, device, backend, name, donated_invars,
579                                *unsafe_map(arg_spec, args))
~/.local/lib/python3.8/site-packages/jax/linear_util.py in memoized_fun(fun, *args)
261     else:
--> 262       ans = call(fun, *args)
263       cache[key] = (ans, fun.stores)
~/.local/lib/python3.8/site-packages/jax/interpreters/xla.py in _xla_callable(fun, device, backend, name, donated_invars, *arg_specs)
651   abstract_args, _ = unzip2(arg_specs)
--> 652   jaxpr, out_avals, consts = pe.trace_to_jaxpr_final(fun, abstract_args, transform_name="jit")
653   if any(isinstance(c, core.Tracer) for c in consts):
~/.local/lib/python3.8/site-packages/jax/interpreters/partial_eval.py in trace_to_jaxpr_final(fun, in_avals, transform_name)
1208     main.jaxpr_stack = ()  # type: ignore
-> 1209     jaxpr, out_avals, consts = trace_to_subjaxpr_dynamic(fun, main, in_avals)
1210     del fun, main
~/.local/lib/python3.8/site-packages/jax/interpreters/partial_eval.py in trace_to_subjaxpr_dynamic(fun, main, in_avals)
1187     in_tracers = map(trace.new_arg, in_avals)
-> 1188     ans = fun.call_wrapped(*in_tracers)
1189     out_tracers = map(trace.full_raise, ans)
~/.local/lib/python3.8/site-packages/jax/linear_util.py in call_wrapped(self, *args, **kwargs)
165     try:
--> 166       ans = self.f(*args, **dict(self.params, **kwargs))
167     except:
 in f(x)
3 def f(x):
----> 4     return jax.numpy.piecewise(x, [x<0,0<x<1], [-x, x])
5
~/.local/lib/python3.8/site-packages/jax/core.py in bool(self)
537   def nonzero(self): return self.aval._nonzero(self)
--> 538   def bool(self): return self.aval._bool(self)
539   def int(self): return self.aval._int(self)
~/.local/lib/python3.8/site-packages/jax/core.py in error(self, arg)
959   def error(self, arg):
--> 960     raise ConcretizationTypeError(arg, fname_context)
961   return error
UnfilteredStackTrace: jax._src.errors.ConcretizationTypeError: Abstract tracer value encountered where concrete value is expected: Traced<ShapedArray(bool[], weak_type=True)>with<DynamicJaxprTrace(level=0/1)>
The problem arose with the bool function.
While tracing the function f at :3, transformed by jit., this concrete value was not available in Python because it depends on the value of the arguments to f at :3, transformed by jit. at flattened positions [0], and the computation of these values is being staged out (that is, delayed rather than executed eagerly).
(https://jax.readthedocs.io/en/latest/errors.html#jax.errors.ConcretizationTypeError)
The stack trace below excludes JAX-internal frames.
The preceding is the original exception that occurred, unmodified.

The above exception was the direct cause of the following exception:
ConcretizationTypeError                   Traceback (most recent call last)
 in
7
8 f(0.5)
----> 9 f_jit(0.5)
 in f(x)
2
3 def f(x):
----> 4     return jax.numpy.piecewise(x, [x<0,0<x<1], [-x, x])
5
6 f_jit=jax.jit(f)
ConcretizationTypeError: Abstract tracer value encountered where concrete value is expected: Traced<ShapedArray(bool[], weak_type=True)>with<DynamicJaxprTrace(level=0/1)>
The problem arose with the bool function.
While tracing the function f at :3, transformed by jit., this concrete value was not available in Python because it depends on the value of the arguments to f at :3, transformed by jit. at flattened positions [0], and the computation of these values is being staged out (that is, delayed rather than executed eagerly).
(https://jax.readthedocs.io/en/latest/errors.html#jax.errors.ConcretizationTypeError)

Thanks for the question – the issue is that comparison operator chaining (i.e. 0<x<1) is not supported for JAX arrays, similar to the case for Numpy. Instead you should write (0<x)&(x<1):
import jax

def f(x):
    return jax.numpy.piecewise(x, [x<0,(0<x)&(x<1)], [-x, x])

f_jit=jax.jit(f)

f(0.5) # 0.5
f_jit(0.5) # DeviceArray(0.5, dtype=float32)

@idnm I'd use Github Discussions (the Discussions tab above) instead of Github Issues for asking questions. It's a better format for questions and it's more appropriate when there isn't necessarily something for us to fix.


Add compact_maps and compact_structs options to PrettyConfig

Fixes #447 by adding compact_maps and compact_structs options to PrettyConfig

[ ] I've included my change in CHANGELOG.md

?r @torkleyy

Codecov Report
Patch coverage: 77.77% and project coverage change: -0.10 :warning:

Comparison is base (5a407f3) 86.73% compared to head (fe79095) 86.63%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #448      +/-   ##
==========================================
- Coverage   86.73%   86.63%   -0.10%
==========================================
  Files          59       60       +1
  Lines        7280     7364      +84
==========================================
+ Hits         6314     6380      +66
- Misses        966      984      +18

Impacted Files
Coverage Δ

src/ser/mod.rs
70.89% <69.23%> (-0.26%)
:arrow_down:

tests/447_compact_maps_structs.rs
100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Some links in the base/README.md are outdated

The README file for the base module lists the contents of the module with links to some specific packages. Some of those packages no longer exist.

Already fixed.


[CI] Makefile: Golang build command returning warning in golang 1.19

Current Behavior
Contributors execute make run to build the adapter. After upgrading from 1.17.8 to 1.19.1, this warning is now shown:
# command-line-arguments
ld: warning: -no_pie is deprecated when targeting new OS versions

Desired Behavior
No build / compiler warnings.

Contributor Guides and Resources

📝 Meshery Adapters Spreadsheet
🛠 Meshery Build & Release Strategy
🙋🏾🙋🏼 Questions: Layer5 Discussion Forum and Layer5 Community Slack

@leecalcote I started getting that warning on my Mac, but not on my Windows/Ubuntu

It seems to be a known issue of Golang 1.19.1. https://github.com/golang/go/issues/54482#issuecomment-1251124908

issue has been resolved from golang/go repo, closing this issue


Do Signals not work in Unit Tests?

Are Signals not supposed to work in the editor?  My issue is that I can't run a unit test for my classes that are using a Signal (even if I'm not testing that particular feature).
The following UnitTest is constantly failing, but the same set up works fine while playing in the scene:
[TestFixture]
public class SignalTest : ZenjectUnitTestFixture
{
    [Test]
    public void RunTest1()
    {
		Container.DeclareSignal<TestSignal>();
		Container.BindSignal<TestSignal> ().To<Listener> (x => x.HelloWorld).AsSingle ();
		Container.Bind<Broadcaster> ().ToSelf ().AsTransient ();

		Broadcaster testBroadcaster = Container.Resolve<Broadcaster> ();
		testBroadcaster.Broadcast ();  // Fails here

		// Assertions and such to follow...

    }
}

I receive the following exception:
---
Zenject.ZenjectException : Unable to resolve type 'Zenject.SignalManager' while building object with type 'TestSignal'.
Object graph:
Broadcaster
TestSignal
---

As for scene setup, I can attach the below MonoBehavior to a scene and it runs fine:
public class TestGameObject : MonoBehaviour {
	[Inject]
	Broadcaster testBroadcaster;

	bool first = true;

	void Update()
	{
		if (first)
		{
			testBroadcaster.Broadcast ();
			first = false;
		}
	}
}

with the following declarations:
public class TestSignal : Signal<TestSignal>  {

}

public class Broadcaster {

	TestSignal signal;

	public Broadcaster(TestSignal _signal)
	{
		signal = _signal;
	}

	public void Broadcast()
	{
		signal.Fire ();
	}
}

public class Listener {

	public void HelloWorld()
	{
		Debug.Log ("Heard it");
	}
}

public class MainGameInstaller : MonoInstaller<MainGameInstaller>
{
          public override void InstallBindings()
          {
		Container.DeclareSignal<TestSignal>();
		Container.BindSignal<TestSignal> ().To<Listener> (x => x.HelloWorld).AsSingle ();
		Container.Bind<Broadcaster> ().ToSelf ().AsTransient ();
           }
}

This is a normal UnitTest, not an integration Test.  Would love to be able to test the "Broadcaster" equivalent classes in my project.

You have to add a binding for SignalManager to your unit test like Container.Bind<SignalManager>().AsSingle();
We are going to get rid of SignalManager at some point to address this issue as discussed here in #256 so this issue will go away then

This should definitely be added to the documentation at Zenject/Documentation/WritingAutomatedTests.md.
None of the examples in there implement signals so far, which could be updated too.
I might create a pull request for that.

This is fixed in develop branch with the new Signals implementation

in version 7 there is no "SignalManager", нow can I solve this?

See https://github.com/svermeulen/Zenject/issues/551 for an example of using signals in unit tests


Add support for multiple tensor input/output

This PR adds support for models with multi tensor input and output as the bioimageio RDF defines it.
side note for further/later discussion/development:
PredictionPipeline somewhat unnecessarily redefines some parts of  the bioimageio.core.nodes definitions with named/tagged shapes, etc.
I don't think this slight difference is really justifying the whole redifinition of many fields; instead the implementation of the nodes could be changed or the axis naming, tagging left out here (the axes names are always accessible!). As this would be a bigger change, it is left untouched here and locally NamedImplicitOutputShape is defined as a tagged equivalent to nodes.ImplicitOutputShape.

I don't think this slight difference is really justifying the whole redifinition of many fields; instead the implementation of the nodes could be changed or the axis naming, tagging left out here (the axes names are always accessible!). As this would be a bigger change, it is left untouched here and locally NamedImplicitOutputShape is defined as a tagged equivalent to nodes.ImplicitOutputShape.

Indeed we should get rid of the duplication, but I agree that it's better to do this in a follow up PR.

Alright working on the multi tensor modifications...
Constantin Pape @.***> schrieb am So., 12. Sep. 2021,
20:01:

@.**** commented on this pull request.
Looks good overall. Can you add a test for pytorch using the new example
model?
(If you want I can also add the multi tensor version of onnx/torchscript,
so that we can add tests for these.)
In
bioimageio/core/prediction_pipeline/_model_adapters/_keras_model_adapter.py
https://github.com/bioimage-io/python-bioimage-io/pull/103#discussion_r706871347
:

   weight_file = self.spec.weights["keras_hdf5"].source

   self.model = keras.models.load_model(weight_file)

   weight_file = bioimageio_model.weights["keras_hdf5"].source

   self._model = keras.models.load_model(weight_file)

   self._output_axes = [tuple(out.axes) for out in bioimageio_model.outputs]

def forward(self, *input_tensors: xr.DataArray) -> List[xr.DataArray]:

   result = self._model.predict(*[ipt.data for ipt in input_tensors])

Why not predict(*input_tensors)? The list comprehension should not be
necessary here.
In
bioimageio/core/prediction_pipeline/_model_adapters/_keras_model_adapter.py
https://github.com/bioimage-io/python-bioimage-io/pull/103#discussion_r706871435
:

   weight_file = self.spec.weights["keras_hdf5"].source

   self.model = keras.models.load_model(weight_file)

   weight_file = bioimageio_model.weights["keras_hdf5"].source

   self._model = keras.models.load_model(weight_file)

   self._output_axes = [tuple(out.axes) for out in bioimageio_model.outputs]

def forward(self, *input_tensors: xr.DataArray) -> List[xr.DataArray]:

   result = self._model.predict(*[ipt.data for ipt in input_tensors])

   if not isinstance(result, (tuple, list)):

       result = [result]

A bit nitpicky, but in the case of tuple shouldn't we cast to list?
In
bioimageio/core/prediction_pipeline/_model_adapters/_keras_model_adapter.py
https://github.com/bioimage-io/python-bioimage-io/pull/103#discussion_r706871493
:

   weight_file = self.spec.weights["keras_hdf5"].source

   self.model = keras.models.load_model(weight_file)

   weight_file = bioimageio_model.weights["keras_hdf5"].source

   self._model = keras.models.load_model(weight_file)

   self._output_axes = [tuple(out.axes) for out in bioimageio_model.outputs]

def forward(self, *input_tensors: xr.DataArray) -> List[xr.DataArray]:

   result = self._model.predict(*[ipt.data for ipt in input_tensors])

   if not isinstance(result, (tuple, list)):

       result = [result]

ah, nvm that's taken care of in the return
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/bioimage-io/python-bioimage-io/pull/103#pullrequestreview-752182667,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ADTQGBNLT44VE3VPXVVSPTLUBTTI7ANCNFSM5DZYTZBA
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

tests using the new example models are still missing...

test_prediction_pipeline_torch for the new multi tensor model fails with unequal outputs. the first is:
output:

expected:

@FynnBe indeed I forgot to update the test outputs after making some changes to the models and weights to fix another issue.
I updated the outputs now. Can you give it another try?


look into using shippable

look into using shippable, and publishing a set of docker images that make working with swagger easier

https://app.shippable.com/

circle ci now supports docker images. not moving to shippable


Ignore boxes that are not supported

Currently the algorithms throw exception in case a non-supported JUMBF box is located. Instead, it should simply ignore the box and proceed discovering the remaining boxes

Already supported in commit 90a84ea5. Now both CoreParser and CoreGenerator ignore content type uuids which are not supported.


ArrayField and ArrayWidget Rendering problem

What version of Unfold are you using?
0.40.0
What version of Django are you using?
5.1
What browser are you using?
Chrome 128
Did you checked changelog/commit history, if the bug is not already fixed?
Yes
Did you searched other issues, if the bug is not already fixed?
Yes
Did you checked documentation?
Yes
Are you able to replicate the bug in the demo site?
ArrayWidget is not used in the demo site
Repository with reproduced bug
model code:
from django.contrib.postgres.fields import ArrayField
from django.db import models

class Customer(models.Model):
    notes = ArrayField(m.TextField(), default=list, blank=True, verbose_name='Notes')

admin code:
class CustomerInline(ModelAdmin):
    model = Customer
    extra = 1
    fields = ['notes']
    formfield_overrides = {
        ArrayField: {
            "widget": ArrayWidget,
        },
    }

Describe your issue
When adding in the following items to the array field using the widget:
- Something 1
- Something 2, Something 3
- Something 4

It saves properly in the backend as:
['Something 1', 'Something 2, Something 3', 'Something 4']
but when the page reloads, it renders as:
- Something 1
- Something 2
-  Something 3
- Something 4

Notice the extra space before Something 3 also

I just tested ArrayWidget in unfold.admin.StackedInline and unfold.admin.TabularInline and it worked without any issues. For testing I used different fields like CharField with choices and TextField.
Would you mind create minimal repository where I can see this issue?

Closing this issue due to inactivity.


ARROW-6397: [C++][CI] Generate minio server connect string

Appveyor is spuriously failing due to socket bind collisions. This change lowers the probability of this error.

Codecov Report

Merging #5238 into master will decrease coverage by 12.23%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           master    #5238       +/-   ##
===========================================
- Coverage   87.64%   75.41%   -12.24%
===========================================
  Files        1033       57      -976
  Lines      148463     3636   -144827
  Branches     1437        0     -1437
===========================================
- Hits       130118     2742   -127376
+ Misses      17983      894    -17089
+ Partials      362        0      -362

Impacted Files
Coverage Δ

python/pyarrow/ipc.pxi

cpp/src/parquet/column_page.h

cpp/src/plasma/test/external_store_tests.cc

cpp/src/arrow/array/builder_decimal.cc

cpp/src/plasma/client.cc

rust/parquet/src/arrow/converter.rs

cpp/src/arrow/compute/compute_test.cc

cpp/src/arrow/python/io.cc

python/pyarrow/hdfs.py

cpp/src/arrow/adapters/orc/adapter_test.cc

... and 960 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update beea8f9...bdef005. Read the comment docs.


Conditional Type with Infer and union/intersection type marked as unused

TypeScript Version:  Playground

Search Terms:
Code
You should open the code in the playground
type MargheritaToppings = {
    mushrooms?: boolean;
    olives?: boolean;
    onion?: boolean;
    basil?: boolean;
};

class Pizza<T, S> {
    errornousFn(toppings: T & S): T & S { return null; } // <-- This will NOT work
    errornousFn2(toppings: T | S) {} // <-- This will NOT work
    // workingFn(toppings: T | S): S { return null; } // <-- This works
}

class PizzaMargherita extends Pizza<MargheritaToppings, number> { }

/* This works fine */

(new PizzaMargherita).errornousFn(null); // Funny enough, this works. Cmd + hover over `errornousFn` will show types correctly.

/* Here's the problem */

type ExtractSecond<P> = P extends Pizza<any, infer T> ? T : never;

let a: ExtractSecond<PizzaMargherita>; // <-- `a: {}` for `A` if `errornousFn` is uncommented
                                       //     and `a: number` if `workingFn` is uncommented

Expected behavior:
I expected the conditional type to work just as calling one of the errornousFns works with typings.
Actual behavior:
I guess that something is off when using union/intersection types and conditional types with infer.
S is somehow marked as unused and thus we get the default {} type.
This is backed up by this, but I guess this is a bug since the same code works for what is not a conditional type.
Playground Link: Here
Related Issues: Only something similar yet not quite the same IMO in FAQ

Maybe @RyanCavanaugh has some authoritative explanation for the following behavior:
type FromUnion<T> = [T] extends [infer U | infer V] ? [U, V] : never
type U = FromUnion<{a: 0} | {b: 0}>;
// type U = [{a: 0} | {b: 0}, {a: 0} | {b: 0}]

type FromIntersection<T> = [T] extends [infer U & infer V] ? [U, V] : never
type I = FromIntersection<{a: 0} & {b: 0}>;
// type I = [unknown, unknown]

Playground link
Obviously you can't reliably recover A and B from either A | B or A & B.  But I'm surprised that FromIntersection<T> doesn't produce the same [T, T] output that FromUnion<T> does.  The compiler is free to do whatever it likes in such inferences, but if completely forgetting about T in [T] extends [infer U & infer V] is intentional (and why) or if it just happens to be that way.  I'm used to the union behavior but this is the first time I've seen the intersection behavior.
I'm trying to find a good canonical answer for this SO question, and while I'm happy to give the advice "you should never be writing infer U | infer V or infer U & infer V", it would be nice to have an explanation for why it goes wrong the way it goes wrong.


Python, Julia and R kernels in the same repo?

I can't seem to get the Python3, IJulia, and IRkernel to work in the same repository. If I have REQUIRE in the repository, I don't have access to IRkernel (though R, Julia, and Python3 are all installed). I have  environment.yml and runtime.txt, as per the docs.
See r-test.ipynb in [https://github.com/sdwfrost/multi-language-demo] - IRkernel isn't available (https://github.com/sdwfrost/multi-language-demo)

https://github.com/binder-examples/multi-language-demo/pull/1#issuecomment-417584848 links to a repository that fixes this. @sdwfrost if you could give a 👍  or 👎 we can close this issue.

Thanks! https://github.com/larssp/mybinder-J-Py-R-oct/ is nice and simple.
My repo has expanded to a big polyglot, for which I needed a Dockerfile. It's still a work in progress:
https://github.com/sdwfrost/polyglot-playground


Target to Meta Store (Godot)

We had bureaucratic issues with this task. So, we proposed in the next grant to target SideQuestVR and also try Meta Store.


Proposal: replace perf map to a ring buffer

Currently Tetragon uses tcpmon_map to send perf events, which is BPF_MAP_TYPE_PERF_EVENT_ARRAY.
Is it better to replace it by BPF_MAP_TYPE_RINGBUF?
See the blog on ringbuf vs perfbuf.

BTW, why the size of tcpmon_map is not set?
https://github.com/cilium/tetragon/blob/735c3dd6dba5b7a068cf29cd37d603cb8c0c2058/bpf/lib/hubble_msg.h#L21

Is it better to replace it by BPF_MAP_TYPE_RINGBUF?

The issue with using BPF_MAP_TYPE_RINGBUF is that it is only support in >= 5.8 kernels. Because tetragon is also required to work on older kernels, we cannot just replace  BPF_MAP_TYPE_PERF_EVENT_ARRAY with BPF_MAP_TYPE_RINGBUF, and we would need to support both which would complicate the code and increase maintenance burden.


feat: Task hierarchy

Why not have a an actual task hierarchy starting from shutdown_pageserver by requiring a CancellationToken to task_mgr::spawn? Let's see.
Caveats:

even RemoteTimelineClient gets a cancellation token, which will be cancelled too soon

currently such token is never used

drive-by layer backoff fix

Tests fail because:

flush loop exists too soon => warning

In https://github.com/neondatabase/neon/pull/6133, we saw that using task-oriented cancellation was problematic, because the scope of a task (in that case, a tenant) might be wider than the scope of the thing being cancelled  (in that case, a timeline).
Rather than extending the per-task cancellation tokens, I think we should go in the direction of using the cancellation tokens we carry on the major objects (Tenant, Timeline, etc).

In #6133, we saw that using task-oriented cancellation was problematic, because the scope of a task (in that case, a tenant) might be wider than the scope of the thing being cancelled (in that case, a timeline).
Rather than extending the per-task cancellation tokens, I think we should go in the direction of using the cancellation tokens we carry on the major objects (Tenant, Timeline, etc).

I was hoping that we would be having less cancellation tokens but for gc and compaction they will always need two except that now they can only use the timeline's CancellationToken.
As for the design in general, this will be more correct as we no longer have the bogus task_mgr::shutdown_token() -- even if someone were to use it by accident, it would still be the correct in-hierarchy token.

Example of avoided problem: https://github.com/neondatabase/neon/pull/5746#discussion_r1428159294

Closing for #8449


the terminal comands stack on top on each other making it hard to read

the terminal comands stack on top on each other making it hard to read
Version: 1.92.0
Commit: b1c0a14de1414fcdaa400695b4db1c0799bc3124
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36
Embedder: codespaces

/gifPlease


pad_image of rife_model.py is inaccurate can you fix it

This part causing error
def pad_image(img, scale):
    _, _, h, w = img.shape
    tmp = max(32, int(32 / scale))
    ph = ((h - 1) // tmp + 1) * tmp
    pw = ((w - 1) // tmp + 1) * tmp
    padding = (0, 0, pw - w, ph - h)
    return F.pad(img, padding)

The error message is as below @zRzRzRzRzRzRzR
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 480 but got size 496 for tensor number 1 in the list.
Traceback (most recent call last):
File "/workspace/ImageToVideoAI/venv/lib/python3.10/site-packages/gradio/queueing.py", line 536, in process_events
response = await route_utils.call_process_api(
File "/workspace/ImageToVideoAI/venv/lib/python3.10/site-packages/gradio/route_utils.py", line 322, in call_process_api
output = await app.get_blocks().process_api(
File "/workspace/ImageToVideoAI/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1935, in process_api
result = await self.call_function(
File "/workspace/ImageToVideoAI/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1520, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
File "/workspace/ImageToVideoAI/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/workspace/ImageToVideoAI/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2405, in run_sync_in_worker_thread
return await future
File "/workspace/ImageToVideoAI/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 914, in run
result = context.run(func, *args)
File "/workspace/ImageToVideoAI/venv/lib/python3.10/site-packages/gradio/utils.py", line 826, in wrapper
response = f(*args, **kwargs)
File "/workspace/ImageToVideoAI/venv/lib/python3.10/site-packages/gradio/utils.py", line 826, in wrapper
response = f(*args, **kwargs)
File "/workspace/ImageToVideoAI/app.py", line 348, in generate
latents = rife_inference_with_latents(frame_interpolation_model, latents)
File "/workspace/ImageToVideoAI/rife_model.py", line 125, in rife_inference_with_latents
frames = ssim_interpolation_rife(model, latent)
File "/workspace/ImageToVideoAI/venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
return func(*args, kwargs)
File "/workspace/ImageToVideoAI/rife_model.py", line 70, in ssim_interpolation_rife
tmp_output = make_inference(model, I0, I1, upscale_amount, 2exp - 1) if exp else []
File "/workspace/ImageToVideoAI/rife_model.py", line 26, in make_inference
middle = model.inference(I0, I1, upscale_amount)
File "/workspace/ImageToVideoAI/rife/RIFE_HDv3.py", line 54, in inference
imgs = torch.cat((img0, img1), 1)
RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 480 but got size 496 for tensor number 1 in the list.

https://huggingface.co/spaces/THUDM/CogVideoX-5B-Space/blob/main/rife_model.py
I made a solution like this but it is causing huge tilting in output
def pad_image(img, scale):
    _, _, h, w = img.shape
    # Calculate padding based on RIFE's expected multiples
    pad_h = (16 - (h % 16)) % 16
    pad_w = (16 - (w % 16)) % 16

    padding = (pad_w//2, pad_w - pad_w//2, pad_h//2, pad_h-pad_h//2) # Distribute padding evenly
    return F.pad(img, padding)

the example tilt
https://github.com/user-attachments/assets/e3bfd4ce-5c4f-4b3b-95e9-e1108077e7bc
and here without rifle no tilting
https://github.com/user-attachments/assets/ce46c09f-5606-4bcb-b684-8e2efe1f0422
Information / 问题信息

[X] The official example scripts / 官方的示例脚本
[ ] My own modified scripts / 我自己修改的脚本和任务

Reproduction / 复现过程
a
Expected behavior / 期待表现
a

@glide-the


UWP Application - Feature request

I think it should be great if we can have Windows Universal Application to use on mobile with continuum.
https://visualstudio.uservoice.com/forums/293070-visual-studio-code/suggestions/7762905-visual-studio-code-on-universal-app-platform

Closing as duplicate of #10759
@OrbintSoft @WangZishi Don't forget to up vote the original issue logged.


network.allneighbordistances documentation not accurate

Currently,  the doctoring for network.allneighbordistances lists the sourcepattern and destpattern parameters as strs. However, the method actually takes a network.PointPattern for each of those.  Either (a) change the docstring to reflect the method; or (b) change the method to reflect the docstring.  network.nearestneighbordistances follows the same docstring format but the actual method corresponds with the docstring.

[x] fix code

[x] fix docstrings

[x] fix examples

[x] fix tests

[x] fix notebooks

Parameters
----------
sourcepattern : str
    The key of a point pattern snapped to the network.
destpattern : str
    (Optional) The key of a point pattern snapped to the network.

        # Source setup
        src_indices = list(sourcepattern.points.keys())
        nsource_pts = len(src_indices)
        src_dist_to_node = sourcepattern.dist_to_node
        src_nodes = {}
        for s in src_indices:
            e1, e2 = src_dist_to_node[s].keys()
            src_nodes[s] = (e1, e2)

        # Destination setup
        symmetric = False
        if destpattern is None:
            symmetric = True
            destpattern = sourcepattern
        dest_indices = list(destpattern.points.keys())

#112 allows to either pattern key (str) or the full spaghetti.network.PointPattern object to be passed in to allneighbordistances as the sourcepattern and destpattern parameters.

is network.allneighbourdistances giving correct result?? when i see the values in distance matrix given by qgis, the result given by network.allneighbourdistances  seems incorrect?? please help

@MSOANCAH Thanks for the report! Please open a new issue for this if you believe that spaghetti is calculating distances incorrectly. Without clear and thorough documentation it will not be possible to troubleshoot any potential error, so please follow the template for issue reporting and provide source code and data for a MWE.

@jGaboardi thanks for your reply..I will do that. But i have some doubt regarding the data preparation steps in facility location problem. I have seen your code, you have street network and then you are adding buffer to get area and then you are creating network. in my case i am not using road network, I am directly using a country shape file as i am working on facility location problem for whole country.
Is it correct or street network is required??.  can i get proper documentation how network is formed? and what is mean by snapobservation and pointpattern. Please help me with this. So that i can get clear idea till now i was just referring to your code.

If you are referring to the Optimal Facility Location: Integration with ortools  notebook, that is simply a use case demonstration of four facility location problems constrained to a network with google's ortools and is not directly related to pysal/spaghetti itself.

In terms of facility location model formulations, I will refer you to the Scenario cell in the notebook where four citations are listed. Two more great sources are:

Daskin, Mark S. 2013. Network and Discrete Location: Models, Algorithms and Applications. 2nd Edition. John Wiley & Sons, Inc. Hoboken, NJ.

Church, Richard L. and Murray, Alan T. 2009. Business Site Selection, Locational Analysis, and GIS. John Wiley & Sons, Inc. Hoboken, NJ.

As for the spaghetti documentation, see the API Reference, specifically for spaghetti.Network.snapobservations and spaghetti.PointPattern. The documentation in the API Reference is generated from docstrings found within the code itself, like the PointPattern docstring, for example. There you will also find inline comments, like this in snapobservations, for example.

I will be locking this issue now, as it is not a bug report.


changing menu backgrounds for each menu option.

What is your question?
how can I make  the main menu background change for each main menu option?

Go to the code tab, click on <> code and click on "Download as ZIP"

how is this related to the question

how is this related to the question

I commented on the wrong one oops


Update ADOPTERS.md

Applying the update from #12086 to help out with DCO
@YasserToutah, does this look good?

Applying the update from #12086 to help out with DCO
@YasserToutah, does this look good?

Woow.. You are amazing!! thank you so much!! looks good! @Rugvip


Extension causes high cpu load

Issue Type: Performance
Extension Name: sasjs-for-vscode
Extension Version: 1.16.2
OS Version: Windows_NT x64 10.0.19044
VS Code version: 1.68.0-insider

:warning: Make sure to attach this file from your home-directory:
:warning:file:///c%3A/Users/M/AppData/Local/Temp/SASjs.sasjs-for-vscode-unresponsive.cpuprofile.txt
Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load

Hi Marko - thanks for raising!  We'll take a look.

@markoenix - we were unable to reproduce this, and our working assumption is that the issue is related to an older version of the extension (we've made a lot of improvements since last year)
If you are able to reproduce, it would be great if you can also attach the text file (cpuprofile.txt) that you refer to in the description.

via Hubstaff
User: Sabir Hassan
Project: vscode-extension - https://app.hubstaff.com/projects/2310883
Date Range: 01/26/23 - 01/26/23
Work session total: 2:23:00
Billable: Yes
Grand total: 2:23:00


Every iteration results in a 3.5gb load getting added into ram = pc crashes at fill

I set iterations to 10 each, for like 10 images, and after the scoring process and when it starts a new iteration, it adds the I assume model size to the ram. I have 64gb, and it fills in after 10 iterations of warmup, I can't even get to the optimization part.
What should I do to fix this?

mmm weird...
the models should be loaded and unloaded to avoid this behaviour
what's the webui version you are using?

My version is 1.6.0 https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/5ef669de080814067961f28357256e8fe27544f4
Maybe this error output has some information, I got it once but I don't remember if subsequent crashes cuz of ram fill had this exact error message
Saving merge to /home/imi/stable-diffusion-webui/models/Stable-diffusion/bbwm-cetusMix_Whalefall2-AOM3A3_orangemixs-best-16bit.safetensors
Unloading model 8 over the limit of 1: 218v5caa.safetensors [c5a1dcb091]
*** API error: POST: http://<IP_ADDRESS>:7860/bbwm/merge-models {'error': 'AttributeError', 'detail': '', 'body': '', 'errors': "'NoneType' object has no attribute 'lowvram'"}
    Traceback (most recent call last):
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/anyio/streams/memory.py", line 98, in receive
        return self.receive_nowait()
               ^^^^^^^^^^^^^^^^^^^^^
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/anyio/streams/memory.py", line 93, in receive_nowait
        raise WouldBlock
    anyio.WouldBlock

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 78, in call_next
        message = await recv_stream.receive()
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/anyio/streams/memory.py", line 118, in receive
        raise EndOfStream
    anyio.EndOfStream

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
      File "/home/imi/stable-diffusion-webui/modules/api/api.py", line 187, in exception_handling
        return await call_next(request)
               ^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 84, in call_next
        raise app_exc
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 70, in coro
        await self.app(scope, receive_or_disconnect, send_no_error)
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 108, in __call__
        response = await self.dispatch_func(request, call_next)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/imi/stable-diffusion-webui/modules/api/api.py", line 151, in log_and_time
        res: Response = await call_next(req)
                        ^^^^^^^^^^^^^^^^^^^^
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 84, in call_next
        raise app_exc
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/starlette/middleware/base.py", line 70, in coro
        await self.app(scope, receive_or_disconnect, send_no_error)
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/starlette/middleware/cors.py", line 84, in __call__
        await self.app(scope, receive, send)
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/starlette/middleware/gzip.py", line 24, in __call__
        await responder(scope, receive, send)
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/starlette/middleware/gzip.py", line 44, in __call__
        await self.app(scope, receive, self.send_with_gzip)
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 79, in __call__
        raise exc
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 68, in __call__
        await self.app(scope, receive, sender)
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 21, in __call__
        raise e
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/fastapi/middleware/asyncexitstack.py", line 18, in __call__
        await self.app(scope, receive, send)
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/starlette/routing.py", line 718, in __call__
        await route.handle(scope, receive, send)
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/starlette/routing.py", line 276, in handle
        await self.app(scope, receive, send)
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/starlette/routing.py", line 66, in app
        response = await func(request)
                   ^^^^^^^^^^^^^^^^^^^
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/fastapi/routing.py", line 237, in app
        raw_response = await run_endpoint_function(
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/imi/stable-diffusion-webui/venv/lib/python3.11/site-packages/fastapi/routing.py", line 163, in run_endpoint_function
        return await dependant.call(**values)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/imi/stable-diffusion-webui/extensions/sd-webui-bayesian-merger/scripts/api.py", line 103, in merge_models_api
        sd_models.reload_model_weights()
      File "/home/imi/stable-diffusion-webui/modules/sd_models.py", line 732, in reload_model_weights
        sd_model = reuse_model_from_already_loaded(sd_model, checkpoint_info, timer)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/imi/stable-diffusion-webui/modules/sd_models.py", line 681, in reuse_model_from_already_loaded
        send_model_to_cpu(sd_model)
      File "/home/imi/stable-diffusion-webui/modules/sd_models.py", line 541, in send_model_to_cpu
        if m.lowvram:
           ^^^^^^^^^
    AttributeError: 'NoneType' object has no attribute 'lowvram'

My config is
device: cpu
work_device: cpu
threads: 16
prune: True
weights_clip: False
rebasin: False
rebasin_iterations: 1
optimiser: bayes                 # tpe
bounds_transformer: False        # bayes only
latin_hypercube_sampling: True  # bayes only
guided_optimisation: False
batch_size: 4
init_points: 5
n_iters: 6
save_imgs: True
scorer_device: cpu # cuda
scorer_method: manual # chad, laion, manual
save_best: True
best_format: safetensors # ckpt
best_precision: 16 # 32

in the api section of the opened webui

merger.py

Same issue here, have you ever fixed this @Enferlain ?


Tidy up moles CEDA abbreviations to match CEDA file naming convention components.

This will be useful in the future when mapping vocabs and broader/narrower terms.

Presently there are 3059 CEDA abbreviations in MOLES.
Bulk reviews should be targeted to resolve this:
I think the bulk of issues will be around those on:
obs, obs Cols and project records.
inst, platform records are the most likely cases which are useful atm.


Enforce single attachment when appropriate

An attachment control with no maximum attachments selected should only allow one attachment

@edalex-ian It does occur with drag and drop, but the message is always the plural one. I.e. it will say something like "This attachment control only allows a maximum of 1 attachments"
Penghai is more than welcome to look at it if he really want to do Purescript :)

A bit Purescript code is added in order to ensure the maximum attachment warning uses the correct plural words.

Hi @edalex-ian , can I merge this one on Monday? Both Aaron and I think it's ready to go.

Go for it. 👍
On Fri, 1 Nov 2019 at 14:21, PenghaiZhang<EMAIL_ADDRESS>wrote:

Hi @edalex-ian https://github.com/edalex-ian , can I merge this one on
Monday? Both Aaron and I think it's ready to go.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/openequella/openEQUELLA/pull/1297?email_source=notifications&email_token=AKPCPAJCGOLTNKKDKS6WHEDQROOEPA5CNFSM4I7VLAZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOECZ4FAY#issuecomment-548651651,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKPCPAIDQ4LW4NGJ54HX5NDQROOEPANCNFSM4I7VLAZA
.

--
Ian Stevenson
Lead Developer
Edalex
www.edalex.com
*Official ANZ service provider for Interfolio
http://www.edalex.com/interfolio, Full Measure Education
http://www.edalex.com/fme **and open http://www.equella.net/*EQUELLA
http://www.equella.net/.


Get rid of any "canceled" activities that happen after closing/canceling a dialog

Fix merged into master.


Support for better invalid expression detection and divide by zero

Invalid expressions like 1+2+ or 1+*2 are now reported and does not produce an error.  Added divide by zero support.  Also incorporated various things from other outstanding pull requests.

So adding support for DivideByZero would break existing functionality, so will be added as an option on a future version.  Hopefully soon.
Also looking into supporting numbers with a leading positive sign (eg, +2).  This would break 2+2.  Right now we support negative numbers, but we they need to have a leading space.  2-2 does not work, but 2- 2 does.  If we added the same support for +2, then existing expressions would have to have a space after a + sign before a number.  I see this as too big a breaking change for support for something that is really not done often, which is specifying a positive number with a leading plus.  Numbers are assumed positive unless preceded by a minus sign generally accepted conventions.


Making sure MPI_CXX_COMPILE_FLAGS is interpreted as a sequence  of options

Fixes #4286
MPI_CXX_COMPILE_FLAGS is a string and needs to be separated in order to be interpreted as a list of options.

@diehlpk Please check whether this solves the issue you reported.

@hkaiser This fic works on the Fedora build system
https://koji.fedoraproject.org/koji/taskinfo?taskID=47357303

@khuck , did you ever find what introduced those poorly formatted flags with quotes around them (from issue #4286)? I'm seeing the same issue with my project and can use this same fix as here (thanks, @hkaiser !). But I'm curious if you know what introduced this in the first place. I'm using PPPL's portal cluster and I don't see this happen on any other system.

@gjwilkie my understanding is that the fix involved converting the variable using the CMake function separate_arguments, see https://github.com/STEllAR-GROUP/hpx/pull/4831/files#diff-6f8d3f443a10e5ac0017e322b264b1581f585d36f2020618d7bba6cab835f002R38


[BRT] Mitigating flaky SignalR tests

mitigates:

#8421 - SignalR C++ Client tests failing randomly
#6597 - Flakiness in SignalR Long Polling Tests

https://github.com/aspnet/AspNetCore/issues/8436 tracking flaky Razor Components test


Fix trial expired message without expiration date

We have simply taken into account the case that we may do not have an expiration date when we show the trial expired message.
Related issues
https://github.com/CartoDB/support/issues/1997

Note: we need to check that the /lockout page still works OK (https://github.com/CartoDB/product/issues/261)


Incorrect python callback executed

Bob Corey ran into issues using python callbacks and provided an example script. Here similar script that works on the 'wave.visit' db. It installs two callbacks: one for pick events & one time slider change events. def When_Point(atts): print "Pick callback" def When_TimeSliderNextState(atts): print "Next State Callback!" RegisterCallback("PickAttributes", When_Point) RegisterCallback("TimeSliderNextStateRPC", When_TimeSliderNextState) OpenDatabase("../data/wave.visit") AddPlot("Pseudocolor","v") DrawPlots() OpenGUI() When you execute a pick 'When_Point' is called, however it is also called if you change the time slider, instead of the expected "When_TimeSliderNextState" callback. It appears that the first callback registered is triggered for any registered event.
-----------------------REDMINE MIGRATION-----------------------
This ticket was migrated from Redmine. As such, not all
information was able to be captured in the transition. Below is
a complete record of the original redmine ticket.
Ticket number: 339
Status: Resolved
Project: VisIt
Tracker: Bug
Priority: Normal
Subject: Incorrect python callback executed
Assigned to: Brad Whitlock
Category: -
Target version: 2.1
Author: Cyrus Harrison
Start: 08/10/2010
Due date:
% Done: 0%
Estimated time:
Created: 08/10/2010 04:30 pm
Updated: 08/19/2010 07:44 pm
Likelihood: 3 - Occasional
Severity: 4 - Crash / Wrong Results
Found in version: 2.0.2
Impact:
Expected Use:
OS: All
Support Group: DOE/ASC
Description:
Bob Corey ran into issues using python callbacks and provided an example script. Here similar script that works on the 'wave.visit' db. It installs two callbacks: one for pick events & one time slider change events. def When_Point(atts): print "Pick callback" def When_TimeSliderNextState(atts): print "Next State Callback!" RegisterCallback("PickAttributes", When_Point) RegisterCallback("TimeSliderNextStateRPC", When_TimeSliderNextState) OpenDatabase("../data/wave.visit") AddPlot("Pseudocolor","v") DrawPlots() OpenGUI() When you execute a pick 'When_Point' is called, however it is also called if you change the time slider, instead of the expected "When_TimeSliderNextState" callback. It appears that the first callback registered is triggered for any registered event.
Comments:
The time slider actually uses a different rpc than the one the script was observing so the userdefined callback was not getting called. Also, we happen to send pick attributes back to the client for events other than the user performed a pick such as when we change time steps. This caused the user to think only the 1st callback gets called. To isolate pick attributes that come only from a userpick takes a little more work since some pick attributes must be ignored. I've created a sample script that does just that.

0381_Streamline_test_disassembly_celltree_builder_split.txt
0381_Station_012000.silo.zip
0381_Streamline_test_callstack.txt
0381_Streamline_test_debugger_output.txt

0352_corey.py.zip


Hornet incomplete shutdown

While shutting down Hornet and exiting with a ctrl-C it seems that not all hornet processes are triggered to shutdown as there are still transaction log messages intermixed with the shutdown log messages. At the end the process hangs and has to be killed thus corrupting the database. Attached is a partial log file.
LogErrorHornet12-15-2019.txt

I have experienced something very similar now twice in a row, on a freshly installed 0.26 node.  Node has only one neighbor on my LAN, also running hornet. After node has synced, sending Ctrl+C stops some processes, but not hornet itself.  SSH console becomes unresponsive. Logging in from a second console shows that hornet still running.
cannot shutdown hornet.txt

I experienced exactly the same behavior, even starting / stopping the GoHornet node via systemctl:

And when i try to re-activate the node, the DB is corrupted and i need to delete the mainnetdb folder

OS: Ubuntu 16.04
VPS: Contabo
CPU: 6 cores
RAM: 16 GB

Fixed in v0.2.7


fix: handling of protocol version 2 devices

Because the v2 devices don't need token/key the login process of the discovery method is optional. After discovering the devices the user can see which devices using protocol version 3 and which are not. Protocol version 2 devices can be added without token/key.

If you see any typo or grammar issue with my wording, please comment on it. My english can be really raw sometimes:D

I've submitted a PR to your branch with updates to readme and fix for the login problem when using NetHome Plus.

Adding the Protocol Version column makes the table too wide on my screen.  How about we leave that column out and just rely on the last column where we say "No Credentials" or we could change that to "Missing Credentials". (I tried "No" instead go "Invalid" to see if I could fit it on one line, but it didn't work, missing is a nicer word than invalid in this case).

I wanted to add the version for the user to better understand what the problem is. But if you think it's enough, I'm okay with your proposal.

Sorry, I ended up pushing a commit to this PR without its own PR.  I got confused with the GitHub web interface.  Anyway, I think this is in good shape now.
Do we know that this is going to be okay on the plugin side?  Will discovery/initialization work okay for V2 devices during plugin initialization?

I wanted to add the version for the user to better understand what the problem is. But if you think it's enough, I'm okay with your proposal.

It's a pity that the width of the settings window is fixed.  Let me play with it and see if we can squeeze it in without getting to wide.

Added it back in with narrow column title so it fits.  I think we should merge so we can have it tested by someone with V2 devices.

Sorry, I ended up pushing a commit to this PR without its own PR. I got confused with the GitHub web interface. Anyway, I think this is in good shape now.
Do we know that this is going to be okay on the plugin side? Will discovery/initialization work okay for V2 devices during plugin initialization?

No problem. If it is easier for you, you can also create branches on this repo when you develop something.

I'll repeat here myself as I think it's hard sometimes to follow the conversation in the comments: I changed the background color of the text because it will draw attention. I think it's easily skippable if it has the same background color as everything else and it's an important information. But if you can convince me not to do so, it can remain as it is now.

Sorry, I ended up pushing a commit to this PR without its own PR. I got confused with the GitHub web interface. Anyway, I think this is in good shape now.
Do we know that this is going to be okay on the plugin side? Will discovery/initialization work okay for V2 devices during plugin initialization?

Well I can't tell you if it will work or not. By the implementation in the Home Assistant repo it should work like this. But yeah, as you said someone with V2 devices should test this. But I think it's worked before, because the issue #37 was created after the custom UI was added which broke the discovery part of the plugin.

I'll repeat here myself as I think it's hard sometimes to follow the conversation in the comments: I changed the background color of the text because it will draw attention. I think it's easily skippable if it has the same background color as everything else and it's an important information. But if you can convince me not to do so, it can remain as it is now.

I don't feel strongly about this, so if you want to put it back then that is fine with me.  Go ahead and do this then lets get some testing.

Sorry, I ended up pushing a commit to this PR without its own PR. I got confused with the GitHub web interface. Anyway, I think this is in good shape now.
Do we know that this is going to be okay on the plugin side? Will discovery/initialization work okay for V2 devices during plugin initialization?

Well I can't tell you if it will work or not. By the implementation in the Home Assistant repo it should work like this. But yeah, as you said someone with V2 devices should test this. I think it's worked before, because the issue #37 was created after the custom UI was added which broke the discovery part of the plugin.

I looked at the code after asking this question, and I think it is going to be fine.  But nothing beats testing by someone with V2 devices.

Just added back the CSS classes. Can I merge?

Just added back the CSS classes. Can I merge?

Yes, let's merge.  Thanks.


[Feature Request] - Dark Mode and add contact us button in navbar, vertical scroll bar

Is your feature request related to a problem ? Please describe. ✍
People wants dark mode in every website, so it will be great if you allow me add that mode on your website under gssoc'23 badging. Also would like to add contact us tab in the Navbar, along with scroll to top button and vertical scroll bar

Describe breifly how would you implement the same.
Solution_steps: First I will add dark mode capabilities in the website with the help of tailwindCSS and Javascript, then I will add contact us tab, and will add vertical scroll bar with the help of CSS for easy surfing.

Additional context
Additional context
Are you contributing for a program?
GSSoC2023
Code of Conduct

[X] I have read and agree to the CONTRIBUTING GUIDELINES of this project.

Dark mode sounds great. @anmode is someone already working on this?

Dark mode sounds great. @anmode is someone already working on this?

I remember...let me see

yep @Vraj1103 you can go for it

@Vraj1103 progress please ?

Yeah! About to complete

@Vraj1103 updates??. If you are not working on this alot of peeps are waiting for their chance

close with no update


Nativescript 7 + angular 11 ( Module not found nativescript-emoji-picker-angular.js)

Hi,
@JonathanTreffler, @hrueger
i get this error,
angular.js
Module not found: Error: Can't resolve '@schoolsquirrel/emoji-picker' in '/Users/dudipartush/Documents/dev/TimeTalk/theGoodPlace/node_modules/@schoolsquirrel/emoji-picker/ivy_ngcc/angular/fesm2015'
<EMAIL_ADDRESS>3:0-71 14:37-48 15:36-46
@ ./app/app.module.ts
@ ./main.ts
`
Steps
1:  ns plugin add @schoolsquirrel/emoji-picker
2:  import EmojiPickerModule in appModule

import {InjectionToken, NgModule, NO_ERRORS_SCHEMA} from "@angular/core";
import {
    NativeScriptCommonModule,
    NativeScriptFormsModule,
    NativeScriptHttpClientModule,
    NativeScriptModule
} from "@nativescript/angular";

import {AppRoutingModule} from "./app-routing.module";
import {AppComponent} from "./app.component";
import {ItemsComponent} from "./item/items.component";
import {ItemDetailComponent} from "./item/item-detail.component";
;
import {HTTP_INTERCEPTORS, HttpClient, HttpClientModule, HttpHeaders} from "@angular/common/http";
import {onError} from '@apollo/client/link/error';

import {InterceptorService} from "./factory/interceptor";
import {TranslateLoader, TranslateModule, TranslateService} from "@ngx-translate/core";
import {TranslateHttpLoader} from "@ngx-translate/http-loader";

import {CommonModule} from "@angular/common";
import {LetterAvatarModule} from "@schoolsquirrel/letter-avatar/angular";

import { EmojiPickerModule  } from "@schoolsquirrel/emoji-picker/angular";

@NgModule({
    bootstrap: [
        AppComponent
    ],
    imports: [
        NativeScriptModule,
        NativeScriptHttpClientModule,
        AppRoutingModule,
        NativeScriptCommonModule,
        NativeScriptFormsModule,
        CommonModule,
        EmojiPickerModule,
        // EmojiModule,
        LoginModule,
    ],
    declarations: [
        AppComponent,
        ItemsComponent,
        ItemDetailComponent,

    ],
    providers: [
    ],
    schemas: [
        NO_ERRORS_SCHEMA
    ]
})
export class AppModule {
    constructor(
        private translate: TranslateService,
    ) {
        this.translate.setDefaultLang('en');
        translate.use('en');
    }

}

`

Hi @dudipsh,
Thanks for the bug report. I'll look into that in a few days.

Hm, I can reproduce the error, however, I don't have any idea what the problem could be. I'll keep investigating

Does @schoolsquirrel/letter-avatar work?

@hrueger
Thanks for the help,
I'm working on something else right now, later or tomorrow I'll try to check it out again.
Then keep you posted

Does @schoolsquirrel/letter-avatar work?

YES ! :)

@hrueger
Hi, do you have working project in ns7 + ng 11?
its brake when i adding EmojiPickerModule to imports section
ERROR in<EMAIL_ADDRESS>do i need to change my tsconfig.json?
{
  "compilerOptions": {
    "module": "commonjs",
    "target": "es5",
    "moduleResolution": "node",
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,

    "forceConsistentCasingInFileNames": true,
    "noEmitHelpers": true,
    "noEmitOnError": true,
    "skipLibCheck": true,
    "lib": [
      "es2018", "es2017", "dom", "es6"

    ],
    "baseUrl": ".",
    "paths": {
      "~/*": [
        "app/*"
      ]
    }
  },
  "include": [
    "reference.d.ts",
    "src/**/*.ios.ts", "src/**/*.android.ts"
  ],
  "files": [
    "./references.d.ts",
    "./src/main.ts"
  ],
  "exclude": [
    "node_modules",
    "platforms",
    "**/*.aot",
    "e2e"

  ]

}

`

@dudipsh
No, sorry. I created a new test app but I get stuck with the same error you describe above. The weird thing is that letter-avatar is working fine, however, I cannot find differences between the two plugins which could cause the problem...

@hrueger
any luck?

No, unfortunately not. This is very strange

@dudipsh Why did you close this? Did you get it working?

@hrueger
yes its works!
I am not sure if this is the only change to make it works
i added nativescript.config.ts in my root folder
import { NativeScriptConfig } from '@nativescript/core';

export default {
  id: 'org.nativescript.goodplace',
  appPath: 'src',
  appResourcesPath: 'App_Resources',
  android: {
    v8Flags: '--expose_gc',
    markingMode: 'none'
  }
} as NativeScriptConfig;

Great, thanks for the info!


Use default user shipping address to calculate indicative shipping cost on basket summary page.

Fixes #827

The get_default_shipping_address method needs a unit test?

Quite simple to live without it.

I disagree - I think it's important even it if looks simple. Several bugs have come up recently after adding support for Django 1.11 and 2.0 because of untested code where upstream behaviour has changed. If we had proper test coverage then these would have been picked up earlier - a good example is the AdvancedWidget which had no tests for what seemed like a simple behaviour.

Alright then, agreed.


Improve event driven collections

This could use some improvement and clean-up. The implementation is rather cumbersome at the moment and should ideally be tied up so that the boilerplate code happens inside the implementation logic.
The kind of implementation I'd like to see it's along the lines of:
// Field
private readonly IEventDrivenSet<MyThing> _myThings;

// Property
public virtual ISet<MyThing> MyThings
{
  get { return _myThings.WrappedSet }
}

// Constructor
public MyClass()
{
  _myThings = new EventDrivenSet<MyThing>(
    add => add.MyClass = this,
    del => del.MyClass = null
  );
}

My current thoughts are towards exposing this as the collection type:
public interface IEventHandlingSet<T>
{
  ISet<T> Wrapped { get; set; }
  ISet<T> Unwrapped { get; set; }

  EventHandler event BeforeAdd(object sender, EventArgs ev);
  EventHandler event AfterAdd(object sender, EventArgs ev);
  EventHandler event BeforeRemove(object sender, EventArgs ev);
  EventHandler event AfterRemove(object sender, EventArgs ev);
}

Then in the type which needs to make use of it:
private IEventHandlingSet<MyThing> _set;

public ISet<MyThing> Set
{ get { return _set.Wrapped; } }

protected ISet<MyThing> UnwrappedSet
{ get { return _set.Unwrapped; } }
{ set { _set.Unwrapped = value; } }

With the solution above - the events are exposed, so if you want to change subscriptions it's easy enough to do so after the fact.
Also, frameworks such as NHibernate have an unwrapped set to which they can bind in mappings.
I do need to check that this doesn't introduce memory leaks due to unwanted event subscription issues.
The event arguments for this would expose the item which was added/removed, as well as the unwrapped collection.
Additionally, the "before" events should expose a method on the event arguments, which allows the addition/removal to be cancelled. If called then the action is aborted.

Looking at best practices for events, I want to change the signatures of the events which are raised by the wrapper:
public event EventHandler<BeforeModifyCollectionEventArgs<TItem>>;

public event EventHandler<AfterModifyCollectionEventArgs<TItem>>;

The after-modify event args will carry a reference to the item which is being added or removed, strongly typed. It will also carry a reference to the source collection instance. This will be typed only as ICollection<TItem>.
It will have a read-only boolean property named IsRemoval which indicates whether or not the event represents the removal of an item from the collection or not.
The before event will still implement the ICancelable interface providing the IsCancelled and Cancel() functionality.
The other two events on the wrapper will use the signatures:
public EventHandler<BeforeReplaceCollectionEventArgs<TCollection>>;

public EventHandler<AfterReplaceCollectionEventArgs<TCollection>>;

These will expose both the original and replacement collections as the currently do. The before event is cancelable as currently.


[Feature request] Support for Github Enterprise

Lot's of companies are using Github enterprise on locally hosted domains.
For instance, we also have the same fun "convention" in mine, to add a gif to our PRs, and I am sure this extension would take off if it had an option to configure the domain.
Github Dark theme extension does it great, a simplified similar interface could be used:

I could be interested to contribute for that if you are interested, keep in touch. Cheers

Hey @matthizou 👋 That's a great suggestion.
Another option would be to use the module used by refined-github: https://github.com/fregante/webext-domain-permission-toggle. This should be pretty easy to add too!
If you are interested in contributing I think this would be a great addition. Let me know if you want to have a go at it, otherwise I am happy to take a look in the next week or so 🙂

Hey! Thanks for the reply
👍  Either way would be great. They each have pros and cons:

webpext-domain-permission-toggle comes pre-canned and makes implementing this suggestion a really quick win. I am not a big fan of having to right-click on the icon and find this entry, it is not intuitive if you don't read the docs.
Custom implementation (like the one above) is more work. Ultimately, it is better for the user (imo), as they can do left-click on the icon and understand the interface intuitively. No need to browse the readme to find how to do it.

Last month I went for a custom implementation (https://github.com/matthizou/github-show-avatars/blob/master/extension/images/screenshots/popup-1.png), which work great, but am thinking of switching to something like the one from the Dark theme posted above, that I find even clearer.
I would suggest we start simple (webpext-domain-permission-toggle), I'll let you do it if it is ok with you. Ping me if you are interested later on to do something more custom.

@matthizou sorry I took so long but I have pushed an update including  webpext-domain-permission-toggle. If you want to take a crack at a custom UI version at some point you are more than welcome 🙂 I agree that this implementation is not as discoverable.

Glad to hear 👏
No luck to make it work though, in my company's Github (it is activated + the browser has been reloaded)

I am not too surprised, as the 2 versions (enterprise and non-enterprise) have often major structural differences in the DOM - even in cases where they look the same. There are no errors in the console, though.
I will try to have a look a shot at it beginning of September except if work on it before. Keep it touch 👋

I think it might be simply that I made a mistake with my most recent change 😅  with my release of the version to add the "Enable GIFs for GitHub" dropdown I failed to inject the content script on the custom domain.

I have submitted another release 1.2.8 which I have verified will execute when the extension is enabled. I have still been unable to test GitHub enterprise, but I am crossing my fingers that the structure isn't different 🤞
Hopefully this works for you, if not I would love it if you could take a look for me! Let me know if I can help at all.

👍  I'll QA it when the new version will be released

Working like a charm 👏


CLI: The RPC interface does not follow the JSON-RPC 2.0 Specification

What version are you using?
80dfc96b3652eb232cceb893a0a451938c9f50a3

What did you do?
soroban-cli serve

curl --location --request POST 'http://<IP_ADDRESS>:8080/api/v1/jsonrpc' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "id": 12134,
    "method": "getHealth"
}'

What did you expect to see?
{"jsonrpc":"2.0","id":12134,"result":{"status":"healthy"}}

What did you see instead?
{"jsonrpc":"2.0","id":12134,"error":{"code":-32601,"message":"unknownmethod","data":null}}

The following command works correctly.
curl --location --request POST 'http://<IP_ADDRESS>:8080/api/v1/jsonrpc' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "id": 12134,
    "method": "getHealth",
    "params": []
}'

Description in JSON-RPC 2.0 Specification

params: A Structured value that holds the parameter values to be used during the invocation of the method. This member MAY be omitted.

cc @paulbellamy


Type incompatibility introduced from<EMAIL_ADDRESS>

Checklist

[X] I have read Caveats documentation and didn't find a solution for this problem there.

Bug description
Since upgrading @aws-sdk/* to > v3.378.0, I'm getting the type issue below using a client. For example, for Personalize:
Error: index.test.ts(12,36): error TS2345: Argument of type 'typeof PersonalizeEventsClient' is not assignable to parameter of type 'InstanceOrClassType<Client<ServiceInputTypes, MetadataBearer, SmithyResolvedConfiguration<HttpHandlerOptions>>>'.
  Type 'typeof PersonalizeEventsClient' is not assignable to type 'ClassType<Client<ServiceInputTypes, MetadataBearer, SmithyResolvedConfiguration<HttpHandlerOptions>>>'.
    The types of 'prototype.middlewareStack.concat' are incompatible between these types.
      Type '<InputType extends ServiceInputTypes, OutputType extends ServiceOutputTypes>(from: MiddlewareStack<InputType, OutputType>) => MiddlewareStack<...>' is not assignable to type '<InputType extends ServiceInputTypes, OutputType extends MetadataBearer>(from: MiddlewareStack<InputType, OutputType>) => MiddlewareStack<InputType, OutputType>'.
        Types of parameters 'from' and 'from' are incompatible.
          Type 'MiddlewareStack<InputType, OutputType>' is not assignable to type 'MiddlewareStack<InputType, ServiceOutputTypes>'.
            Types of property 'addRelativeTo' are incompatible.
              Type '(middleware: MiddlewareType<InputType, OutputType>, options: RelativeMiddlewareOptions) => void' is not assignable to type '(middleware: MiddlewareType<InputType, ServiceOutputTypes>, options: RelativeMiddlewareOptions) => void'.
                Types of parameters 'middleware' and 'middleware' are incompatible.
                  Type 'MiddlewareType<InputType, ServiceOutputTypes>' is not assignable to type 'MiddlewareType<InputType, OutputType>'.
                    Type 'InitializeMiddleware<InputType, ServiceOutputTypes>' is not assignable to type 'MiddlewareType<InputType, OutputType>'.
                      Type 'InitializeMiddleware<InputType, ServiceOutputTypes>' is not assignable to type 'InitializeMiddleware<InputType, OutputType>'.
                        Call signature return types 'InitializeHandler<InputType, ServiceOutputTypes>' and 'InitializeHandler<InputType, OutputType>' are incompatible.
                          Type 'Promise<InitializeHandlerOutput<ServiceOutputTypes>>' is not assignable to type 'Promise<InitializeHandlerOutput<OutputType>>'.
                            Type 'InitializeHandlerOutput<ServiceOutputTypes>' is not assignable to type 'InitializeHandlerOutput<OutputType>'.
                              Types of property 'output' are incompatible.
                                Type 'ServiceOutputTypes' is not assignable to type 'OutputType'.
                                  'ServiceOutputTypes' is assignable to the constraint of type 'OutputType', but 'OutputType' could be instantiated with a different subtype of constraint 'MetadataBearer'.
                                    Type 'PutEventsCommandOutput' is not assignable to type 'OutputType'.
                                      'PutEventsCommandOutput' is assignable to the constraint of type 'OutputType', but 'OutputType' could be instantiated with a different subtype of constraint 'MetadataBearer'.

The issue doesn't happen when using<EMAIL_ADDRESS>I believe it may be to do with AWS updating Smithy from 1 > 2 - https://github.com/aws/aws-sdk-js-v3/commit/96938415e65ccc4353be8f816e919215de12a1b7
Reproduction
import {
  PersonalizeEventsClient,
} from "@aws-sdk/client-personalize-events";

const personalizeMock = mockClient(PersonalizeEventsClient);

Environment

Node version:
Testing lib and version:
Typescript version:
AWS SDK v3 Client mock version: 3.0.0,
AWS JS SDK libs and versions:

"@aws-sdk/client-personalize-events": "^3.370.0"

I also had success using<EMAIL_ADDRESS>but for my use case I need to mock an S3 response body like so:
  const s3ClientMock = mockClient(S3Client)

  const stream = new Readable()
  stream.push(JSON.stringify({ data: true }))
  stream.push(null)

  s3ClientMock.on(GetObjectCommand).resolves({
    Body: sdkStreamMixin(stream),
  })

If anyone is using the sdkStreamMixin from @aws-sdk/util-stream-node you will also need to change to using<EMAIL_ADDRESS>

at the time of writing<EMAIL_ADDRESS>and getting same type mismatch error.
I was able to fix it by override (in package.json)
"overrides": {
  "@smithy/types": "2.3.4"
}

latest version of @smithy/types  at this time was 2.3.5

New comment
Please disregard this message, I reviewed my comment and it doesn't seem to be directly related to the issue of this ticket.
Original
at the time of writing, latest aws-sdk version is<EMAIL_ADDRESS>and getting same type mismatch error.
I was able to fix it by override (in package.json)
"overrides": {
  "@smithy/types": "2.3.4"
}

latest version of @smithy/types at this time is 2.3.5

Overriding the @smithy/types did the trick for me with the current latest version. I use pnpm, so added this to my package.json:
"pnpm": {
  "overrides": {
    "@smithy/types": "2.7.0"
  }
}

I have sent a PR to fix this issue for the next release: https://github.com/m-radzikowski/aws-sdk-client-mock/pull/196

I did not get any type compatibility issues on the clean install of @aws-sdk/* packages in v3.378.0. The issue is, most likely, @smithy/types installed in multiple versions, which happens sometimes if you add/bump @aws-sdk/* packages.
See the caveats section in README for solution details. Overriding the @smithy/types version is one of the solutions listed there.
If you still have problem, please reopen the issue including the content of your package.json and output of npm ls @smithy/types / pnpm why @smithy/types / yarn why @smithy/types.


Remove line ending for image base64 encoding on iOS

Hi,
In SOSPicker.m, you encoded image to base64 with an option NSDataBase64Encoding64CharacterLineLength. This will insert a line ending at max length of 64. So the base64 string cannot be used directly as source to image tag.
To fix this, I remove that option and replace it with 0. The conversion will be resulted in a string without any line ending.
Changes
- (void)assetsPickerController:(GMImagePickerController *)picker didFinishPickingAssets:(NSArray *)fetchArray

...
[result_all addObject:[UIImageJPEGRepresentation(image, self.quality/100.0f) base64EncodedStringWithOptions:0]];

...

[result_all addObject:[data base64EncodedStringWithOptions:0]];
...

Makes sense, thanks!

When you  plan to release a new version? So that I can use it in my application?

Just tagged and released 2.1.6.