eFAST fails when Sobol works. Sobol sum of S1 not always equal to 1.

I have a model consisting of a set of differential equations. I would like to conduct a sensitivity analysis on a subset of parameters and get back their sensitivity index. I am using GobalSensitivity.gsa to do this, paired with the Sobol method and a Sobol2007 estimator. I noticed however, that no matter the number of samples, I never get a sum of first order indices equal to 1.0.
I thought of switching to eFAST as it is supposed to be more efficient, but this method fails completely with the following error:
JULIA: ArgumentError: Uniform: the condition a < b is not satisfied.
@ Distributions ~/.julia/packages/Distributions/7iOJp/src/univariate/continuous/uniform.jl:38
@ GlobalSensitivity ~/.julia/packages/GlobalSensitivity/jG1Zc/src/eFAST_sensitivity.jl:98

Attached is a file with model outputs for the SA. Below is the code of the model. Note that I multiply all values by 1e200 before SA as they are quite small and this causes issues downstream. This shouldn't affect the result of the SA by my understanding.  Some combinations of parameters do cause the solver to abort a run during the SA (1-4 in every 4000 roughly)
analysis.txt
I have also attached the complete model with the set of parameter bounds and initial conditions I use. The model being complex, this is not a minimum-reproducible example.
using DifferentialEquations
using DiffEqSensitivity
using ForwardDiff
using GlobalSensitivity
using Statistics
using Printf

# Define model domain. Reject any values below 0.
function is_invalid_domain(u,p,t)
    return u[1] < 0 || u[2] < 0 || u[3] < 0 || u[4] < 0
end

# Defines a problem object and solves it.
function solve_model(p, u0)
    # Set the time timespan
    tspan = (0.0, last(u0))

    # Build a callback to introduce a carbon addition as it is a discontinuity
    stops = []
    carbon = []
    punctual_organic_carbon_addition = p[end] == -1 ? [] : p[end]
    for (time_to_add, (pOC_to_add, dOC_to_add)) in punctual_organic_carbon_addition
        push!(stops, time_to_add)
        push!(carbon, (convert(Float64, pOC_to_add), convert(Float64, dOC_to_add)))
    end

    additions = Dict(Pair.(stops, carbon))

    addition_condition(u,t,integrator) = any(x->t==x, stops)  # If we hit any of the stops return true
    function addition!(integrator)
        integrator.u[1] += additions[integrator.t][1]
        integrator.u[2] += additions[integrator.t][2]

        if integrator.u[3] < 1
            integrator.u[3] = 1  # Add a viable cell if none exist
        end
    end
    carbon_add_cb = DiscreteCallback(addition_condition, addition!)

    # Convert p and remove puncutal_punctual_organic_carbon_addition
    p = convert(Array{Float64}, p[1:end-1])

    # Build the ODE Problem and Solve
    prob = ODEProblem(model, u0[1:end-1], tspan, p)
    sol = solve(prob, Rosenbrock23(), callback=carbon_add_cb, tstops=stops, isoutofdomain=is_invalid_domain, maxiters=1e7)

    return sol
end

# Runs the sensitivity analysis using Sobol method.
function run_sensitivity_analysis()
    p_bounds = [[1.0e-14, 100000], [0.01, 500], [1, 500], [1000000000,<PHONE_NUMBER>], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [1.0e-8, 100], [882000.0, 882000.0], [-1, -1]]
    u0 = [1.6382099999999998e13, 3.4061512877350002e10, 0.0, 100000.0, 1.461e7]

    # Define a function that remakes the problem and gets its result
    f1 = function (p)
        sol = solve_model(p, u0)

        # File analysis.txt contains written last(sol[1,:])

        [last(sol[1,:] * 1e200)]  # This hacky solution to handle tiny (10^-300) values sucks.
    end

    # Run GSA
    # fast_result = GlobalSensitivity.gsa(f1, eFAST(), p_bounds, samples=2^14)  # Fails
    sobol_result = GlobalSensitivity.gsa(f1, Sobol(), p_bounds, Ei_estimator=:Sobol2007, samples=2^14)
    return (sobol_result.ST[1,:], sobol_result.S1[1,:])
end

# Implements the differential equations that define the model
function model(du,u,p,t)
    # Paramaters
    mu_max = p[1]
    maintenance_per_cell = p[2]
    dOC_per_cell = p[3]

    carrying_capacity = p[4]
    pOC_input_rate = p[5]
    dOC_input_rate = p[6]
    inorganic_carbon_input_rate = p[7]
    inorganic_carbon_fixing_rate = p[8]
    inorganic_carbon_per_cell = p[9]
    eea_rate = p[10]
    Ks = p[11]

    # Load state conditions
    pOC_content = u[1]
    dOC_content = u[2]
    inorganic_carbon_content = u[3]
    cell_count = u[4]

    growth = mu_max * (dOC_content / (Ks + dOC_content)) * cell_count * (1 - cell_count / carrying_capacity)

    required_dOC_per_cell = maintenance_per_cell
    required_dOC = required_dOC_per_cell * cell_count

    dOC_missing = max(required_dOC - dOC_content, 0)
    starvation_deaths = dOC_missing == 0 ? 0 : dOC_missing / required_dOC_per_cell

    deaths =  starvation_deaths

    dOC_consumption = required_dOC_per_cell * (cell_count - deaths)
    fixed_carbon = inorganic_carbon_fixing_rate * inorganic_carbon_content

    du[1] = pOC_input_rate - eea_rate*pOC_content*cell_count
    du[2] = dOC_input_rate + dOC_per_cell * (deaths - growth) - dOC_consumption + eea_rate*pOC_content*cell_count + fixed_carbon
    du[3] = inorganic_carbon_input_rate + inorganic_carbon_per_cell * (deaths - growth) + required_dOC - fixed_carbon
    du[4] = growth - deaths
end

@Vaibhavdixit02 can you look into this one?

I never get a sum of first order indices equal to 1.0.

The sum of all indices is supposed to be equal 1.0, or the sum of total indices. So, if you looks the sum of total indices in your result, it;s almost 1 (it might not be exactly equal), or else you can compute the second order indices as well by passing Sobol(order = [0, 1, 2]) and then check the sum of first and second orders together, it should be close to 1.0.

The efast method doesn't work because you have some parameters with lower bounds == upper bounds, so the Uniform distribution errors when it's passed the bounds, you can modify your function as below to get it to work.
function run_sensitivity_analysis()
                  p_bounds = [[1.0e-14, 100000], [0.01, 500], [1, 500], [1.0e-8, 100]]
                  u0 = [1.6382099999999998e13, 3.4061512877350002e10, 0.0, 100000.0, 1.461e7]
                  p_fixed = [1000000000, 0, 0, 0, 0, 0,  882000.0, -1]
                  # Define a function that remakes the problem and gets its result
                  f1 = function (p)
                      pars = zeros(12); pars[4:9] = p_fixed[1:6]; pars[1:3] = p[1:3]; pars[10] = p[4]; pars[11:12] = p_fixed[7:8]
                      sol = solve_model(pars, u0)
                      # File analysis.txt contains written last(sol[1,:])

                      [last(sol[1,:] * 1e200)]  # This hacky solution to handle tiny (10^-300) values sucks.
                  end

                  # Run GSA
                  fast_result = GlobalSensitivity.gsa(f1, eFAST(), p_bounds, samples=2^14)  # Fails
                  #sobol_result = GlobalSensitivity.gsa(f1, Sobol(), p_bounds, Ei_estimator=:Sobol2007, samples=10000)
                  return (fast_result.ST[1,:], fast_result.S1[1,:])
              end

Thank you for that information. As an aside, do you think my wacky solution to deal with very small values changes the outcome of the analysis? My understanding of the math is that it shouldn't.

I will also add it would be cool if eFAST behaved like Sobol and returned 0 values instead. Unifies the interface a bit.

That's the plan, see https://github.com/SciML/GlobalSensitivity.jl/pull/83

As an aside, do you think my wacky solution to deal with very small values changes the outcome of the analysis?

It is definitely causing issues, the eFAST result for your model doesn't seem to match Sobol. I re-ran several other examples to be sure that there wasn't anything else that might be causing it but doesn't look like it. Tbh literature always suggests using parameters in [0,1] domain only for gsa, but that's often no possible practically so we allow using the values as it is.
My suggestion for your model is 1. try to get the observed variables' scale reasonable, iiuc it looks like though your u0 is e10 scale the last time point give e-13!? 😅  2. If possible re-parameterise your model such the you pass parameters of somewhat similar scale and then do a factor multiplication inside your f1 to scale them appropriately for the model

Also why do you have a copy() call only on p[4]?

Ignore that, #83 is ready, I'll merge and create a release within a couple of hours and you can just use the latest version to run the function as it is

@Ge0rges you can use v2.1.2 now

Nice! Thanks for the tips and improvement. I'll work on fixing the scales, though I wonder if the GSA algorithm could normalize the inputs to be within [0,1].

@Vaibhavdixit02 updated to latest version, switched to eFAST, and weirdly I get nonzero values for identical bounds?
p_bounds = [[1.0e-14, 100000], [0.01, 500], [1, 500], [1000000000,<PHONE_NUMBER>], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [1.0e-8, 100], [882000.0, 882000.0], [-1, -1]]

f1 = function (p)
     sol = solve_model(p, u0)
    [last(sol[1, :]) * 1e200]
end

sobol_result = GlobalSensitivity.gsa(f1, eFAST(), p_bounds, samples=2^10)
return (sobol_result.ST[1,:], sobol_result.S1[1,:])

Look at your commit and seems like your conditional if statement works to identify equal bounds...
for (j, v) in enumerate(p_bounds)
        if p_bounds[j][1] == p_bounds[j][2]
            @printf "same bounds: %s\n" v
        end
    end

    # Define a function that remakes the problem and gets its result
    f1 = function (p)
        sol = solve_model(p, u0)
        [last(sol[1, :]) * 1e200]
    end

    # Run GSA
    sobol_result = GlobalSensitivity.gsa(f1, eFAST(), p_bounds, samples=2^10)
    @printf "sobol T: %s\n" sobol_result.ST[1,:]

Output:
same bounds: Real[1000000000,<PHONE_NUMBER>]
same bounds: Real[0, 0]
same bounds: Real[0, 0]
same bounds: Real[0, 0]
same bounds: Real[0, 0]
same bounds: Real[0, 0]
same bounds: Real[882000.0, 882000.0]
same bounds: Real[-1, -1]
sobol T: [0.8630413479272362, 0.8913392355004319, 0.8561012812442496, 0.8844354099002445, 0.863187985875788, 0.8653135861544157, 0.8859176270623108, 0.8659130475648313, 0.8078074792439602, 0.8924281370072416, 0.8309263086754832, 0.8829918924453956]
```

Yes, I observed that, but it looks like an issue with your model. I tried the same case on simpler models it works correctly, I can take a look at the model tomorrow (IST) and get back to you with the changes I mentioned before.

Huh, I'm puzzled as to why it should be model dependent... will continue looking at this today as well and try your tips. Thank you.

So, it looks like the first observed variable (which you want to use for GSA), becomes 0 for almost all values of parameters except very close to the minimum of the bounds you are passing. That's the issue, so even with your hack of *1e200, the output of the function on which you are performing is always 0, hence you get equal sensitivity (quite high) for each variable. The discrepancy between sobol and eFAST can be understood by the difference in sampling used in the methods.

Got it. Any recommendations as to how I could scale things to work? I thought of doing z-normalization with estimated min-max bounds, but despite this the numbers are too small. Perhaps if I normalize the values returned to GSA after all samples are run I could get tighter bounds.

Why does that state go to 0, is it expected? Can you modify the time span or something else that would allow it to not go to 0, or perform GSA on another state?

It is expected for that value to go to zero under a large combination of parameters, modifying it not go to 0 within the model would compromise its function. I could truncate it out of the GSA, though I was hoping to take it into account as a key variable in scenarios not displayed here where it fluctuates more often away from 0.

I think I am not clear of what is the output of interest here, is it not only the first state at last time point?
The returns mentioned below are for f1 function

You can instead run GSA on the entire time span (so you'd return sol[1,:] instead of last(sol[1,:]))
If you are interested in the other state's sensitivities at the last time point also, you can return sol[:, end]
if you are interested in all states' over the entire timespan then just return the solution sol

The output of interest is the last time point of all the outputs. So the model outputs the variation of 4 variables, I'm looking at the just the last value of each.

It would persist for the first state, yes, but having the other states would allow you something more meaningful. For the first state unless you can avoid the zero

Thank you for all your help, that was a good catch! I will brainstorm a way to avoid this zero in the first state.

So it seems like I need to normalize the first state. However my issue is that because I only solve one parameter set at a time, I don't have access to the bounds of that state across the samples.
Is there a way I could either get GSA to give me all of the sample parameters to then return all the outputs in a matrix? Or, is there a way I can pass a normalization function to GSA for it to execute once all samples have been solved?
I don't really see how I can scale my state without knowing its bounds. Even if I scaled the solution linearly, I would still get a large amplitude in the range (the theoretical solution range for this state is 1e-400 to 1e17).

Is there a way I could either get GSA to give me all of the sample parameters to then return all the outputs in a matrix?

Yes, you can use these lines https://github.com/SciML/GlobalSensitivity.jl/blob/be7d32c20e4d21866cacf69a7918ed0a5ee57e96/src/sobol_sensitivity.jl#L321-L326 to generate the required input design matrices and pass them with this method https://github.com/SciML/GlobalSensitivity.jl/blob/be7d32c20e4d21866cacf69a7918ed0a5ee57e96/src/sobol_sensitivity.jl#L109-L112. To scale the output you'd have to make it a part of the f function you define for GSA, you can indeed take a batch approach and do it at once for all outputs, like how this https://github.com/SciML/GlobalSensitivity.jl/blob/master/test/sobol_method.jl#L3-L6 is defined.
Take a look at https://docs.sciml.ai/GlobalSensitivity/stable/tutorials/parallelized_gsa/#Direct-Use-of-Design-Matrices and https://docs.sciml.ai/GlobalSensitivity/stable/tutorials/parallelized_gsa/#Parallelizing-the-Global-Sensitivity-Analysis as well as the test file for sobol linked above to get a good idea of how to get this done. It should definitely be possible with what we have in place.

Thank you!

Why does Sobol not require this scaling to work, but eFAST does?


tracing: add upstream address to tracing child spans

Would help to know to which upstream endpoint the request went to.
Risk Level: Low
Testing: Updated existing tests
Docs Changes: yes, updated "What data each trace contains"
Release Notes: yes
Fixes #8954

I've updated the docs.

A question though, do you think sending this IP address to be collected by tracing collector will be fine for all users?

We already know all the endpoints since its in the config, we can write upstream IP into access logs with %UPSTREAM_HOST%, so I doubt that traces could compromise much.
However it might make sense to make the tags set configurable. We have like less than 64 tags, so a quick lookup over a tag mask is totally feasible.


Introduce a higher speed serializer option

Do some research. Should do before 1.0 to verify the abstraction

Honestly, this is going to be a documentation effort only. Not shipping anything right now.

I want to try to use MemoryPack here. Looks easy to use, perf numbers are off the charts. It'd need to be done in a separate extension Nuget to avoid taking the dependency.
Tasks

[ ] Implementation of a MemoryPack version of Wolverine's IMessageSerializer
[ ] An extension method on WolverineOptions to register that serializer globally
[ ] Extension methods to add that serializer to listeners and/or subscribers?
[ ] Test it end to end where it has to go over the wire. Could be just over TCP

Done with the MemoryPack option!


IPython Kernal Fail to Start

From<EMAIL_ADDRESS>on 2014-10-15T17:06:55Z
Spyder Version:  2.3.1
Python Version:  2.7.8
Qt Version    :  4.8.6, PyQt4 (API v2) 4.10.4 on Darwin
pyflakes >=0.5.0:  0.7.3 (OK)
pep8 >=0.6      :  1.4.6 (OK)
IPython >=0.13  :  2.3.0 (OK)
pygments >=1.6  :  1.6 (OK)
pandas >=0.13.1 :  0.12.0 (NOK)
sphinx >=0.6.6  :  1.2.3 (OK)
psutil >=0.3    :  1.1.2 (OK)
rope >=0.9.2    :  0.9.4 (OK)
matplotlib >=1.0:  1.3.1 (OK)
sympy >=0.7.0   :  0.7.3 (OK)
pylint >=0.25   :  None (NOK)
What steps will reproduce the problem?

On startup and when restarting an IPython Kernel, I am unable to do so.

What is the expected output? What do you see instead?
Should just see the standard IPython Prompt, instead I get,
An error ocurred while starting the kernel
Traceback (most recent call last):
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/spyderlib/widgets/externalshell/start_ipython_kernel.py", line 183, in
from IPython.zmq.ipkernel import IPKernelApp # 0.13 (analysis:ignore)
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/IPython/init.py", line 45, in
from .config.loader import Config
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/IPython/config/init.py", line 16, in
from .application import *
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/IPython/config/application.py", line 23, in
import logging
File "/Users/jengel/anaconda/lib/python2.7/logging/init.py", line 26, in
import sys, os, time, cStringIO, traceback, warnings, weakref, collections
File "collections.py", line 13, in
import numpy as np
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/numpy/init.py", line 142, in
import add_newdocs
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/numpy/add_newdocs.py", line 9, in
from numpy.lib import add_newdoc
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/numpy/lib/init.py", line 4, in
from type_check import *
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/numpy/lib/type_check.py", line 8, in
import numpy.core.numeric as _nx
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/numpy/core/init.py", line 45, in
from numpy.testing import Tester
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/numpy/testing/init.py", line 8, in
from unittest import TestCase
File "/Users/jengel/anaconda/lib/python2.7/unittest/init.py", line 58, in
from .result import TestResult
File "/Users/jengel/anaconda/lib/python2.7/unittest/result.py", line 9, in
from . import util
File "/Users/jengel/anaconda/lib/python2.7/unittest/util.py", line 2, in
from collections import namedtuple, OrderedDict
ImportError: cannot import name namedtuple
Please provide any additional information below
.
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=2009

From<EMAIL_ADDRESS>on 2014-10-15T22:08:49Z
It's worth noting that when I just load up an IPython session and do:
from collections import namedtuple
I don't get an error

From ccordoba12 on 2014-10-16T16:20:22Z
I think this errors arises (in both cases) because you have a file called "collections.py" in your folder or current working directory. I say it because of this line
File "collections.py", line 13, in

in your tracebacks.
This makes the logging module to import the wrong module, as can be seen from one line above the previous one:
File "/Users/jengel/anaconda/lib/python2.7/logging/__init__.py", line 26, in
import sys, os, time, cStringIO, traceback, warnings, weakref, collections

The problem should be solved by renaming "collections.py" to another thing.

From<EMAIL_ADDRESS>on 2014-10-15T22:21:51Z
Update: I've upgrade to numpy 1.9 using conda (anaconda)
numpy                     1.9.0                   py27_p0  [mkl]
and now I get this error on startup, still with numpy:
An error ocurred while starting the kernel
Traceback (most recent call last):
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/spyderlib/widgets/externalshell/start_ipython_kernel.py", line 183, in
from IPython.zmq.ipkernel import IPKernelApp # 0.13 (analysis:ignore)
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/IPython/init.py", line 45, in
from .config.loader import Config
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/IPython/config/init.py", line 16, in
from .application import *
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/IPython/config/application.py", line 23, in
import logging
File "/Users/jengel/anaconda/lib/python2.7/logging/init.py", line 26, in
import sys, os, time, cStringIO, traceback, warnings, weakref, collections
File "collections.py", line 13, in
import numpy as np
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/numpy/init.py", line 172, in
from . import add_newdocs
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/numpy/add_newdocs.py", line 13, in
from numpy.lib import add_newdoc
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/numpy/lib/init.py", line 8, in
from .type_check import *
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/numpy/lib/type_check.py", line 11, in
import numpy.core.numeric as _nx
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/numpy/core/init.py", line 6, in
from . import multiarray
ImportError: cannot import name multiarray

From<EMAIL_ADDRESS>on 2014-10-16T19:41:22Z
Thanks for the hint. I've followed up on it, and this is what I've found. The error seems to come from loading numpy in line 17 of 'collections.py'
ERROR TRACE:
File "/Users/jengel/anaconda/lib/python2.7/logging/init.py", line 26, in
import sys, os, time, cStringIO, traceback, warnings, weakref, collections
File "collections.py", line 17, in
import numpy as np
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/numpy/init.py", line 172, in
from . import add_newdocs
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/numpy/add_newdocs.py", line 13, in
from numpy.lib import add_newdoc
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/numpy/lib/init.py", line 8, in
from .type_check import *
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/numpy/lib/type_check.py", line 11, in
import numpy.core.numeric as _nx
File "/Users/jengel/anaconda/lib/python2.7/site‑packages/numpy/core/init.py", line 6, in
from . import multiarray
ImportError: cannot import name multiarray
There are several collections.py files in my site-packages folder:
[~/anaconda/lib/python2.7]$ find . -name collections.py
./collections.py
./site-packages/astropy/utils/collections.py
./site-packages/binstar_client/mixins/collections.py
./site-packages/matplotlib/collections.py
./site-packages/sqlalchemy/orm/collections.py
./site-packages/statsmodels/compatnp/collections.py
I think 'logging.py' imported by Ipython.confg.application means to load the base 'collections.py' from the site-packages folder.
Instead it seems to be loading the matplotlib version of collections.py which has
import numpy as np
on line 17.
I've tried uninstalling and reinstalling spyder, numpy, and matplotlib, all to no avail. Same error message. There are no other 'collections.py' files in my PYTHONPATH.
Given that collections.py is a part of matplotlib, I can't just go renaming it.
Any thoughts?

From<EMAIL_ADDRESS>on 2014-10-16T19:46:07Z
I also tried reinstalling ipython to no avail.
The problem seems to be something about the ipython startup procedure through spyder (embedded app) which is different that a normal qtconsole. I can run qtconsole fine, and can even connect the spyder ipython console to a running ipython kernel fine. I just can't start a new ipython console from within spyder.

From ccordoba12 on 2014-11-18T15:07:00Z
But those are the collections files you have under /anaconda/lib/python2.7. However, I think the problem is you have another collections named file somewhere else in your hard drive that somehow is picked up instead of the standard library one.

Closing because of lack of response.


images more than 3 months old are not supported STO-7231

Harness Developer Pull Request
Thanks for helping us make the Developer Hub better. The PR will be looked at
by the CODEOWNERS.
What Type of PR is This?

[ ] Issue
[ ] Feature
[ ] Maintenance/Chore

If tied to an Issue, list the Issue(s) here:

Issue(s)

House Keeping
Some items to keep track of. Screen shots of changes are optional but would help the maintainers review quicker.

[ ] Tested Locally
[ ] Optional Screenshot.

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://65e61ed90fc94e2640684ecd--harness-developer.netlify.app

Please check the Execution Link of the Pipeline for the Website Draft URL. This is located in the Preview Step behind the Harness VPN and also is available in #hdh_alerts. E.g Website Draft URL: https://unique-id--harness-developer.netlify.app. Current Draft URL is: https://65e631f649659a38c421b03a--harness-developer.netlify.app


Enforce an explicit schema for the "package metadata" Marathon label

As a result, the ListHandler response will not contain the new
package fields from the Universe 3.0 schema.
This gets us closer to the CLI integration tests passing (#409). Some things to follow up on:

@tamarrow this change doesn't fix the CLI test failures because we are now including the selected field explicitly in the label even if it wasn't specified in the package. So the CLI tests will need to be updated to expect that field.
At one point we were running the CLI integration tests against Cosmos regularly. Should we start doing that again? It would have caught the selected discrepancy I mentioned above much earlier.

If there's more work that needs to be done on this, I won't have time to address it today. Please go ahead and add changes to it and merge if needed.

LGTM!

Okay. I'll take over this PR.

@jsancio is this ready to merge once the tests pass?

@tamarrow @BenWhitehead This is ready for review.
Both test_package and test_service in the CLI pass. I had to make some minor changes that I will pass the the CLI repo soon.

@jsancio feel free to merge, though I think there's some cleanup we're going to want to take care of when we take care of the todo (version)s in the code. (I'm not sure the new metadata object should go in com.mesosphere.cosmos.label or someplace else. Having just a label package feels kinda orphaned from the marathon aspect which prompts it to be there at all.


Edge / Chrome

Are there plans to get this to work without ActiveX?  Trying to get this integration working on a new Windows Server 2019 deployment for Edge or Chrome users.  Thanks.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 18fcb539-bdbd-068d-46c0-44058146031e
Version Independent ID: 15e99611-e40e-310c-1625-9e76b27cfe99
Content: Publish Remote Desktop with Azure AD App Proxy
Content Source: articles/active-directory/manage-apps/application-proxy-integrate-with-remote-desktop-services.md
Service: active-directory
Sub-service: app-mgmt
GitHub Login: @msmimart
Microsoft Alias: mimart

@turg77 Thanks for your feedback! We will investigate and update as appropriate.

Hi @turg77,
If you would like to request this feature the best place to do that is in User Voice where the product team can reply directly. https://feedback.azure.com/forums/169401-azure-active-directory
As of yet there are no plans that I'm aware of , but the product group is pretty responsive to suggestions.


How to get abandoned cart data

In my index.js
app.get("/api/abandoned-cart", async (_req, res) => {
const checkoutsData = await shopify.api.rest.AbandonedCheckout.checkouts({
session: res.locals.shopify.session,
});
res.status(200).send(checkoutsData);
});
and I have created a component abandonedCart
import React, { useEffect, useState } from "react";
function AbandonedCart() {
const [checkoutsData, setCheckoutsData] = useState([]);
useEffect(() => {
fetch("/api/abandoned-cart")
.then(response => response.json())
.then(data => {
setCheckoutsData(data)
console.log("data",data)})
.catch(error => console.error(error));
}, []);
return (

Abandoned Cart Data:
{JSON.stringify(checkoutsData, null, 2)}

);
}
export default AbandonedCart;
the auth api I am calling is
const shopify = shopifyApp({
api: {
apiVersion: LATEST_API_VERSION,
restResources,
billing: undefined, // or replace with billingConfig above to enable example billing
},
auth: {
path: "/api/auth?shop=brandgoclothe-01.myshopify.com",
callbackPath: "/api/auth/callback",
},
webhooks: {
path: "/api/webhooks",
},
// This should be replaced with your preferred storage strategy
sessionStorage: new SQLiteSessionStorage(DB_PATH),
});

when the api is called I am getting 503 error
I am attaching the RQ/RS of the api's

aditional informtion is earlier I am getting shop undefined error, so I have included shop=brandgoclothe-01.myshopify.com", as query parameter in and now I am getting 503 error in both the api's.
help me to get out of this

Thank you for the issue, but this repository isn't a support channel. Please use one of the official support channels. See https://shopify.dev/ for more info


History index fails to paint node image icons

Not sure whether this is a css bug or not.

Managed to figure it out.


Format of focus chart x axis in "lineWithFocusChart"

Hi!
I have a problem formatting the X axis in the "lineWithFocusChart" type. I have an array of Date values ($scope.xValues) and I have written this code:
tickFormat: function(d){
                    return d3.time.format("%d-%m %H:%M")(new Date(d));
                  },
tickValues: $scope.xValues

It works with the chart, but the format of the focus chart is not as desired. Here I put an image to show you the problem.

Is there an option like "xAxisFocus" or something like that to change the x axis format?
Thank you in advance!

You probably figured it out by now but for others, it is x2Axis:
chart.x2Axis.tickFormat(function(d) { return d3.time.format('%b %d')(new Date(d)); })

This might be a dumb question, but why is this? Shouldn't it, by default at least, be the same format as the chart?


RFC: DiSSCo Terms and Vocabularies Implementation strategy

A new Request for Comments (RFC) outlining the DiSSCo Vocabulary Implementation Plan. This RFC proposes a dedicated vocabulary server for DiSSCo-specific terms and controlled vocabularies, treating them as FAIR Digital Objects (FDOs).
Key points:

We propose using Handle PIDs for each term, rather than the more familiar IRIs and CURIEs typically used in RDF/JSON-LD vocabulary implementations. This approach aligns with our FDO strategy and enhances persistence and resolvability. However, we're also keeping in mind the readability, existing CURIE usage practices, and common JSON-LD parsing and semantic validation.
The RFC focuses on the process of implementing and serving these terms, not on the terms themselves.

The RFC google doc can be found here .
Please submit your comments by 2024-08-23.

Check usage of DefinedTerms for schema.org interoperability (see more here RO-Crate recommendation)

Add hdl context. Example:
{
  "@context": {
    "hdl": "https://hdl.handle.net/",
   "schema": "https://schema.org/"
    "ods": "http://rs.dissco.eu/opends/terms/"
  },
 "@type": "schema:DefinedTerm",
  "@id": "hdl:20.5000.10/SSA-ASD-FJJ",
}

We received feedback in the RFC doc. the suggestions will be added to our backlog.


Revocation not working

Hi,
I was testing the BPA from frontend and realized that the revocation functionality is not working correctly. I am able to revoke a credential but it still appears valid and the status is "verified" if I make a proof request after revoking the credential.
For Example check the image below:

Steps to reproduce:

Start the BPA agent normally
Create Schema, Credential Definition (Revocable) & Proof Template
Issue the credential to your agent
Revoke the credential
Request Presentation

Although revoked, if you still choose to share the proof from the holder. It would show as verified on UI. Instead of "un-verified or revoked"

I am using stable release 0.8.0 of BPA and in this release I do not have the option to ask for "check for revocation". I do not have the option to explicitly set revocation interval. Although my credential def is revocable.
This is the UI for creating a proof template:

Are there new features in the latest commits related to this?
Also on a side note another observation, there is no option to ask for "self attested attributes" while creating proof template and subsequently in present-proof workflow, which is a standard aries implementation.

Thanks @swcurran for the explanation. That part is definitely missing on the side of the proofing bpa. We either have to filter the credentials that have been revoked, or highlight them as revoked in the ui. As aca-py provides this functionally via the /credentials api this should be doable.
I will have a look into the other issue which is a bit weird as each proof request that is generated from the template also requests proof of non revocation as a default, for example for the template above:
    "presentation_request": {
        "nonce": "12345",
        "name": "myProofNew",
        "version": "1.0",
        "requested_attributes": {
            "some-uuid": {
                "names": [
                    "name"
                ],
                "restrictions": [
                    {
                        "schema_id": "some schema id"
                    }
                ],
                "non_revoked": {
                    "to":<PHONE_NUMBER>,
                    "from":<PHONE_NUMBER>
                }
            }
        },
        "requested_predicates": {}
    }

I do not think this is a V2 problem. You can test if the wallet apps are V2 capable by enabling the expert mode and then either create the connection via OOB or issue a credential via the V2 api.

Connection and credential exchanges are V1 and V2 capable, rest will follow at some point. Lissi had some mediator upgrades recently, my guess is that the exchange is not in the correct format or missing information.

Fixed with aca-py release 0.7.2. Proof presentations that are based on a revokable credential currently evaluate to invalid when sent by the Lissi app, this will be fixed with a new app release.


Set-SnipeitLicense

Context

Dear Developer,
when I use Set-Snipeitlicense the command -notes wouldnt work:
Set-SnipeitLicenseSeat: A parameter cannot be found that matches parameter name 'notes'.
With "Tab" it suggest note but does not set the note.
And know a Question why i use the note field and found this issue:
Is it a Problem of the Snipeit-Database that there is no connection between the checked out License and the asset
or could it be an additional function that i should ask u too build?
In my example i read the OS license from Bios but sometimes there is no key. I do the trick with an empty key and use the UUID from the PC in the notes field.
This is an Possibility but it makes check in and check out of Licenses rly annoying. In the LicenseSeat function i couldnt do a search for the assigned asset and have to know the id.
Is there a solution for that, what i didnt see?
Thanks for your hard work.

Your Environment

SnipitPS Module version used:
Operating System and PowerShell version:
Snipe It version:

Expected Behavior

Current Behavior

Possible Solution

Steps to Reproduce (for bugs)

@noxare What version of snipeit are you on?  I'm running 5.1.8 here, and it's working fine.

If you check your activity log, does it show the notes on the right side?  I thin that's all the note switch is for when assigning licenses, as there is no "notes" field for the license seat.  I know there has been talk about adding different fields to licenses.  One of my biggest pet peaves is that we have one software with 30 different seats that all expire at different times.  :(  So we have to have 30 different licenses set up in Snipeit.  Each with it's own expiration date.
With that, do you have one license per key?

there no notess property just note for acivity log. bt
@noxare  after you assign license to user or asset it should show up like:
(Dont let all 3's confuse you, it was just coincidence that user id , location id and license id's were same)
id                : 7
license_id        : 3
assigned_user     : @{id=3; name=Petri Asikainen; department=}
assigned_asset    :
location          : @{id=3; name=Ulvila, }
reassignable      : True
user_can_checkout : False
name              : Seat 5
available_actions : @{checkout=True; checkin=True; clone=True; update=True; delete=True}

so find out what seats is assigned to "Petri Asikainen" (id 3)
Get-SnipeitLicenseSeat -id 3 | where-object { $_.assigned_user.id -eq 3}

#and check in all licenses from specific user
Get-SnipeitLicenseSeat -id 3 | where-object { $_.assigned_user.id -eq 3} | ForEach-Object { Set-SnipeitLicenseSeat -id 3 -seat_id $_.id -assigned_to $null}


Feat: Change EventProcessor to an interface

:scroll: Description
EventProcessor is now an interface instead of a pure function
:bulb: Motivation and Context
Closes https://github.com/getsentry/sentry-dart/issues/479
Unblocks

https://github.com/getsentry/sentry-dart/issues/480
https://github.com/getsentry/sentry-dart/pull/473
https://github.com/getsentry/sentry-dart/pull/452

:green_heart: How did you test it?
:pencil: Checklist

[x] I reviewed submitted code
[ ] I added tests to verify changes
[x] I updated the docs if needed
[x] All tests passing
[ ] No breaking changes

:crystal_ball: Next steps

do we need to add export 'event_processor.dart'; to the sentry.dart file?


[WIP - don't review, need to check CI first] some swamp fixes

title + pr desc comin soon

Closing in favour of #1548


Document patron load Perl scripts

What does this PR do?
To help with future migration to Python, we need to thoroughly understand what the remaining Perl scripts do in the patron load process. This PR adds inline comments to the remaining Perl scripts in patronload/scripts documenting the code in detail
What are the relevant tickets?

https://mitlibraries.atlassian.net/browse/IMP-2318

Includes new or updated dependencies?
NO

@gam5 please correct and/or clarify anything here that isn't right or needs more information. Thank you!

Force push to rebase onto significantly updated main branch.

Looks good. My one quibble is the "use strict" comment. It's just there to force the use of declared/scoped variables. https://perldoc.perl.org/strict

Force push to rebase onto updated main branch.


Try to add syslog support

Try to add syslog support to registry logging. But logrus logging is really strange. Don't know if it really helps.

Please sign your commits following these rules:
https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:
$ git clone -b "syslog" git@github.com:fbacchella/distribution.git somewhere
$ cd somewhere
$ git commit --amend -s --no-edit
$ git push -f

Ammending updates the existing PR. You DO NOT need to open a new one.

@fbacchella The logging approach in the registry is to route them all via stderr/stdout. This can be routed to syslog via another mechanism.
I am not sure if logrus' hook system is the right approach. If we do add syslog support, we won't really want to support it through a hook.

Indeed logrus formatting can be very strange. But right know it's still the most usable way.

@fbacchella logrus retains structure in log messages, which is, at worst, unfamiliar by some accounts. It's a fairly well documented format and there are other formatter options that can be used to meet different needs.


Add options for tabs within the more actions dropdown

The designs indicate that the tab options that usually appear in a GridFieldDetailForm for blocks will need to be available in a dropdown on blocks. These need to be available per block without considerable performance degradation.
To handle this, I propose that we check tabs per block type (extension of BaseElement) and cache the result. There's is a possibility that the data saved on a block may affect the tabs that are shown, but when a block is expanded we can update the tab options dynamically (logged at #324).
A/Cs:

[ ] Tabs are calculated per block type and cached so that performance is not significantly affected
[ ] All tabs that usually show when editing a saved block with a GridFieldDetailForm are included
[ ] Tab options are included in the action menu on a block (implemented by #322)

For reference we worked on a similar component which never quite made it in, before the MoreActions React component was available in core: https://github.com/symbiote/silverstripe-gridfieldextensions/pull/225

Think about generating a cache on dev/build

@clarkepaul How important is this feature, compared to spending this time on other features, or having a lower CMS experience? How likely do you think it is that authors navigate from the block overview into a specific tab via the "meatballs" menu, vs. just clicking "edit block" to get to the detail view, and then selecting the tab there? Has this shortcut been something out of user testing?

Hey @chillu. The designs currently do not indicate it is possible to get to the GridFieldDetailForm if the block is in-line editable. The only options are the tabs in this meatballs menu, the tabs rendered as "normal" - inside the in-line form, or as you say, providing the ability to access the edit (GridFieldDetailForm) screen and using the tabs that way.

I’m assuming that most content blocks will have a subset of form fields being inline editable (e.g. just title and content), and then all fields in the detail view? And those inline editable fields might contain fields across tabs (depending on priority), but there’s no tabs directly in the inline editing.
We have to create a solution which works for getCMSFields() implementations with 100+ fields, and 10+ tabs. And by "works", I mean set the expectation with devs that if they want blocks to be inline editable, they'll have to choose some fields as more important than others. Simpler getCMSFields() implementations might sometimes be fine to show with all fields and tabs inside the inline editing mode, but I think that's rare enough not to make it a design goal.
If we're loading the full getCMSFields here, I'm a bit concerned on what message that sends to devs (don't worry about choosing important fields), and what that does to CMS performance. We'd need to be smarter about deferred loading of form schema, and deferred rendering of form fields.
Apart from that, having a view mode toggle (tabs) hidden away in a "more options" dialog seems like a weird UX choice. After selecting a different view mode (different tab), you have no way of knowing you're in this mode without opening the menu/dialog again. And if we introduce a separate "current tab" viewer, it begs the question why we're not just using a GridField detail form here. Keep in mind that the eventual goal is for this detail edit form to load faster (caching form fields), so the mode switch won't be as painful for authors.
/cc @clarkepaul

@chillu the current route being taken is for content blocks to be inline editable or not. Being built with an opt-out approach, any block that is set to be inline editable would by default display everything from the getCMSFields, see: #266. The assumption being that blocks with 100+ fields would have inline editing removed by a developer so to not adversely affect CMS performance.
Let's pause on this issue to make sure the performance impact is released and clarify the UX desire behind it.

Lots going on in this conversation so I'll try to recap some of the reasoning.

How likely do you think it is that authors navigate from the block overview into a specific tab via the "meatballs" menu, vs. just clicking "edit block" to get to the detail view

I think the other tabs within the dropdown will be used far less than editing "content". Therefor easy access to the content tab was far more important.
The whole idea is that people can edit the entire page without having to dive back and forth from blocks. Eventually we wont need access to the detail view for blocks unless specified by a dev (eg. userforms or large blocks). Having tabs in the dropdown wasn't vital at this stage but made for a much better experience letting people know where they are going and whats available to see. "Edit block" doesn't differentiate itself from inline editing very well. Some basic testing of the experience with settings and history in the dropdown worked well within the block view. It will also allow for tabs areas to be transitioned one by one if needed.

I’m assuming that most content blocks will have a subset of form fields being inline editable (e.g. just title and content), and then all fields in the detail edit form? And those inline editable fields might contain fields across tabs (depending on priority), but there’s no tabs directly in the inline editing?

Nope, the in-block editing view represents all the fields in the "Content" tab as being editable. Blocks naturally grow to the height of the fields inside. We are condensing groups of fields into single click areas to reduce consumed height (like a link which has: link text, link, title, new tab...). I'm trying to keep this as basic as possible (all fields treated the same). Tabs will transfer to blocks with the same structure (tab for tab), and nested tabs will continue to look like tabs with the in-block edit view.
I can't recall the exact details of the teams discussion on performance but pretty sure we had some options (hopefully captured somewhere), for example only loading the fields within a block when its expanded could be expected.

Just to make it clear with a bullet pointed list of pertinent details:

Elements must extend BaseElement
BaseElement has a config setting inline_editable
When a block is "in-line editable"

The whole form (all of getCMSFields) will show in-line
The options menu appears with the tabs

When a block is not "in-line editable"

The options menu does not appear at all
Clicking a block will take you to a GridFieldDetailForm

An example of a block type that is not in-line editable: elemental-userforms.

Three options (in order of design preference I guess):
A. Put tabs into the "more actions" menu
B. Keep the tabs in-line
C. Add an option to get to the edit form (and remove the in-line tabs)
We can't do the most preferable option without some sort of cache for the output of getCMSFields. FWIW I don't think this is very costly in regards to development time. If the idea is to have some sort of "CMS Fields Manifest" in the future then we will be writing this in a way that it can be replaced with low cost.
I'm still keen to do option A - I think the design benefit outweighs the technical debt, which we can minimise by containing it (And this is already estimated for it - only a 3).

Sorry, what is the options menu we're talking about here?

Alright, thanks for taking the time to explain this - an important nuance that I didn't pick up on when reviewing the designs. But my fault for not being more involved in the discussion which lead to this point.
Essentially, we're forming developer habits here, one way or another. I'd rather push them towards not having tabs on inline editable tabs than creating workarounds for them. But devs sometimes don't control the presence of tabs (e.g. auto-added "link tracking" tabs), so this seems like a good compromise.
Would allow_inline_editing default to true?

There's is a possibility that the data saved on a block may affect the tabs that are shown, but when a block is expanded we can update the tab options dynamically

That would be my preference, since we don't need to come up with a short-term solution for getCMSFields caching. How hard is that? Even with the full "form field client-side cache" in place, that would only happen on demand - the first time the detail edit form (or inline edit form) is requested for this particular model. Which might be when you expand the block, not when you display its summary (TBC).

we still want the short-term solution for caching tabs because we won't have any source of data until the block is expanded (but the tabs should appear in the "More Actions" menu from the get-go)

So either you have to pre-load all cms fields for all blocks (before the first one could be expanded), or deal with a "more options" menu that doesn't have the tabs until you first expand each type - at which point you can implement client-side caching. My point is that I don't want to create a system which does the pre-loading without considering the bigger picture (GraphQL-based form schemas which are hopefully cached through Apollo). And if we wait until the first expand action, we might as well dynamically append those, and deal with caching properly later across all form fields incl. tabs.

If we decide to not show tabs until the block is expanded, that would be amazing. If @clarkepaul is on board we don't really have a problem.
I agree that it's loads of CPU cycles on the server - hence the intention was to have a long-term server-side cache (that is cleared on flush). I agree that creating a system in elemental just for this is not ideal but does have some advantages over Apollo caching (as I see it):

Form schemas (cached through Apollo) are specific to elements - cached schemas are only for a specific block ID
Server side cache would have element tabs per element type (ie. Content blocks have these tabs)
No request is required for the tabs with the server side cache as we can include the tabs as part of the ElementalArea field "schema data"

Basically it's a minimum effort required to solve the problem with the fastest (perfomance-wise) solution that doesn't introduce hoards of technical debt. I'm keen to produce some code as a POC.
I've self-assigned this but I won't actually do anything till we've resolved these discussions.

Are you suggesting that we have only actions in the dropdown when the block is collapsed, but if the block is expanded it has both the tab links and the block actions?
Its a bit hard for me to know the impact of the intended UI. If you find that development is blowing out because of showing the tabs in the dropdown menu, then we could hide the [...] icon until the block is expanded—as long as its the intention we continue to enhance the experience at a later date.
I think easy access to links is going to reduce clicking, especially when it comes to saving/publishing blocks.

FYI @chillu - Here's the server side caching I implemented in the PR: https://github.com/dnadesign/silverstripe-elemental/blob/f1162762c6ef30a61b550fc823f3100e9b1a5b51/src/Services/ElementTabProvider.php

MVP implemented in #373
I think this is good enough to close this ticket. The expensive operations are done on flush and cached, so there's negligible impact to the CMS user. @ScopeyNZ has also done a nice job of hiding away that part of the logic in an API marked as internal in case we come up with a better way to do it in future.


TexelFetchBuffer incorrect call for macOS

texelFetchBuffer should be replaced with just texelFetch

this change should be made to operator glslmulti1_pixel


delay raft messages if they take too much memory

Signed-off-by: qupeng<EMAIL_ADDRESS>What problem does this PR solve?
Under heavy write load, received raft messages and unstable raft entries can take much memory to cause OOM finally.
What is changed and how it works?
Delay raft messages if they take too much memory.
Related changes

PR to update pingcap/docs/pingcap/docs-cn:
PR to update pingcap/tidb-ansible:
Need to cherry-pick to the release branch

Check List
Tests

Integration test

Release note
None

/release

/release

/release

/merge


refactoring

refactoring and harmonising a bit the style across tabs.

nice refactoring guidelines here, courtesy of @samcunliffe

right! 😅


Update atom to 1.0.15

Thank you for the contribution. It was merged directly as fb1c181d9c8376907df0d9f95cceb8713252edea to keep commit history cleaner. Your contribution is still credited to you.


New-CsBatchPolicyAssignmentOperation - Not found

What particular powershell addin is required to run this? It's not specified on this page and it's not recognized.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: 6fe8cc5e-0f33-d33a-6765-a3f3a33f1522
Version Independent ID: 13cc4718-4967-695d-cd07-13c3021d8682
Content: Assign policies to large sets of users in your school - Microsoft Teams
Content Source: Teams/batch-policy-assignment-edu.md
Service: msteams
GitHub Login: @LanaChin
Microsoft Alias: v-lanac

@Cdenby Thank you for submitting feedback and contributing to the docs. We are currently investigating this.

I found it - it's the azureAdPreview and you have to totally remove AzureAD in order to run it.
uninstall-module -name azuread
Install-Module -Name AzureADPreview

@Cdenby thank you for pointing this out and helping improve MS Docs. Do you recommend adding anything to the article to help other users?

@Cdenby We appreciate any feedback that improves the content in the Microsoft docs but we haven't had any response from you so we are going to close this issue.
Please feel free to re-open this issue if there is a specific area of the docs that we can improve or make better. Thank you.


SegFault PickUp/Delivery

I'm currently using the routing library.
Using some hints from the discussion forum :
https://groups.google.com/forum/#!searchin/or-tools-discuss/negative$20capacity|sort:relevance/or-tools-discuss/NeClqCYwD6E/jIN2VXU--l0J
The current use is a CVRP with some pickup activities(positive quantities) and deliver some others(negative quantities).
It works quite well but a SegFault occurs when most of the quantities are bigger than the half of the vehicle capacity.

That's strange. What language/platform are you using ? Can you share some
code to reproduce it ?
On Wed, Mar 8, 2017 at 6:57 PM, Gwénaël Rault<EMAIL_ADDRESS>wrote:

I'm currently using the routing library.
Using some hints from the discussion forum :
https://groups.google.com/forum/#!searchin/or-tools-
discuss/negative$20capacity|sort:relevance/or-tools-
discuss/NeClqCYwD6E/jIN2VXU--l0J
The current use is a CVRP with some pickup activities(positive quantities)
and deliver some others(negative quantities).
It works quite well but a SegFault occurs when most of the quantities are
bigger than the half of the vehicle capacity.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/337, or mute the thread
https://github.com/notifications/unsubscribe-auth/AKjyUr4ygYihPEWWkCHYga8-2DcYAiCpks5rjuvygaJpZM4MXGs_
.

Our tool is based on ruby and call OR-tools with a C++ interface (based on an old tutorial : Chapter 9) through protobuf.
The easiest way to reproduce it will be to setup our API :
https://github.com/Mapotempo/optimizer-api/tree/deliveries
And the wrapper to OR-tools
https://github.com/Mapotempo/optimizer-ortools/tree/deliveries
And then call the test case which fails
https://github.com/Mapotempo/optimizer-api/commit/a02dd8fe33aedf45a704085377ae30a6a5f85bd9
APP_ENV=test bundle exec rake test TEST=test/wrappers/ortools_test.rb

Do you happen to have a stack trace when the SegFault occurs ?
On Thu, Mar 9, 2017 at 10:31 AM, Gwénaël Rault<EMAIL_ADDRESS>wrote:

Our tool is based on ruby and call OR-tools with a C++ interface (based on
an old tutorial : Chapter 9) through protobuf.
The easiest way to reproduce it will be to setup our API :
https://github.com/Mapotempo/optimizer-api/tree/deliveries
And the wrapper to OR-tools
https://github.com/Mapotempo/optimizer-ortools/tree/deliveries
And then call the test case which fails
Mapotempo/optimizer-api@a02dd8f
https://github.com/Mapotempo/optimizer-api/commit/a02dd8fe33aedf45a704085377ae30a6a5f85bd9
APP_ENV=test bundle exec rake test TEST=test/wrappers/ortools_test.rb
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/337#issuecomment-285300737,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKjyUkAgtZDxHUZYI8Jb9G-MgKErnh3Dks5rj8bqgaJpZM4MXGs_
.

using the routing_trace flag, I got :

test - [11:34:06] src/constraint_solver/search.cc:240: Start search (memory used = 9.60 MB)
test - [11:34:06] src/constraint_solver/search.cc:240: Root node processed (time = 0 ms, constraints = 107, memory used = 9.60 MB)
test - Segmentation fault (core dumped)

Can you get a stack trace from the core which was dumped ?
On Thu, Mar 9, 2017 at 11:36 AM, Gwénaël Rault<EMAIL_ADDRESS>wrote:

using the routing_trace flag, I got :
test - [11:34:06] src/constraint_solver/search.cc:240: Start search
(memory used = 9.60 MB)
test - [11:34:06] src/constraint_solver/search.cc:240: Root node
processed (time = 0 ms, constraints = 107, memory used = 9.60 MB)
test - Segmentation fault (core dumped)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/337#issuecomment-285316240,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKjyUnKbfjFk5pD7GEgfZFcoC663y3SEks5rj9YegaJpZM4MXGs_
.

#0  0x00007effc33c9a97 in operations_research::RouteConstructor::CheckTempAssignment(operations_research::Assignment*, int, int, int, int, int, int) () from ../or-tools/lib/libortools.so
#1  0x00007effc33d7dde in operations_research::RouteConstructor::Construct() () from ../or-tools/lib/libortools.so
#2  0x00007effc33dbd16 in operations_research::SavingsBuilder::Next(operations_research::Solver*) () from ../or-tools/lib/libortools.so
#3  0x00007effc341580c in operations_research::(anonymous namespace)::ComposeDecisionBuilder::Next(operations_research::Solver*) () from ../or-tools/lib/libortools.so
#4  0x00007effc326e945 in operations_research::Solver::NextSolution() () from ../or-tools/lib/libortools.so
#5  0x00007effc326faff in operations_research::Solver::SolveAndCommit(operations_research::DecisionBuilder*, std::vector<operations_research::SearchMonitor*, std::allocator<operations_research::SearchMonitor*> > const&) () from ../or-tools/lib/libortools.so
#6  0x00007effc334d487 in operations_research::(anonymous namespace)::NestedSolveDecision::Apply(operations_research::Solver*) () from ../or-tools/lib/libortools.so
#7  0x00007effc326eace in operations_research::Solver::NextSolution() () from ../or-tools/lib/libortools.so
#8  0x00007effc326f068 in operations_research::Solver::Solve(operations_research::DecisionBuilder*, std::vector<operations_research::SearchMonitor*, std::allocator<operations_research::SearchMonitor*> > const&) () from ../or-tools/lib/libortools.so
#9  0x00007effc33bf556 in operations_research::RoutingModel::SolveFromAssignmentWithParameters(operations_research::Assignment const*, operations_research::RoutingSearchParameters const&) ()
from ../or-tools/lib/libortools.so
#10 0x0000000000411986 in operations_research::TSPTWSolver(operations_research::TSPTWDataDT const&) ()
#11 0x0000000000408b74 in main ()
(gdb) bt full
#0  0x00007effc33c9a97 in operations_research::RouteConstructor::CheckTempAssignment(operations_research::Assignment*, int, int, int, int, int, int) () from ../or-tools/lib/libortools.so
No symbol table info available.
#1  0x00007effc33d7dde in operations_research::RouteConstructor::Construct() () from ../or-tools/lib/libortools.so
No symbol table info available.
#2  0x00007effc33dbd16 in operations_research::SavingsBuilder::Next(operations_research::Solver*) () from ../or-tools/lib/libortools.so
No symbol table info available.
#3  0x00007effc341580c in operations_research::(anonymous namespace)::ComposeDecisionBuilder::Next(operations_research::Solver*) () from ../or-tools/lib/libortools.so
No symbol table info available.
#4  0x00007effc326e945 in operations_research::Solver::NextSolution() () from ../or-tools/lib/libortools.so
No symbol table info available.
#5  0x00007effc326faff in operations_research::Solver::SolveAndCommit(operations_research::DecisionBuilder*, std::vector<operations_research::SearchMonitor*, std::allocator<operations_research::SearchMonitor*> > const&) () from ../or-tools/lib/libortools.so
No symbol table info available.
#6  0x00007effc334d487 in operations_research::(anonymous namespace)::NestedSolveDecision::Apply(operations_research::Solver*) () from ../or-tools/lib/libortools.so
No symbol table info available.
#7  0x00007effc326eace in operations_research::Solver::NextSolution() () from ../or-tools/lib/libortools.so
No symbol table info available.
#8  0x00007effc326f068 in operations_research::Solver::Solve(operations_research::DecisionBuilder*, std::vector<operations_research::SearchMonitor*, std::allocator<operations_research::SearchMonitor*> > const&) () from ../or-tools/lib/libortools.so
No symbol table info available.
#9  0x00007effc33bf556 in operations_research::RoutingModel::SolveFromAssignmentWithParameters(operations_research::Assignment const*, operations_research::RoutingSearchParameters const&) ()
from ../or-tools/lib/libortools.so
No symbol table info available.
#10 0x0000000000411986 in operations_research::TSPTWSolver(operations_research::TSPTWDataDT const&) ()
No symbol table info available.
#11 0x0000000000408b74 in main ()
No symbol table info available.

I've completed a bit the trace, but i can't find out how to trace within the or-tools sources using gdb

It seems you are using "Savings" as first solution heuristic. Does the same
model fail if you use another heuristic ?
On Fri, Mar 24, 2017 at 9:54 AM, Gwénaël Rault<EMAIL_ADDRESS>wrote:

I've completed a bit the trace, but i can't find out how to trace within
the or-tools sources using gdb
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/337#issuecomment-289028580,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKjyUpmPVdXhrVaH2OLESCKU-Gr0OJynks5ro8sJgaJpZM4MXGs_
.

It doesn't lead to a SegFault but the solution only contains depots with the following heuristics :
local cheapest insertion, parallel cheapest insertion, first inbound min value, best insertion and all unperformed
And don't even found a solution with christofides.

Are your pickup and delivery nodes optional ? (I would suppose so).
What kind of penalties do they have ?
Do you have enough vehicles to cover the demand ?
Are you 100% sure the deliveries have negative demand ? I say that because
the problems appear when demand > 1/2 capacity.
Are you forcing the cumul at the start node to be 0 when building the
demand dimension ?
Have you tried relaxing the problem a bit to see what happens ? In
particular if you have time windows, what happens if you remove them ?
Last, unless the pickup and the deliveries are unrelated, did you call
RoutingModel::AddPickupAndDelivery for each pickup/delivery pair?
On Fri, Mar 24, 2017 at 11:09 AM, Gwénaël Rault<EMAIL_ADDRESS>wrote:

It doesn't lead to a SegFault but the solution only contains depots with
the following heuristics :
local cheapest insertion, parallel cheapest insertion, first inbound min
value, best insertion and all unperformed
And don't even found a solution with christofides.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/337#issuecomment-289049727,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKjyUpg7ph2xXtI-lVjdZATu5ayeoE9oks5ro9ylgaJpZM4MXGs_
.

nodes are optional, the penalty is depending on the problem size, but is quite high regarding the problem.
The test problem have no timewindow and no particular constraint except the capacity.
The callback give a negative quantity if the node is a delivery and positive if it is pickup.
The problem works, when the cumulated delivery quantities does not exceed the capacity of the vehicle, but the problem is quite trivial
The dimension is not forced to start at zero (which is logical if we want to manage with negative quantities) I tried fixing it, but didn't work neither ;)
The SlackVar is set to zero for every node, because i don't allow to load a half pickup. But even permiting this lead to an empty solution.
And yes, pickup and deliveries are unrelated

Can you share the routing search parameters you are using ? You can display
them with DebugString().
On Fri, Mar 24, 2017 at 2:05 PM, Gwénaël Rault<EMAIL_ADDRESS>wrote:

nodes are optional, the penalty is depending on the problem size, but is
quite high regarding the problem.
The test problem have no timewindow and no particular constraint except
the capacity.
The callback give a negative quantity if the node is a delivery and
positive if it is pickup.
The problem works, when the cumulated delivery quantities does not exceed
the capacity of the vehicle, but the problem is quite trivial
The dimension is not forced to start at zero (which is logical if we want
to manage with negative quantities) I tried fixing it, but didn't work
neither ;)
The SlackVar is set to zero for every node, because i don't allow to load
a half pickup. But even permiting this lead to an empty solution.
And yes, pickup and deliveries are unrelated
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/337#issuecomment-289101393,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKjyUomWiQ8YRklkkBabiVqWvnrFHl00ks5rpAXQgaJpZM4MXGs_
.

I failed to reproduce your issue by handcrafting a model from your
description. Do you think you could share a minimal model which exhibits
the issue (with just a couple of vehicles and nodes) ?
On Fri, Mar 24, 2017 at 2:57 PM, Vincent Furnon<EMAIL_ADDRESS>wrote:

Can you share the routing search parameters you are using ? You can
display them with DebugString().
On Fri, Mar 24, 2017 at 2:05 PM, Gwénaël Rault<EMAIL_ADDRESS>wrote:

nodes are optional, the penalty is depending on the problem size, but is
quite high regarding the problem.
The test problem have no timewindow and no particular constraint except
the capacity.
The callback give a negative quantity if the node is a delivery and
positive if it is pickup.
The problem works, when the cumulated delivery quantities does not exceed
the capacity of the vehicle, but the problem is quite trivial
The dimension is not forced to start at zero (which is logical if we want
to manage with negative quantities) I tried fixing it, but didn't work
neither ;)
The SlackVar is set to zero for every node, because i don't allow to load
a half pickup. But even permiting this lead to an empty solution.
And yes, pickup and deliveries are unrelated
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/337#issuecomment-289101393,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKjyUomWiQ8YRklkkBabiVqWvnrFHl00ks5rpAXQgaJpZM4MXGs_
.

The solver debugString :
Solver(name = "Routing", state = OUTSIDE_SEARCH, branches = 83, fails = 69, decisions = 82, delayed demon runs = 20, var demon runs = 286, normal demon runs = 633, Run time = 2 ms)
The solution DebugString :
Assignment(time0 (0..4611686018427387904) | time1 (0..4611686018427387904) | time2 (0..4611686018427387904) | time3 (0..4611686018427387904) | time4 (0..4611686018427387904) | time5 (0..4611686018427387904) | time6 (0) | time7 (0) | distance0 (0..9223372036854775807) | distance1 (0..9223372036854775807) | distance2 (0..9223372036854775807) | distance3 (0..9223372036854775807) | distance4 (0..9223372036854775807) | distance5 (0..9223372036854775807) | distance6 (0) | distance7 (0) | time_order0 (0..9223372036854775807) | time_order1 (0..9223372036854775807) | time_order2 (0..9223372036854775807) | time_order3 (0..9223372036854775807) | time_order4 (0..9223372036854775807) | time_order5 (0..9223372036854775807) | time_order6 (0) | time_order7 (0) | distance_order0 (0..9223372036854775807) | distance_order1 (0..9223372036854775807) | distance_order2 (0..9223372036854775807) | distance_order3 (0..9223372036854775807) | distance_order4 (0..9223372036854775807) | distance_order5 (0..9223372036854775807) | distance_order6 (0) | distance_order7 (0) | quantity00 (0..1000) | quantity01 (0..1000) | quantity02 (0..1000) | quantity03 (0..1000) | quantity04 (0..1000) | quantity05 (0..1000) | quantity06 (0..1000) | quantity07 (0..1000) | Nexts0 (0) | Nexts1 (1) | Nexts2 (2) | Nexts3 (3) | Nexts4 (4) | Nexts5 (5) | Nexts6 (7) | Active0 (0) | Active1 (0) | Active2 (0) | Active3 (0) | Active4 (0) | Active5 (0) | Active6 (1) | Vehicles0 (-1) | Vehicles1 (-1) | Vehicles2 (-1) | Vehicles3 (-1) | Vehicles4 (-1) | Vehicles5 (-1) | Vehicles6 (0) | Vehicles7 (0) | (0))

The test case is the following :
I've got a matrix 4*4, with only 0 or 3.
1 vehicle, starting from index 0 and ending at this same point. with a capacity of 10
6 services (3 pickup, 3 deliveries) with quantities of 5 or 6.
problem = {       matrices: [{         id: 'matrix_0',         distance: [           [0, 3, 3, 3],           [3, 0, 3, 3],           [3, 3, 0, 3],           [3, 3, 3, 0]         ]       }],       units: [{         id: 'unit_0',       }],       points: [{         id: 'point_0',         matrix_index: 0       }, {         id: 'point_1',         matrix_index: 1       }, {         id: 'point_2',         matrix_index: 2       }, {         id: 'point_3',         matrix_index: 3       }],       vehicles: [{         id: 'vehicle_0',         start_point_id: 'point_0',         end_point_id: 'point_0',         matrix_id: 'matrix_0',         capacities: [{           unit_id: 'unit_0',           limit: 10,           overload_multiplier: 0,         }]       }],       services: [{         id: 'service_0',         type: 'pickup',         activity: {           point_id: 'point_1'         },         quantities: [{           unit_id: 'unit_0',           value: 5,         }]       }, {         id: 'service_1',         type: 'pickup',         activity: {           point_id: 'point_2'         },         quantities: [{           unit_id: 'unit_0',           value: 6,         }]       }, {         id: 'service_2',         type: 'delivery',         activity: {           point_id: 'point_3'         },         quantities: [{           unit_id: 'unit_0',           value: 6,         }]       }, {         id: 'service_3',         type: 'delivery',         activity: {           point_id: 'point_3'         },         quantities: [{           unit_id: 'unit_0',           value: 5,         }]       }, {         id: 'service_4',         type: 'delivery',         activity: {           point_id: 'point_3'         },         quantities: [{           unit_id: 'unit_0',           value: 5,         }]       }, {         id: 'service_5',         type: 'pickup',         activity: {           point_id: 'point_2'         },         quantities: [{           unit_id: 'unit_0',           value: 6,         }]       }],       configuration: {         resolution: {           duration: 100         }       } }
And is available here :
https://github.com/Mapotempo/optimizer-api/blob/deliveries/test/wrappers/ortools_test.rb#L1229

... Was sending a time cost and sending only a distance matrix...


feat: function watchQuery

Types of changes

[ ] Bug fix (a non-breaking change which fixes an issue)
[ ] New feature (a non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Description

Another pr for function watchQuery, forgot dataRefresh part in last pr https://github.com/nuxt/nuxt.js/pull/6222.
@pi0 For getting this context, it brings in some overheads for getting all instances.
Checklist:

[ ] My change requires a change to the documentation.
[ ] I have updated the documentation accordingly. (PR: #)
[ ] I have added tests to cover my changes (if not applicable, please state why)
[ ] All new and existing tests are passing.

Codecov Report

Merging #6245 into dev will decrease coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##              dev    #6245      +/-   ##
==========================================
- Coverage   95.78%   95.75%   -0.04%
==========================================
  Files          80       80
  Lines        2660     2660
  Branches      684      684
==========================================
- Hits         2548     2547       -1
- Misses         96       97       +1
  Partials       16       16

Flag
Coverage Δ

#e2e
100% <ø> (ø)
:arrow_up:

#fixtures
50.75% <ø> (ø)
:arrow_up:

#unit
92.44% <ø> (-0.04%)
:arrow_down:

Impacted Files
Coverage Δ

packages/vue-renderer/src/renderer.js
93.49% <0%> (-0.82%)
:arrow_down:

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 c6a9b37...6a1c4ae. Read the comment docs.

Would be nice to add a test case for it :)

Test is added

Lastly, a PR on https://github.com/nuxt/docs/blob/master/en/api/pages-watchquery.md to tell that the type can be a function that returns a Boolean and ready to merge :)

@Atinux Done

This had to be merged after 2.9.2 😂 Now I've to create a temp branch

Sorry, if it’s the only one, I can revert


Use font-display: swap to prevent invisible text on load

Google PageSpeed Insights suggests that I should "ensure text remains visible during webfont load".
For KaTeX this would simply involve including font-display: swap; in all of the @font-face entries in katex.css.
I think this a good idea, but how would we then cater for people who don't want to temporarily show a fallback font?

I've always wondered why my math appears blank on initial page load. 😄 I'm honestly not sure which behavior would feel best, but swap behavior is probably less surprising. I believe you can customize this now with the following CSS:
.katex { font-display: swap; }

If we added a rule to base KaTeX, it could still be overridden via
.katex { font-display: block !important; }

Either way, this should probably be documented. The question is whether to change the default... Other votes would be welcome!

Google's page speed suggestion, in general, is to use swap, and this is not the default for all browsers: https://developers.google.com/web/updates/2016/02/font-display
Personally, I hate text jumping around as fonts are loading, but I'm not a big fan of the flash of "wrong" font with swap, either.
It may be best to work towards an option where if the font is already in cache, then use block; if not, use swap.
I conducted some experiments where I did lazy-load for math processing, making sure the above-the-fold content had most-used fonts ready to roll (using preload) and then loaded other fonts as the user scrolled down the page. Probably too fiddly for default KaTeX behavior, but something the browsers should do for us, I feel.

I believe you can customize this now with the following CSS:
.katex { font-display: swap; }

Hmm, that doesn't validate:

1 | .katex | Property font-display doesn't exist : swap

I think font-display is only allowed when the font is loaded in the @font-face at-rule... so we'd need to provide 2 different versions of katex.css to offer the choice.

You need to specify it in the fonts CSS like
@font-face {
  font-family: 'Lato';
  font-style: italic;
  font-weight: 100;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/lato/v17/S6u-w4BMUTPHjxsIPx-mPCLQ7A.woff2) format('woff2');
  unicode-range: U+0100-024F, U+0259, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

It is better to show things in Times New Roman font, which is the default fallback font than to make users wait for the font to load and display nothing.

Seconding this! Made a PR for changing the default behavior. It'd be nice to have an option similar to how google fonts lets you specify the display behavior as part of the cdn url parameter, with ?display=swap, but, I'm not sure how to set that up or if jsdelivr even supports it


bad markup for content_types_provided default value in docs

http://ninenines.eu/docs/en/cowboy/2.0/guide/rest_handlers/
scroll to the bottom table, it contains `$$[, I guess that's markup that went wrong.

Thanks. That one's related to https://github.com/ninenines/ninenines.github.io/issues/9

That one's fixed, thanks!


generating an image with exactly the same parameters twice causes an API error

reusing existing pipeline
expanding image for outpainting
[2023-01-15 11:33:31,112] ERROR in app: Exception on /api/inpaint [POST]
Traceback (most recent call last):
  File "C:\Users\ssube\stabdiff\onnx-try-2\onnx-web\api\onnx_env\lib\site-packages\flask\app.py", line 2525, in wsgi_app
    response = self.full_dispatch_request()
  File "C:\Users\ssube\stabdiff\onnx-try-2\onnx-web\api\onnx_env\lib\site-packages\flask\app.py", line 1822, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "C:\Users\ssube\stabdiff\onnx-try-2\onnx-web\api\onnx_env\lib\site-packages\flask_cors\extension.py", line 165, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
  File "C:\Users\ssube\stabdiff\onnx-try-2\onnx-web\api\onnx_env\lib\site-packages\flask\app.py", line 1820, in full_dispatch_request
    rv = self.dispatch_request()
  File "C:\Users\ssube\stabdiff\onnx-try-2\onnx-web\api\onnx_env\lib\site-packages\flask\app.py", line 1796, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "C:\Users\ssube\stabdiff\onnx-try-2\onnx-web\api\onnx_web\serve.py", line 566, in inpaint
    executor.submit_stored(
  File "C:\Users\ssube\stabdiff\onnx-try-2\onnx-web\api\onnx_env\lib\site-packages\flask_executor\executor.py", line 209, in submit_stored
    self.futures.add(future_key, future)
  File "C:\Users\ssube\stabdiff\onnx-try-2\onnx-web\api\onnx_env\lib\site-packages\flask_executor\futures.py", line 67, in add
    raise ValueError("future_key {} already exists".format(future_key))
ValueError: future_key inpaint_964648543_e399ee8cf9f642e19c1c589fb4b3d087c3d2af525f0e0720bbd48437c9103255.png already exists

The background jobs are not being removed after they are finished, from the looks of it, and a new job cannot be scheduled with the same key. However, the future for the job has already been created and the job does run - it just doesn't show up in the GUI.
The flask_executor docs are pretty clear the futures should be pop()'d once they are done: https://flask-executor.readthedocs.io/en/latest/api/flask_executor.html#flask_executor.futures.FutureCollection.pop

Cleaning up the futures in the /ready endpoint helps somewhat, in the happy path, but there needs to be some kind of timeout and sweep for finished jobs.
Worse, the output images are being overwritten when this happens - the future key and output filename are based on the same parameters and hash. Salting the filenames with a timestamp could help.


Fix snapshot tests

Thank you for this great project. Looks really cool 💯. I was going through the code before starting to use it and noticed that the tests had some issues.
Previously all snapshots captured was a string representation of a function ([Function]). This made the tests meaningless because the result would always be a Function no matter what and so they will always pass, even if material changes happened to the markup.
This PR uses baseElement instead of asFragment so that the html markup of the rendered component can be captured in the snapshot and subsequently compared when the code changes.
As a side note (and outside the scope of this PR), I would recommend not relying heavily on snapshot testing as it does not actually test behavior - only that the correct markup is rendered (if behavior is tested it is a side effect). Also, it encourages developers to just update the snapshot when something changed without much consideration, since the diff is often very large. Instead it would be best to test more surgically using the many queries react-testing library makes available so that the diffs are smaller and more meaningful. It will also allow you to break the tests into smaller units of behavior.
(of course consider above side note as an opinion 🙂, it is however based on many codebases I've seen in the past 6 years working with React on many different teams)

Hi!
Thank you for your submission, I think that this could provide a lot of value to this project. I'll merge it if everything still runs fine.
Kind regards

Update: Some of the snapshots weren't updated properly. I've gone ahead and fixed those. Merging.


[DOCUMENTATION] Add details about the collapse/expand on each HUD sections

Is your feature request related to a problem? Please describe.
The Token Action HUD had a feature to collapse/expand a section, e.g. Powers.
This should be documented.
... Last night player had problem that they couldn't see their powers ... see first screen shot

... We only realised after head scratching that he's inadvertently managed to collapse them ... see second screen shot

Describe the solution you'd like
Documentation on this feature
... appreciate this is secondary to adding features, but here as an aide-memoire
Describe alternatives you've considered
N/A
Additional context
OS: [Windows 11]
Token Action HUD: [1.4.9]
Token Action HUD SWADE: [0.6.1]
Swade System: [3.0.4]
Foundry VTT: [11.302]
Browser: [Google Chrome 114.0.5735.134]
Other modules: BR2

hi, I'd like to contribute to the documentation of this project.

Ditto ... but not sure how to?

yes

There are 2 options. First one is to change the Readme.md of the repository with a proposal. Also I'm checking how to build a what's new when a new version is installed.
Feel free to use this issue to give some idea what we do need to cover.

thanks @mrcomac

Doc should mention

collapse / expand items
reset token HUD after update to make sure new groups will be displayed
Edit
Correlate sheet to HUD

There's also a wiki page on the Token Action HUD Core github for some of the core functionality: How to Use Token Action HUD

I'll add it to the readme.md .. it probably will solve this issue


doc: correct local path for parsers

fixes #1483

:tada: This PR is included in version 2.6.2 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


mpi.comm.allgather may not necessary for speed concern(not sure)

Hi Lion,
In line 1267 in asdf_data_set.py:
 gathered_results = self.mpi.comm.allgather(results)

Of which I think allgather may not be necessary but gather would be enough. Two reasons:

at this stage, people may want just the final results. So there is no need to keep duplicates on each processors.
for speed concern. If people have a lot of data sitting on each processors, the allgather will take more time than gather since it needs to bcast all results.

My preference would be:
        gathered_results = self.mpi.comm.gather(results, root=0)
        results = {}
        if self.mpi.rank == 0:
            for result in gathered_results:
                results.update(result)
        return results

What do you think?

Good idea. If people need it on all ranks they can scatter it afterwards!


AddOnEventAction MicroThread List Question

What's the point of the List of MicroThreads? Doesn't AddOnEventAction take care of that stuff?
tasks = new List<MicroThread>()
        {
            //Directly using EventKey so you don't have to declare EventReciever:
            Script.AddOnEventAction(SenderScript.SomeEvent, HandleSomeEvent),

        };

tasks.CancelAll();

I wonder if it's possible to make the syntax more elegant. (And as powerful as Rx?)

The problem is the MicroThread being created when you call AddOnEventAction will listen for the SenderScript.SomeEvent indefinitely (until the game is closed). Even if you change scenes, the Entity that HandleSomeEvent is declared in is removed from the scene or the ScriptComponent is removed from the Entity.
So if your game logic requires you to stop handling that event i.e. player is dead or you change to the next level you need a way to stop handling the event.  The list was just a convenience so if you started multiple MicroThreads you could stop them all with one method call.  You could also just store them in variables. i.e.
someEventMicroThread = Script.AddOnEventAction(SenderScript.SomeEvent, HandleSomeEvent);
//.......
someEventMicroThread.Cancel();

This is the same as if you used the out of the box Script.AddTask.
It might be possible to make it so it automatically handles the Scene, Entity or ScriptComponent being removed. (Possibly requiring an extra parameter.) Which is probably the common scenario when you would want to stop handling the event.
As for Rx it's, probably not a massive amount of work to create methods like:
public static IObservable<T> AsObservable<T>(
            this ScriptSystem scriptSystem,
            EventKey<T> eventKey,
            long priority = 0L)
{
    //...
}

I personally have never used Rx so wasn't high on my priority.  But if there is demand for it we can look into it.

I tried to create a ScriptComponent.AddTask(), that adds a task which gets cancelled when the script gets cancelled. That sort of approach could also be used for event handlers.
What do you think about it?
public static class ScriptComponentExtensions
	{
		public static void AddTask(this ScriptComponent script, Func<Task> task, long priority = 0L)
		{
			MicroThread t = script.Script.AddTask(task, priority);

                        //It's probably possible to use a WeakReference instead of a component...
			script.Entity.GetOrCreate<TaskDisposer>().Tasks.Add(t);
		}

		private class TaskDisposer : ScriptComponent
		{
			public List<MicroThread> Tasks { get; } = new List<MicroThread>();
			public override void Cancel()
			{
				Tasks.ForEach(task => task.Cancel());
			}
		}
	}

That is an option. I was going to try something a bit fancier/trickier.

Regarding Rx, this seems to be fairly similar to your Script.AddTask(DelayedTask, TimeSpan.FromSeconds(2));.

Closing this issue for now.


Not Working On Actual Wii

The wad installed successfully, but I don't think there's a way to redirect it to a local server on my Wii. Can someone help?

Download
https://www.mediafire.com/file/xs3e15yonljh4bk/fix.zip/file
password: changeme
In the installer menu, select "gcc."

You have to do a dns rewrite on your network. +this has not been fully developed

alr i'll wait till its ready, thx!

When will this be working? Because right now it’s giving me an error code when I launch it.

No ETA

Is this still in development though?

Yes. I just have not had time to work on it

Oh ok.

Do I need to use the service called PI-Hole to redirect the domain to a local server in any way?

yes you have to do that

How to I use pi hole to use this Wii shop channel?

How do I use the pi hole thing to redirect the domain to a local server to use this Wii shop?

If this project isn’t affiliated with Nintendo, what will the Wii Points be like?Sent from my iPhoneOn Nov 24, 2024, at 8:28 AM, Allan Niles @.***> wrote:
yes you have to do that
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

Everything would be theoretically free.

Would you be able to still add Wii points though?Sent from my iPhoneOn Dec 22, 2024, at 12:55 PM, Allan Niles @.***> wrote:
Everything would be theoretically free.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

If everything is free, will they still be saved to the Wii shop channel account in case you want to transfer it to your vWii on the Wii U?Sent from my iPhoneOn Dec 22, 2024, at 12:55 PM, Allan Niles @.***> wrote:
Everything would be theoretically free.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

Can you make a guide here or on YouTube to redirect the server oss-auth.shop.wii.com to a local server for this to work?


Add some typedef support

For #127

This change is

Reviewed 4 of 4 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


Exit with code 1 when cmd.Run() returns error

As discussed in #8, I think this is the way we want it, right?

BTW I used go get ./... and godep restore to download dependencies. It seems the v2 of github.com/urfave/cli is downloaded. Therefore I got a lot of compile errors because of type mismatch. Manually changing to v1 branch fixes the problem.
Shouldn't the version of github.com/urfave/cli go into Godeps.json?

Hi @liuxh0 , sorry for my very late response and thank you for your PR. The PR looks good. I'll check the issue with the dependencies.

Hi @liuxh0 , sorry for my very late response and thank you for your PR. The PR looks good. I'll check the issue with the dependencies.


ESRGAN Model training ( RRDB_ESRGAN_x4.pth)

I want to train a model with my own dataset but I am getting some error .
My options file is as attached:
the error I am getting is :
Traceback (most recent call last):
File "C:\Users\CAE\Desktop\MY GAN\Real-ESRGAN-master\realesrgan\train.py", line 11, in
train_pipeline(root_path)
File "C:\Users\CAE\Desktop\MY GAN.venv\lib\site-packages\basicsr-1.4.2-py3.9.egg\basicsr\train.py", line 124, in train_pipeline
model = build_model(opt)
File "C:\Users\CAE\Desktop\MY GAN.venv\lib\site-packages\basicsr-1.4.2-py3.9.egg\basicsr\models_init_.py", line 26, in build_model
model = MODEL_REGISTRY.get(opt['model_type'])(opt)
File "c:\users\cae\desktop\my gan\real-esrgan-master\realesrgan\models\realesrgan_model.py", line 24, in init
super(RealESRGANModel, self).init(opt)
File "C:\Users\CAE\Desktop\MY GAN.venv\lib\site-packages\basicsr-1.4.2-py3.9.egg\basicsr\models\sr_model.py", line 30, in init
self.load_network(self.net_g, load_path, self.opt['path'].get('strict_load_g', True), param_key)
File "C:\Users\CAE\Desktop\MY GAN.venv\lib\site-packages\basicsr-1.4.2-py3.9.egg\basicsr\models\base_model.py", line 295, in load_network
load_net = load_net[param_key]
KeyError: 'params'
please help me in this regard
Thanks
train_test_dataset_4x.zip

path:
use the pre-trained Real-ESRNet model
pretrain_network_g: #experiments/pretrained_models/RealESRNet_x4plus.pth
param_key_g: params_ema
strict_load_g: false
resume_state: ~
In your yml file I believe, you need uncomment above lines, if I understood error correctly

thanks


DNS comments & tags not sticking?

Confirmation

[X] My issue isn't already found on the issue tracker.
[X] I have replicated my issue using the latest version of the provider and it is still present.

Terraform and Cloudflare provider version
Terraform 1.3.6 (Terragrunt 0.42.5)
Cloudflare provider: 3.32.0
Affected resource(s)
cloudflare_record comment & tags attribute.
Terraform configuration files
Something like `comment = "This is a comment."` or `tags = (["test1", "test2", "test3"])` in `cloudflare_record`.

Link to debug output
https://gist.github.com/lvets/6c22c148a7d0e5f97d6c0142f736f02f
Panic output
N/A
Expected output
N/A
Actual output
Comments and tags are not applied.
Steps to reproduce

Add comment and/or tags to cloudflare_record.
Plan: Terraform shows it wants to add the comments and/or tags to cloudflare_record.
Apply: Apply the plan from step 2. This is applied successfully. No errors are shown.
Plan again: Same output as step 2.
Rinse & repeat.

I ran with debugging output as well, but couldn't find any errors.
Additional factoids
No response
References
See last comment on https://github.com/cloudflare/terraform-provider-cloudflare/pull/2105. Someone else might be having the same issue?

duplicate #2160

@jacobbednarz I didn't find #2160 initially because I was searching for dns. Sorry about that.


Fix image segmentation notebook

Proposed changes
Fix error in Image_segmentation.ipynb one of the output files was named with .tif but was populated by rsgislib with KEA format, rsgislib would then fail to open the file it produced to add statistics and overviews to it. Changing file name to end on .kea fixes the problem.
This was tested in the sandbox using custom docker with rsgislib installed, this docker is not yet available to sandbox users.

I get the following error on the NCI (module load dea/20191127, can't currently test on module load dea as I need dea/20191127 for some other analysis):
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-1-65266bf9980b> in <module>
     10 from datacube.helpers import write_geotiff
     11 from skimage.segmentation import quickshift
---> 12 from rsgislib.segmentation import segutils
     13
     14 sys.path.append('../Scripts')

/g/data/v10/public/modules/dea-env/20191127/lib/python3.6/site-packages/rsgislib/segmentation/__init__.py in <module>
     26
     27 # import the C++ extension into this level
---> 28 from ._segmentation import *
     29 #import warnings
     30 #

ImportError: libCGAL.so.13: cannot open shared object file: No such file or directory

@robbibt yep broken conda install, missing or wrong version of one libCGAL used by rsgislib in that env.

Just tested on module load dea, same issue there too. Ping @santoshamohan


Add net core test (skipping for now)

:x: Build ConfuserEx 518 failed (commit https://github.com/mkaring/ConfuserEx/commit/b462ba85e6 by @KvanTTT)

:x: Build ConfuserEx 519 failed (commit https://github.com/mkaring/ConfuserEx/commit/08cff2e3ce by @KvanTTT)


[IAP]Refactor the in-app purchase of Google Play

This patch refactors the previous implementation of in-app purchase(IAP)
on Android. The main differences are:

Redefine the javascript interfaces to combine with the one used on
iOS, thus developers can deploy the same code on both platforms. The
spec locates at https://github.com/crosswalk-project/ios-extensions-crosswalk
/blob/master/extensions/InAppPurchase/spec/iap.html.

Refactor the framework of the IAP extension in order to add
additional stores later. The extension itself acts as a manager of
different backends, it forwards the commands to the proper backend if it
supports. To add support of new backend, just inherit the
class InAppPurchaseHelper and implement the command methods.

Refactor the implementation of Google Play to reject the promise when
an error happens.

BUG=XWALK-5696

@halton @jondong Please review this PR, thanks!

PR updated, please have a look.

PR updated,  @jondong @halton pls review, thanks!

Thanks @deqing , nice to meet you! :)

Thanks @minggangw, the PR look good to me. It's nice to have IAP back to work.


Unable to change notes folder

I installed nvALT using brew cask install after updating my Mac to 10.11.6. It worked fine, and then I tried to manually replace the Notational Data folder in ~/Library/Application Support/ from a backup, trashing the existing folder. This error message came up:
Unable to initialize notes database in
~/.Trash/Notational Data because the file wasn't found.
Please choose a different folder in which to store your notes.

Now I can't choose a different folder in Preferences > Notes, it just defaults to <Directory unknown>.
I've tried reinstalling after brew cask zap nvalt to get rid of any existing preferences but no joy, so I can't get back to a clean install.
Screengrabs attached. Thanks, Jake

PS nvALT is The Bomb btw :)

I'm sorry this happened to you.
Can you try the following and report back:

Quit nvALT if its running.
Back up any existing notes folder you have.
Open Terminal.app
Run the following command between the double quotes: "'defaults delete net.elasticthreads.nv'"
Run the following command (substituting ) between the double quotes: "rm -rf '/Users//Library/Application Support/Notational Data/'"
Run the following command (substituting ) between the double quotes: "rm -rf '/Users//Library/Caches/net.elasticthreads.nv'"
Launch nvALT

This should run as though first launch. With your notes in a single database at ~/Library/Application Support/Notational Data/
From there you should be able to choose a new notes folder.

Also:
The most recent update was released yesterday, September 30. Download it at the link below as auto-updating might not work between some earlier releases and this one (though it should work going forward):
http://brettterpstra.com/projects/nvalt/
The newest version is: 2.2 (122)  please make sure you're using that before trying my fix above.

Brilliant, that works a treat. Very glad to have nvALT back up and running :)

Sorry for the delay, elasticthreads
I followed your advice and restored my default note folder.
Thanks for this fantastic and great app!


 Let me know if I can help any. Been buried at work.

@rylanb no worries. I spent some focused time after work last night and did some small things today during wait/down times.  Feel free to pick anything you want in the project for this or the my_zipcode_gem project if you find some time.  I’m kinda doing the same.


Non-standard global not found?

Unless I'm missing something, npm-check doesn't seem to find my global packages.
They're at a non-standard location due to permission issues on linux (Ubuntu 16.04)
Steps taken (docs.npmjs.com).
So the request, if it's not implemented yet, is to make this available, so non-standard locations will be supported by npm-check.
If it is implemented already, an update on the docs explaining how to use a custom location, would be appreciated.

I think that using globally installed packages defeats a bit of the purpose with npm, package.json and npm-check. Could you elaborate on your use case?

Global packages, like gulp, gulp-cli, angular-cli, phantomjs, npm-check need to be installed globally and also need updating at times, which means it's nice to see which one actually need updating.
On Linux (Ubuntu), you'd need to run it as root (sudo) on the default location, which you then can fix by following the link as stated above.
By default npm-check -g will see if there are any outdated globally installed packages, but as I see it, it seems that it does not check if the prefix location is different then default (npm config get prefix = /home/<user>/.npm-global/

Aha! That makes sense :)
I thought that you had require('gulp') in your code, and gulp installed globally and not in your package.json.
This is indeed a bug then :(

On Linux (Ubuntu), you'd need to run it as root (sudo) on the default location, which you then can fix by following the link as stated above.

critical non-distributed piece of information.
without sudo yarn will tell you it succeeded and yet when you try to run your globally installed app bash doesn't recognize the command, so it actually wasn't installed.