Inquery about the dimension of input and output

Hello, after reading your library, I would say it is a great job for uncertainty calibration, but I was wondering if the model is limited that in bayes regression model, input and output must have the same size, but sometimes you know this is kind of a big limitation for dataset, maybe sometimes input dimension is like 10 and target dimension is like 4

Hi @luli191,
Thank you for your message and your interest in the library. I may need some more information to answer precisely to your question.
It seems that it is already possible to select the output dimension of your regression problem. For instance, there is an output_dim argument for the regression routine. Moreover, the basic Bayesian MLP that we provide also includes an argument for this (num_outputs).
Could you provide a more precise pointer towards the class that does not support this feature - and that you are interested in - so that I can help?

Hi@o-laurent ,
Thank you for your reply.
I think that even if the dimension of output_dim can be selected, it still requires that the input and output must be of the same dimension, because in my regression attempt, the _forward function in bayes_linear.py will return F.inear with an error as long as input and output is not the same size：RuntimeError: linear(): input and weight.T shapes cannot be multiplied (3x10 and 4x64).
I'm now interested in how to train a bayesian regression model to predict target values don't have the same size with input, like x=[1,4,7,,9,10], y=[3e-1,5e-2].
And it seems that there is not a prediction function for bayes regression, I didn't find that, I would be great appreciate if you could tell me where to find.
Thank you.

Hi again @luli191,
Could you send me the code defining the model that you are using? Could you also tell me what is your batch size and the dimensions of your data (x and y)?

Hi @o-laurent, sure, here are the model I am using.
model
def optim_regression(
model: nn.Module,
learning_rate: float = 5e-4,
):
optimizer = optim.Adam(
model.parameters(),
lr=learning_rate,
weight_decay=0,
)
return optimizer
model = bayesian_mlp(
in_features=10,
num_outputs=4,
hidden_dims=[64, 64],
)
loss = ELBOLoss(
model=model,
inner_loss=nn.MSELoss(),
kl_weight=1 / 50000,
num_samples=3,
)
routine = RegressionRoutine(
probabilistic=False,
output_dim=4,
model=model,
loss=loss,
optim_recipe=optim_regression(model),
)
batch_size is 32, x is a one-dimensional tensor with 10 columns, y is a one-dimensional tensor with 4 columns, like x=[1,2,3,4,5,6,7,8,9,10], y=[1,2,3,4].

Hi @luli191,
Thank you for the code snippet; it allowed us to discover that the ELBOLoss was not correctly handled within the RegressionRoutine. The package's next release will fix this issue (it should be released tomorrow). In the meantime, you could always try install the fixed version using the following command:
pip install https://github.com/ENSTA-U2IS/torch-uncertainty/archive/dev.zip

Let us know if you need any other help.

Hi@alafage,
Also, I believe it's necessary to encapsulate a predict method in regression routine. This is particularly important for uncertainty quantification problems, as being able to directly see the predicted values is very intuitive for understanding the model's output.

Thank you!

The RegressionRoutine already has a method for prediction; basically, it uses the forward method of the model. You should be able to get predictions from your model using:
inputs = ...  #some inputs
routine = RegressionRoutine(...)

predictions = routine(inputs)
# or
predictions = routine.forward(inputs)

In addition, you can access the model using routine.model.
I hope that helps.

@alafage
Thank you for your reminder. I had previously looked at the RegressionRoutine, but I overlooked the forward method, which led me to think there wasn't a method provided for obtaining predictions. Perhaps adding a tutorial for Bayesian regression would be a good idea？

Thanks for the suggestion. I am putting it on the todo list :)


refactored disclaimer gaia write into thunk

fixes #298
refactored gaia call in disclaimer component into redux thunk

LGTM!


patch for #388 - setting global _FillValue

NC_EINVAL is returned when trying to set attribute _FillValue for global variables.
This patch is for issue #388

This patch may need to be reversed due to unforeseen consequences.   See #458 for more information, but in a nutshell we may need to update the documentation instead of enforcing the previously-documented behavior.  Charlie Zender is making a good case that the old behavior has become a de-facto standard/workflow for some segment of our community.


Sptribs cic release 3 wa rebase

Change description
Rebasing sptribs_cic_release_3_wa from sptribs_cic_release_3
JIRA link (if applicable)

Done manually


Send a distribution preview notification on Wednesday

[x] Create Notification
[x] Create Bulk Send Service
[x] Create Task to send on Wednesday

Done


Progress when filtering large files

It would be good to give some idea of how long the file parsing is going to take, e.g. when filtering the huge wikidata JSON file. I think this does it (although I'm not sure if enumerate(iter(f.readline, '')): is significantly less efficient than enumerate(f):.
I restructured the enumerate_lines_from_file function to do the "print every X lines" function, as to prepend the amount done, it needs a way to access the .tell() method of the underlying (compressed) bytes, which is more easily done within the generator function.
import io
import os
import bz2
import gzip

def open_file_based_on_extension(filename, mode):
    # Open a file, whether it's uncompressed, bz2 or gz
    if filename.endswith(".bz2"):
        return bz2.open(filename, mode, encoding="utf-8")
    elif filename.endswith(".gz"):
        return gzip.open(filename, mode, encoding="utf-8")
    else:
        return open(filename, mode, encoding="utf-8")

def enumerate_lines_from_file(filename, print_every=None, print_line_num_func=None):
    """
    Enumerate the lines in a file, whether it's uncompressed, bz2 or gz. If print_every
    is given as an integer, print a message out every print_every lines. If
    print_lin_num_func is given, it should be a function that takes in the line number
    and returns the string to print out.
    """
    underlying_file_size = os.path.getsize(filename)
    with open_file_based_on_extension(filename, "rt") as f:
        if print_every is not None:
            try:
                underlying_file = f.buffer.fileobj  # gzip
            except AttributeError:
                try:
                    underlying_file = f.buffer._buffer.raw._fp  # b2zip
                except AttributeError:
                    underlying_file = f  # plain
        for line_num, line in enumerate(iter(f.readline, '')):
            if print_every is not None and line_num != 0 and line_num % print_every == 0:
                underlying_file_pos = underlying_file.tell()
                percent_done = 100 * underlying_file_pos / underlying_file_size
                if print_line_num_func is not None:
                    print(f"{percent_done:.2f}% read. " + print_line_num_func(line_num))
                else:
                    print(f"{percent_done:.2f}% read. " + f"Processing line {line_num}")
            yield line

# Test plain
for line in enumerate_lines_from_file("test.txt", 1000):
    pass

# Test gzip
for line in enumerate_lines_from_file("test.gz", 1000):
    pass

# Test bz2 (also with bespoke print function)
count = 0
for line in enumerate_lines_from_file("test.bz2", 1000, lambda line: f"{count} out of {line} lines start with A"):
    if line.startswith("A"):
        count += 1
    pass

Ah, brilliant thanks! I can integrate that back into the code base when I get back next week.

We could also predict the remaining time and ETA quite accurately.


update cpu check

This patch changes the parameters for the sensu CPU check to be
variable controlled rather than hardcoded and increases the crit
level for the sensu CPU check from 90 to 99.

Can one of the admins verify this patch?

"ok to test" to accept this pull request for testing
"test this please" for a one time test run
"add to whitelist" to add the author to the whitelist

Looks good to me.

:+1:

ok to test

ok to test


Make generated projects compatible with docker-compose up out of the box

Is your feature request related to a problem? Please describe.
As I understand aeproject generates docker-compose.yml file that depends on NODE_TAG and COMPILER_TAG env variables. I would like to use docker-compose up to run the testing environment as a more familiar tool for me, but it is not working untill I define these variables by myself (I'm creating an .env file).
Would be nice if aeproject specify some version of node and compiler to be compatible with docker-compose out of the box.
Describe the solution you'd like
aeproject can create .env file by itself, not sure how to handle this in the best way.

What do you think of this solution? https://github.com/aeternity/aeproject/pull/432

I also wanted to see that. didn't check the solution, but if it works go with it! :)


Question about vector quantization

I genuinely think it is a good idea.
Since I have no research experience in vector quantization, I would like to know how to ensure that all tokens in the Dict are optimized. If there is a token in the Dict that is far away from the image's all feature tokens, then it may not be selected by argmin during training.

In our implemention, we do nothing to force all the tokens to be optimized while training, but we used to calculate the utilization rate of the tokens and it reached about 99%.
If you want to optimized all the tokens, more implementations are here

It addresses my concern.
Thanks!


bug: TypeError: Can't instantiate abstract class Infura with abstract methods chain_id

information posted here: https://github.com/ApeWorX/ape/issues/119

Please upgrade to latest ProviderAPI in Ape v0.1.0a19


E: Failed to fetch http://ppa.launchpad.net/pistache+team/stable/ubuntu/dists/focal/InRelease  403  Forbidden [IP: <IP_ADDRESS> 80]

apt update failed on the ppa

Thanks @desjare. I am not able to replicate. Is this still occurring?

Ubuntu 20.04
Le lun. 29 juin 2020 à 12:39, Kip<EMAIL_ADDRESS>a écrit :

Thanks @desjare https://github.com/desjare. I am not able to replicate.
Is this still occurring?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/oktal/pistache/issues/790#issuecomment-651233520, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AD4B3GKK2PX6QYA5G6JK7GLRZC7U5ANCNFSM4OLHDUMA
.

I am also running Focal and I don't see this problem.

I’m on Linux on win. Sorry for the fuss will try on my personal machine
tonight.
Have a nice one
Éric
Le lun. 29 juin 2020 à 12:42, Kip<EMAIL_ADDRESS>a écrit :

I am also running Focal and I don't see this problem.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/oktal/pistache/issues/790#issuecomment-651234924, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AD4B3GNOCRZTG43URXXMLWDRZC77RANCNFSM4OLHDUMA
.


[feature]Create auto-copy function for word

Describe your idea:
As we know, Ida pro(another famous tool) has a function: when user click a word, its all letter will be choosen, it's color will be inverse.
Of course, we already have that capability. But the last feature is useful, and jadx still lacks this feature:
When word's color is inverse, we can direct press Ctrl + C to copy the word.
For example, there is some code text.
super.onCreate(savedInstanceState);
When we click the word,(such as onCreate, and not double click), it's color will change. And feature is that we press Ctrl + C, the word will be copy to clipboard.
This will be easy to people, and dont have to copy word by drag the mouse.
Difficulty：now we can turn color to another color, we can add a shortcut key binding, and it's callback is copy. Then it's ok.
According to my judgement, the feature may be easy to do, but i'm not sure you will like it, so i submit a feature.

@zhongqingsong sure, that will be a nice feature! 👍🏽

Done :tada:

Hi how to close this feature?
Thanks.

It bings me some inconvenience,  i hope you can add a switch for this  thanks. @skylot @zhongqingsong


Add support for NIP22 - Comment

Description
Close: https://github.com/rust-nostr/nostr/issues/611
Support NIP22: https://github.com/nostr-protocol/nips/blob/master/22.md
Scope:

[x] Add Kind::Comment
[x] Support uppercase E in TagStandard::Event
[x] Support uppercase K in TagStandard::Kind
[x] Add EventBuilder::comment
[x] Add client.comment()
[x] Add example

Checklist

[x] I followed the contribution guidelines
[x] I ran just precommit or just check before committing
[x] I updated the CHANGELOG (if applicable)

Hi @yukibtc , I wonder is there a way when I set marker: None, it didn't shrink the vector with empty string too?
I reuse TagStandard::Event with added uppercase: bool instead of create a new standard for comment, but in NIP22 marker is unnecessary. But for compality I still keep marker attr. I wonder when marker: None is there a way to remove "" from vector too?
tags.push(Tag::from_standardized_without_cell(TagStandard::Event {
    event_id: root.id,
    relay_url: relay_url.clone(),
    marker: None,
    public_key: Some(root.pubkey),
    uppercase: true,
}));

"tags": [
  [
    "e",
    "b8c6832a2f2ec9172339c194b5e93f54fe7be1df7ec8389996c003302aa13214",
    "",
    "",
    "126103bfddc8df256b6e0abfd7f3797c80dcc4ea88f7c2f87dd4104220b4d65f"
  ],
  [
    "k",
    "1"
  ]
]

Hi @yukibtc , I wonder is there a way when I set marker: None, it didn't shrink the vector with empty string too?
I reuse TagStandard::Event with added uppercase: bool instead of create a new standard for comment, but in NIP22 marker is unnecessary. But for compality I still keep marker attr. I wonder when marker: None is there a way to remove "" from vector too?
tags.push(Tag::from_standardized_without_cell(TagStandard::Event {
    event_id: root.id,
    relay_url: relay_url.clone(),
    marker: None,
    public_key: Some(root.pubkey),
    uppercase: true,
}));

"tags": [
  [
    "e",
    "b8c6832a2f2ec9172339c194b5e93f54fe7be1df7ec8389996c003302aa13214",
    "",
    "",
    "126103bfddc8df256b6e0abfd7f3797c80dcc4ea88f7c2f87dd4104220b4d65f"
  ],
  [
    "k",
    "1"
  ]
]

I've fixed by using:
if let Some(marker) = marker {
    tag.resize_with(3, String::new);
    tag.push(marker.to_string());

    if let Some(public_key) = public_key {
        tag.resize_with(4, String::new);
        tag.push(public_key.to_string());
    }
} else if let Some(public_key) = public_key {
    tag.resize_with(3, String::new);
    tag.push(public_key.to_string());
}

My PR is only supporting comment on EventId - e tag only, but NIP22 allow comment on Address - a tag and Reference - i tag. Do you have any ideas for implement it? create each comment function for each thing is a bit complex


Sample rate (fs) - No default. Must select either 8000 or 16000.

I am training with 48k but in validation I get this
    Run model on reference(ref) and degraded(deg)
    Sample rate (fs) - No default. Must select either 8000 or 16000.
    Note there is narrow band (nb) mode only when sampling rate is 8000Hz.

How to fix it or it is imposible

Could you let me know when you encountered this issue, and which code corresponds to this error?
Did it occur during the calculation of PESQ?

{
"num_gpus": 8,
"batch_size": 16,
"learning_rate": 0.0005,
"adam_b1": 0.8,
"adam_b2": 0.99,
"lr_decay": 0.99,
"seed": 1234,
"dense_channel": 64,
"compress_factor": 0.3,
"num_tsconformers": 4,
"beta": 2.0,

"sampling_rate": 48000,
"segment_size": 96000,
"n_fft": 800,
"hop_size": 300,
"win_size": 800,

"num_workers": 64,

"dist_config": {
    "dist_backend": "nccl",
    "dist_url": "tcp://localhost:54321",
    "world_size": 1
}

}

I set this setttings.
I couldn't find this error where located that is why I'm asking.

I understand that the metric discriminator needs to compute PESQ during training, but PESQ only supports speech below 16kHz.

You can remove the metric discriminator, or find another metric that can be calculated under a 48 kHz sampling rate, such as ViSQOL.

aha thanks


feat: allow marshalling into Solidity-compatible format from witness.Witness.

Right now we have to construct the inputs for verifying in Solidity by hand. It would be better if we can just marshal witness.Witness into Solidity inputs with performing all the conversions and including commitment if necessary (for Groth16 verifier).
Related #524

Would be very appreciated


[Draft] CBMC proofs for +TCP

Draft PR for addition of +TCP CBMC proofs to this repo
Description
This PR aims to bring all the +TCP CBMC proofs in this repository. The end goal is to execute the proofs with every new PR to check whether the PR introduces any breaking change.
This is a PR that will involve quite a bit of editing and changes to allow CBMC to execute with the different directory structure of this repo (when comparing with amazon-freertos). I will make changes to it and people can review it and suggest changes while I am doing so.
Once everything is finalised, I will create a 'squashed' PR.
Test Steps
Once the files are edited to work with this repository,

Run python3 prepare.py in the /FreeRTOS/Test/CBMC/proofs directory
Commit the changes caused be prepare.py
Run 'make' in each proof subdirectory

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

see https://github.com/FreeRTOS/FreeRTOS/pull/56. this PR is squashed there.


Package for data models

This will be improved in the future. For a moment we need to define proper data types, marked as todo items.

@pupenasan can you add inputs to todo items, please?

Чи дивилися на цей опис? https://github.com/pupenasan/pacframework-tools/blob/main/masterdataxls.md


Switch Pex installed wheels to --prefix scheme.

Previously Pex used Pip's --target scheme which had both known bugs
(https://github.com/pypa/pip/issues/7658) and unknown quirks that Pex
was failing to fully be able to work around. Switch to the --prefix
scheme which exactly mirrors the scheme venvs use so that venvs can be
created with content of all sorts placed where it belongs.
This removes fragile parsing and interpretation of the RECORD; now Pex
only creates a RECORD, which is much more straight forward, when
building a venv.
Partially addresses #1655 by switching to sha256 for all external
artifact hashing. Only internal hashing remains for:

interpreters / INTERP-INFO
venvs and unzipped_pexes / PEX-INFO pex_hash (but this is a hash
that includes all distributions' sha256 hashes).

Fixes #1656
Closes #1662

The existing tests proved an excellent gauntlet for all the shuffling in pex/pep_376.py. That said, a few new helpers deserve their own unit tests which I'll be adding here before un-drafting. I wanted to get a CI burn. All 18 test shards (9 IT, 9 Unit) pass on my machine, but there's always macOS and I'd like to suss things out before bugging folks to look at this fairly huge PR.

Alright - this is good to go for review. Thanks in advance - it's big.

N.B..: The only incompatibility here is forward compatiblity for pex-tools venv for versions 2.1.{68,69,70} operating against newer PEXes. There is simply no way to patch that up.

Makes sense. I think this would be helpful to include in the comments, including the trick about .prefix being non-importable

I guess. This is a very old and very central fix for PEX though! Have you not wondered why .bootstrap and .deps were named as they are?!

Have you not wondered why .bootstrap and .deps were named as they are?!

Ah! Wow. I figured it had something to do with being private, I did not make the connection that it disables Python imports.


Dumb/smart component pattern and repaints

Using the dumb/smart components pattern, does it mean that all dumb components will be re-rendered when the "containers" receive a new state notification ? For example in the the todo example adding a todo to the list will re-render the whole app.
Are there any pattern to optimise repaints in a larger app ?

React-Redux implements a pretty aggressive shouldComponentUpdate so state changes will only trigger re-renders if the slice of state @connect'd to results in a different set of state props (only checked shallowly)
That said. If the smart component does trigger a re-render and you are concerned about performance then you should implement shouldComponentUpdate in your 'dumb' components. In practice most components can use something like https://facebook.github.io/react/docs/pure-render-mixin.html

I am not so much concerned about performance yet but I think many people are and that should be addressed in the docs.
As you said:

state changes will only trigger re-renders if the slice of state @connect'd to results in a different set of state props

In that case in the simple todo example form the doc, why would the footer component re-render when a todo is added? It doesn't share any state with the todo list.

This is a consequence of how React works, and react-redux actually improves the situation. In no way does connect cause there to be additional re-renders of the entire app tree that you wouldn't experience if you simply mutated a prop or state on a similarly positioned component.
That said, the footer in this example shows the todo count so it rightly does need to be re-rendered. but I believe that is beside your point.
bottom line is store subscriptions do not produce additional render noise as long as you are only subscribing to the slice of state the given component tree has an interest in reacting to.

That said, the footer in this example shows the todo count so it rightly does need to be re-rendered. but I believe that is beside your point.

Are we talking about the same example ?

This is a consequence of how React works, and react-redux actually improves the situation. In no way does connect cause there to be additional re-renders of the entire app tree that you wouldn't experience if you simply mutated a prop or state on a similarly positioned component.

My question is more about the dumb/smart component pattern. Is it correct to say that smart components re-render all their nested dumb components when state updates ? If so it's worth taking into account when structuring the app.

Are we talking about the same example ?

not sure, i'm talking about this here: https://github.com/rackt/redux/blob/master/examples/todomvc/components/Footer.js#L51

Is it correct to say that smart components re-render all their nested dumb components when state updates ? If so it's worth taking into account when structuring the app.

yes that's fair to say but I don't think it has a particularly deep implication for how one should structure their app.

Put connect() at the top until you hit performance problems, then put it somewhere in the middle to solve them.

Thanks, so one connect() at the top most level is the approach you'd recommend? It'd nice to have this statement in the docs somewhere, it'd help understanding the whole redux flow. Maybe a "flux like" diagram would help there as well.

then put it somewhere in the middle to solve them.
Then we would have multiple connect() for all main "containers" connecting to the main store ?

There is no official recommendation on this, it really depends on the app.
Usually I'd go for “one connect() per route handler”, but as your app gets more complicated, you'll want to put connect()s further down the hierarchy. It's a balance you'll need to figure out for yourself. As soon as there's too much prop passing, it's a sign that you should connect().

Sorry to drag this up but i had a similar question. Because the props are passed from the top level root component, i.e the APP itself, it seems that every inherit component will render.
This doesn't seem to be an issue with other flux implementations as you can have the even listener, listening for updates - somewhere deep in the component hierarchy. ShouldComponentUpdate works ok here but where as in Redux components will need to update to pass the props down.
This seems to be conflicting with React fundamentals where a full app render is taking place all the time?
I'm envisaging performance bottlenecks.
Am i missing something? @gaearon @gnoff

Actually you probably dont want to have your root component react to every changes in your store. It should only propagate the "global" state changes like maybe a session change or a language switch.
The rest of your state will be handled by the relevant children.
BTW you can define which part of the store your component will react to using mapStateToProps: https://github.com/rackt/react-redux/blob/master/docs/api.md#connectmapstatetoprops-mapdispatchtoprops-mergeprops-options

Because the props are passed from the top level root component, i.e the APP itself, it seems that every inherit component will render.

I said in the above comment that nobody forces you to connect just once. You can have as many connected components as you like. This addresses any potential performance bottlenecks.


numba 0.46, useless(?) code in parfor init block

Reporting a bug

[x] I am using the latest released version of Numba (most recent is visible in
the change log (https://github.com/numba/numba/blob/master/CHANGE_LOG).
[ ] I have included below a minimal working reproducer (if you are unsure how
to write one see http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports).

We are porting hpat to numba 0.46 and found discrepancies in parfor pass output.
pre parfor pass input IR is identical.
In previous version init block after parfor pass was empty.
In 0.46 init block contains seemingly useless code.
init block:
    arr.83 = $arr.83.139                     ['$arr.83.139', 'arr.83']
    del arr.83                               []

We didn't manage to reduce code to pure numba yet but here are IR before preparfor pass  and after parfor pass.
Any ideas why this is happens?
prev numba
=========== before preparfor ===========
label 0:
    N = arg(0, name=N)                       ['N']
    $0.1 = global(np: <module 'numpy' from '/home/ibutygin/miniconda3/envs/HPAT/lib/python3.7/site-packages/numpy/__init__.py'>) ['$0.1']
    $0.2 = getattr(value=$0.1, attr=arange)  ['$0.1', '$0.2']
    $0.4 = call $0.2(N, func=$0.2, args=[Var(N, /home/ibutygin/src/hpat/hpat/hpat/tests/test_basic.py (303))], kws=(), vararg=None) ['$0.2', '$0.4', 'N']
    A = $0.4                                 ['$0.4', 'A']
    _dist_arr.36 = A                         ['A', '_dist_arr.36']
    $0.1.37 = global(hpat: <module 'hpat' from '/home/ibutygin/src/hpat/hpat/hpat/__init__.py'>) ['$0.1.37']
    $0.2.38 = getattr(value=$0.1.37, attr=distributed_api) ['$0.1.37', '$0.2.38']
    $0.3.39 = getattr(value=$0.2.38, attr=dist_return) ['$0.2.38', '$0.3.39']
    $0.5.40 = call $0.3.39(_dist_arr.36, func=$0.3.39, args=[Var(_dist_arr.36, /home/ibutygin/src/hpat/hpat/hpat/hiframes/hiframes_untyped.py (1735))], kws=(), vararg=None) ['$0.3.39', '$0.5.40', '_dist_arr.36']
    _d_arr.41 = $0.5.40                      ['$0.5.40', '_d_arr.41']
    distributed_return.44 = cast(value=_d_arr.41) ['_d_arr.41', 'distributed_return.44']
    return distributed_return.44             ['distributed_return.44']
========================================
============= after parfor =============
label 0:
    N = arg(0, name=N)                       ['N']
    $start.54.115 = const(int, 0)            ['$start.54.115']
    $step.56.116 = const(int, 1)             ['$step.56.116']
    $dtype.57.117 = const(dtype, int64)      ['$dtype.57.117']
    $0.5.62 = global(math: <module 'math' from '/home/ibutygin/miniconda3/envs/HPAT/lib/python3.7/lib-dynload/math.cpython-37m-x86_64-linux-gnu.so'>) ['$0.5.62']
    $0.6.63 = getattr(value=$0.5.62, attr=ceil) ['$0.5.62', '$0.6.63']
    del $0.5.62                              []
    $0.9.66 = N - $start.54.115              ['$0.9.66', '$start.54.115', 'N']
    del N                                    []
    $0.11.68 = $0.9.66 / $step.56.116        ['$0.11.68', '$0.9.66', '$step.56.116']
    del $0.9.66                              []
    $nitems_r.70.118 = call $0.6.63($0.11.68, func=$0.6.63, args=[Var($0.11.68, /home/ibutygin/miniconda3/envs/HPAT/lib/python3.7/site-packages/numba/parfor.py (354))], kws=(), vararg=None) ['$0.11.68', '$0.6.63', '$nitems_r.70.118']
    del $0.6.63                              []
    del $0.11.68                             []
    $0.13.71 = global(int: <class 'int'>)    ['$0.13.71']
    $0.14.72 = global(max: <built-in function max>) ['$0.14.72']
    $const0.16.74 = const(int, 0)            ['$const0.16.74']
    $0.17.75 = call $0.14.72($nitems_r.70.118, $const0.16.74, func=$0.14.72, args=[Var($nitems_r.70.118, /home/ibutygin/miniconda3/envs/HPAT/lib/python3.7/site-packages/numba/parfor.py (354)), Var($const0.16.74, /home/ibutygin/miniconda3/envs/HPAT/lib/python3.7/site-packages/numba/parfor.py (355))], kws=(), vararg=None) ['$0.14.72', '$0.17.75', '$const0.16.74', '$nitems_r.70.118']
    del $nitems_r.70.118                     []
    del $const0.16.74                        []
    del $0.14.72                             []
    $nitems.77.119 = call $0.13.71($0.17.75, func=$0.13.71, args=[Var($0.17.75, /home/ibutygin/miniconda3/envs/HPAT/lib/python3.7/site-packages/numba/parfor.py (355))], kws=(), vararg=None) ['$0.13.71', '$0.17.75', '$nitems.77.119']
    del $0.17.75                             []
    del $0.13.71                             []
    $0.19.78 = global(np: <module 'numpy' from '/home/ibutygin/miniconda3/envs/HPAT/lib/python3.7/site-packages/numpy/__init__.py'>) ['$0.19.78']
    $0.20.79 = getattr(value=$0.19.78, attr=empty) ['$0.19.78', '$0.20.79']
    del $0.19.78                             []
    $arr.83.120 = call $0.20.79($nitems.77.119, $dtype.57.117, func=$0.20.79, args=[Var($nitems.77.119, /home/ibutygin/miniconda3/envs/HPAT/lib/python3.7/site-packages/numba/parfor.py (355)), Var($dtype.57.117, /home/ibutygin/miniconda3/envs/HPAT/lib/python3.7/site-packages/numba/parfor.py (332))], kws=(), vararg=None) ['$0.20.79', '$arr.83.120', '$dtype.57.117', '$nitems.77.119']
    del $dtype.57.117                        []
    del $0.20.79                             []
    $0.1.37 = global(hpat: <module 'hpat' from '/home/ibutygin/src/hpat/hpat/hpat/__init__.py'>) ['$0.1.37']
    $0.2.38 = getattr(value=$0.1.37, attr=distributed_api) ['$0.1.37', '$0.2.38']
    del $0.1.37                              []
    $0.3.39 = getattr(value=$0.2.38, attr=dist_return) ['$0.2.38', '$0.3.39']
    del $0.2.38                              []
---begin parfor 0---
index_var =  parfor_index.112
LoopNest(index_variable = parfor_index.112, range = (0, $nitems.77.119, 1))
init block:
label 78:
    i.99 = parfor_index.112                  ['i.99', 'parfor_index.112']
    $74.5.103 = i.99 * $step.56.116          ['$74.5.103', '$step.56.116', 'i.99']
    $74.6.104 = $start.54.115 + $74.5.103    ['$74.5.103', '$74.6.104', '$start.54.115']
    $arr.83.120[parfor_index.112] = $74.6.104 ['$74.6.104', '$arr.83.120', 'parfor_index.112']
----end parfor 0----
    del $step.56.116                         []
    del $start.54.115                        []
    $_d_arr.41.121 = call $0.3.39($arr.83.120, func=$0.3.39, args=[Var($arr.83.120, /home/ibutygin/miniconda3/envs/HPAT/lib/python3.7/site-packages/numba/parfor.py (356))], kws=(), vararg=None) ['$0.3.39', '$_d_arr.41.121', '$arr.83.120']
    del $arr.83.120                          []
    del $0.3.39                              []
    distributed_return.44 = cast(value=$_d_arr.41.121) ['$_d_arr.41.121', 'distributed_return.44']
    del $_d_arr.41.121                       []
    return distributed_return.44             ['distributed_return.44']
========================================

numba 0.46
=========== before preparfor ===========
label 0:
    N = arg(0, name=N)                       ['N']
    $0.1 = global(np: <module 'numpy' from '/home/ibutygin/miniconda3/envs/NUMBA_CUSTOM/lib/python3.7/site-packages/numpy/__init__.py'>) ['$0.1']
    $0.2 = getattr(value=$0.1, attr=arange)  ['$0.1', '$0.2']
    $0.4 = call $0.2(N, func=$0.2, args=[Var(N, /home/ibutygin/src/numba/hpat/hpat/tests/test_basic.py (303))], kws=(), vararg=None) ['$0.2', '$0.4', 'N']
    A = $0.4                                 ['$0.4', 'A']
    _dist_arr.36 = A                         ['A', '_dist_arr.36']
    $0.1.37 = global(hpat: <module 'hpat' from '/home/ibutygin/src/numba/hpat/hpat/__init__.py'>) ['$0.1.37']
    $0.2.38 = getattr(value=$0.1.37, attr=distributed_api) ['$0.1.37', '$0.2.38']
    $0.3.39 = getattr(value=$0.2.38, attr=dist_return) ['$0.2.38', '$0.3.39']
    $0.5.40 = call $0.3.39(_dist_arr.36, func=$0.3.39, args=[Var(_dist_arr.36, /home/ibutygin/src/numba/hpat/hpat/hiframes/hiframes_untyped.py (1753))], kws=(), vararg=None) ['$0.3.39', '$0.5.40', '_dist_arr.36']
    _d_arr.41 = $0.5.40                      ['$0.5.40', '_d_arr.41']
    distributed_return.44 = cast(value=_d_arr.41) ['_d_arr.41', 'distributed_return.44']
    return distributed_return.44             ['distributed_return.44']
========================================
============= after parfor =============
label 0:
    N = arg(0, name=N)                       ['N']
    $start.54.115 = const(int, 0)            ['$start.54.115']
    $step.56.116 = const(int, 1)             ['$step.56.116']
    $dtype.57.117 = const(dtype, int64)      ['$dtype.57.117']
    $0.5.62 = global(math: <module 'math' from '/home/ibutygin/miniconda3/envs/NUMBA_CUSTOM/lib/python3.7/lib-dynload/math.cpython-37m-x86_64-linux-gnu.so'>) ['$0.5.62']
    $0.6.63 = getattr(value=$0.5.62, attr=ceil) ['$0.5.62', '$0.6.63']
    del $0.5.62                              []
    $0.9.66 = N - $start.54.115              ['$0.9.66', '$start.54.115', 'N']
    del N                                    []
    $0.11.68 = $0.9.66 / $step.56.116        ['$0.11.68', '$0.9.66', '$step.56.116']
    del $0.9.66                              []
    $nitems_r.70.118 = call $0.6.63($0.11.68, func=$0.6.63, args=[Var($0.11.68, /home/ibutygin/src/numba/numba/numba/parfor.py (354))], kws=(), vararg=None) ['$0.11.68', '$0.6.63', '$nitems_r.70.118']
    del $0.6.63                              []
    del $0.11.68                             []
    $0.13.71 = global(int: <class 'int'>)    ['$0.13.71']
    $0.14.72 = global(max: <built-in function max>) ['$0.14.72']
    $const0.16.74 = const(int, 0)            ['$const0.16.74']
    $0.17.75 = call $0.14.72($nitems_r.70.118, $const0.16.74, func=$0.14.72, args=[Var($nitems_r.70.118, /home/ibutygin/src/numba/numba/numba/parfor.py (354)), Var($const0.16.74, /home/ibutygin/src/numba/numba/numba/parfor.py (355))], kws=(), vararg=None) ['$0.14.72', '$0.17.75', '$const0.16.74', '$nitems_r.70.118']
    del $nitems_r.70.118                     []
    del $const0.16.74                        []
    del $0.14.72                             []
    $nitems.77.119 = call $0.13.71($0.17.75, func=$0.13.71, args=[Var($0.17.75, /home/ibutygin/src/numba/numba/numba/parfor.py (355))], kws=(), vararg=None) ['$0.13.71', '$0.17.75', '$nitems.77.119']
    del $0.17.75                             []
    del $0.13.71                             []
    $0.19.78 = global(np: <module 'numpy' from '/home/ibutygin/miniconda3/envs/NUMBA_CUSTOM/lib/python3.7/site-packages/numpy/__init__.py'>) ['$0.19.78']
    $0.20.79 = getattr(value=$0.19.78, attr=empty) ['$0.19.78', '$0.20.79']
    del $0.19.78                             []
    $arr.83.139 = call $0.20.79($nitems.77.119, $dtype.57.117, func=$0.20.79, args=[Var($nitems.77.119, /home/ibutygin/src/numba/numba/numba/parfor.py (355)), Var($dtype.57.117, /home/ibutygin/src/numba/numba/numba/parfor.py (332))], kws=(), vararg=None) ['$0.20.79', '$arr.83.139', '$dtype.57.117', '$nitems.77.119']
    del $dtype.57.117                        []
    del $0.20.79                             []
    $0.1.37 = global(hpat: <module 'hpat' from '/home/ibutygin/src/numba/hpat/hpat/__init__.py'>) ['$0.1.37']
    $0.2.38 = getattr(value=$0.1.37, attr=distributed_api) ['$0.1.37', '$0.2.38']
    del $0.1.37                              []
    $0.3.39 = getattr(value=$0.2.38, attr=dist_return) ['$0.2.38', '$0.3.39']
    del $0.2.38                              []
---begin parfor 0---
index_var =  parfor_index.112
LoopNest(index_variable = parfor_index.112, range = (0, $nitems.77.119, 1))
init block:
    arr.83 = $arr.83.139                     ['$arr.83.139', 'arr.83']
    del arr.83                               []
label 78:
    i.99 = parfor_index.112                  ['i.99', 'parfor_index.112']
    $74.5.103 = i.99 * $step.56.116          ['$74.5.103', '$step.56.116', 'i.99']
    $74.6.104 = $start.54.115 + $74.5.103    ['$74.5.103', '$74.6.104', '$start.54.115']
    $arr.83.139[parfor_index.112] = $74.6.104 ['$74.6.104', '$arr.83.139', 'parfor_index.112']
----end parfor 0----
    del $step.56.116                         []
    del $start.54.115                        []
    $_d_arr.41.121 = call $0.3.39($arr.83.139, func=$0.3.39, args=[Var($arr.83.139, /home/ibutygin/src/numba/numba/numba/parfor.py (356))], kws=(), vararg=None) ['$0.3.39', '$_d_arr.41.121', '$arr.83.139']
    del $arr.83.139                          []
    del $0.3.39                              []
    distributed_return.44 = cast(value=$_d_arr.41.121) ['$_d_arr.41.121', 'distributed_return.44']
    del $_d_arr.41.121                       []
    return distributed_return.44             ['distributed_return.44']
========================================

Thanks for the report.

We are porting hpat to numba 0.46 and found discrepancies in parfor pass output.

From which version are you porting it from? 0.44.0, 0.44.1, 0.45.0, 0.45.1?

0.45.1

I don't think a huge amount was added specifically to parfors between 0.45.1 and 0.46.0:
git diff 0.45.1 -- numba/npyufunc/parfor.py numba/parfor.py

looks pretty much like just this patch https://github.com/numba/numba/pull/4305 which I don't think would necessarily mutate the parfor init block.
An IR legalizer was added in https://github.com/numba/numba/pull/4162 to ensure the IR is valid prior to lowering, I'm wondering if that's now preventing some cleanup happening in parfors? Also, given the above, could you just run DCE over the init block?

could you just run DCE over the init block?

I tried to add DeadCodeElimination pass right after parfor but it had no effect.
And how can I run DCE over a single block? There is dead_code_elimination function in ir_utils, but it works over entire function not a single block.

could you just run DCE over the init block?

I tried to add DeadCodeElimination pass right after parfor but it had no effect.
And how can I run DCE over a single block? There is dead_code_elimination function in ir_utils, but it need entire function not a single block.

I don't think there's a already existing function to do that, you'd probably have to customise something.
I do have to ask what's the actual issue here? Why are some provably dead statements causing a problem?

I do have to ask what's the actual issue here? Why are some provably dead statements causing a problem?

We have our custom passes which transform parfors into mpi-distibuted code.
They will generate additional code for such 'dead' code (comparing to previous numba version) and we see it in our reports.

I see, it might be beneficial to write a DCE pass that can actually operate on the Parfors class if it is not working already, I imagine that may be generally useful?
@DrTodd13 any ideas why the above is now happening. I don't think it's anything necessarily related to patches to parfors since 0.45.1.

@Hardcode84 @stuartarchibald I think we need a minimal reproducer.  If Ivan doesn't want to post it publically then he can send it to me directly.

I was unable to make pure (without our custom passes in pipeline) reproducer yet. We only have HPAT-based for now (it is one of the HPAT tests actually).
I will probably try to reduce test case again on next week.
We will also probably post our update-to-46-numba HPAT PR (WIP) on next week or so.

If it is hard to decouple from HPAT, i have HPAT installed and can run HPAT tests.  Just post what branch and test commands and I can help diagnosing the issue.

@sklam
branch from https://github.com/IntelPython/hpat/pull/224
But it is probably broken now due to changes #4687
quick workaround to enable it will be to change in inline_closure_call
    - if isinstance(callee, pytypes.FunctionType):
    -     from numba import compiler
    -     callee_ir = compiler.run_frontend(callee, inline_closures=True)
    - else:
    -     callee_ir = get_ir_of_code(glbls, callee_code)
    + callee_ir = get_ir_of_code(glbls, callee_code)

Test python -W ignore -u -m unittest -v hpat.tests.test_basic.TestBasic.test_dist_return
Output should be:
FAIL: test_dist_return (hpat.tests.test_basic.TestBasic)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/ibutygin/src/numba/hpat/hpat/tests/test_basic.py", line 313, in test_dist_return
    self.assertEqual(count_array_OneDs(), 1)
AssertionError: 2 != 1

Thanks

Here is on pure numba:
import numba;

@numba.njit(parallel=True)
def foo():
    res = 0
    arr = [1,2,3,4,5]
    numba.parfor.init_prange()
    dummy = arr
    for i in numba.prange(5):
        res += arr[i]
    return res + dummy[2]

print(foo())

0.46 ouput:
-----------------------------nopython: parfor_pass------------------------------
label 0:
    $const0.1 = const(int, 0)                ['$const0.1']
    res = $const0.1                          ['$const0.1', 'res']
    del $const0.1                            []
    $const0.2 = const(int, 1)                ['$const0.2']
    $const0.3 = const(int, 2)                ['$const0.3']
    $const0.4 = const(int, 3)                ['$const0.4']
    $const0.5 = const(int, 4)                ['$const0.5']
    $const0.6 = const(int, 5)                ['$const0.6']
    $dummy.21 = build_list(items=[Var($const0.2, test.py (6)), Var($const0.3, test.py (6)), Var($const0.4, test.py (6)), Var($const0.5, test.py (6)), Var($const0.6, test.py (6))]) ['$const0.2', '$const0.3', '$const0.4', '$const0.5', '$const0.6', '$dummy.21']
    del $const0.6                            []
    del $const0.5                            []
    del $const0.4                            []
    del $const0.3                            []
    del $const0.2                            []
    $const34.3 = const(int, 5)               ['$const34.3']
    $const64.3 = const(int, 2)               ['$const64.3']
---begin parfor 0---
index_var =  parfor_index.0
LoopNest(index_variable = parfor_index.0, range = (0, $const34.3, 1))
init block:
    dummy = $dummy.21                        ['$dummy.21', 'dummy']
    del dummy                                []
label 46:
    $46.5 = getitem(value=$dummy.21, index=parfor_index.0) ['$46.5', '$dummy.21', 'parfor_index.0']
    $res.22 = inplace_binop(fn=<built-in function iadd>, immutable_fn=<built-in function add>, lhs=res, rhs=$46.5, static_lhs=Undefined, static_rhs=Undefined) ['$46.5', '$res.22', 'res']
    res = $res.22                            ['$res.22', 'res']
----end parfor 0----
    $64.4 = static_getitem(value=$dummy.21, index=2, index_var=$const64.3) ['$64.4', '$const64.3', '$dummy.21']
    del $dummy.21                            []
    del $const64.3                           []
    $64.5 = res + $64.4                      ['$64.4', '$64.5', 'res']
    del res                                  []
    del $64.4                                []
    $64.6 = cast(value=$64.5)                ['$64.5', '$64.6']
    del $64.5                                []
    return $64.6                             ['$64.6']

0.45.1 output is more different:
label 0:
    $const0.1 = const(int, 0)                ['$const0.1']
    res = $const0.1                          ['$const0.1', 'res']
    del $const0.1                            []
    $const0.2 = const(int, 1)                ['$const0.2']
    $const0.3 = const(int, 2)                ['$const0.3']
    $const0.4 = const(int, 3)                ['$const0.4']
    $const0.5 = const(int, 4)                ['$const0.5']
    $const0.6 = const(int, 5)                ['$const0.6']
    $arr.3 = build_list(items=[Var($const0.2, test.py (6)), Var($const0.3, test.py (6)), Var($const0.4, test.py (6)), Var($const0.5, test.py (6)), Var($const0.6, test.py (6))]) ['$arr.3', '$const0.2', '$const0.3', '$const0.4', '$const0.5', '$const0.6']
    del $const0.6                            []
    del $const0.5                            []
    del $const0.4                            []
    del $const0.3                            []
    del $const0.2                            []
    $const34.3 = const(int, 5)               ['$const34.3']
    $const64.3 = const(int, 2)               ['$const64.3']
    $64.4 = static_getitem(value=$arr.3, index=2, index_var=$const64.3) ['$64.4', '$arr.3', '$const64.3']
    del $const64.3                           []
---begin parfor 0---
index_var =  parfor_index.0
LoopNest(index_variable = parfor_index.0, range = (0, $const34.3, 1))
init block:
label 46:
    $46.5 = getitem(value=$arr.3, index=parfor_index.0) ['$46.5', '$arr.3', 'parfor_index.0']
    $res.19 = inplace_binop(fn=<built-in function iadd>, immutable_fn=<built-in function add>, lhs=res, rhs=$46.5, static_lhs=Undefined, static_rhs=Undefined) ['$46.5', '$res.19', 'res']
    res = $res.19                            ['$res.19', 'res']
----end parfor 0----
    del $arr.3                               []
    $64.5 = res + $64.4                      ['$64.4', '$64.5', 'res']
    del res                                  []
    del $64.4                                []
    $64.6 = cast(value=$64.5)                ['$64.5', '$64.6']
    del $64.5                                []
    return $64.6                             ['$64.6']

but this dead code
init block:
    dummy = $dummy.21                        ['$dummy.21', 'dummy']
    del dummy                                []

shouldn't be there in any case, right?

@ehsantn @Hardcode84 @stuartarchibald @sklam Note that this doesn't happen if init_prange is not explicitly called or if "dummy = arr" is moved above the init_prange call.  However, I did figure out why the dead code was in the init block.  When the dead code elimination is done for the parfor, the set of lives out of the parfor that is used to determine if something can be removed is calculated as the real lives plus all the aliases of all the lives.  On its face that seems reasonable because you don't want to remove something like "dummy[i] = 1" if dummy aliases something else.  Alias analysis sees the "dummy = arr" and then says that dummy is live post loop because arr is live post loop even though dummy is never directly accessed again.  I did a test where instead of passing the lives and all the aliases to the remove dead parfor extension that instead I just pass in lives and that eliminates the issue in the above test and works for test_parfors, test_ir_utils, and test_analysis.  Something a little less scary would be to have two sets of lives kept.  One applied to assignments (which would just be lives) and the other applied to everything else (which would be lives + aliases).  What does everyone think?

@Hardcode84 If you want to try this fix, you can try branch issue4690 in github.com/IntelLabs/numba.

@DrTodd13
This branch fixes all parfor-related failures in our tests.
Thanks

Good point!
With regards to the above, I think that would you propose in having assignment-lives and all-lives seems like the best solution here? I'm wondering if there should be a container in which to ship all this information around opposed to having to keep modifying call sites?


Fix explicit bugs of example

Fix some example source code to be able to complie.
But they don't have assurance being executable,
And following examples are not fixed yet.

example/body/inertialellipsoid_test.c
example/chain/chain2vert_test.c
example/chain/com_vel_spher_test.c

Best Regards,

Thanks for the report. I've fixed them and moved some of them to test/.


Prepend project name to findings path - #171

@vanniktech please check this branch out and tell me if the file is clickable :)

I found one more case where this does not work. It's when this plugin is applied in a single project that has no subprojects.
It can be reproduced here when running ./gradlew detektCheck and this patch file to trigger a warning:
diff --git a/src/main/kotlin/com/vanniktech/android/apk/size/ApkSizeTask.kt b/src/main/kotlin/com/vanniktech/android/apk/size/ApkSizeTask.kt
index 23a7d82..f245a90 100644
--- a/src/main/kotlin/com/vanniktech/android/apk/size/ApkSizeTask.kt
+++ b/src/main/kotlin/com/vanniktech/android/apk/size/ApkSizeTask.kt
@@ -23,7 +23,7 @@ open class ApkSizeTask : DefaultTask() {

     outputFile.parentFile.mkdirs()
     outputFile.createNewFile()
-    outputFile.outputStream().use { outputStream ->
+    outputFile.outputStream().use({ outputStream ->
       val appendableStream = PrintStream(outputStream)
       appendableStream.println("bytes,kilobytes,megabytes")

@@ -32,7 +32,7 @@ open class ApkSizeTask : DefaultTask() {
       val megaBytes = ApkSizeTools.convertBytesToMegaBytes(apkSize)

       appendableStream.println("$bytes,$kiloBytes,$megaBytes")
-    }
+    })

     failBuildMaxMethods(apkSize, extension.maxApkSize)
   }

The output will be:
UnnecessaryParentheses - [sizeApk] at gradle-android-apk-size-plugin/src/main/kotlin/com/vanniktech/android/apk/size/ApkSizeTask.kt:26:34

Which is not entirely correct since I'm already at the gradle-android-apk-size-plugin folder and hence the path should be src/main/kotlin/com/vanniktech/android/apk/size/ApkSizeTask.kt:26:34 in order to be clickable.

Why don't we always print ouf the full path in the console? That would solve all the problems. (Also executing detektCheck from a module level by using the installed gradle command line). Ktlint does also the same.


systemd-stage-1: Use common bin for /sbin

util-linux's mount command was only looking in /sbin for mount helpers, which wasn't working.
Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[ ] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
24.11 Release Notes (or backporting 23.11 and 24.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[ ] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Not sure if caused by this PR, but there's something weird with systemd initrd: on unstable-small from today, my mdadm array stopped being assembled at boot, dropping me on the recovery shell. mdadm command is available, and a mdadm -As is enough to bring the array up, but then it's hard to continue booting. Does not happen on 20240804. Disabling boot.initrd.systemd.enable allows me to boot fine on current unstable-small. Could this be caused by this PR?

@andrevmatos Would you mind opening an issue about that, including any details you can? Ideally including the systemd stage 1 journal contents.

Not sure if caused by this PR, but there's something weird with systemd initrd: on unstable-small from today, my mdadm array stopped being assembled at boot, dropping me on the recovery shell. mdadm command is available, and a mdadm -As is enough to bring the array up, but then it's hard to continue booting. Does not happen on 20240804. Disabling boot.initrd.systemd.enable allows me to boot fine on current unstable-small. Could this be caused by this PR?

I can confirm the problem with mdadm only happens after this specific commit. Pinning the nixpkgs input to the commit just before this one (github:NixOS/nixpkgs/0af9d835c27984b3265145f8e3cbc6c153479196) temporarily fixes the issue.


Fix fatalError failure for development snapshots

Since we currently don't support --with-docker for development snapshots, we shouldn't attempt to calculate swiftBaseDockerImage when --with-docker is not passed. Otherwise this triggers a fatalError crash.

@swift-ci test

@swift-ci test

@swift-ci test


Feature Name
IState, StateBase, State, Blackboard, Clipboard
Feature Description
This feature introduces a standardized state management system, including the following components:

[ ] IState: An interface defining the core methods required for state management.
[ ] StateBase: A base class that provides default behavior for common state operations.
[ ] State: A concrete implementation for handling in-memory state as a dictionary.
[ ] Blackboard: A specialized state system supporting shared, global state with additional rules and methods for collaborative multi-agent environments.
[ ] Clipboard: A lightweight state management system for temporary, ephemeral data storage and transfer between agents or processes.

Motivation
State management is critical for enabling agents to store, share, and retrieve information efficiently within a multi-agent system (MAS). This feature will:

Provide a unified approach to state handling across various MAS components.
Ensure modularity and flexibility for extending or customizing state mechanisms.
Simplify interactions between agents, particularly in scenarios requiring shared state (e.g., Blackboard).
Improve maintainability and reduce redundancy by standardizing state operations.

Potential Solutions

Define a core interface (IState) with methods like read, write, and update.

Implement default behaviors in a base class (StateBase) to reduce code duplication.
Concrete Implementations:

State: A dictionary-backed implementation for simple in-memory state.

Blackboard: Add methods for locking, unlocking, and rule-based state updates to support multi-agent collaboration.
Clipboard: Focus on lightweight operations, providing an easy mechanism for transient data storage and transfer.

Testing:

Develop contract-based unit tests to validate all implementations against the IState interface.

Additional Context (optional)
No response
Affected Areas
None
Priority
Low
Required Files

[ ] Test File
[ ] Component File

let's start here:
from abc import ABC, abstractmethod
from typing import Dict, Any

class IState(ABC):
    @abstractmethod
    def read(self) -> Dict[str, Any]:
        """
        Reads and returns the current state as a dictionary.
        """

    @abstractmethod
    def write(self, data: Dict[str, Any]) -> None:
        """
        Replaces the current state with the given data.
        """

    @abstractmethod
    def update(self, data: Dict[str, Any]) -> None:
        """
        Updates the state with the given data.
        """

    @abstractmethod
    def reset(self) -> None:
        """
        Resets the state to its initial state.
        """

    def deep_copy(self) -> 'IState':
        """
        Creates a deep copy of the current state.
        """
        raise NotImplementedError("Subclasses must implement 'deep_copy'.")

Okay

from typing import Dict, Any
from pydantic import Field, ConfigDict
from swarmauri_core.ComponentBase import ComponentBase
from swarmauri_core.state.IState import IState

class StateBase(IState, ComponentBase):
    """
    Abstract base class for state management, extending IState and ComponentBase.
    """
    model_config = ConfigDict(extra='forbid', arbitrary_types_allowed=True)
    resource: Optional[str] =  Field(default=ResourceTypes.STATE.value, frozen=True)
    type: Literal['StateBase'] = "StateBase"

    def read(self) -> Dict[str, Any]:
        """
        Reads and returns the current state as a dictionary.
        """
        raise NotImplementedError("Subclasses must implement 'read'.")

    def write(self, data: Dict[str, Any]) -> None:
        """
        Replaces the current state with the given data.
        """
        raise NotImplementedError("Subclasses must implement 'write'.")

    def update(self, data: Dict[str, Any]) -> None:
        """
        Updates the state with the given data.
        """
        raise NotImplementedError("Subclasses must implement 'update'.")

    def reset(self) -> None:
        """
        Resets the state to its initial state.
        """
        raise NotImplementedError("Subclasses must implement 'reset'.")

    def deep_copy(self) -> 'IState':
        """
        Creates a deep copy of the current state.
        """
        raise NotImplementedError("Subclasses must implement 'deep_copy'.")

from typing import Dict, Any
from pydantic import Field
from swarmauri_core.ComponentBase import ComponentBase
from swarmauri_core.state.StateBase import StateBase

class DictState(StateBase):
    """
    A concrete implementation of StateBase that manages state as a dictionary.
    """

    state_data: Dict[str, Any] = Field(default_factory=dict, description="The current state data.")

    def read(self) -> Dict[str, Any]:
        """
        Reads and returns the current state as a dictionary.
        """
        return self.state_data

    def write(self, data: Dict[str, Any]) -> None:
        """
        Replaces the current state with the given data.
        """
        self.state_data = data

    def update(self, data: Dict[str, Any]) -> None:
        """
        Updates the state with the given data.
        """
        self.state_data.update(data)

    def reset(self) -> None:
        """
        Resets the state to an empty dictionary.
        """
        self.state_data = {}

    def deep_copy(self) -> 'DictState':
        """
        Creates a deep copy of the current state.
        """
        from copy import deepcopy
        return DictState(state_data=deepcopy(self.state_data))

swarmauri_community:
import pyperclip
from typing import Dict, Any
from swarmauri_core.state.StateBase import StateBase

class ClipboardState(StateBase):
    """
    A concrete implementation of StateBase that uses the system clipboard to store and retrieve state data.
    """

    def read(self) -> Dict[str, Any]:
        """
        Reads the current state from the clipboard as a dictionary.
        """
        try:
            clipboard_content = pyperclip.paste()
            # Ensure the clipboard contains valid data (e.g., a JSON string that can be parsed)
            if clipboard_content:
                return eval(clipboard_content)  # Replace eval with JSON for safer parsing
            return {}
        except Exception as e:
            raise ValueError(f"Failed to read state from clipboard: {e}")

    def write(self, data: Dict[str, Any]) -> None:
        """
        Replaces the current state with the given data by copying it to the clipboard.
        """
        try:
            pyperclip.copy(str(data))  # Convert dictionary to string for clipboard storage
        except Exception as e:
            raise ValueError(f"Failed to write state to clipboard: {e}")

    def update(self, data: Dict[str, Any]) -> None:
        """
        Updates the current state with the given data by merging with clipboard content.
        """
        try:
            current_state = self.read()
            current_state.update(data)
            self.write(current_state)
        except Exception as e:
            raise ValueError(f"Failed to update state on clipboard: {e}")

    def reset(self) -> None:
        """
        Resets the clipboard state to an empty dictionary.
        """
        try:
            self.write({})
        except Exception as e:
            raise ValueError(f"Failed to reset clipboard state: {e}")

    def deep_copy(self) -> 'ClipboardState':
        """
        Creates a deep copy of the current state. In this context, simply returns a new ClipboardState with the same clipboard data.
        """
        try:
            current_state = self.read()
            new_instance = ClipboardState()
            new_instance.write(current_state)
            return new_instance
        except Exception as e:
            raise ValueError(f"Failed to create a deep copy of the clipboard state: {e}")

Created a PR for this
https://github.com/swarmauri/swarmauri-sdk/pull/905


No Method for saving photo

Hello,
Great library for photo edit. Some methods are needed like save photo to a file and provide path in the callback. I didn't find any save method in the library.

//get bitmap from image view
Bitmap filteredBitmap = ((BitmapDrawable) imageView.getDrawable()).getBitmap();


Umbrella issue for reconciliation semantics

Fist of all I'm sorry if this is totally inappropriate or invalid :) It started as a comment  https://github.com/kubernetes-incubator/service-catalog/pull/979#discussion_r125159846 but became too big and I decided to create an issue instead. Feel free to close it/etc.
IMHO we should have a document that describes ideal/desired reconciliation behaviour in detail, ignoring what is possible with current OSB spec. Then, once we have it, we can take a look at the spec and see how we can implement things. It's not hard to imagine we will have behaviours that are hard/impractical/impossible to implement given the current OSB spec. That is how we will get drivers/use cases to improve the spec.
Building the other way around (here is the spec, lets build an impl) is certainly possible, but it seems to me top down approach will result in better native kubernetes-like experience.
Some things from the list below have tickets already. This is my attempt to answer/ask relevant questions and some learnings from implementing Smith.
Re. reprocessing:

When Broker is updated/added it should be queried for new list of ServiceClasses. Existing related ServiceClasses should be updated, new ones added, removed ones deleted.
When ServiceClass is updated/delete/added all related Instances should be reprocessed.
When Instance is updated/delete/added all related Bindings should be reprocessed.
When Binding is updated/delete/added all related Secrets should be reprocessed.
Reverse reprocessing: ServiceClass->Broker and Secret->Binding -  E.g. if something modifies the contents of a ServiceClass object we should fix it by reprocessing related Broker. If Secret is deleted/etc, the related Binding should be reprocessed so that Secret is recreated.

Re. owner references:
Controller with "block owner deletion" flag set:

ServiceClass->Broker
Secret->Binding

Non-controller with "block owner deletion" flag set:

Instance->ServiceClass
Binding->Instance

Re. deletion:
Deletion is tricky. Cascading deletion or orphaning?

What happens when Broker is deleted? ServiceClasses should be deleted? What if there are Instances?
What happens when ServiceClass is deleted? Instances should be deleted? What if there are Bindings?
What happens when Instance is deleted? Bindings should be deleted.
What happens when Binding is deleted? Secret should be deleted.

How deletion works depends on GC, owner references and deletion options (foreground, background vs orphaning).
Re. adoption:
What if there is an orphaned ServiceClass/Instance/Binding/Secret and an owner is created. E.g. orphan Secret and a Binding is created. Should it adopt the Secret? Think about each combination.
Re. blocked creation:
What if a Broker wants to create a ServiceClass or Binding wants to create a Secret and that object already exists? A terminal error, prehaps. However what if that conflicting object is deleted? The Broker/Binding should be reprocessed because it is unblocked.
Basically, this is the list of kinds of issues I faced with Smith so far :) All are solved via event listeners and additional indexes on informers.
Mandatory reading:
https://github.com/kubernetes/community/blob/master/contributors/devel/controllers.md
https://github.com/kubernetes/community/blob/master/contributors/design-proposals/controller-ref.md
Some pre-existing issues (missed something?): #780, #750, #705, #704, #601, #481, #801, #978, #999, #976, #921

I agree that we need to follow the "Kubernetes native" approach for reconciliation loop whenever it is possible. However, I'm not sure if top-down approach will always work, as OSB was not designed for idempotent reprocessing.

should be reprocessed

@ash2k we need a definition of "reprocess" there. Given that OSB spec currently doesn't have mandatory GET endpoints for Instances and Bindings, it's a non-trivial question.
The only reliable way of "fully reprocessing" in OSB is to delete the old object and create a new one. But even that is often not feasible - we can't simply wipe the data and create a new empty Instance for every update of ServiceClass.

The only reliable way of "fully reprocessing" in OSB is to delete the old object and create a new one. But even that is often not feasible - we can't simply wipe the data and create a new empty Instance for every update of ServiceClass.

@nilebox Sure. Well, if user has requested an update that cannot be fulfilled in principle then that is a terminal error. Easy :) I understand what you are talking about.

user has requested an update

@ash2k the problem here is that in Kubernetes' Instance object you only have the "desired state". To know exactly what has changed (to determine whether an update can be fulfilled or not), you need the snapshot of the previous version, or, a way to retrieve the "actual state" from the broker.
Hence the GET endpoint I mentioned, which could have solved this problem by providing an actual state, but since it's not required by the spec, we can't rely on that.
The best we can do (and I have already seen the code about this in Service Catalog) is to store the checksum of the entire Instance spec. This way we can at least know if the spec has changed since we've sent it to the broker.

then that is a terminal error

I am afraid that with such limitations any update could become a terminal error :(

Well, at least we have UPDATE for Instances (with optional plan_updateable flag), but still no way to update the Binding.
My initial point was that the devil is in the detail, and we need to be explicit about what "reprocess" means for every type of Kubernetes resource, and which changes are supported.


feat: use the same compiler in cairo_compile and in tests

Close #211

Test failling are the same ones than with https://github.com/kkrt-labs/keth/pull/269, the latter can be merged as the tests are taking too long to finish for now and are reported are failure


Numbers in exponential form highlighted incorrectly

fn main() {
	a := 1e-6
	b := 1e+6
}

V
C (how it should be)

Fixed in https://github.com/0x9ef/vscode-vlang/commit/6b58431cd51cb4449924aece54998d5b0751c4a1


question: [Inference Displayed]

So is the interface only supposed to display aspect opinion pairs extracted from the data instead of all the potential opinion pairs from the bootstrap lexicon? Is this a bug or a feature?

Hi @amygeorge
As per the ABSA task definition, the interface displays aspect-opinion pairs extracted from the data.
Generating all potential pairs is interesting, but may result in a very large quantity of pairs, many of which will be incompatible if performed naively (like "friendly"-"pasta").


UTF-8 issue using readFileSync()

My umlauts are not parsed correctly from my utf8-encoded .po file using the following script
gettextParser.po.parse(
    fs.readFileSync(poFileName)
).translations['']

However, this works:
gettextParser.po.parse(
    fs.readFileSync(poFileName).toString()
).translations['']

Probably your po file does not specify the used charset with the content-type header and iso-8859-1 is used by default. If you want to use another default encoding, set it with the second paramater for parse
gettextParser.po.parse(fs.readFileSync(poFileName), 'utf-8').translations['']

Okay, got it
But do you know where the specifications for those headers can be found?


Cl release - cl.owl to cl-full

Closing this because I would have rather the preferred roots declared to not mess up the OLS view


import assets: download fonts too

[ ] Add FA fonts
[ ] Add Academicons fonts

Considering that I just tackled this problem manually, I would like to offer taking this on.
Currently the directory structure looks like this:
static
├── css
│   ├── fonts
│   │   ├── academicons.eot
│   │   ├── ...
│   │   └── academicons.woff
│   ├── vendor
│   │   └── main.min.css
│   └── webfonts
│       ├── fa-brands-400.eot
│       ├── ...
│       └── fa-solid-900.woff2
└── js
    └── vendor
        └── main.min.js

I would like to propose putting vendor as the root folder, which would enable me to generate the following folder structure without rewriting the fontawesome or academicons css, as well as make for simple cleanup of the downloaded assets:
static
└── vendor
    ├── css
    │   └── main.min.css
    ├── fonts
    │   ├── academicons.eot
    │   ├── ...
    │   └── academicons.woff
    ├── js
    │   └── main.min.js
    └── webfonts
        ├── fa-brands-400.eot
        ├── ...
        └── fa-solid-900.woff2

The only drawback is that this would require changes to the theme.

Since this issue was originally opened, Academic has evolved to using the industry standard Node JS approach to downloading offline assets - see comment at https://github.com/gcushen/hugo-academic/pull/1554#issuecomment-596151573 .
Hence, please consider opening a PR on the Academic repo to improve handling of offline assets in https://github.com/gcushen/hugo-academic/blob/master/package.json and https://github.com/gcushen/hugo-academic/blob/master/scripts/update_bootstrap.sh . At the time of writing, Bootstrap and the speaker notes tool are the built-in offline assets.
As a result, our early Python-based approach to downloading assets will likely be deprecated once offline support has migrated to the Node JS approach.


stream-binder-kafka 3.0.3 and spring kafka2.3.4.releasse conflict in Haxton.M3 release train

@homerlsy commented on Fri May 15 2020
in KafkaMessageChannelBinder
MessageProducer createConsumerEndpoint(
			final ConsumerDestination destination, final String group,
			final ExtendedConsumerProperties<KafkaConsumerProperties> extendedConsumerProperties)

we are calling
containerProperties.setAuthorizationExceptionRetryInterval(this.configurationProperties.getAuthorizationExceptionRetryInterval());
the method doesn't exist on ContainerProperties

@homerlsy You are using Hoxton.M3 by the title of the issue. Can you update to the latest Hoxton release? (Hoxton.SR4). You are most likely using an older Spring Kafka version. Try upgrading to the latest Hoxton and see if that fixes the issue. I am closing this issue now, but feel free to re-open if you are still facing difficulties running it.


Master

The tag 'twitter on line 5 in '-posts/' is not a recognized Liquid tag.

What is the error you try to fix here?

This looks like a PR from a personal webpage. I'm going to close this.
From time to time, people new to GitHub send such PRs probably just because it shows a suggestion "Would you like to create a pull request?" I'm not sure if there's a way to not show that suggestion by default...


Could not load manifest.

After running the build and loading as an unpacked extension, I get the following error (see screenshot).  Does this mean my build failed?  I am building on macOS 10.12.3 using all the required dependencies as outlined in the README.

(Assuming the build completed without errors) could you check if going one more directory under the build directory is the issue? The directory that can be loaded in your example should be under Code/e2email/build/e2email


Added charts and top nav bar

Hard coded different types of charts and added fixed top bar

looks good to me!


'--export-pdf' argument not accepted

I installed presenterm-export and tmux and upon running the command to export to pdf, the below message is displayed:
[~/Downloads/presenterm-0.2.1]$ ./presenterm  --export-pdf ../hw1.md
error: unexpected argument '--export-pdf' found

  tip: to pass '--export-pdf' as a value, use '-- --export-pdf'

Usage: presenterm [OPTIONS] <PATH>

For more information, try '--help'.

This change is not released yet. You can download the latest source and run it from there. I'm preparing the next release and I'm hoping I can get that done later today.

I just released version 0.3.0. Also I'd suggest updating to presenterm-export 0.1.4 as I fixed an issue with relative paths.


3D image rotation Ref. Figure 5-12, p. 165 (add %matplotlib notebook)

Chapter 5 Support Vector Machins has a 3D Figure 5-12 on page 165 (2nd Ed.).
Matplotlib allows rotation of 3D figures with the mouse, however, this functionality is only available if the cell creating the surface includes a line
%matplotlib notebook
Ref:
https://stackoverflow.com/questions/33436221/displaying-rotatable-3d-plots-in-ipython-or-jupyter-notebook

Thanks for the tip, I'll check it out! 👍


errors: Replace ParseError with CqlResponseParseError in frame::response module

Ref: https://github.com/scylladb/scylla-rust-driver/issues/519
Depends on: https://github.com/scylladb/scylla-rust-driver/pull/1017
Motivation
We ultimately want to get rid of the ParseError. This error type is overloaded with a lot of variants which do not provide much context to the users. In addition, a lot of errors are stringified.
This PR gets rid of ParseError from the frame::response module which is responsible for CQL response deserialization. This is the place where the usage of ParseError is abused the most.
Changes
Types of response
There are multiple types of responses. We introduce a new error type for each of them, e.g. CqlResultParseError or CqlSupportedParseError. I follow a bottom-to-top approach, starting from implementing an error types for CQL column type deserialization.
Each commit introduces a new error type, which is firstly encapsulated by ParseError (so the higher level functions returning ParseError can apply ? operator). Once we exhaust all of the error variants that can be returned by some function, we introduce a new error type which encapsulates error types introduced in previous commits. These error types are then moved out of the ParseError (if possible, sometimes the functions are not exclusive to frame::response module which is the only module addressed in this PR).
Pre-review checklist

[x] I have split my patch into logically separate commits.
[x] All commit messages clearly explain what they change and why.
[ ] I added relevant tests for new features and bug fixes.
[x] All commits compile, pass static checks and pass test.
[x] PR description sums up the changes and reasons why they should be introduced.
[x] I have provided docstrings for the public items that I want to introduce.
~[ ] I have adjusted the documentation in ./docs/source/.~
[x] I added appropriate Fixes: annotations to PR description.

You haven't checked nor crossed out the I added relevant tests for new features and bug fixes option. Do you believe any tests are relevant here?

v2:

rebased on current version of low_lever_deser_errors
addressed review comments

Rebased on main

v2.1: addressed nit review comments

ref: #1056


Variable interpolation in CMD

Describe the bug
Running a CMD with a command that uses an environment variable does not interpolate it.
In package.json:
"scripts": {
  "storybook": "start-storybook -p ${STORYBOOK_PORT:-9001}",
}

In Dockerfile:
ENV STORYBOOK_PORT=300

CMD [ "/bin/sh", "-c", "npm run storybook" ]

OR
ENV STORYBOOK_PORT=3000

CMD [ "/bin/sh", "-c", "npm", "run", "storybook" ]

Results in $STORYBOOK_PORT always be an empty string.

I think that would be a feature of npm/nodejs and not Lagoon.
I searched through the documentation of package.json and could not find anything that you can use the format ${} to use env variables.

@Schnitzel thank you for looking into this.
I noticed that this image has a custom entrypoint - could it be that it does not evaluate variables?
Interestingly that variables interpolation does work locally and in CI, but not in Lagoon.

I noticed that this image has a custom entrypoint - could it be that it does not evaluate variables?

the entrypoint is just a call to exec in a shell: https://github.com/amazeeio/lagoon/blob/master/images/commons/lagoon/entrypoints.sh#L15

Interestingly that variables interpolation does work locally and in CI, but not in Lagoon.

Can you show me which command you run in CI and locally?
Because it might be the case that in CI and locally you are running in bash, while here you are running in sh which is not the same.

so if sh is a POSIX, the this applies
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_02
but then "double-quoting" results in literal interpretation
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_02_03
So, it looks to me that
"scripts": {
  "storybook": "start-storybook -p ${STORYBOOK_PORT:-9001}",
}

is interpreted as literal start-storybook -p ${STORYBOOK_PORT}
I've tried to get an output of this specific case (tried to see this string in the output) but was not able to do so.
If it is indeed a matter POSIX sh - is it possible to replace it with bash for the entrypoint? (and it feels like a big ask, but I'm wondering what is the reason not to use bash)

@alexdesignworks
You can just change the CMD:
CMD [ "/bin/bash", "-c", "npm run storybook" ]

and then it's running is bash

plus the reason to now use bash by default is that bash is not by default in the alpine upstream images and we want to keep the images as small and as upstreamy as possible.


Demo and explain the sentence sentiment algorithm

Demo how the sentiment algorithm works
Explain what are the inputs/outputs and how the sentiment is determined

User Story
Study the sentiment algorithm how it is going to work
How is going to work my code as a backend in relation to front end
Acceptance Criteria

[ ] view a response from my lambda to the public or demo lambda

Estimated & Time Spent total
Estimated: 3 hours
Time spent total: 15 currently
Time Spent on Issue

Activity
Time Spent

Talking with team mates
4 hrs

Research
4 hr

Troubleshooting with teammates
2 hr

Troubleshooting on own
2.5 hr

Coding
2.0 hr

Testing
0.5 hours


bug under item cloning

[x] purchase information is not displayed for services when cloned

issue fixed !


[iOS] Introduce TurboModule Setup Metric

Summary
With the introduction of TurboModules, it would be beneficial to measure the setup time of these modules, as we currently have it in place for NativeModules.
The instantiation of the TMs occurs in the RCTTurboModuleManager. In order to successfully measure the time it took to setup the module, we need to ensure that we don't take into account cached modules. As such, we need to:

Check if module is in _turboModuleCache
a. Start mark for RCTPLTurboModuleSetup tag if not found
Get the TM via [self provideTurboModule:]
Check if module is in _turboModuleCache
a. Stop mark for RCTPLTurboModuleSetup if we did not find module in cache prior to step 2 and if it's now present in the cache.
b. Notify about setup time if the above is true.
Return TM

Changelog
[iOS] [Added] - Gain insights on the the turbo module setup times by observing RCTDidSetupTurboModuleNotification. The userInfo dictionary will contain the module name and setup time in milliseconds. These values can be extracted via RCTDidSetupModuleNotificationModuleNameKey and RCTDidSetupModuleNotificationSetupTimeKey. Updated the naming of RCTDidSetupNativeModuleNotification key to distinguish between native & turbo modules.
Test Plan
Observe for RCTDidSetupTurboModuleNotification
- (void)setup {
    [_notificationCenter addObserver:self
                            selector:@selector(didSetupTurboModule:)
                                name:RCTDidSetupTurboModuleNotification
                              object:nil];
}

- (void)didSetupTurboModule:(NSNotification *)notification {
    NSDictionary *userInfo = notification.userInfo;
    if (userInfo) {
        NSString *moduleName = userInfo[RCTDidSetupModuleNotificationModuleNameKey];
        NSNumber *setupTime = userInfo[RCTDidSetupModuleNotificationSetupTimeKey];
        NSLog(@"%@ setup took %li ms", moduleName, [setupTime integerValue]);
    }
}

Output
TestTurboModule setup took 1 ms

cc @RSNara

Hello @shergin and @RSNara,
Have you managed to take a look at this PR?

Hi @RSNara, I've implemented the changes thanks to your feedback and I think we've covered everything.


Update readme with new RPC methods and snapshots

I think we can remove the old ones.

done, I've also added trace methods under Supported Features section


Illogical database permissions on master

Why do you need to provide SELECT permissions AND SELECT ON dbo.$ndo$srvproperty? It should be one or the other, with preference that its the more limited SELECT ON dbo.$ndo$srvproperty. Dynamics doesn't seem to create any other tables in master so what else is it doing?

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

ID: db5ca7bd-5e2e-544c-2a4f-5349a9f6f161
Version Independent ID: 7909d0e4-3797-3cc3-2a37-48a43712452e
Content: Provisioning the Dynamics 365 Business Central Server Service Account - Business Central
Content Source: dev-itpro/deployment/provision-server-account.md
Service: dynamics365-business-central
GitHub Login: @jswymer
Microsoft Alias: solsen

The sample queries provided in the same document also reflect that SELECT is not required on the master database.
The instances I have, have had the public role altered to grant SELECT on dbo.$ndo$srvproperty (i.e. GRANT SELECT dbo.$ndo$srvproperty TO public). Is this something that the Dynamics installer process does when creating and populating the table?


Add Reporting Frequency data to the MP Export (Need by End of July)

From CBS Integration Meeting: will need these changes in place by end of July
See notes from 6/30 https://teams.microsoft.com/l/entity/com.microsoft.teamspace.tab.wiki/tab::28c91218-92c0-4bef-a976-693fbd3cb56a?context={"subEntityId"%3A"{\"pageId\"%3A10%2C\"origin\"%3A2}"%2C"channelId"%3A"19%3Afvp_xnWsRzIdujIp2G0Dj1W8YDe7M6ezAHY99gd01TM1%40thread.tacv2"}&tenantId=88b378b3-6748-4867-acf9-76aacbeca6a7
Notes (7.20.2022); Need to decide if this info needs to go in the MP Config API or the Export
Endpoint Info: https://api.epa.gov/easey/dev/monitor-plan-mgmt/plans/MDC-1ABE8566A0314B8C821A9A92BB4C9530
Dev Notes:
Include "reportingFrequencies" in the root monitoring plan records.
CVP to add reportingFrequencies to emissionsers backlog.  Need by same timeframe as reporting frequency item
Testing: Make calls to the endpoints thru POSTMAN and verify that they are available

Test Case: TC822

Test Passed


Log small_client fixture phases on the scheduler

This PR logs when we start/finish setup/teardown of the small_client fixture on the scheduler. This helps to correlate cluster logs with issues. We have seen some CI failures in the cluster (e.g. #441) where being able to pinpoint when these phases happen would have facilitated debugging.
Merge conflicts with:

#472

The problem with test_name_uuid is that it's nowhere to be found in the database or in the dashboard.
I've replaced it with test name + session_id.