Add time.monotonic

Added time.monotonic as suggested in #699 - it is a trivial one-line implementation based on performance.now.
The docstring is a simplified version of the official Python documentation.

P.S. My apologies for remaking #765 - I wanted to be proactively helpful and update this to fix the spurious merge conflict that got introduced by other changes at. But since I had deleted the fork from my account (I don't like having forks sitting around on my GitHub), recreating the pull request seemed to be the only way for me to do so.
But to be clear, I still really don't want forks sitting around on my GitHub account, and after not getting any response on this trivial PR for seven months, I'm not feeling very optimistic or patient about it being worth it to do so, so we're now in the same state: the fork is already gone from my account and thus I can't update this PR.
The difference this time is that I won't be recreating a third time, unless I get some explicit signal that the help is actually wanted.

Every once in a while I think "maybe it is worth it to have one or more tests for this", but what, exactly, would such tests be proving?
We don't want to be testing the behavior of performance.now() itself, because if there's a bug in that, that's not Transcrypt's problem - whoever implemented performance.now needs to be testing that.
I presume we don't want Transcrypt to be in the business of implementing backwards-compatible polyfils for performance.now which try to degrade while at least maintaining monotonicity on browsers that don't have it, or workarounds for buggy implementations of performance.now if there is any browser that requires that, and I don't know of any changes in browser APIs on the horizon which might make us use a more complex implementation.
I also don't think Transcrypt wants to be in the business of supporting old browsers which don't have performance.now at all. But even if we do, this implementation doesn't even prevent importing the time module on such browsers - it's just that if you call time.monotonic() you'll get the same exception as you would if you tried calling performance.now().
So what exactly is the testable surface area? That we didn't make a typo? That someone didn't accidentally delete or add a 0 in the / 1000? That sounds silly, but I do see the value of that - it's a good safety railing to have against accidents. So we could do a one-liner test
verifying that time.monotonic returns a number, and if that number seem to be approximately the output of performance.now() / 1000:
int(time.monotonic()) <= int(performance.now() / 1000)

I didn't initially put that in because it seems like it's almost redundant, and it takes me more work to verify that the test is appropriately scoped and correct than to just verify the code itself (much more work, if you have the attention to detail to notice that the above test is only going to be guaranteed correct if the left side of <= is guaranteed to be evaluated before the right side, and the standard of care to go look up the relevant ECMAScript standard to verify if that actually is guaranteed).
But I will gladly go ahead and add So if I get an explicit statement that this is wanted. And I'm open to other suggestions about what's worth testing. Maybe I'm missing something  in my above reasoning.
That's why my initial description of #765 that I wrote back in December 2020 said

Please advise if you want any tests for it!

and it takes more work to verify that the test is appropriately scoped and correct than to just verify the code itself

Case in point:
I don't remember if <= is guaranteed in JavaScript to evaluate the left operand before the right operand.
Knowing me, I probably checked that when I first wrote that example test line. But right now I don't remember. And if it's not guaranteed, then that test is just wrong/unreliable/nondeterministic.
In the amount of time it even took me to remember this possibility, I can validate that this time.performance is still implemented correctly. In the amount of time it would take me to describe it, or in the amount of time it would take me to look up relevant ordering guarantees in JavaScript, I could do that several times over.

Accepted but unable to auto-merge, so merged manually.

Glad to see this finally make it in! Thank you!


Tab Incorrect Behaviour

Open a native select from http://jsfiddle.net/me3bo81p/,
Press Tab.

The select closes but still has focus. The next Tab move focus to the next element.
However, for select2 the first tab moves the focus to the next element, which I believe is wrong.
Could this be fixed?

@kevin-brown I think this is fixed?

Yup, looks like it.
Select2 now matches what Webkit does by default (just close the dropdown if it's open).


No html file generated by PotreeConverter

Hi there,
I am trying to get my point clouds (.las) visualized in Chrome, but when I exactly follow the instructions on Getting Started to generate a html of the point cloud, no html is generated by PotreeConverter, only many binary files. Is there a way to solve this?

I've found the answer, it is needed to put the potree source as an output folder.


Add command to get current environment name

When scripting it would be helpful to be able to get the current environment name without have to dig into the config.json file.
Something like az account show

We already have azd show for use by tooling - maybe we can just add this to that.

Is this not handled by azd env list which updates as you set the use select the environment?

I wanted to get the name programmatically. With az cli I can use --query to get just the name, with azd I have to manually parse the results.  Maybe the answer is to support --query and return json.

Ah I see - that make sense. Thanks for clarifying.


Stochsystem overhaul

Work on #75, #42 and #22

I've taken a quick look at this and have three comments:

CoupledSDEs now has one parameter field p for both functions f and g, but I still think there should be a constructor function that lets you pass individual parameter fields pf and pg as input arguments (because otherwise it will be difficult to combine existing CoupledODEs drift functions with different noise functions).
We should also import the step! and set_state! functions used in DynamicalSystemsBase and then rewrite the callbacks in e.g. transition in terms of these functions. This seems to be faster than callbacks.
It makes sense to me that in DynamicalSystemsBase the function should be called CoupledSDEs to match the nomenclature of CoupledODEs, but our package focuses more on noise- and rate-induced transitions, so should we still keep an alias like StochSystem or StochasticSystem?

We should also import the step! and set_state! functions used in DynamicalSystemsBase and then rewrite the callbacks in e.g. transition in terms of these functions. This seems to be faster than callbacks.

The documentation of DynamicalSystems.jl says that recommend using ODEProblem when using callbacks.

We should only merge once the CI, Dowgrade and docs are working. Will take a look tonight :)

The transition function throws an error in the tests:

ERROR: cannot assign a value to imported variable CriticalTransitions.trajectory from module Main

Can check later what the issue is. Also, trajectory seems to be a lot slower than simulate. Do you know why @oameye ?

We need to update the docs.

dev, examples and ext have still to be updated

[ ] check how DynamicalSystems of the state and parameters and it similarly
[ ] Get docs up to date with this branch
[ ]  Make extention out of baisins
[ ] Make helpful constructors for CoupledSDEs
[ ] Normalise g function in CoupledSDEs and noise strength field
[ ]

DynamicalSystems allows the parameters to be of the type that the ODEProblem allows.

We will have to add the covariance matrix and noise strength to the CoupledSDEs struct. There is no way to construct these quantities from the SDEIntegrator

https://github.com/SciML/DiffEqNoiseProcess.jl/issues/202

[ ] add documentation about S in CoupledSDEs{IIP,..., S}
[ ] switch p and noise strength in creation of CoupledSDEs


Update composer.json

Fixes #6.

hey @Wulfheart Thanks for the PR and again sorry for my mistake.


Unicode escapes in regex patterns are marked invalid as of Ajv v7

What version of Ajv are you using? Does the issue happen if you use the latest version?
v7.0.3, yes.
Ajv options object

All options are default, ajv-formats added the the avj instance.
JSON Schema
{
  "$id": "http://example.com/util/myschema.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Example",
  "type": "string",
  "pattern": "\\x{00a1}"
}

Sample data
Not relevant.
Your code
Tested with ts-node, I am simply reproducing in the shell.
import Ajv from 'ajv'

const schema = {
  "$id": "http://example.com/util/myschema.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Example",
  "type": "string",
  "pattern": "\\x{00a1}"
}

const ajv = new Ajv()
ajv.compile(schema)

Validation result, data AFTER validation, error messages

Uncaught SyntaxError: Invalid regular expression: /\x{00a1}/: Invalid escape

What results did you expect?
No compilation error, this works with v6 of ajv and new RegExp("\\x{00a1}") works without issues.
Are you going to resolve the issue?
No

I need to check the details but I think it’s likely to be an expected change (that needs to be added to release notes) - from v7 the patterns are treated as having “u” flag - it’s how it is required by the spec.
So the pattern in your schema is equivalent to new RegExp("\\x{00a1}", "u") that might be not valid - need to check it.

I need to check the details but I think it’s likely to be an expected change (that needs to be added to release notes) - from v7 the patterns are treated as having “u” flag - it’s how it is required by the spec.
So the pattern in your schema is equivalent to new RegExp("\\x{00a1}", "u") that might be not valid - need to check it.

new RegExp("\x{00a1}", "u")

Uncaught SyntaxError: Invalid regular expression: /\x{00a1}/: Invalid escape
As I thought, this regular expression is invalid when used with "u" flag - please check the docs on MDN how to change it.

new RegExp("\x{00a1}", "u")

Uncaught SyntaxError: Invalid regular expression: /\x{00a1}/: Invalid escape
As I thought, this regular expression is invalid when used with "u" flag - please check the docs on MDN how to change it.

@epoberezkin I bumped into a similar issue today, related to the 'u' flag.
This flag is not supported by any IE browser version.
Is it by design that AJV 7.x does not support IE?
Otherwise, is there a way we could make this flag optional, e.g. if es5 is enabled in AVJ options?
https://github.com/ajv-validator/ajv/blob/master/lib/vocabularies/code.ts#L98

Adding option to create regular expressions without u flag is ok - need to think what to name it.
It should be a separate issue - PR is welcome.

Cheers!
I opened a new ticket with more details:
https://github.com/ajv-validator/ajv/issues/1474


Material-UI Popover Bug?

I have a test that includes the following selector and action:
let popover = ReactSelector('PopoverAnimationDefault').find('div').withText('CLICK ME')
await t.click(popover)

When the popover is displayed on-screen, I get the following error in testcafe:

Which seems to point to the following piece of code in material-ui/Popover/Popover.js:
    _this.setPlacement = function (scrolling) {
      if (!_this.state.open) {
        return;
      }

      if (!_this.popoverRefs.layer.getLayer()) {
        return;
      }

Which makes it seem like _this.popoverRefs.layer is undefined?
The site itself works fine and there are no errors related to this popover outside of using testcafe. The rest of the stacktrace when the popover comes up is extremely unhelpful, pointing at comments and even whitespace.
Any thoughts?

operating system: macOS Sierra
testcafe version: 0.18.5
node.js version: 8.9.1

Hi @eliw00d
I've created a simple test for Material-UI Popover.
import ReactSelector from 'testcafe-react-selectors';

fixture `Material UI Popover`
    .page('http://www.material-ui.com/#/components/popover');

test('test', async t => {
    const clickMeLinks      = ReactSelector('RouterContext').find('span').withText('CLICK ME');
    const clickMeLinksCount = await clickMeLinks.count;

    for (let i = 0; i < clickMeLinksCount; i++)
        await t.click(clickMeLinks.nth(i));
});

and it works good.
It's a difficult to locate a problem without example.
Could you, please, provide an example on which this issue is reproduced?

We are trying to isolate the issue to a specific set of code, but it is proving to be extremely difficult.
The scenario is a Dialog that leads to another Dialog with an AutoComplete. When the test reaches the point where it types into the AutoComplete and the Popover shows up it crashes and burns with the above error.
However, if we open the second Dialog directly and type into the AutoComplete, the test works.
I am not really sure what the issue is, as these errors do not show up in our deployed site, only when we've been trying to implement TestCafe.

Ok. I get it. I will try to reproduce the problem myself.
Could you please provide:

material-ui module version
markup and code for the Dialog that leads to another Dialog with an AutoComplete

We are using:
"material-ui": "0.19.4"

However, I think I may have figured it out. We are using a "fix" for a MUI bug that dispatches a new window event for resizing. It looks like this:
    componentDidUpdate() {
        this.resizeFix()
    }

    resizeFix() {
        setTimeout(() => {
            window.dispatchEvent(new Event('resize'))
        })
    }

If I remove the calling line the test passes.

Some more details:
Uncaught TypeError: Cannot read property 'getLayer' of null
    at Popover._this.setPlacement (bundle.js:50350)
    at invokeFunc (bundle.js:18647)
    at leadingEdge (bundle.js:18657)
    at debounced (bundle.js:18722)
    at hammerhead.js:formatted:4201
    at dispatchEvent (hammerhead.js:formatted:3990)
    at bundle.js:123994

Where hammerhead.js:formatted:3990 is                                                       , t = e ? S["default"].windowDispatchEvent.apply(this, arguments) : S["default"].dispatchEvent.apply(this, arguments);
and bundle.js:123994 is window.dispatchEvent(new Event('resize'));

I've created an example based on the create-react-app template and Material UI Demos.
You can find it here.
I was trying to reproduce the issue. But unfortunately, I did not succeed.
Could you please try to modify my example and reproduce the problem?
Also I need some additional information from you: please, tell the version of the browser you are using.

I will give it a shot.
Google Chrome
Version 63.0.3239.90 (Official Build) beta (64-bit)

I forgot to update this, but switching to Material UI 1.0.0 solved this problem.


Using vscode.Pseudoterminal for executing commands

Version: 1.46.1
Commit: cd9ea6488829f560dc949a8b2fb789f3cdc05f5d
Date: 2020-06-17T21:17:14.222Z
Electron: 7.3.1
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.5.0```

Pseudoterminal doesn't provide any mechanism to issue commands to the underlying shell like vscode.terminal does with sendText. For example.
class CustomBuildTaskTerminal implements vscode.Pseudoterminal {
	private writeEmitter = new vscode.EventEmitter<string>();
        open() {
             // I need API's to execute commands on this Pseudoterminal
             // make some user interacitions
            // again run commands

        }

I do not have the liberty to use this
const pty = new CustomBuildTaskTerminal()
const term = vscode.window.createTerminal("Some Name", pty)

Because in the CustomExecution in the TaskProvider, you can only provide vscode.Pseudoterminal instance.
With the following code I can send text to the pseudo terminal
this.writeEmitter.fire("any text")

But I want to send to the shell instead of just displaying it on the terminal.
Hope you get my problem, else please ask for more clarification.

You can just call into your Pseudoterminal.handleInput. The extension is "the shell" so you can send text to it whenever you want.


transitions with condition?

is any way to create transition with condition?

Sorry for the long lag time on responding to this. What do you mean?

Closing just because I'm not sure what the issue is, in case there is no response.  Please feel free to reopen!

I'm using https://github.com/tyarkoni/transitions#conditional-transitions for now and I use conditional-transitions a lot. Is there are a way to use condition with automat?

Formally speaking, it looks like "transitions" (and in particular conditional transitions in that library) implement an NFA rather than a DFA.  Personally I think that DFAs are a lot easier to reason about, and, although automat doesn't yet really take advantage of them, DFAs have various additional formal properties you can use to make guarantees about a particular FSM.  Also, nondeterminism in NFAs is often used to implement things that are better and more clearly represented as additional states in the DFA.  For example, in the example in the docs for conditions, I think it would be a lot better to represent "matter" as a state machine of its own; in fact the property of matter in question is called its "state" and the change between them is called a transition so it would make a lot of sense to model it that way in your state machine as well.
All that said, NFAs do have their uses, so I'm not saying we should never implement them, simply that I want to be careful about adding this feature and I'd like to figure out a way to do it that gently encourages developers to use DFAs whenever possible.  So I'm curious about your use-cases: what are you doing with conditions that is hard to model as a state machine?  How would you like to see it implemented in automat?

I'm chiming in merely as an interested user of automat.
I don't think "transitions"' conditions (say that 3 times fast) implement an NFA.  An NFA can be in more than one state after a given input or even no inputs (so-called "free moves" or ε-transitions, where ε means "empty input".) The example transition from the link describes a transition from solid on heat  to gas when is_flammable() returns True; and when is_flammable() returns False but is_really_hot() returns True, the transition is on heat from solid to liquid.  As a diagram:

                                            +-----+
                                       True/| gas |
                                          / +-----+
      +-------+   heat   +--------------+/                      +--------+
      | solid |----------| is_flammable |                  True/| liquid |
      +-------+          +--------------+\                    / +--------+
                                          \                  /
                                      False\+---------------+
                                            | is_really_hot |
                                            +---------------+
                                                             \
                                                              \
                                                          False\+-----+
                                                                | ... |
                                                                +-----+

(The source seems to support this interpretation.)
No input in our alphabet puts the machine into both solid and liquid states, nor does any state transition occur without an input.  So, not an NFA.
We could turn it into an NFA, but I find it hard to think about what that would mean without also requiring accept states. That's because I only know that an NFA has "guessed" correctly if the set of states it's in intersects with its set of accept states.
I agree that adding a state usually solves the use case for conditions.  Indeed, minimizing if statements has been my goal while working with automat.  I also find that automat's plain old Python object approach enables some remarkable flexibility.
To demonstrate, here's an automat approach to the linked-to transitions:
from automat import MethodicalMachine

class Matter(object):
    '''
    Everything is matter in our world, and all such matter can be
    heated.
    '''
    CHANGE_TEMPERATURE = 0

    def heat(self, temperature):
        if temperature >= self.CHANGE_TEMPERATURE:
            return self.sufficientHeat(temperature)
        else:
            return self.insufficientHeat(temperature)

class FlammableMatter(Matter):
    '''
    Some matter can be turned into a gas.
    '''
    _machine = MethodicalMachine()
    CHANGE_TEMPERATURE = 100.0

    @_machine.state(initial=True)
    def solid(self):
        pass

    @_machine.state()
    def gas(self):
        pass

    @_machine.input()
    def sufficientHeat(self, temperature):
        pass

    @_machine.input()
    def insufficientHeat(self, temperature):
        pass

    @_machine.output()
    def rarified(self, temperature):
        return True

    @_machine.output()
    def noChange(self, temperature):
        return False

    solid.upon(sufficientHeat, enter=gas, outputs=[rarified], collector=next)
    solid.upon(insufficientHeat, enter=solid, outputs=[noChange], collector=next)

class MeltableMatter(Matter):
    '''
    Some matter can be melted.
    '''
    _machine = MethodicalMachine()
    CHANGE_TEMPERATURE = 74.0

    @_machine.state(initial=True)
    def solid(self):
        pass

    @_machine.state()
    def liquid(self):
        pass

    @_machine.input()
    def sufficientHeat(self, temperature):
        pass

    @_machine.input()
    def insufficientHeat(self, temperature):
        pass

    @_machine.output()
    def liquified(self, temperature):
        return True

    @_machine.output()
    def noChange(self, temperature):
        return False

    solid.upon(sufficientHeat, enter=liquid, outputs=[liquified],
               collector=next)
    solid.upon(insufficientHeat, enter=solid, outputs=[noChange],
               collector=next)

Notes:

We have a common base class.  I'm not the biggest fan of inheritance, but we can leverage it here because automat machines decorate plain old Python objects.
That base class implements a heat method that checks the condition and calls.  While it may seem bad that the condition occurs outside our automat apparatus, I think that's a good thing.  The machine does not assume anything about how it's used or called; rather, it ensures that it's been used or called correctly, raising an exception if not.  Invalid or unexpected behaviors are either impossible or mechanical to correct.  Supposing we've laid these machines out correctly, the only problem that heat can have is that it's not checking the temperature correctly.  We can trust that invariants we care about are maintained by virtue of state accessibility or inaccessibility.

As it's written, the automata's invariants are:

that insufficient heat does not change an automaton's state, and sufficient heat does.
that sufficient heat does change an automaton's state, permanently, and subsequent heating is impossible.

A consequence of this is that we can continue to heat up a Matter automaton until its state has changed.  After that, more heat is a problem:
>>> f = FlammableMatter()
>>> f.heat(98)
False
>>> f.heat(99)
False
>>> f.heat(100)
True
>>> f.heat(101)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "auto.py", line 9, in heat
    return self.sufficientHeat(temperature)
  File "/home/mrw/.virtualenvs/3b48cc9341edd108/local/lib/python2.7/site-packages/automat/_methodical.py", line 93, in sufficientHeat
    collector = self.collectors[transitioner._state]
KeyError: <MethodicalState(machine=<automat._methodical.MethodicalMachine object at 0x7f2599fe8790>, method=<function gas at 0x7f259885c758>, serialized=None)>
>>> m = MeltableMatter()
>>> m.heat(70)
False
>>> m.heat(71)
False
>>> m.heat(74)
True
>>> m.heat(74)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "auto.py", line 9, in heat
    return self.sufficientHeat(temperature)
  File "/home/mrw/.virtualenvs/3b48cc9341edd108/local/lib/python2.7/site-packages/automat/_methodical.py", line 93, in sufficientHeat
    collector = self.collectors[transitioner._state]
KeyError: <MethodicalState(machine=<automat._methodical.MethodicalMachine object at 0x7f259885a610>, method=<function liquid at 0x7f259885ca28>, serialized=None)>

Maybe that's not what we want - maybe you only get one shot to heat up something that can melt.  Let's make that an invariant:
class MeltableMatter(Matter):
    '''
    Some matter can be melted.
    '''
    _machine = MethodicalMachine()
    CHANGE_TEMPERATURE = 74.0

    @_machine.state(initial=True)
    def solid(self):
        pass

    @_machine.state()
    def liquid(self):
        pass

    @_machine.state()
    def unheatableSolid(self):
        pass

    @_machine.input()
    def sufficientHeat(self, temperature):
        pass

    @_machine.input()
    def insufficientHeat(self, temperature):
        pass

    @_machine.output()
    def rarified(self, temperature):
        return True

    @_machine.output()
    def noChange(self, temperature):
        return False

    solid.upon(sufficientHeat, enter=liquid, outputs=[rarified],
               collector=next)
    solid.upon(insufficientHeat, enter=unheatableSolid, outputs=[noChange],
               collector=next)
    unheatableSolid.upon(sufficientHeat, enter=unheatableSolid, outputs=[noChange],
                         collector=next)
    unheatableSolid.upon(insufficientHeat, enter=unheatableSolid, outputs=[noChange],
                         collector=next)

And now you can only heat a solid once:
>>> doesNotMelt = MeltableMatter()
>>> doesNotMelt.heat(70)
False
>>> doesNotMelt.heat(100)
False
>>> melts = MeltableMatter()
>>> melts.heat(100)
True

Or can you?  There's still a transition that could be applied.  If it's obvious, then I've made a point with all these examples!
Regardless, I'm not convinced of the utility of NFA support.  If you do add it, @glyph, it would make the most sense to also add accept states.  But neither would help with conditions as "transitions" implements them.

@glyph my use case is vending-machine algorithm, where I need to count coins, and as I understand, DFAs are not capable of counting.
https://github.com/aborilov/kiosk/blob/master/kiosk/kiosk.py#L95
My state transition table not done yet, but already looks scary :)
I will happily use automat if I can.

While it may seem bad that the condition occurs outside our automat apparatus, I think that's a good thing. The machine does not assume anything about how it's used or called; rather, it ensures that it's been used or called correctly, raising an exception if not. Invalid or unexpected behaviors are either impossible or mechanical to correct. Supposing we've laid these machines out correctly, the only problem that heat can have is that it's not checking the temperature correctly. We can trust that invariants we care about are maintained by virtue of state accessibility or inaccessibility.

This is a perfect encapsulation of how I personally would use automat, and how I would implement conditions.  My previous comment was definitely wrong about NFA vs. DFA: what Automat really implements is a finite state transducer, specifically a Mealy machine.  Mealy machines have only inputs, outputs, and states; the transition function is a mapping of (input, state) to outputs.
In particular, the idiom would be to make certain inputs private methods, and then to make public methods which examine the relevant conditional state (counters, flags, etc) public methods which then call those private methods to provide the right input depending on state.
Grouping in additional logical constructs, like conditions, is open-ended.  If conditions why not loops?  If loops why not counters, comparisons, entry and exit functions, and so on?  Any extra stuff makes it harder to reason about the state machine in terms of its core properties of inputs, states, and outputs.  So I'm not totally opposed to adding more things, but there would have to be a clear motivation for a reason to do it within the state machine itself rather than inside application code.


[New game]: Kill the birds game

🎮 Game Request
Player has to kill the moving birds in a fixed time span
Point down the features
1)Engage in fast-paced bird shooting action.
2)Test your aiming and reflexes as you try to take down birds on the move.
3)Avoid shooting innocent creatures to maintain your score and protect wildlife.
4)Experience different game modes and challenges for varied gameplay
5)Earn high scores and compete with friends for the top spot on the leaderboard.
Select program in which you are contributing
GSSoC23
Code of Conduct

[X] I follow CONTRIBUTING GUIDELINE of this project.

Hey @Tushar98644 !
Thank you for raising an issue 💗
You can self assign the issue by commenting /assign in comment 😀
Make sure you follow CODE OF CONDUCT and CONTRIBUTING GUIDELINES 🚀
Don’t Forget to ⭐ our GameZone🎮
Make sure you join our Discord🕹

/assign

Hey @Tushar98644 👋!
@kunjgit here,
We have this annoucement to make 📢!!
💥 Special Announcement:
It's the Call to all the designers 🔥 🎨
As you all know that GameZone has crossed 100 games 💗 , it's time that we all come up together and make the UI even better!!
We are redesigning the thumbnails, make sure you come up with the aesthetic and cool ideas 🚀 !
You are supposed to share the 4 different templates that can be used. Make sure that the size is: 1280 px X 720 px.
The frame should be such that there is only a single image of the game that's taking up the major portion of the frame. Any kind of text should not be there.
The design should be catchy and aesthetic! 🔥
Note: You are not supposed to create any issue right now for the same.
You have to share different designs right now in Discord  and Project Admin would be selecting one design and would be assigning the issue. After that only, you have to start working on it.

Hey @Tushar98644 ! Thank you so much for your raising the issue💗
It’s all yours, you can come anytime again and make some contributions! 🚀
Alone, we can do little, but together we can do so much! 😇


feat: update policy-evaluator to get new OCI manifest capability.

Description
Updates the policy-evaluator version in use to allow the usage of the new capability able to fetch OCI image manifests.
Fix #707

Blocked by https://github.com/kubewarden/policy-evaluator/pull/429#issuecomment-1924541219


Could not load file or assembly 'Unity.Abstractions, Version=<IP_ADDRESS>

I have a dll 'A' which is using Unity(5.10.3) + Unity.Configuration(5.10.0). It has a method which is using following code to load dynamically in container:
var unitySection = (UnityConfigurationSection)configuration.GetSection("Unity");
if (unitySection != null)
	container.LoadConfiguration(unitySection, FullTextContainerName);

Another dll 'B' using only Unity(5.10.3) - again exposing registration method to container.
And a Unit test where I reference both and call their registrations methods.
Once I try to execute this test I receive following exception:
System.IO.FileLoadException: Could not load file or assembly 'Unity.Abstractions, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=489b6accfaf20ef0' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
It can be mitigated only if I add to app.config following section:
<runtime> 		<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> 			<dependentAssembly> 				<assemblyIdentity name="Unity.Abstractions" publicKeyToken="489b6accfaf20ef0" culture="neutral"/> 				<bindingRedirect oldVersion="<IP_ADDRESS>-<IP_ADDRESS>" newVersion="<IP_ADDRESS>"/> 			</dependentAssembly> 		</assemblyBinding> 	</runtime>
Is there any other way to do it, or I should go to all application and adapt their configs ?

At the moment it is the only solution. I will try to fix it in the feature.


i think this one gonna work

@chunza2542 i remove my function loginWithUnstoppable and just use login function and added a condition to it i think this one gonna work, feel free to merge whenever you're free

Ohh, so sorry for the late reply but let me try this first
https://github.com/chunza2542/ethtalk.app/pull/2#discussion_r803559530

Ohh, so sorry for the late reply but let me try this first #2 (comment)

no problem bro

@spiritbro1 Deployed, could you try it again?

still the same bro 🥲

Hey, after some debugging, I still don't know what cause the problem but if you would like to help me debug you can send me your email and I'll put you as an Editor (firebase). -> Twitter: @chunza2542.


adding aws_auth_configmap parameters

What does this PR do?
Adding aws_auth configmap parameters included in terraform-aws-eks module.
Motivation
Feature needed for customer engagement.
More

[ ] Yes, I have tested the PR using my local account setup  (Provide any test evidence report under Additional Notes)
[ ] Yes, I have added a new example under examples to support my PR
[ ] Yes, I have created another PR for add-ons under add-ons repo (if applicable)
[ ] Yes, I have updated the docs for this feature
[ ] Yes, I ran pre-commit run -a with this PR

Note: Not all the PRs required examples and docs except a new pattern or add-on added.
For Moderators

[ ] E2E Test successfully complete before merge?

Additional Notes

I think we'll have to do something with https://github.com/aws-ia/terraform-aws-eks-blueprints/blob/main/aws-auth-configmap.tf#L1 or else it will create conflicts

Ah, I didn't originally see this. I'll close this PR. Thanks!


Test delaying video

Lucas suggested delaying video by rendering to an off-screen canvas, capturing frames, and then playing them back after a delay.
This would use a lot of memory, and doesn't fix people after you, but would be really nice for the people before you.
It's not clear whether this would actually be possible

I am told that https://github.com/mbebenita/Broadway may be a way to do this.

I am told that https://github.com/mbebenita/Broadway may be a way to do this.

@taymonbeal are you imagining something where we use web RTC to send video to the server, and then Broadway to render it on the client after a delay?  Or extending Broadway to be able to encode video?

@taymonbeal are you imagining something where we use web RTC to send video to the server, and then Broadway to render it on the client after a delay?  Or extending Broadway to be able to encode video?


Having some trouble updating

I followed the instructions given here: https://github.com/mattermost/mattermost-docker

docker-compose down
git pull
docker-compose build
docker-compose up -d

and got an error at the git pull part:

git pull
Your configuration specifies to merge with the ref 'refs/heads/team-and-enterprise'
from the remote, but no such ref was fetched.

I am running:

Mattermost Enterprise Edition
Modern communication from behind your firewall.
Version: 3.6.0  (3.6.2)
Database: postgres

It seems that your local Git repository is on team-and-enterprise branch but it doesn't exists anymore.
I think you should use master branch :
git checkout master

I don't have much experience with git, I just remember following the instructions for how to install 3.6 back in the days. Does the command you gave above delete anything i.e. my dockerfile or the data?

The command will set your local repository on the master branch, than you will be able to git pull to get the new code from Github. It should not delete your data (which is, I guess, in a volumes/ folder) but it will modify the Dockerfile to the new version.
If you're really not confident, you could provide the result of the git status command to see how is your local repository currently.

Well here it is:
root@internal-docker:/mnt/mattermost-docker# git status
On branch team-and-enterprise
Your branch is up-to-date with 'origin/team-and-enterprise'.
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   docker-compose.yml

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        volumes/

no changes added to commit (use "git add" and/or "git commit -a")
root@internal-docker:/mnt/mattermost-docker#

I can backup the files of course, do the command you suggested then adapt my docker file again? Am I the first one to upgrade from this team-and-enterprise version? (couldn't find anyone else with this issue)

The team-and-entreprise seems to be an old branch, not existing anymore on this repository.
I suggest the following workaround :
cp docker-compose.yml /tmp/docker-compose.yml.save # Backup docker compose file
git stash # Stash changes
git checkout master # Checkout master branch
git pull origin master # Update master branch from repository
git stash pop # Unstash changes

At the last step, it is possible that you get an issue if you made a lot of modifications on your docker-compose.yml, that's why I suggest to backup it at the beginning. If you get any problem, you will just have to get your file back like this : cp /tmp/ocker-xompose.yml.save docker-compose.yml.

Thanks for your help, I'll give that a try this weekend and will update this thread.

@ovizii Did you succeed in updating your git repository ? :)

sorry, I got side tracked so seeing your follow-up I just tried and followed your directives:
git stash
Saved working directory and index state WIP on team-and-enterprise: c59ac91 Export vars to fix the postgres container error
HEAD is now at c59ac91 Export vars to fix the postgres container error

 checkout master
Branch master set up to track remote branch master from origin.
Switched to a new branch 'master'

git pull origin master
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (2/2), done.
remote: Total 5 (delta 3), reused 5 (delta 3), pack-reused 0
Unpacking objects: 100% (5/5), done.
From https://github.com/mattermost/mattermost-docker
 * branch            master     -> FETCH_HEAD
   7590cef..c9a33c7  master     -> origin/master
Updating 7590cef..c9a33c7
Fast-forward
 app/docker-entry.sh | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

git stash pop
Auto-merging docker-compose.yml
CONFLICT (content): Merge conflict in docker-compose.yml

docker-compose build
ERROR: yaml.scanner.ScannerError: mapping values are not allowed here
  in "./docker-compose.yml", line 2, column 8

getting this error with the new docker-compose.yml file so I have no placed my old docker-compose.yml file back and attempted docker-compose build + docker-compose up -d
but it fails:
...
mattermost/webapp/dist/5.2429f4590e5ccd71db19.js.map
  3 48.2M    3 1652k    0     0   5072      0  2:46:06  0:05:33  2:40:33     0
curl: (56) SSL read: error:00000000:lib(0):func(0):reason(0), errno 104

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
ERROR: Service 'app' failed to build: The command '/bin/sh -c mkdir -p /mattermost/data     && curl https://releases.mattermost.com/$MM_VERSION/mattermost-team-$MM_VERSION-linux-amd64.tar.gz | tar -xvz     && cp /mattermost/config/config.json /config.json.save     && rm -rf /mattermost/config/config.json' returned a non-zero code: 2

what do I do now?

You have some merge-conflict on your docker-compose.yml file.
You have 2 options :

solve the merge conflict : should open your docker-compose.yml to fix it
use a new clean file and customize it with your volumes and passwords

If you have trouble, you could dump your file content here but BE CAREFUL it may contain some sensitive data (username/password) that you should obfuscate first.

Hi @ovizii, did you manage to made it work ?

thanks for checking in, its scheduled for this afternoon, it only became a priority now as some mobile clients demanded a newer server version :-)
will update this thread in a few hours.

oh, if you want to have a look, here is my "old" docker-compose file, there is absolutely nothing secret in there.
db:
  build: db
  restart: always
  volumes:
    - ./volumes/db/var/lib/postgresql/data:/var/lib/postgresql/data
    - /etc/localtime:/etc/localtime:ro
  # uncomment the following to enable backup
  #environment:
  #  - AWS_ACCESS_KEY_ID=XXXX
  #  - AWS_SECRET_ACCESS_KEY=XXXX
  #  - WALE_S3_PREFIX=s3://BUCKET_NAME/PATH
  #  - AWS_REGION=us-east-1
app:
  build: app
  links:
    - db:db
  restart: always
  volumes:
    - ./volumes/app/mattermost/config:/mattermost/config:rw
    - ./volumes/app/mattermost/data:/mattermost/data:rw
    - /etc/localtime:/etc/localtime:ro
web:
  build: web
  ports:
    - "180:80"
    - "1443:443"
  links:
    - app:app
  restart: always
  volumes:
      # This directory must have cert files
    - ./volumes/web/cert:/cert:ro
    - /etc/localtime:/etc/localtime:ro
  environment:
    - MATTERMOST_ENABLE_SSL=false
    - PLATFORM_PORT_80_TCP_PORT=80

First, I think there is a merge conflict you should solve on the current docker-compose.yml. I think the file contain some <<<<<<< HEAD and ======= created by Git when you tried to stash pop. When solved, I think it will work.

you are right, the new file started like this:
<<<<<<< Updated upstream
version: "2"

services:

  db:

so basically, I just remove the first line, then continue with your instructions. Will update in a few minutes.

After replacing docker-compose.yml with the version which caused the error I tried following your instructions:

I suggest the following workaround :
cp docker-compose.yml /tmp/docker-compose.yml.save # Backup docker compose file
git stash # Stash changes
git checkout master # Checkout master branch
git pull origin master # Update master branch from repository
git stash pop # Unstash changes

git stash
docker-compose.yml: needs merge
docker-compose.yml: needs merge
docker-compose.yml: unmerged (0802ba58865bde0ab352073c1c850bac5ecd23ce)
docker-compose.yml: unmerged (e037ad1482bf023a722b22b09586f9c54799e69a)
docker-compose.yml: unmerged (1f143e3ece4259f2544172cc96669c7ca59c82a2)
fatal: git-write-tree: error building trees
Cannot save the current index state
git checkout master
docker-compose.yml: needs merge
error: you need to resolve your current index first
really not sure where to go from here - I am unfamiliar with git and the likes, getting the container started in the first place was very easy but this update is getting weirder and weirder.

Ok, it's quite difficult to sort out this issue without having the hand on your Git repository. Git is great but you can, sometimes, be in a tricky situation...
My advice is to start from a fresh setup :

clone the current git repository in another repository
edit the new docker-compose.yml file to add your custom data (database credentials, using Team edition if need)
copy your "old" volumes to the new folder (something like sudo cp -p -r /old/repository/volumes /new/repository/)
then run docker-compose up

If everything works, you could, then, remove your old directory.
Use the README.md file to reconfigure your docker-compose.yml file correctly.

Thanks. I'll give this information to one of my colleagues from the development department if he can't sort it out I'll just start fresh.


Get_Distance Issue

Traceback (most recent call last):
File "C:\Users\Dexters Laboratory\Desktop\Tindr\TinderBotz\auto_swipe.py", line 54, in
if profile.get_distance() <= maximum_distance:  # compare the distance to the maximum allowed distance
TypeError: '<=' not supported between instances of 'NoneType' and 'int'
I believe the path for the distance has changeD? Its returning None now ..

I can't check since I'm on vacation but there could be 2 reasons for this.

They changed the distance-html tag (thus the xpath changed and the project needs to be updated)
Premium users have the option to disable the distance on their profile. In that case it returns None for that premium user, since the distance is not being displayed.

Can you check which of these two problems is occurring?
If it's the first one, it should crash at every profile. In that case I'll push an update once I'm back from vacation.
If it's the second option, you should simply handle the case where the distance is hidden (None) before comparing it in your if statement.
Greetings,
Fred

I figured it out, sorry. You called it. Comparing it to none first fixed the issue!
Ref: for anyone else that comes looking
if distance is not None and int(distance) >= waytoofardistance:


pwsh 7.2 CentOS 7 slow startup (30-60 seconds) if mounted SMB share is down

Prerequisites

[X] Write a descriptive title.
[X] Make sure you are able to repro it on the latest released version
[X] Search the existing issues.
[X] Refer to the FAQ.
[X] Refer to Differences between Windows PowerShell 5.1 and PowerShell.

Steps to reproduce
mount any smb share to system
(i.e. mount //<IP_ADDRESS>/smb-share /mnt/custom-smb-share etc)
if remote resource (//<IP_ADDRESS>/smb-share) will become unavailable, simple run ./pwsh will be around 30-60 seconds to start until you umount "failed" smb share
Expected behavior
usual start ~1-5 seconds or maybe error message during startup that mount point is unavailable

Actual behavior
start around 40-60 seconds

Measure-Command { pwsh -noprofile -c exit }

Days              : 0
Hours             : 0
Minutes           : 1
Seconds           : 0
Milliseconds      : 262
Ticks             : 602624509
TotalDays         : 0.000697482070601852
TotalHours        : 0.0167395696944444
TotalMinutes      : 1.00437418166667
TotalSeconds      : 60.2624509
TotalMilliseconds : 60262.4509

Error details
no errors returned

Environment data
PS /etc> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      7.2.0
PSEdition                      Core
GitCommitId                    7.2.0
OS                             Linux 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           <IP_ADDRESS>
WSManStackVersion              3.0

Visuals
No response

I think it is dup of #15061

Well I don't have any startup issues with a few samba shares.
Issue happens only when samba share goes down. (also in case #15061 NFS shares not smb)

#15061 is that pwsh enumerates all volumes and this can take a lot of time, specially if an volume is unreachable.


it doesn't seem to work with the sdwebui LyCORIS extension

I trained the Loha model using the kohya_ss script, but it doesn't seem to work with the sdwebui-LyCORIS extension. Could it be that it's not supported yet? I've confirmed that sdwebui-LyCORIS is already up-to-date.

Adding more information: During the training process, the sample images appeared to be normal.

Loha is supported few months ago
It can be some problems between the extension and sdwebui
Try to update to sdwebui 1.5.0
And use built-in lora to use it
(After 1.5.0 built-in lora will support all lycoris model)

Sorry, I forgot to mention that I used sdxl.

@zbulrush sdxl should work with built-in lora system
Lycoris ext will deprecated in the future or become a experiment field
Just try latest sd webui and use lycoris model as lora
(You can still use lycoris' arguments system, it is also merged into sd webui now)


IBufferByteAccess.Buffer fails for netstandard

IBufferByteAccess (cswinrt/strings/additions/IBufferByteAccess.cs) doesn't have the Vftbl properly initialized and fails to call the Do_Abi methods
Repro:
Run test TestBuffer in TestComponentCSharp_Tests.cs on netstandard

@ujjwalchadha Does this fix by Scott resolve this? https://github.com/microsoft/CsWinRT/pull/504/commits/50db586a154972e4a460984a5dff95e999ed8796

fixed by commit above #504


[6.0] [Completion] Complete .isolation for @isolated(any) functions

6.0 cherry-pick of #74860

Explanation: Adds completion support for .isolation on @isolated(any) functions
Scope: Affects code completion
Issue: rdar://124615036
Risk: Low, only affects completion, and is fairly straightforward
Testing: Added tests to test suite
Reviewer: Alex Hoppen

@swift-ci  please test

@swift-ci please test


Item available despite stock 0 and sale

Description: Item available despite stock 0 and sale
Environment: <IP_ADDRESS>
Steps to reproduce:

Installing the SwagCommerce plugin with authorisation for the warehouse extension
Create two sales channels
Create two rules - one for each of the sales channels - to be able to assign the warehouse groups to them.
Create two warehouse groups, each with one of the two rules
Create two warehouses, each with a warehouse group assigned to it.
"Activate "Hide product after sale
Assign both warehouse groups to one product
Activate sale for this product
Set the warehouse stock of this product for sales channel 1 to 10 and for sales channel 2 to 0
Product continues to be displayed in both sales channels and is only declared as "Not available" on the detail page

Expected result: The product isn't available anymore in the one saleschannel where the stock is zero
Actual result: The product is available in the both saleschannel

[public] Shopware automated response: This issue is linked to the internal issue: NEXT-26093
[created from NEXT-26093, comment 507097]


Feat 49 populate actions from cclw

First pass of populating actions from CCLW.

uses hard-coded CSVs
uses code from prototype (pandas, etc)
rudimentary tests

@opyate I've reviewed the changes, please find my observations below.
Flattening of policies and documents
In the original prototype, we flattened out the CCLW data, and loader is working the same way. This means that currently, an Action is being created for each unique policy and document combination. Instead, it should create a unique Action for each CCLW policy. All documents associated with that policy should then be stored as Documents against the Action ([issue #50](https://app.zenhub.com/workspaces/climate-policy-radar-613867967a1a9200123c9aad/issues/climatepolicyradar/navigator/50)).
Using backend and front end export files
We’re currently using both the backend and front end export files. This was originally because the backend file includes CCLW policy ids, but does not include document URLs to documents stored on CCLW blob storage. These are available on the front end export file, and so the two are merged together. However, we’re not loading the source policy id into our database any more, so I don’t think its relevant to use the backend export file? In which case, we could simplify the process considerably and just use the existing front end export file and not worry about merging them.
Flexible bulk load format
The current loader is very fixed to the current CCLW export file structure. This means it couldn’t be used to bulk load policies from other sources. We originally discussed the possibility of defining our own bulk load file schema which would enable this to happen. This would involve then mapping the CCLW data to our schema. I think the scope of this issue for the sprint can be limited to supporting CCLW only, but I think we should raise a new issue in the backlog to make sure that we consider this going forward.
Other observations

extract.main.extract(...  has hardcoded paths to data referenced by date. I think we would need to change this to allow the path and filenames to be specified as arguments to the [main.py](http://main.py) script. This will enable us to repeat the import process for an updated set of import files, without needing to update the code.
Check fully qualified import in extract.main - this refers to app.model does this work ok?
transform.datafixes updates the dates for 5 policies which have missing dates. I guess its possible that in an updated extract that new policies could be received which also have missing dates. Would it be better to update the source data and instead include validation in the process to warn the user that some policies (list them) won’t be loaded because they don’t have date information?
As part of [issue #50](https://app.zenhub.com/workspaces/climate-policy-radar-613867967a1a9200123c9aad/issues/climatepolicyradar/navigator/50), we’ll need to decide how to deal with document names. Currently these have very uninformative names, and I would recommend that they are manually reviewed by @danny-waite-cpr and @marcusodavies  prior to loading.
The load will currently bulk load policies in irrespective of whether the load has been carried out previously and would create duplicate Actions. I think for the scope of this sprint that is fine, but we should capture this in the backlog to make sure that we can take it into account. This is where storing source policy ids may be helpful to update them.

@chrisaballard thanks for the comments!

In the original prototype, we flattened out the CCLW data, and loader is working the same way. This means that currently, an Action is being created for each unique policy and document combination. Instead, it should create a unique Action for each CCLW policy.

Definitely. When I implement https://github.com/climatepolicyradar/navigator/issues/50 next, I'll aggregate those docs into a single action. (In the current code, the dupe actions are blocked with the new unique constraint.)

We’re currently using both the backend and front end export files. This was originally because the backend file includes CCLW policy ids, but does not include document URLs to documents stored on CCLW blob storage. These are available on the front end export file, and so the two are merged together. However, we’re not loading the source policy id into our database any more, so I don’t think its relevant to use the backend export file? In which case, we could simplify the process considerably and just use the existing front end export file and not worry about merging them.

Shall I simplify it in a subsequent task?

* `extract.main.extract(...`  has hardcoded paths to data referenced by date. I think we would need to change this to allow the path and filenames to be specified as arguments to the `[main.py](http://main.py)` script. This will enable us to repeat the import process for an updated set of import files, without needing to update the code.

I'll make that change now.

* Check fully qualified import in `extract.main` - this refers to `app.model` does this work ok?

It's loader's own app.model, not the one from backend.

* `transform.datafixes` updates the dates for 5 policies which have missing dates. I guess its possible that in an updated extract that new policies could be received which also have missing dates. Would it be better to update the source data and instead include validation in the process to warn the user that some policies (list them) won’t be loaded because they don’t have date information?

This just came up in a call with Danny and Marcus, actually. We'll implement a warning/flagging system, then they can fix the CSV and re-upload.

Reviewed recent changes. All looks fine - removing the backend export files from extract and load has simplified the load process considerably. I've just notived that issue #49 seems to refer to documents and not actions, apologies if there was any confusion there!


Added hmm case study

Adding an HMM case study!

Here's the example model pull request with discussion: https://github.com/stan-dev/example-models/pull/187

@serban-nicusor-toptal does the error here look like a problem with my pull or CI? I see this error: https://travis-ci.com/github/stan-dev/stan-dev.github.io/builds/197896607 , which doesn't seem like an error with the stuff I added

There was a bug in the Travis configuration that was fixed on master, this PR must have forked from the old broken version of it.
See old versus new.
Can you please change the contents of .travis.yml to those in the master branch ? That will solve the issue. Thanks!

@serban-nicusor-toptal thanks it worked!
@mitzimorris ready for review!

@charlesm93 can you review this?

Looks good to me. You're missing some dependencies. The total list should be: tidyverse, ggplot2, cmdstanr, and posterior. Fix that and you should be good to merge.

@charlesm93 1.5 months later, ready for review lol

@charlesm93 1.5 months later, ready for review lol

No worries, I realize how busy you are. I'll go through it today.

No worries, I realize how busy you are. I'll go through it today.

Should just be this change: https://github.com/stan-dev/stan-dev.github.io/pull/130/commits/24a6e5f18dfbc1881987e8513c0947510cf1a662
busy -> forgetful

Should just be this change: https://github.com/stan-dev/stan-dev.github.io/pull/130/commits/24a6e5f18dfbc1881987e8513c0947510cf1a662
busy -> forgetful

Looks good to me. Feel free to go ahead and merge.

Looks good to me. Feel free to go ahead and merge.


python2-urllib2 cannot use cafile in ubuntu-14.04

# trytls https python python2-urllib2/run.py
platform: Linux (Ubuntu 14.04)
runner: trytls 0.3.0 (CPython 2.7.6, OpenSSL 1.0.1f)
stub: python python2-urllib2/run.py
ERROR valid certificate Common Name [accept domain-match.badtls.io:10000]
      reason: stub exited with return code 1
      output: Traceback (most recent call last):
                File "python2-urllib2/run.py", line 13, in <module>
                  urllib2.urlopen("https://" + host + ":" + port, cafile=cafile)
              TypeError: urlopen() got an unexpected keyword argument 'cafile'

Welp, this requires things implemented in Python 2.7.9.

Works on python 2.7.5 in CentOS 7.

@ikisusi might be a backport?

closed by #237


fix the bug that if one case occur error in one metric, all the rest …

When run evaluation with function: deepeval.evaluate([testcases], [metrics]), if one case failed on one metric with some error, all the rest of cases will fail on that metric, debug and found the metric error is not reset when run every testcase, both the rest testcases get that error, my commit fixed that bug through reset the metric.error in evaluate function

@wanghuanjing thank you so much!


Initial vLLM setup fails due to missing HuggingFace permissions

When following initial setup steps from: https://github.com/tenstorrent/tt-inference-server/tree/main/vllm-tt-metal-llama3-70b#vllm-tt-metalium-llama-31-70b-inference-api, fails due to missing HF token permissions to download config for Meta-Llama-3.1-70B.
docker run \
>   --rm \
>   -it \
>   --env-file .env \
>   --cap-add ALL \
>   --device /dev/tenstorrent:/dev/tenstorrent \
>   --volume /dev/hugepages-1G:/dev/hugepages-1G:rw \
>   --volume ${PERSISTENT_VOLUME?ERROR env var PERSISTENT_VOLUME must be set}:/home/user/cache_root:rw \
>   --shm-size 32G \
>   --publish 7000:7000 \
>   ghcr.io/tenstorrent/tt-inference-server/tt-metal-llama3-70b-src-base-vllm:v0.0.1-tt-metal-385904186f81-384f1790c3be
2024-11-15 09:07:01.845 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.pearson_correlation_coefficient be migrated to C++?
2024-11-15 09:07:01.847 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.Conv1d be migrated to C++?
2024-11-15 09:07:01.848 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.conv2d be migrated to C++?
2024-11-15 09:07:01.851 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.unsqueeze_to_4D be migrated to C++?
2024-11-15 09:07:01.852 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.from_torch be migrated to C++?
2024-11-15 09:07:01.852 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.to_torch be migrated to C++?
2024-11-15 09:07:01.852 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.to_device be migrated to C++?
2024-11-15 09:07:01.852 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.from_device be migrated to C++?
2024-11-15 09:07:01.852 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.allocate_tensor_on_device be migrated to C++?
2024-11-15 09:07:01.852 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.copy_host_to_device_tensor be migrated to C++?
2024-11-15 09:07:01.852 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.deallocate be migrated to C++?
2024-11-15 09:07:01.852 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.reallocate be migrated to C++?
2024-11-15 09:07:01.852 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.load_tensor be migrated to C++?
2024-11-15 09:07:01.853 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.dump_tensor be migrated to C++?
2024-11-15 09:07:01.853 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.as_tensor be migrated to C++?
2024-11-15 09:07:01.864 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.avg_pool2d be migrated to C++?
2024-11-15 09:07:01.881 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.conv2d be migrated to C++?
2024-11-15 09:07:01.881 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.avg_pool2d be migrated to C++?
2024-11-15 09:07:01.882 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.Conv1d be migrated to C++?
INFO 11-15 09:07:02 importing.py:10] Triton not installed; certain GPU-related functions will not be available.
INFO 11-15 09:07:04 api_server.py:528] vLLM API server version 0.1.dev3062+g384f179
INFO 11-15 09:07:04 api_server.py:529] args: Namespace(allow_credentials=False, allowed_headers=['*'], allowed_methods=['*'], allowed_origins=['*'], api_key='eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZWFtX2lkIjoidGVuc3RvcnJlbnQiLCJ0b2tlbl9pZCI6ImRlYnVnLXRlc3QifQ._1fGZrJLARFZgqe-aZNr5dO_gb1gtzFrqm-aWcNvGOo', block_size=64, chat_template=None, code_revision=None, collect_detailed_traces=None, config_format=<ConfigFormat.AUTO: 'auto'>, cpu_offload_gb=0, device='auto', disable_async_output_proc=False, disable_custom_all_reduce=False, disable_fastapi_docs=False, disable_frontend_multiprocessing=False, disable_log_requests=False, disable_log_stats=False, disable_logprobs_during_spec_decoding=None, disable_sliding_window=False, distributed_executor_backend=None, download_dir=None, dtype='auto', enable_auto_tool_choice=False, enable_chunked_prefill=None, enable_lora=False, enable_prefix_caching=False, enable_prompt_adapter=False, enforce_eager=False, fully_sharded_loras=False, gpu_memory_utilization=0.9, guided_decoding_backend='outlines', host=None, ignore_patterns=[], kv_cache_dtype='auto', limit_mm_per_prompt=None, load_format='auto', log_global_stats=False, long_lora_scaling_factors=None, lora_dtype='auto', lora_extra_vocab_size=256, lora_modules=None, max_context_len_to_capture=None, max_cpu_loras=None, max_log_len=None, max_logprobs=20, max_lora_rank=16, max_loras=1, max_model_len=131072, max_num_batched_tokens=131072, max_num_seqs=32, max_parallel_loading_workers=None, max_prompt_adapter_token=0, max_prompt_adapters=1, max_seq_len_to_capture=8192, middleware=[], mm_processor_kwargs=None, model='meta-llama/Meta-Llama-3.1-70B', model_loader_extra_config=None, multi_step_stream_outputs=True, ngram_prompt_lookup_max=None, ngram_prompt_lookup_min=None, num_gpu_blocks_override=None, num_lookahead_slots=0, num_scheduler_steps=10, num_speculative_tokens=None, otlp_traces_endpoint=None, override_neuron_config=None, pipeline_parallel_size=1, port=7000, preemption_mode=None, prompt_adapters=None, qlora_adapter_name_or_path=None, quantization=None, quantization_param_path=None, ray_workers_use_nsight=False, response_role='assistant', return_tokens_as_token_ids=False, revision=None, root_path=None, rope_scaling=None, rope_theta=None, scheduler_delay_factor=0.0, scheduling_policy='fcfs', seed=0, served_model_name=None, skip_tokenizer_init=False, spec_decoding_acceptance_method='rejection_sampler', speculative_disable_by_batch_size=None, speculative_disable_mqa_scorer=False, speculative_draft_tensor_parallel_size=None, speculative_max_model_len=None, speculative_model=None, speculative_model_quantization=None, ssl_ca_certs=None, ssl_cert_reqs=0, ssl_certfile=None, ssl_keyfile=None, swap_space=4, tensor_parallel_size=1, tokenizer=None, tokenizer_mode='auto', tokenizer_pool_extra_config=None, tokenizer_pool_size=0, tokenizer_pool_type='ray', tokenizer_revision=None, tool_call_parser=None, tool_parser_plugin='', trust_remote_code=False, typical_acceptance_sampler_posterior_alpha=None, typical_acceptance_sampler_posterior_threshold=None, use_v2_block_manager=False, uvicorn_log_level='info', worker_use_ray=False)
INFO 11-15 09:07:04 api_server.py:166] Multiprocessing frontend to use ipc:///tmp/652c9ad3-a61d-4e6d-ad7f-b9aa98c42c0d for IPC Path.
INFO 11-15 09:07:04 api_server.py:179] Started engine process with PID 41
Traceback (most recent call last):
  File "/tt-metal/python_env/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 406, in hf_raise_for_status
    response.raise_for_status()
  File "/tt-metal/python_env/lib/python3.8/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/meta-llama/Meta-Llama-3.1-70B/resolve/main/config.json

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "run_vllm_api_server.py", line 50, in <module>
    main()
  File "run_vllm_api_server.py", line 46, in main
    runpy.run_module("vllm.entrypoints.openai.api_server", run_name="__main__")
  File "/usr/lib/python3.8/runpy.py", line 210, in run_module
    return _run_code(code, {}, init_globals, run_name, mod_spec)
  File "/usr/lib/python3.8/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/user/vllm/vllm/entrypoints/openai/api_server.py", line 585, in <module>
    uvloop.run(run_server(args))
  File "/tt-metal/python_env/lib/python3.8/site-packages/uvloop/__init__.py", line 82, in run
    return loop.run_until_complete(wrapper())
  File "uvloop/loop.pyx", line 1518, in uvloop.loop.Loop.run_until_complete
  File "/tt-metal/python_env/lib/python3.8/site-packages/uvloop/__init__.py", line 61, in wrapper
    return await main
  File "/home/user/vllm/vllm/entrypoints/openai/api_server.py", line 552, in run_server
    async with build_async_engine_client(args) as engine_client:
  File "/usr/lib/python3.8/contextlib.py", line 171, in __aenter__
    return await self.gen.__anext__()
  File "/home/user/vllm/vllm/entrypoints/openai/api_server.py", line 107, in build_async_engine_client
    async with build_async_engine_client_from_engine_args(
  File "/usr/lib/python3.8/contextlib.py", line 171, in __aenter__
    return await self.gen.__anext__()
  File "/home/user/vllm/vllm/entrypoints/openai/api_server.py", line 184, in build_async_engine_client_from_engine_args
    engine_config = engine_args.create_engine_config()
  File "/home/user/vllm/vllm/engine/arg_utils.py", line 907, in create_engine_config
    model_config = self.create_model_config()
  File "/home/user/vllm/vllm/engine/arg_utils.py", line 843, in create_model_config
    return ModelConfig(
  File "/home/user/vllm/vllm/config.py", line 162, in __init__
    self.hf_config = get_config(self.model, trust_remote_code, revision,
  File "/home/user/vllm/vllm/transformers_utils/config.py", line 148, in get_config
    if is_gguf or file_or_path_exists(model,
  File "/home/user/vllm/vllm/transformers_utils/config.py", line 86, in file_or_path_exists
    return file_exists(model, config_name, revision=revision, token=token)
  File "/tt-metal/python_env/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/tt-metal/python_env/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2833, in file_exists
    get_hf_file_metadata(url, token=token)
  File "/tt-metal/python_env/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/tt-metal/python_env/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 1666, in get_hf_file_metadata
    r = _request_wrapper(
  File "/tt-metal/python_env/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 364, in _request_wrapper
    response = _request_wrapper(
  File "/tt-metal/python_env/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 388, in _request_wrapper
    hf_raise_for_status(response)
  File "/tt-metal/python_env/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 423, in hf_raise_for_status
    raise _format(GatedRepoError, message, response) from e
huggingface_hub.errors.GatedRepoError: 401 Client Error. (Request ID: Root=1-67377fb8-30d086136440fa987c2a0f8c;382a4350-1869-4ac9-92f0-9a75a7b2e168)

Cannot access gated repo for url https://huggingface.co/meta-llama/Meta-Llama-3.1-70B/resolve/main/config.json.
Access to model meta-llama/Llama-3.1-70B is restricted. You must have access to it and be authenticated to access it. Please log in.
2024-11-15 09:07:05.966 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.pearson_correlation_coefficient be migrated to C++?
2024-11-15 09:07:05.966 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.Conv1d be migrated to C++?
2024-11-15 09:07:05.967 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.conv2d be migrated to C++?
2024-11-15 09:07:05.967 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.unsqueeze_to_4D be migrated to C++?
2024-11-15 09:07:05.967 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.from_torch be migrated to C++?
2024-11-15 09:07:05.968 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.to_torch be migrated to C++?
2024-11-15 09:07:05.968 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.to_device be migrated to C++?
2024-11-15 09:07:05.968 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.from_device be migrated to C++?
2024-11-15 09:07:05.968 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.allocate_tensor_on_device be migrated to C++?
2024-11-15 09:07:05.968 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.copy_host_to_device_tensor be migrated to C++?
2024-11-15 09:07:05.968 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.deallocate be migrated to C++?
2024-11-15 09:07:05.968 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.reallocate be migrated to C++?
2024-11-15 09:07:05.968 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.load_tensor be migrated to C++?
2024-11-15 09:07:05.968 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.dump_tensor be migrated to C++?
2024-11-15 09:07:05.968 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.as_tensor be migrated to C++?
2024-11-15 09:07:05.970 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.avg_pool2d be migrated to C++?
2024-11-15 09:07:05.973 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.conv2d be migrated to C++?
2024-11-15 09:07:05.973 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.avg_pool2d be migrated to C++?
2024-11-15 09:07:05.973 | WARNING  | ttnn.decorators:operation_decorator:801 - Should ttnn.Conv1d be migrated to C++?
INFO 11-15 09:07:06 importing.py:10] Triton not installed; certain GPU-related functions will not be available.
Process SpawnProcess-1:
Traceback (most recent call last):
  File "/tt-metal/python_env/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 406, in hf_raise_for_status
    response.raise_for_status()
  File "/tt-metal/python_env/lib/python3.8/site-packages/requests/models.py", line 1024, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 401 Client Error: Unauthorized for url: https://huggingface.co/meta-llama/Meta-Llama-3.1-70B/resolve/main/config.json

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/user/vllm/vllm/engine/multiprocessing/engine.py", line 391, in run_mp_engine
    engine = MQLLMEngine.from_engine_args(engine_args=engine_args,
  File "/home/user/vllm/vllm/engine/multiprocessing/engine.py", line 135, in from_engine_args
    engine_config = engine_args.create_engine_config()
  File "/home/user/vllm/vllm/engine/arg_utils.py", line 907, in create_engine_config
    model_config = self.create_model_config()
  File "/home/user/vllm/vllm/engine/arg_utils.py", line 843, in create_model_config
    return ModelConfig(
  File "/home/user/vllm/vllm/config.py", line 162, in __init__
    self.hf_config = get_config(self.model, trust_remote_code, revision,
  File "/home/user/vllm/vllm/transformers_utils/config.py", line 148, in get_config
    if is_gguf or file_or_path_exists(model,
  File "/home/user/vllm/vllm/transformers_utils/config.py", line 86, in file_or_path_exists
    return file_exists(model, config_name, revision=revision, token=token)
  File "/tt-metal/python_env/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/tt-metal/python_env/lib/python3.8/site-packages/huggingface_hub/hf_api.py", line 2833, in file_exists
    get_hf_file_metadata(url, token=token)
  File "/tt-metal/python_env/lib/python3.8/site-packages/huggingface_hub/utils/_validators.py", line 114, in _inner_fn
    return fn(*args, **kwargs)
  File "/tt-metal/python_env/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 1666, in get_hf_file_metadata
    r = _request_wrapper(
  File "/tt-metal/python_env/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 364, in _request_wrapper
    response = _request_wrapper(
  File "/tt-metal/python_env/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 388, in _request_wrapper
    hf_raise_for_status(response)
  File "/tt-metal/python_env/lib/python3.8/site-packages/huggingface_hub/utils/_http.py", line 423, in hf_raise_for_status
    raise _format(GatedRepoError, message, response) from e
huggingface_hub.errors.GatedRepoError: 401 Client Error. (Request ID: Root=1-67377fbb-5fc35dbf6d3882202048c17d;da98cf33-f7e1-4af9-bcf8-5b925ac47dbf)

Cannot access gated repo for url https://huggingface.co/meta-llama/Meta-Llama-3.1-70B/resolve/main/config.json.
Access to model meta-llama/Llama-3.1-70B is restricted. You must have access to it and be authenticated to access it. Please log in.

I can add something like HF login (https://huggingface.co/docs/huggingface_hub/en/quick-start#login-command):
from huggingface_hub import login

login()

Previously we didn't require a HF account to run the flask inference API server, but it's getting increasingly common to assume users will have this when using vLLM.

As a work-around, I manually set HF_TOKEN in docker command, as shown in https://github.com/tenstorrent/tt-inference-server/issues/23 .
This solved the huggingface login issue, but there's still permission errors when handling cache for huggingface things.
 File "/tt-metal/python_env/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 1349, in _hf_hub_download_to_cache_dir
    os.makedirs(os.path.dirname(blob_path), exist_ok=True)
  File "/usr/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/usr/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/usr/lib/python3.8/os.py", line 213, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/usr/lib/python3.8/os.py", line 223, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/home/user/cache_root/huggingface'

I tried to run sudo python3 run_vllm_api_server.py - it seems like there's password set for the user...?

Manually setting model to be repacked model in persistent_volume managed to bypass huggingface.
def main():
    # vLLM CLI arguments
    args = {
        "model": "/home/user/cache_root/model_weights/repacked-llama-3.1-70b-instruct/",
        "block_size": "64",
        "max_num_seqs": "32",
        "max_model_len": "128000",
        "max_num_batched_tokens": "128000",
        "num_scheduler_steps": "10",
        "port": os.getenv("SERVICE_PORT", "8000"),
        "download-dir": os.getenv("CACHE_DIR", None),
        "api-key": get_encoded_api_key(os.getenv("JWT_SECRET", None)),
    }

but it still fails to work
2024-11-21 15:19:36.709 | INFO     | SiliconDriver   - Software version 6.0.0, Ethernet FW version 6.10.0 (Device 6)
2024-11-21 15:19:36.711 | INFO     | SiliconDriver   - Detected 4 PCI devices : [0, 1, 2, 3]
2024-11-21 15:19:36.720 | INFO     | SiliconDriver   - Software version 6.0.0, Ethernet FW version 6.10.0 (Device 3)
2024-11-21 15:19:36.720 | INFO     | SiliconDriver   - Software version 6.0.0, Ethernet FW version 6.10.0 (Device 7)
Process SpawnProcess-1:
Traceback (most recent call last):
  File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/user/vllm/vllm/engine/multiprocessing/engine.py", line 391, in run_mp_engine
    engine = MQLLMEngine.from_engine_args(engine_args=engine_args,
  File "/home/user/vllm/vllm/engine/multiprocessing/engine.py", line 139, in from_engine_args
    return cls(
  File "/home/user/vllm/vllm/engine/multiprocessing/engine.py", line 78, in __init__
    self.engine = LLMEngine(*args, **kwargs)
  File "/home/user/vllm/vllm/engine/llm_engine.py", line 335, in __init__
    self.model_executor = executor_class(
  File "/home/user/vllm/vllm/executor/executor_base.py", line 47, in __init__
    self._init_executor()
  File "/home/user/vllm/vllm/executor/tt_executor.py", line 27, in _init_executor
    self.driver_worker.init_device()
  File "/home/user/vllm/vllm/worker/tt_worker.py", line 215, in init_device
    self.mesh_device = self._open_t3k_mesh_device()
  File "/home/user/vllm/vllm/worker/tt_worker.py", line 407, in _open_t3k_mesh_device
    mesh_device = ttnn.open_mesh_device(
  File "/tt-metal/ttnn/ttnn/distributed/distributed.py", line 162, in open_mesh_device
    return ttnn._ttnn.multi_device.MeshDevice(
IndexError: unordered_map::at: key not found
                 Device | INFO     | Closing user mode device drivers

Hi @changh95, thanks for sharing your experience. I understand there are some rough edges here and appreciate the feedback.
There are three separate issues based on what you shared:
First issue: /home/user/cache_root is not writable by the user inside the Docker container. For security reasons the Docker user does not have sudo by default.

You can set the permissions on the host with chown -R <host_persistent_directory> to give the Docker user permissions specifically, though on some systems this may not work. This is approach in https://github.com/tenstorrent/tt-inference-server/blob/main/vllm-tt-metal-llama3-70b/setup.sh#L229.
Alternatively, you can set chmod -R 777 <host_persistent_directory> to allow other users (including Docker user UID=1000) to write to the directory.
Another alternative, run container as root via docker run -u root

Second issue: The vLLM model kw_arg is not the path to the model weights, but is the HF repo name for loading the tokenizer.

For https://huggingface.co/meta-llama/Llama-3.1-70B-Instruct it should be: meta-llama/Llama-3.1-70B-Instruct
Our implementation uses the LLAMA3_CKPT_DIR to locate the model weights. You should see that in the generated .env file from running the setup.sh script.

Third issue: error during Opening user mode device driver

This may be because of a connectivity issue in mesh device Ethernet links. Could you run tt-topology --list and share the result? You should see each chip have a unique ID. If you see that reset the mesh device via tt-smi -r 0,1,2,3 and run again the workload again to verify.

Thanks @tstescoTT  for prompt reply!
The output of tt-topology --list on my confguration is like this:
 Detected Chips: 8
 Devices on system:
 0: n300 L<PHONE_NUMBER>22066 - (0, 0)
 1: n300 L<PHONE_NUMBER>22075 - (0, 1)
 2: n300 L<PHONE_NUMBER>220ad - (0, 0)
 3: n300 L<PHONE_NUMBER>2209b - (0, 0)
 4: n300 R<PHONE_NUMBER>22066 - (1, 0)
 5: n300 R<PHONE_NUMBER>22075 - (1, 1)
 6: n300 R<PHONE_NUMBER>220ad - (1, 0)
 7: n300 R<PHONE_NUMBER>2209b - (1, 0)
 Configuration: Mesh

Also, thank you for giving solutions for issue 1 and 2! With -u root and giving permission on persistent_volume at the host side got me bypass the issues before.
Currently waiting for the first run through.

Mesh device shouldn't take that long to open. It looks like the chip topology is incorrect for mesh configuration (see below expected layout), you can fix this by running tt-toplogy again with mesh layout. See instructions at https://github.com/tenstorrent/tt-topology?tab=readme-ov-file#mesh.
tt-topology -l mesh -p mesh_layout.png

You should see output for the mesh configuration like:
(.venv) ~/tt-topology$ tt-topology --list
 Detected Chips: 8
 Devices on system:
 0: n300 L<PHONE_NUMBER>2315e - (1, 0)
 1: n300 L<PHONE_NUMBER>2315d - (1, 1)
 2: n300 L<PHONE_NUMBER>23167 - (2, 1)
 3: n300 L<PHONE_NUMBER>2317f - (2, 0)
 4: n300 R<PHONE_NUMBER>2315e - (0, 0)
 5: n300 R<PHONE_NUMBER>2315d - (0, 1)
 6: n300 R<PHONE_NUMBER>23167 - (3, 1)
 7: n300 R<PHONE_NUMBER>2317f - (3, 0)
 Configuration: Mesh

@tstescoTT
I've actually done that a few times.
Many times I got the results as below - always somehow it's (0,0), (0,1), (1,0), (1,1)...
(venv) hgchang@tt-quiet:~$ tt-topology --list
 Detected Chips: 8
 Devices on system:
 0: n300 L<PHONE_NUMBER>22066 - (0, 0)
 1: n300 L<PHONE_NUMBER>22075 - (0, 1)
 2: n300 L<PHONE_NUMBER>220ad - (0, 0)
 3: n300 L<PHONE_NUMBER>2209b - (0, 0)
 4: n300 R<PHONE_NUMBER>22066 - (1, 0)
 5: n300 R<PHONE_NUMBER>22075 - (1, 1)
 6: n300 R<PHONE_NUMBER>220ad - (1, 0)
 7: n300 R<PHONE_NUMBER>2209b - (1, 0)
 Configuration: Mesh

With this configuration, the first run always got me waiting for very long.
Perhaps I'll try re-flashing the chips with tt-topology until I get a configuration like yours.

This is likely an issue with the Ethernet links themselves, please verify the physical links (internal Warp 100 bridges and external QSFP-DD cables) are connected as shown:

For LoudBox: https://docs.tenstorrent.com/systems/t3000/specifications.html#qsfp-dd-connections-and-system-topology-tw-02002,
For QuietBox: https://docs.tenstorrent.com/systems/quietbox/specifications.html#qsfp-dd-connections-and-system-topology
Note: for QSFP-DD cables to be fully connected there should be a "click" sound, and they cannot be pulled out with gentle force without pulling on the blue tab.

I see you're already on it in https://discord.com/channels/863154240319258674/1309352969292087387
Please let me know if that fixes the issue!


Fast logpdf for exponetial family

In this issue it was shown that logpdf evaluation inside the ExponentialFamily.jl is far slower then it theoretically could be.
This PR aims to partially resolve this issue trough two following ideas:
1. Evaluate logpartition only once.
2. Use pack_parameters instead of flatten_parameters, for multivariate distributions.
To benchmark logpdf I am using the following script:
using Pkg
using Revise
using ExponentialFamily
using StableRNGs
using Distributions
using LinearAlgebra
using BenchmarkTools

function generate_random_normal()
	rng = StableRNG(42)
	n = 4
	golden_μ = randn(rng, n)
	L = randn(rng, n, n)
	golden_Σ = L * L' + Matrix{Float64}(I, n, n)
	return golden_normal = Distributions.MvNormal(golden_μ, golden_Σ);
end

dists = [Gamma(), generate_random_normal()]
efs = map((d) -> convert(ExponentialFamily.ExponentialFamilyDistribution, d), dists)

liniarize(samples::AbstractMatrix) = eachcol(samples)
liniarize(samples::Vector) = samples

function benchmark_old_logpdf(d)
	rng = StableRNG(42)
	samples = liniarize(rand(rng, d, 1000))
	@benchmark map((s) -> logpdf($d, s), $samples)
end

benchmark_old_logpdf(efs[1])
benchmark_old_logpdf(efs[2])

function benchmark_new_logpdf(d)
	rng = StableRNG(42)
	samples = rand(rng, d, 1000)
	@benchmark logpdf($d, $samples)
end

benchmark_new_logpdf(efs[1])
benchmark_new_logpdf(efs[2])

Old evaluation strategy
There are two outputs the speed of logpdf evaluation without naïvly of the logpartition (benchmark_old_logpdf):
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
Range (min … max):  51.875 μs …   2.353 ms  ┊ GC (min … max):  0.00% … 95.82%
Time  (median):     53.083 μs               ┊ GC (median):     0.00%
Time  (mean ± σ):   61.119 μs ± 121.205 μs  ┊ GC (mean ± σ):  11.50% ±  5.63%
▄▅██▇▅▄▃▃▃▂▃▂▂▂▁▁▁▁   ▁▁                                     ▂
███████████████████▇████▇▇▇███▇▇▇▇▇▆▅▅▄▆▅▅▃▄▄▄▄▄▄▄▄▁▄▁▃▄▅▅▄▄ █
51.9 μs       Histogram: log(frequency) by time        72 μs <
Memory estimate: 164.19 KiB, allocs estimate: 2001.
BenchmarkTools.Trial: 9754 samples with 1 evaluation.
Range (min … max):  449.666 μs …   1.863 ms  ┊ GC (min … max): 0.00% … 68.39%
Time  (median):     481.959 μs               ┊ GC (median):    0.00%
Time  (mean ± σ):   511.372 μs ± 172.085 μs  ┊ GC (mean ± σ):  4.95% ± 10.20%
▅█▆▄▃▁                                                        ▁
███████▇▆▄▄▃▁▁▁▁▃▁▁▃▁▁▁▁▁▁▁▁▁▁▃▁▁▁▃▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▃▄▇██ █
450 μs        Histogram: log(frequency) by time       1.63 ms <
Memory estimate: 1007.94 KiB, allocs estimate: 5001.
New evaluation strategy
There are two outputs the speed of logpdf evaluation with only one logpartition evaluation (benchmark_new_logpdf):
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
Range (min … max):  43.750 μs …   2.385 ms  ┊ GC (min … max):  0.00% … 95.76%
Time  (median):     45.167 μs               ┊ GC (median):     0.00%
Time  (mean ± σ):   53.773 μs ± 135.426 μs  ┊ GC (mean ± σ):  14.61% ±  5.67%
▂▄▆▇█▆▃▁     ▁▁                                             ▁
█████████▇▇▇▆▇████▇▆▆▆▅▄▅▇▆▇▇▇▆▇▆▆▆▆▇▆▇▆▆▆▅▅▅▅▆▅▅▆▄▅▅▅▄▄▅▄▄▄ █
43.8 μs       Histogram: log(frequency) by time      59.9 μs <
Memory estimate: 164.19 KiB, allocs estimate: 2001.
BenchmarkTools.Trial: 10000 samples with 1 evaluation.
Range (min … max):  109.875 μs …   1.425 ms  ┊ GC (min … max):  0.00% … 89.07%
Time  (median):     117.541 μs               ┊ GC (median):     0.00%
Time  (mean ± σ):   134.204 μs ± 135.941 μs  ┊ GC (mean ± σ):  11.87% ± 10.49%
█▂                                                            ▁
███▄▄▃▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁█ █
110 μs        Histogram: log(frequency) by time       1.25 ms <
Memory estimate: 633.31 KiB, allocs estimate: 3003.

@ismailsenoz A new evaluation strategy has not been implemented for MvNormalWishart, and I am a bit confused about it: its samples are not matrices, but its variate form is Matrixvariate. I think someone could do it in a separate PR if there is a need to do the same for this distribution.

@bvdmitri We have two new traits objects in this PR: MapBasedLogpdfCall and PointBasedLogpdfCall. I can imagine that their purpose can be not completely clear from the first glance so I wrote docstrings for them. But I am not sure that they should go into documentation because these two structures define the behavior of the undocumented method _logpdf. What should I do in this situation?

You can either

Use comments instead of the docstrings
Document the change

@ismailsenoz A new evaluation strategy has not been implemented for MvNormalWishart, and I am a bit confused about it: its samples are not matrices, but its variate form is Matrixvariate. I think someone could do it in a separate PR if there is a need to do the same for this distribution.

Indeed Normal-Wishart distribution is mix-variate and referring to it as Matrixvariate is not ideal. We should consider it in a seperate PR. I am ok with the new strategy.

I like the idea of making it a mix-variate type (we can do it with abstract types and tuples). But indeed it probably should be a separate PR.
Regarding the failing documentation build see my previous comment


camera zones not passed to double-take matches in MQTT

Describe the bug
frigate camera zones are not passed to double-take/matches in mqtt
Version of Double Take
1.6.0 (frigate 0.9.4)
Expected behavior
Would expect "current_zones" or "entered_zones" from frigate/events to be passed to "zones" in double-take/matches with the corresponding event "id".
Screenshots
See mqtt messages below for the same event "id".
Hardware

Unraid Dockers / MQTT Explorer

Additional context
frigate event message:
{   "before": {     "id": "1637154224.800873-p7wqxk",     "camera": "uvc_patio",     "frame_time":<PHONE_NUMBER>.799868,     "snapshot_time":<PHONE_NUMBER>.002791,     "label": "person",     "top_score": 0.8046875,     "false_positive": false,     "start_time":<PHONE_NUMBER>.800873,     "end_time": null,     "score": 0.55859375,     "box": [       0,       735,       149,       1072     ],     "area": 50213,     "region": [       0,       260,       820,       1080     ],     "current_zones": [       "patio"     ],     "entered_zones": [       "patio"     ],     "has_clip": false,     "has_snapshot": false   },   "after": {     "id": "1637154224.800873-p7wqxk",     "camera": "uvc_patio",     "frame_time":<PHONE_NUMBER>.799868,     "snapshot_time":<PHONE_NUMBER>.002791,     "label": "person",     "top_score": 0.8046875,     "false_positive": false,     "start_time":<PHONE_NUMBER>.800873,     "end_time":<PHONE_NUMBER>.998617,     "score": 0.55859375,     "box": [       0,       735,       149,       1072     ],     "area": 50213,     "region": [       0,       260,       820,       1080     ],     "current_zones": [       "patio"     ],     "entered_zones": [       "patio"     ],     "has_clip": true,     "has_snapshot": true   },   "type": "end"
double-take match message:
{   "id": "1637154224.800873-p7wqxk",   "duration": 2.73,   "timestamp": "2021-11-17T13:03:50.554Z",   "attempts": 19,   "camera": "uvc_patio",   "zones": [],   "misses": [],   "match": {     "name": "alex",     "confidence": 99.93,     "match": true,     "box": {       "top": 65,       "left": 201,       "width": 86,       "height": 86     },     "type": "snapshot",     "duration": 0.02,     "detector": "compreface",     "filename": "59ad83ef-1d0e-4091-91b6-f3041796f774.jpg",     "base64": null   } }

Looking into it further it appears that the first message from frigate has no zone for the "before" but does have it for the "after"
This issue may be resolved by using the "after" zones instead of the "before". @jakowenko let me know if you agree.
{   "before": {     "id": "1637154224.800873-p7wqxk",     "camera": "uvc_patio",     "frame_time":<PHONE_NUMBER>.800873,     "snapshot_time": 0,     "label": "person",     "top_score": 0,     "false_positive": true,     "start_time":<PHONE_NUMBER>.800873,     "end_time": null,     "score": 0.55859375,     "box": [       0,       786,       165,       1078     ],     "area": 48180,     "region": [       0,       780,       300,       1080     ],     "current_zones": [],     "entered_zones": [],     "has_clip": false,     "has_snapshot": false   },   "after": {     "id": "1637154224.800873-p7wqxk",     "camera": "uvc_patio",     "frame_time":<PHONE_NUMBER>.803092,     "snapshot_time":<PHONE_NUMBER>.803092,     "label": "person",     "top_score": 0.724609375,     "false_positive": false,     "start_time":<PHONE_NUMBER>.800873,     "end_time": null,     "score": 0.8203125,     "box": [       299,       388,       673,       1072     ],     "area": 255816,     "region": [       70,       270,       878,       1078     ],     "current_zones": [       "patio"     ],     "entered_zones": [       "patio"     ],     "has_clip": false,     "has_snapshot": false   },   "type": "new" }

Thanks for the additional info @bigbangus, I do look for after if it exists, but I'm guessing the initial match came during the before event, which at that time had no zones.
The only thing I could try to do is manipulate the metadata of the event if the current before event is still processing. If event 1 (before) is still processing the request (meaning no results were found) and event 2 (after) comes in, I could try to modify the current event 1 metadata to include the zones from event 2.
I hope this makes sense haha. It's a little confusing to type up.

I'd be happy to try that change whenever you release the next version thank you.


Convert VRF-Prefix relationship to M2M

Closes: #
What's Changed

Move Prefix.vrf FK to VRF.prefixes M2M
Clean up other post-data-migration enforcement

TODO

[x] Explanation of Change(s)
[ ] Added change log fragment(s) (for more information see the documentation)
[ ] Attached Screenshots, Payload Example
[ ] Unit, Integration Tests
[ ] Documentation Updates (when adding/changing features)
[ ] Example Plugin Updates (when adding/changing features)
[ ] Outline Remaining Work, Constraints from Design

@bryanculver I fixed the merge conflict, black and moved the code you introduced in ipam/utils/migrations.py to match the rest of the file


Add API extension for cert-manager v1.0.2

Generate Java API client and model types for Kubernetes Cert Manager.
See also:

https://github.com/jetstack/cert-manager
https://github.com/jetstack/cert-manager/tree/master/pkg/apis/certmanager
https://github.com/jetstack/cert-manager/releases/latest

Support was added in:

https://github.com/manusa/yakc/commit/de352729a7731e857485ac62fc33e44837b9d6ad
https://github.com/manusa/yakc/commit/9d394309330314b5b7f53537293827e82a76a234
https://github.com/manusa/yakc/commit/c094e23ca37dc5e0241e3b9bb993010f2af624f3


Better support for Side by Side packages

Description of the new feature / enhancement
winget should better support multiple versions of the same package being installed on the same machine.  This happens, and we currently try to pretend it doesn't.
Proposed technical implementation details
Package detection on the system needs to be improved to correlate package versions together.
Replace PackageVersion InstalledVersion with PackageVersion[] InstalledVersions internally, then reasoning about how that affects everywhere that breaks.

@JohnMcPMS I think this is a great call out. I think we should also take this into consideration as it relates to channels and how we can handle software that doesn't install side by side.
I know Ultimaker.Cura as an example of one package where the .exe during upgrade simply installs a new version of the package. We should also include the impact on the import scenario.

I think we should also take this into consideration as it relates to channels and how we can handle software that doesn't install side by side.

Another example in my case is with respect to Typora. https://typora.io/
I currently have a dev channel release installed, 1.3.3-dev (From https://typora.io/releases/all > [Dev/Beta Releases])
> winget upgrade

... gives ...
Typora 1.3     Typora.Typora       1.3.3          1.3.6         winget

... That is, winget is not recognizing the dev channel and, if allowed, will (undesirably) upgrade the dev channel 1.3.3-dev to the stable release channel 1.3.6 (From https://typora.io/releases/all > [Stable releases]).
Unless, that is, that the Typora developer is failing to configure their winget manifest correctly (but given this issue is open presumably multiple channels is not supported in winget currently)

#147 "Support different release channels [released, beta, alpha]" is the better place for the channels issue.

I don't really understand why Microsoft Visual C++ Redistributables have different packages for x86 and x64 architectures, but .NET Desktop Runtimes don't have both as separate packages.

Dependency management, mostly. We currently can't say in the manifest that a package relies on a certain architecture of another package, so we have to have per architecture pacakges for the VCRedists (many packages specifically want the x86 redists). And no one has added a package that relies on a certain architecture of the .NET Desktop Runtime.

[Policy] Area-Matching

Another example of this being an issue would be SSMS. Major versions like 18,19 can be installed side-by-side. Winget would still mark v18 as outdated and show the upgrade to v19.

Well, this happens now and winget installs v19. But it keeps v18 intact, so we run into the issue that winget installs v19 every time winget upgrade --all is issued. Like here: #3541

I just linked a draft specification for anyone following this issue.

@denelon

I know Ultimaker.Cura as an example of one package where the .exe during upgrade simply installs a new version of the package. We should also include the impact on the import scenario.

Also Vulkan SDK and blender on updating (seemingly silently) install a new version and then output no installed package found matching input criteria, but keep including the package in the output of winget update.

Something we could also do is automatically try installing a package if updating gives "No installed package found matching input criteria."

We've been working on the side-by-side scenarios. You could try the latest release and enable the experimental feature on:

https://github.com/microsoft/winget-cli/releases/tag/v1.8.924-preview

Please provide feedback at:

https://github.com/microsoft/winget-cli/discussions/4281

[Policy] Experimental