JMSCC0020: This session is closed when stopping a spring boot application

Hello,
We have an error displayed in the logs when stopping a spring boot application that uses this lib.
Here is the required information:

version affected by this issue: 2.2.5
Java version: AdoptOpenJDK 11, tested on docker and on Red Hat

Here is the stacktrace:
185658 [DefaultMessageListenerContainer-1] WARN  o.m.pooled.jms.JmsPoolSession - Caught exception trying close() when putting session back into the pool, will invalidate. com.ibm.msg.client.jms.DetailedIllegalStateException: JMSCC0020: This session is closed.
An application called a method that must not be used after the session is closed.
Ensure that the session is not closed before calling the method.
com.ibm.msg.client.jms.DetailedIllegalStateException: JMSCC0020: This session is closed.
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)
        at com.ibm.msg.client.commonservices.j2se.NLSServices.createException(NLSServices.java:319)
        at com.ibm.msg.client.commonservices.nls.NLSServices.createException(NLSServices.java:226)
        at com.ibm.msg.client.jms.internal.JmsErrorUtils.createException(JmsErrorUtils.java:126)
        at com.ibm.msg.client.jms.internal.State.checkNotClosed(State.java:142)
        at com.ibm.msg.client.jms.internal.JmsSessionImpl.checkNotClosed(JmsSessionImpl.java:3040)
        at com.ibm.msg.client.jms.internal.JmsSessionImpl.setMessageListener(JmsSessionImpl.java:2161)
        at com.ibm.mq.jms.MQSession.setMessageListener(MQSession.java:978)
        at org.messaginghub.pooled.jms.JmsPoolSession.close(JmsPoolSession.java:91)
        at org.springframework.jms.support.JmsUtils.closeSession(JmsUtils.java:109)
        at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.clearResources(DefaultMessageListenerContainer.java:1241)
        at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1128)
        at java.base/java.lang.Thread.run(Thread.java:834)

The issue can be reproduced with this simple pom:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.5.RELEASE</version>
    </parent>

    <groupId>com.test</groupId>
    <artifactId>mq-spring-boot-error</artifactId>
    <version>4.0.0</version>

    <dependencies>
        <dependency>
            <groupId>com.ibm.mq</groupId>
            <artifactId>mq-jms-spring-boot-starter</artifactId>
            <version>2.2.5</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <release>11</release>
                    <target>11</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <executable>true</executable>
                </configuration>
            </plugin>
        </plugins>

    </build>

</project>

The following class:
@SpringBootApplication
@EnableJms
public class Application {

    public static void main(String[] args) {
        SpringApplication.run(Application.class, args);
    }

    @JmsListener(destination = "queueName")
    public void listener(Message message) {
        System.out.println("Message received");
    }
}

And a minimal configuration that includes ibm.mq.pool.enabled = true
This happens when starting and stopping the application with systemd via the executable generated by spring boot (or by simply running something like MODE=service ./my-app.jar start and kill $PID).
It seems to be due to the fact that spring first closes the JMS sessions by calling JmsPoolConnectionFactory.stop and then it destroys the AbstractJmsListeningContainer which leads to calling JmsPoolSession.close which calls JmsSessionImpl.setMessageListener and in this function, the code checks that the session is alive.
I hope it's clear.
Thank you.

I don't know that there's anything that can be done in this package - as you say, it seems to be in the way the core Spring code interacts with the pooling library. You might be better off asking in the full Spring repository. Though I suspect that the Spring recommendation would be to move to using the Spring Cache options instead.
And having said that, there are a number of times I see errors/FDCs coming from the MQ client code when unexpectedly stopped eg "kill " (nothing to do with spring or pools) so getting errors during a shutdown should not be completely unexpected.

Hello @ibmmqmet,
Thank you for your reply. You're right, not sure anything can be done in this package.

as you say, it seems to be in the way the core Spring code interacts with the pooling library. You might be better off asking in the full Spring repository. Though I suspect that the Spring recommendation would be to move to using the Spring Cache options instead.

My personal impression is that it's not really "spring's fault". I think the problem comes either from the pooling library calling setMessageListener(null) (there might be a good reason do that though) or from the ibm mq client checking the state of the session when setting a message listener (same, there might a good reason to do that).
As for spring recommendations, I think I saw in the docs that they do recommend the pooling library that you're using.
Thank you.

Closing as not really a problem for this repo.


Updated object-replication-configure.md

"Object Replication" is present under "Data management", however in this article it was mentioned that Object Replication is present under "Blob service." Therefore updating this document to show Object Replication under "Data management"

@Pranjal039 : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#label:"aq-pr-triaged"

@Pranjal039 - Thanks for making that fix!
#sign-off

@tamram Thanks for approving the changes. Needed to know if it takes sometime to show the updated changes in the document ? As i could still see the "Blob Service" is mentioned in article https://docs.microsoft.com/en-us/azure/storage/blobs/object-replication-configure?tabs=portal#configure-object-replication-with-access-to-both-storage-accounts rather than "Data management"

@tamram Thanks for approving the changes. Needed to know if it takes sometime to show the updated changes in the document ? As i could still see the "Blob Service" is mentioned in article https://docs.microsoft.com/en-us/azure/storage/blobs/object-replication-configure?tabs=portal#configure-object-replication-with-access-to-both-storage-accounts rather than "Data management"

Hi @Pranjal039 - It does take some time. I see "Data management" on the live site now:


Jumping on single words

Hey, love the idea of leveraging LSP to simplify tags.
In my Python projects with ctags, my tags are single words. E.g. I have a line that says:
Distribution	../chaospy/distributions/baseclass/distribution.py	/^class Distribution(object):$/;"	c

This allows me to put the cursor on Distribution anywhere and jump with <c-]>.
With your plugin I don't seem to be able to do this. Instead, I need to visually select the string chaospy.Distribution. Then it understands the query and I can jump as normal.
Is there a way to get tag jumps to work on single words inside nvim-lsp-smag? If so, how do I enable it?

Hey 👋🏾
To be honest I'm not 100% sure if I understand you correctly. But I'm afraid that I must tell you that this does not work. As documented, this plugin doesn't actually care about your current word under your cursor, visual selection or argument of a tag command/function call. It never sees it. Instead it will query the connected language clients (and these their associated servers) for definitions/declarations/... based on the current cursor location. What the server then actually identifies as the "word"/object of interest completely belongs to the server implementation and we can't affect this. You can say that this is one of the smart features such a language server provides: detecting what is actually the object under the cursor. Completely independent of what your iskeyword configuration in NeoVim is.
That said, your visual selection change nothing for the LSP part. What I suspect what is happening, is that you still have traditional tags available for the same buffer. In case the plugin was not able to find a single location for you, it will return v:null. In that case NeoVim will automatically fall back to use the traditional tags instead, like if you would not have set a tagfunc option set (as this plugin does for you). And that is actually one of the strengths this plugin that you can use both methods in parallel even for the same buffer.
So as it looks to me, in both of your cases the LSP approach does not find anything. That's why in both cases it will fall back to normal tags. In the first case it does also find nothing, as the word does not match any entry in your tag files. But if you make the word more specific with a visual selection it will find something.
Was that somewhat helpful? 🙈


Fixed markdown

I am very sorry I missed this earlier. Dont mean annoy you with pull request. Again, very sorry.

Meh, don't worry! Thanks again


[update] swhks: execute command directly

swhks/src/main.rs: execute command directly instead of using sh -c
[cmd]

Once again,
https://github.com/waycrate/swhkd/pull/141/files#diff-45b62f44970ab53954369c4056fe2c513bda50727c6a4cfbed224a1ea3daecdfR109-R111 This just seems to be adding cruft to the codebase, I don't see an advantage to this approach over using sh -c where we don't need to handle this usecase.


Fix scraping server

Describe your changes and upload screenshots if changes on frontend/UI.

Only single instance of Scraper class will be created. Previously a new instance was created on each request.
Added logging.

Issue ticket number and link
Issue Fixes : #issue_number
Checklist before requesting a review

[ ] I have performed a self-review of my code
[ ] If it is a core feature, I have added thorough tests.
[ ] Do we need to implement analytics?
[ ] Will this be part of a product update? If yes, please write one phrase about this update.

But not all unit tests are passing!


Failed to conect to console

So apparently boop is able to recognize the IP of my 3ds, but my console refuses to accept the conection.
It gets all the way until "opening socket to send the file list..." and then the message appears
I looked around and it figures my pc and the program aren't the problem, so what should I do?
I'm really desperate cuz all the good RPGs are so heavy and I need this to install my games, help :(

shut down the firewall and try again


Add ability to kill a running query

#654 Will add functionality to see which queries are running in the cluster.

Related to https://github.com/influxdb/influxdb/issues/411

Fixed via #5950


Istio-cni forcibly replaced the cni version of existing plugins to 0.3.1

Bug description
istio-cni deleted the cni version  of the existing plugin when merging istio cni plugin to chained plugins even if they have different cni versions. here is code link.
My source cni config file is as below:
// 10-terway.conf
    {
      "cniVersion": "0.3.0",
      "name": "terway",
      "type": "terway"
    }

after installing instio-cni,  cni config was changed as below:
// 10-terway.conflist
{
    "plugins": [
        {
            "name": "terway",
            "type": "terway",
        },
        {
            "name": "istio-cni",
            "type": "istio-cni",
            "log_level": "debug",
            "kubernetes": {
                "kubeconfig": "/etc/cni/net.d/ZZZ-istio-cni-kubeconfig",
                "cni_bin_dir": "/opt/cni/bin",
                "exclude_namespaces": [
                    "istio-system",
                    "kube-system"
                ]
            }
        }
    ],
    "name": "k8s-pod-network",
    "cniVersion": "0.3.1"
}

Unfortunately, terway does not support the version of 0.3.1 currently so that kublet throw the error in logs.

Maybe istio-cni should  keep respective cni version when merging mulitple cni plugins. But I am not sure if cni spec is allowed to do that. I also open a issue for that.
[x] Networking
Expected behavior
istio-cni can keep respective cni version when merging mulitple cni plugins.
Steps to reproduce the bug
Version (include the output of istioctl version --remote and kubectl version --short and helm version --short if you used Helm)
client version: 1.9.2
control plane version: 1.9.2
data plane version: 1.9.2 (2 proxies)
kubernetes: 1.18

How was Istio installed?
# operator-cni-1.9.2.yaml
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
  namespace: istio-system
  name: istio-control-plane
spec:
  profile: demo
  components:
    cni:
      enabled: true
      namespace: kube-system
  values:
    cni:
      excludeNamespaces:
       - istio-system
       - kube-system
      logLevel: debug
      chained: true

istioctl install -f operator-cni-1.9.2.yaml
Environment where the bug was observed (cloud vendor, OS, etc)
cloud vendor: Aliyun ACK

We probably should gracefully handle all versions that istio cni are compatible with, instead of blindly rewrite it to 0.3.1. I will take a look at his.

Not stale.

Hi @bianpengyuan, shall we move this issue to 1.12?

not stale.

This issue is not stale and I look forward to a fixing.
One possible solution could be trying to reuse original cniVersion value if there was one; otherwise prompting a warning to cluster admins that they should configure this cniVersion or use Istio CNI as an "Interface Plugin" instead.

In addition, when an administrator tries to uninstall a chained Istio CNI installation which fails pod creation, the Istio CNI created conflist file will not be reverted to the original conf file.
The administrator has to manually fix the invalid CNI configuration.

@jijiechen would you like to work on this? Contribution are welcome!


[fix] invalid byte sequence in utf-8 occurred when upload file

Coverage decreased (-6.2%) to 62.062% when pulling 749cc72b8b3fb51bfe7d86e95519d44e2783ac6f on itowtips:fix-uploader into e4286d56c493cf2bb14989f15b63df65d9846dd9 on shirasagi:master.


Should we remove upsert behavior from the POST users endpoint?

I'd like to consider removing "upsert" behavior from the POST users/ endpoint altogether for a potential v2, since it seems like an easy way to shoot ourselves in the foot and mangle data that we don't intend to (aside from syncing users, where it's pretty necessary).
References #361.

 As a dev, I want to remove upsert behavior from the POST users endpoint so that we don't accidentally mangle data we don't intend to.


Fix/units to quantity

Changing model and code from "units" to "quantity" to be more consistent with the other implementations.

Has conflicts


#36 Feature: Live update Active sleep time

https://user-images.githubusercontent.com/95225751/206555085-c63d8203-d7b4-45cb-b93a-663ac559cf6c.mp4

fix merge conflicts @kuldeepsingh0330

how can i fix this merge conflict. Can you tell what issue you face.


Update Architecture.md

Fixed some typos and grammatical errors. Please have a look. :smiley:

Coverage remained the same at 86.376% when pulling f3b958ebc0836ce6b7d4e5af2cb4a5f60d0544d7 on KamalAwasthi:patch-1 into 260555ca54b00be8607f59c8e5678fb8b13ee291 on Bottr-js:master.

Coverage remained the same at 86.376% when pulling f3b958ebc0836ce6b7d4e5af2cb4a5f60d0544d7 on KamalAwasthi:patch-1 into 260555ca54b00be8607f59c8e5678fb8b13ee291 on Bottr-js:master.


[chore/release] Release 0.5.0

Update version and changelog for upcoming release

@lquerel If everything is correct I can create a tag after merging of this PR. thank you!


anther and other classes being hard-coded as subclasses of "independent continuant"

I'm seeing some multihoming that looks like it might be result of an accidental inclusion of a conversion of inferred axioms:

I'm sure no one needed "anther" to be hardcoded as subclass of "independent continuant" ?!
There are similar hard-coded subclasses in other areas too in PO file now, e.g. under "continuant".
Can this be undone?

HI Damion,  Those relationship are not "hard-coded" per se, but are coming from the reasoner.  Which PO file are you using?
If you look at the editors file: plant-ontology.obo you can see this.  Compare the asserted and Inferred views.
The version you are showing above also seems to be missing some of the subclass relationships.

The appropriate BFO term should be 'material entity' -- or, for those items
which are separated by their own independent boundary, such as cells --
'object'
'Material entity' is safe in any case
BS
On Wed, Sep 30, 2020 at 12:24 PM Laurel Cooper<EMAIL_ADDRESS>wrote:

HI Damion, Those relationship are not "hard-coded" per se, but are coming
from the reasoner. Which PO file are you using?
If you look at the editors file: plant-ontology.obo you can see this.
Compare the asserted and Inferred views.
The version you are showing above also seems to be missing some of the
subclass relationships.
[image: image]
https://user-images.githubusercontent.com/7378000/94712283-20319080-02fe-11eb-91ea-4af50d0b41ea.png
[image: image]
https://user-images.githubusercontent.com/7378000/94712648-a1892300-02fe-11eb-9b6d-4682dc865339.png
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/Planteome/plant-ontology/issues/700#issuecomment-701498524,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AB7KUN3Q6EFTRIXMNGM5OOTSINLSLANCNFSM4R6WTNDA
.

Hmm, I just downloaded the po.owl file from github and did NOT run the reasoner.  The relations seem to be baked in, not inferred. This same view is being picked up by Ontobee (which I recall doesn't include inferred parenthood?).

These hardcoded relations came into FoodOn when I imported PO terms via OntoFox, so that's what set me sleuthing.

Yes, Unfortunately those inferred relations appear to be converted into assertions in the release process. I will look into this a bit more.

I guess I'd reiterate that the assertions, whether inferred or hard coded, seem to be at odd levels in the class structure.  Perhaps an artifact of earlier development cycle?  What I see in FoodOn as a result of PO import is:

So bud, reproductive root system, shoot system etc. should be inferred lower down in class hierarchy, not up under continuant?

Hi Damion, This is indeed an artifact of the set up of the ontology and the effect of the reasoner during the release process.  We are doing some tests to determine the best way to address this.

I believe this issue is fixed. The issues were probably caused by some domain/range constraints coming from RO.

Ok!


adding hightlight

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+0.4%) to 60.682%

Files with Coverage Reduction
New Missed Lines
%

pynapple/io/neurosuite.py
1
16.63%

Totals

Change from base Build<PHONE_NUMBER>:
0.4%

Covered Lines:
1658

Relevant Lines:
2674

💛  - Coveralls

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 60.288%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
1658

Relevant Lines:
2673

💛  - Coveralls


Publication

👷 Deploy Preview for crpp-ai-oncology-zurich processing.

Name
Link

🔨 Latest commit
4c8bc4908b97c28d2b746c53638a14f8a643dcb8

🔍 Latest deploy log
https://app.netlify.com/sites/crpp-ai-oncology-zurich/deploys/6569bb084dc18a000848086d


Color to black-n-while image

Script Title - Script is able to change a color image to bw image (Can be done by cv2 library)
what will change - Adding script for that
Instructions

Create a new folder for your script and file/folder name should be appropriate.
Create a README.md in your folder for program Instructions
add requirements.txt if needed

Please add/delete options that are not relevant.

[x] Adding New Code

Programming Language

[x] Python

Happy Coding,

Is this a simple script for black and white or is there any special condition?
I am creating a pull request for this issue.

May work on this?

Just a simple task for changing the color of the image to bw and save it too


Fix regression for pool creation timeout retry

test: use tmp in project workspace

Use a tmp folder from the workspace allowing us to cleanup up things like
LVM volumes a lot easier as we can just purge it.

Signed-off-by: Tiago Castro<EMAIL_ADDRESS>

test(pool): create on very large or very slow disks

Uses LVM Lvols as backend devices for the pool.

This test ensures that the pool creation is completed by itself and also
that a client can also complete it by calling create again.

Signed-off-by: Tiago Castro<EMAIL_ADDRESS>

fix: allow pool creation to complete asynchronously

When the initial create gRPC times out, the data-plane may still be creating
the pool in the background, which can happen for very large pools.
 If the pool creation completes before, then
we retry the creation flow.
The reason why we don't simply use very large timeouts is because the gRPC
operations are currently sequential, mostly due to historical reasons.
Now that the data-plane is allowing concurrent calls, we should also allow
this on the control-plane.
TODO: allow concurrent node operations

Signed-off-by: Tiago Castro<EMAIL_ADDRESS>

fix: check for correct not found error code

A previous fix ended up not working correctly because it was merged
incorrectly, somehow!

Signed-off-by: Tiago Castro<EMAIL_ADDRESS>

chore: update terraform node prep

Pull the Release key from a recent k8s version since the old keys are no
longer valid.
This will have to be updated from time to time.

Resolves https://github.com/openebs/mayastor/issues/1772

bors try

bors try

bors merge


Error when using useLineChart() or LineChart.useChart() hook with <LineChart.Group>

Using a <LineChart.Group> with multiple <LineChart id="..."> children is fine.  However when moving the <LineChart id="..."> components into a child component so they have access to the <LineChart.Provider data={{ ... }}>, it seems that the id is missing from within the hooks:
ERROR  [react-native-wagmi-charts] Missing data "id" prop on LineChart. You must pass an id prop to <LineChart /> when using a dictionary for your data.

This error disappears when the hook is removed.  Is it a setup issue in how I'm using the hook with multiple line charts?  @nandorojo I think you originally added this feature in #31  if you have any guidance it would be much appreciated 🙏
Repo to demonstrate issue: https://github.com/evansendra/wagmi-multichart-example

I think the children are getting mapped so avoid abstracting it into its own component. Haven't used this in a long time though so I forget tbh

Thanks for your super quick reply @nandorojo.  I think without that abstraction it becomes impossible to use the hooks based on https://github.com/coinjar/react-native-wagmi-charts?tab=readme-ov-file#hooks:

"The following hooks are only accessible inside the LineChart.Provider or CandlestickChart.Provider"

Will dig into it a bit more to see what's happening within the library when it checks for IDs

I think you can check the source it should be an easy fix, I might also be wrong

Yep it was an easy fix and my incorrect hook usage.  Looking into the source a bit the line chart hooks have to be used within children of <LineChart> in order to have IDs correctly provisioned.  Will add some code in this comment for an example in case I delete the example repo later.

App.tsx
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import Chart from "./Chart";

export default function App() {
  return (
      <View style={styles.container}>
          <Chart />
        <StatusBar style="auto" />
      </View>
  );
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: '#fff',
        alignItems: 'center',
        justifyContent: 'center',
    },
});

Chart.tsx
import {LineChart, useLineChart} from 'react-native-wagmi-charts';
import {GestureHandlerRootView} from "react-native-gesture-handler";
import {curveLinear} from "d3-shape";
import {useState} from "react";
import {runOnJS, useAnimatedReaction} from "react-native-reanimated";
import {View} from "react-native";

const data = [
    {
        timestamp:<PHONE_NUMBER>000,
        value: 33575.25,
    },
    {
        timestamp:<PHONE_NUMBER>000,
        value: 33565.25,
    },
    {
        timestamp:<PHONE_NUMBER>000,
        value: 33545.25,
    },
    {
        timestamp:<PHONE_NUMBER>000,
        value: 33535.25,
    },
    {
        timestamp:<PHONE_NUMBER>000,
        value: 33510.25,
    },
    {
        timestamp:<PHONE_NUMBER>000,
        value: 33215.25,
    },
];

const data2 = data.map((point, idx, arr) => {
    return arr[arr.length - 1 - idx];
});

const LineChartOne = function LineChartOne() {
    return (
        <>
            <LineChart.Path />
            <LineChart.CursorCrosshair snapToPoint>
                <LineChart.Tooltip />
            </LineChart.CursorCrosshair>
        </>
    )
}

const LineChartTwo = function LineChartTwo() {
    const [textWidth, setTextWidth] = useState<number>(0);
    const [xDisplacement, setXDisplacement] = useState<number>(0);

    const { currentX, isActive } = LineChart.useChart();

    useAnimatedReaction(() => currentX.value,
    () => {
      console.log(`x: `, currentX.value);
        runOnJS(setXDisplacement)(currentX.value);
    });

    const onTextLayout = (e: any) => {
        setTextWidth(e.nativeEvent.layout.width);
    }

    return (
        <>
            <LineChart.Path color="green" />
            <LineChart.CursorCrosshair snapToPoint>
                <LineChart.Tooltip position="bottom" />
                <LineChart.CursorLine />
            </LineChart.CursorCrosshair>
            <View style={{
                position: 'absolute',
                bottom: -25,
                left: xDisplacement,
                transform: [{ translateX: -(textWidth / 2) }],
            }} onLayout={onTextLayout}>
                <LineChart.DatetimeText style={{ textAlign: 'center' }} />
            </View>
        </>
    )
}

const ChartData = function ChartData() {
        return (
        <LineChart.Group>
            <LineChart id="one" shape={curveLinear}>
                <LineChartOne />
            </LineChart>
            <LineChart id="two" shape={curveLinear}>
                <LineChartTwo />
            </LineChart>
        </LineChart.Group>
    )
}

const Chart = function Chart() {
    return (
        <GestureHandlerRootView>
            <LineChart.Provider data={{
                one: data,
                two: data2,
            }}>
                <ChartData />
            </LineChart.Provider>
        </GestureHandlerRootView>
    );
}

export default Chart;


What is the format of comma separated lists?

Example:
"""
    contacts is a comma-separated list of contact IDs that you want to access in bulk.
    The token owner needs to be either a buyer or seller in the contacts, contacts that do not pass this check are simply not returned.
    A maximum of 50 contacts can be requested at a time.
    The contacts are not returned in any particular order.
    """
    def getContactsInfo(self, contacts):
        return self.sendRequest('/api/contact_info/', {'contacts': contacts}, 'get')

Here, does contacts is a comma-separated list of contact IDs imply that contacts is a string of format 'contact1,contact2,contact3' and not a Python list (e.g. ['contact1', 'contact2', 'contact3'])?

@adriaanjoubert i did the API long time ago, but i guess its a Python List.
Regards

Ok, I'll let you know once I've figured it out 👍

@mgp25 it appears to be a comma separated string, in fact.


(2409) Unpin symfony-webpack-encore and update to 2.1.0

Now @nest/cli has updated to to webpack 5.72.0 we should be able to unpin @symfony/webpack-encore

Ah, great stuff. Are any of the warnings coming from npm run build:assets resolvable? Or are they all coming from imports of GDS stuff?

And for anything not resolvable, please can you create a dev ticket?


This PR extends the Number class to introduce a withinRange method

This method takes in a number to test, a min, a max and if the test should be inclusive.
Eg.
Number::withinRange(50, 0, 100) // true
Number::withinRange(0, 0, 100) // true
Number::withinRange(100, 0, 100) // true
Number::withinRange(101, 0, 100) // false
Number::withinRange(-1, 0, 100) // false

Number::withinRange(1, 0, 100, inclusive: false) // true
Number::withinRange(99, 0, 100, inclusive: false) // true
Number::withinRange(0, 0, 100, inclusive: false) // false
Number::withinRange(100, 0, 100, inclusive: false) // false

Number::withinRange(50.5, 0.5, 100.5) // true
Number::withinRange(0.0, 0.0, 100.0) // true
Number::withinRange(100.0, 0.0, 100.0) // true
Number::withinRange(100.1, 0.0, 100.0) // false
Number::withinRange(-1.9, 0.0, 100.0) // false

Thanks for your pull request to Laravel!
Unfortunately, I'm going to delay merging this code for now. To preserve our ability to adequately maintain the framework, we need to be very careful regarding the amount of code we include.
If possible, please consider releasing your code as a package so that the community can still take advantage of your contributions!
If you feel absolutely certain that this code corrects a bug in the framework, please "@" mention me in a follow-up comment with further explanation so that GitHub will send me a notification of your response.


Internal Server Error with master and release 0.3.6

I've downloaded and built the docker image for both the master branch and the latest tagged version 0.3.6.  After successfully building the docker images (e.g. docker build -t ga4gh_server_0_3_6 .) and running it (e.g. docker run -d -p 8222:80 --name ga4gh_server_test ga4gh_server_0_3_6), I attempt to load the default page however an "Internal Server Error" appears.  The same occurs for the master branch.  I have done a pull on the latest version in docker hub (i.e. afirth/ga4gh-server) and this successfully shows the demo landing page.  Any suggestions on building the docker image so that it successfully runs?

Upon investigation into the apache2 logs, it seems the peer service is failing as the "initial_peers.txt" file is missing:
IOError: [Errno 2] No such file or directory: u'ga4gh/server/templates/initial_peers.txt'
In the afirth/ga4gh-server docker build, peer service was not found in the frontend.py script.

The afirth/ga4gh-server is not the latest ga4gh-server docker image.  See the docs here for more information:
http://ga4gh-server.readthedocs.io/en/latest/installation.html?highlight=docker#deployment-on-docker
You can add your own initial_peers.txt file (just point it at 1kgemomes.ga4gh.org). You can find some more information about configuration here:
http://ga4gh-server.readthedocs.io/en/latest/configuration.html?highlight=initial_peers.
Were you specifically interested in using the peer service, or just trying to set up a GA4GH reference server?

Thanks for the followup.  I wasn't interested in the peer service at the moment, only in getting the reference server working.  The initial_peers.txt file exists on the server and seems to be in the right location with the inclusion of 1kgenomes.ga4gh.org, however the script throws the error that the file doesn't exist.  The build was done on a fresh clone of the master repo.  I also built release 0.3.6 to see if there was a rogue check-in that may have caused issues.

I wonder if there might be a permissions issue on the file or the parent folder. make sure that the parent folder is owned by www-data. Sorry that I don't have  time to set it up and debug from right now.

@rdeborj, The dockers I build for the servers generally just create the dummy file eg https://github.com/ljdursi/profyle_ingest_docker/blob/master/scripts/wrapper.sh#L33 , sorry, I should be putting those in the CanDIG organization

Aren’t you suppose to be on vacation?
The files exist in the container in the location they should be in but for some reason the code can’t find them.  I was originally reviewing the CanDIG version but started troubleshooting which led me to the original ga4gh server code.  The same problem exists so I’m working with Jone at troubleshooting the problem.

On Sep 12, 2017, at 1:46 PM, Jonathan Dursi<EMAIL_ADDRESS>wrote:
@rdeborj https://github.com/rdeborj, The dockers I build for the servers generally just create the dummy file eg https://github.com/ljdursi/profyle_ingest_docker/blob/master/scripts/wrapper.sh#L33 https://github.com/ljdursi/profyle_ingest_docker/blob/master/scripts/wrapper.sh#L33 , sorry, I should be putting those in the CanDIG organization
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/ga4gh/ga4gh-server/issues/1637#issuecomment-328930003, or mute the thread https://github.com/notifications/unsubscribe-auth/AcuvjK4MQQgo5uQoYo9FXwW46x9FxQulks5shsOMgaJpZM4PUsjQ.

Doesn't seem to be a permissions issue.  Through the docker container, everything is owned and run by root.

As a follow up, one of our students removed the line (309):
network.initialize(     app.config.get('INITIAL_PEERS'),     app.backend.getDataRepository(),     app.logger)
When the line is removed and rebuilding the docker container, the landing page appears correctly and I am able to run curl commands to get readgroups remotely.

After some clues from @ljdursi, I hardcoded the fully qualified path to the initial_peers.txt file in the frontend.py file and everything worked.  I've been investigating the serverconfig.py and the frontend.py  files to determine how the root directory is fetched and why it isn't being used correctly.

I think to close this properly the initial peers text should be added to the setup.py package data.
https://docs.python.org/2/distutils/setupscript.html


Issue 37 specs2 4.7.1

Json4s has a transitive dependency on scala-parser-combinators:1.0.4,
specs2 has a transitive dependency on scala-parser-combinators:1.1.2
The tests fail because of the conflict of these libraries. I do this change after the update to the latest json4s.


Add missing datatype members to IPropertiesDescriptor

This PR adds missing datatype method members to IPropertiesDescriptor<T, out TReturnType>
interface that were implemented on the concrete implementation PropertiesDescriptor<T>,
but not the concrete implementation SingleMappingSelector<T>.
Add XML docs to IProperty types

I've added a couple of code standards tests

ported to master a50f8a155b953bcefc47efc7a85eb8b298dd53ff


[WIP] support read historical data

What problem does this PR solve?
close https://github.com/pingcap/tispark/issues/1895
What is changed and how it works?
Check List
Tests

Unit test
Integration test
Manual test (add detailed scripts or steps below)
No code

Code changes

Has exported function/method change
Has exported variable/fields change
Has interface methods change
Has persistent data change

Side effects

Possible performance regression
Increased code complexity
Breaking backward compatibility

Related changes

Need to cherry-pick to the release branch
Need to update the documentation
Need to update the tidb-ansible repository
Need to be included in the release note

/run-all-tests tikv=v4.0.8 tidb=v4.0.8 pd=v4.0.8


Timestamps are not printed

Hello, is it possible to print timestamps as well? Although print_timestamps value is is set to true, They are not printed.

Hmm, could you try from the main repo and see if that still happens? https://github.com/ggerganov/whisper.cpp/tree/master/examples/whisper.android


The script button in the node inspector disappeared

Tested versions
4.4.dev from 30-08- 2024, 17:19:54
System information
Godot Engine v4.4.dev.custom_build.a5830f6eb (2024-08-30 09:43:13 UTC) - https://godotengine.org OpenGL API 3.3.0 NVIDIA 470.239.06 - Compatibility - Using Device: NVIDIA - NVIDIA GeForce GT 740M
Issue description
The script button in the node inspector disappeared, it disappeared in the last builds from the developer version, maybe it's not a bug but a temporary issue. But I'm only reporting it because I see that no one has reported it. Under Linux.
Steps to reproduce
just build a new version from github from sources
Minimal reproduction project (MRP)
just create a new project, and then add a script to the node and it is not visible in the inspector, but nodes without a script have the option to add a script.

Regression from:

https://github.com/godotengine/godot/pull/94511

CC @dalexeev


Allow ZIP download

Please add a button that allows to download all the images of an album in a zip file.
And/or: inside the album the possibility to select one or more files to download.

I don't think Open Content has that possibility ATM


Back buttons could use history?

Needs some thinking if that's really a good idea.

Closing as no ideas have come.


Add quarterly cycle for utility_meter component

Many tariff cycles in Australia are 3 monthly (quarterly).
Add quarterly tariff cycle handling to the utility_meter component.
Description:
Adds a quarterly tariff cycle to utility_meter component.
Example entry for configuration.yaml (if applicable):

utility_meter:
  energy:
    source: sensor.energy_in_kwh
    cycle: quarterly

Checklist:

[X ] The code change is tested and works locally.
[X ] Local tests pass with tox. Your PR cannot be merged unless tests pass
[ X] There is no commented out code in this PR.
[X ] I have followed the development checklist

If user exposed functionality or configuration variables are added/changed:

[X ] Documentation added/updated in home-assistant.io

If the code communicates with devices, web services, or third-party tools:

[ ] The manifest file has all fields filled out correctly. Update and include derived files by running python3 -m script.hassfest.
[ ] New or updated dependencies have been added to requirements_all.txt by running python3 -m script.gen_requirements_all.
[ ] Untested files have been added to .coveragerc.

If the code does not interact with devices:

[X ] Tests have been added to verify that the new code works.

Hi @aamcrae,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!

Please take another look...


Adds support for intermediate sequential block results

This makes it so that SequentialBlocks can be used to get the internal results
required for models such as yolo.

Codecov Report

Merging #1943 (fafb214) into master (bb5073f) will decrease coverage by 2.18%.
The diff coverage is 67.25%.

@@             Coverage Diff              @@
##             master    #1943      +/-   ##
============================================
- Coverage     72.08%   69.90%   -2.19%
- Complexity     5126     5706     +580
============================================
  Files           473      544      +71
  Lines         21970    25178    +3208
  Branches       2351     2733     +382
============================================
+ Hits          15838    17600    +1762
- Misses         4925     6238    +1313
- Partials       1207     1340     +133

Impacted Files
Coverage Δ

api/src/main/java/ai/djl/modality/cv/Image.java
69.23% <ø> (-4.11%)
:arrow_down:

...rc/main/java/ai/djl/modality/cv/MultiBoxPrior.java
76.00% <ø> (ø)

...rc/main/java/ai/djl/modality/cv/output/Joints.java
71.42% <ø> (ø)

.../main/java/ai/djl/modality/cv/output/Landmark.java
100.00% <ø> (ø)

...main/java/ai/djl/modality/cv/output/Rectangle.java
72.41% <0.00%> (ø)

...i/djl/modality/cv/translator/BigGANTranslator.java
21.42% <0.00%> (-5.24%)
:arrow_down:

...odality/cv/translator/BigGANTranslatorFactory.java
33.33% <0.00%> (+8.33%)
:arrow_up:

...nslator/InstanceSegmentationTranslatorFactory.java
14.28% <0.00%> (-3.90%)
:arrow_down:

.../cv/translator/SemanticSegmentationTranslator.java
0.00% <0.00%> (ø)

.../cv/translator/StyleTransferTranslatorFactory.java
40.00% <ø> (ø)

... and 446 more

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


feat:

Feature Request
One Off cairo Installer option

Something like cairo install that checks for rust installation and then installs cairo

Describe Alternatives

Related Code

Additional Context

If the feature request is approved, would you be willing to submit a PR?
(Help can be provided if you need assistance submitting a PR)

[ Tick] Yes
[ ] No

do you mean a script for developers of the cairo repo initiation?
otherwise - again all they need is just to use scarb - no need for anything regarding rust.


[SPARK-16693][SPARKR] Remove methods deprecated in 2.0.0 or before

What changes were proposed in this pull request?
Remove deprecated functions which includes:
SQLContext/HiveContext stuff
sparkR.init
jsonFile
parquetFile
registerTempTable
How was this patch tested?
unit tests
@shivaram

Test build #62758 has started for PR 14330 at commit 3162215.

Test build #62758 has finished for PR 14330 at commit 3162215.

This patch fails some tests.
This patch merges cleanly.
This patch adds no public classes.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/62758/
Test FAILed.

Merged build finished. Test FAILed.

Test build #62759 has started for PR 14330 at commit 9cc2260.

See JIRA comment.

Test build #62759 has finished for PR 14330 at commit 9cc2260.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/62759/
Test PASSed.

Yeah lets discuss this on JIRA / mailing lists and then get back to this

Test build #72511 has started for PR 14330 at commit 9cc2260.

Test build #72511 has finished for PR 14330 at commit 9cc2260.

This patch passes all tests.
This patch does not merge cleanly.
This patch adds no public classes.

Build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72511/
Test PASSed.

Any update on this PR?

We are closing it due to inactivity. please do reopen if you want to push it forward. Thanks!


Make "Num" const

Fixes #266.
I try to work on this issue. At first, I modified the "Num" string to be const. I'm going to fix other strings in another pull request :)
@mtshiba

Thanks!


Docker stack test is failing

Service: test1-8498081-pingerExt2 created, id=auxp066aoc14uparnxp2y9xm5
Stack is running 52fb77d20003a01ff653b6a5393564baecd899cbbffc012ad07b38815d457f29
Stack is up: 52fb77d20003a01ff653b6a5393564baecd899cbbffc012ad07b38815d457f29
--- FAIL: TestShouldManageStackLifeCycleSuccessfully (0.59s)
        stack_test.go:135: start stack test1-8498081
        stack_test.go:141: start stack test2-9727887
        stack_test.go:144: rpc error: code = 2 desc = Stack test2-9727887 already exists

Also, even when a test fails, it should clean up after itself.

Can't duplicate, passing now.


[WIP] Add artwork page

Added an art page for artworks and commissioned art pieces

Moved all progress to #49


Fixing the Backgound CSS properties

Fixing the Background CSS properties to make it really cover the page without repeating

Much better! Thank you so much @rsm23! I'm going to merge this and close.


Port to Angelo

Despite working almost exclusively with front-end mapping tools and node.js over the last two years my most popular contribution is still a Sinatra app boilerplate I made three years ago, so I might as well update it to use something decent like Angelo (h/t @kenichi).
It should probably be versioned in some way too. Here we go!

:+1: but sinatra definitely counts as "decent" :smiley_cat:

@kenichi true true
This repo is very dated though and updating it to use Angelo will give me a chance to (a) refamiliarize myself with Ruby, (b) get to know Angelo better, (c) make sure this thing with my name on it actually works, and (d) banish rack

nah


Hired Banner z-index

The version selector and the cdn provider selector show up over the Hired Banner.

Maybe we could just remove the banner now ...


Fix #2204. Auto-remove docker containers after run.

What does this implement/fix? Explain your changes.

Does this close any currently open issues?
https://github.com/Glavin001/atom-beautify/issues/2204
Any other comments?
You can use the following to clean up:
docker ps --all | grep "unibeautify/" | awk '{ print $1 }' | xargs docker rm

Checklist
Check all those that are applicable and complete.

[x] Merged with latest master branch
[x] Regenerate documentation with npm run docs
[x] Add change details to CHANGELOG.md under "Next" section
[ ] Added examples for testing to examples/ directory
[ ] Travis CI passes (Mac support)
[ ] AppVeyor passes (Windows support)

Published fix to v0.33.4


Mapping to and from a class with a custom metaclass is not allowed

The following the case fails:
from unittest import TestCase
from mapper.object_mapper import ObjectMapper

class MyMetaClass(type):
    pass

class MyFromClass(metaclass=MyMetaClass):
    pass

class MyToClass:
    pass

class Test(TestCase):
    def test_mapping_class_with_custom_metaclass(self):
        mapper = ObjectMapper()
        mapper.create_map(MyFromClass, MyToClass)

This behavior prevents to map to and from classes with a custom metaclass (i.e. Django models).
Is it intended or the check in ObjectMapper.create_map is just too strict?

A more specific example is the use of classes inherited from an abstract class.
from abc import ABC, abstractmethod

from mapper.object_mapper import ObjectMapper

class Interface(ABC):
    @abstractmethod
    def foo(self):
        pass

class FirstImplementation(Interface):
    def __init__(self):
        self.member = 1

    def foo(self):
        print('foo')

class SecondImplementation(Interface):
    def __init__(self):
        self.member = 1

    def foo(self):
        print('foo')

mapper = ObjectMapper()
mapper.create_map(FirstImplementation, SecondImplementation)

The above code raises:
mapper.object_mapper_exception.ObjectMapperException: type_from must be a type


Fix use of LoRA tokenizers

This depends on vLLM PR https://github.com/vllm-project/vllm/pull/6227, which is only held up because I need to find time to add a test to it.

Merge after #47

Codecov Report
Attention: Patch coverage is 33.33333% with 34 lines in your changes missing coverage. Please review.

Project coverage is 30.75%. Comparing base (d32cfb1) to head (8aa1f95).

Files
Patch %
Lines

src/vllm_tgis_adapter/grpc/grpc_server.py
14.28%
23 Missing and 1 partial :warning:

tests/conftest.py
60.00%
7 Missing and 1 partial :warning:

tests/test_grpc_server.py
33.33%
2 Missing :warning:

:exclamation:  There is a different number of reports uploaded between BASE (d32cfb1) and HEAD (8aa1f95). Click for more details.
HEAD has 2 uploads less than BASE

Flag
BASE (d32cfb1)
HEAD (8aa1f95)

3
1

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #40       +/-   ##
===========================================
- Coverage   62.96%   30.75%   -32.21%
===========================================
  Files          18       18
  Lines        1250     1278       +28
  Branches      222      228        +6
===========================================
- Hits          787      393      -394
- Misses        390      881      +491
+ Partials       73        4       -69

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Autosuggest story on Storybook hard to see

Description of issue:

For the Autosuggest stories, the suggestions are hidden by the container, making this component hard to decipher. You have to scroll within the container to see them.

Component in question (if applicable):

Autosuggest

Figma Link (if applicable):

https://www.figma.com/file/qShodlfNCJHb8n03IFyApM/Main?node-id=11689%3A423

Oh yeah, it seems there was a change and now the suggestions aren't showing.


upgrade golang to 1.16

https://github.com/open-cluster-management/backlog/issues/11916
Signed-off-by: Song Song Li<EMAIL_ADDRESS>

/test test

/test test

/lgtm


Improve jnp.split API

Sorry for the very uninformative title for this issue, couldn't think of a better one.
While reading the code for split in jax/_src/numpy/lax_numpy.py, I noticed the following block of code for the function lax_numpy._split:
https://github.com/google/jax/blob/2b716f292d814fdfadca43e108b5fedc122c0d2c/jax/_src/numpy/lax_numpy.py#L1178-L1193
Accounting to the type signature of indices_or_sections
https://github.com/google/jax/blob/2b716f292d814fdfadca43e108b5fedc122c0d2c/jax/_src/numpy/lax_numpy.py#L1172-L1173
We should be able to remove the first branch (i.e. (tuple, list)), in the spirit of #7737. Was about to send a pull request. But I also noticed that indices_or_sections is always concrete, and Arrays are not hashable. Keeping the current type also prevents us from marking indices_or_sections as static in jit. One might argue removing the second branch(i.e. (np.ndarray, ndarray)) and make indices_or_sections: int | Sequence[int] made more sense, but that's a deviation from the original numpy api.
Not sure what's the best action to take here.

I suspect it's the type annotations that are incorrect, not the implementation. The latter has much more test coverage than the former.

I would hesitate to apply #7737 here, as the argument must be static and so there's no performance footgun in passing a list instead of an array, and erroring on list/tuple input would break a lot of downstream code.

I suspect it's the type annotations that are incorrect, not the implementation.

Totally agree. Can we error on array input and mark split as static?

Erroring on array input would be an API change that would potentially require a deprecation cycle and also a large number of fixes to downstream packages, and I can't think of any advantage that such a depracation would bring about, so I lean toward no.

Should we at least relax the type annotation then? Feel free to close this issue.

I can't think of any advantage that such a deprecation would bring about.

Even with the relax typing, use of split under jit still requires special treatment (other jnp functions will at least work under jit with correct static_argnums). Just pointing out the awkwardness, won't argue too strongly about it.
a: Array
i: Array

def f(a, i):
  ...
  r = split(a, i)
  ...

f(a, i)                                   # type checks, works, let me try to jit it
jit(f)(a, i)                              # doesn't work, one could argue `i` should be marked as static
jit(f, static_argnums=(1,))(a, i)         # still doesn't work
jit(f, static_argnums=(1,))(a, tuple(i))  # finally

Yeah, understood that this does not work with JIT, and I think that's handled about as well as it can be in the code (explicit concreteness checks with associated error messages). We could probably adjust the type annotation to make clear that sequences are supported - what do you think?

I think that's handled about as well as it can be in the code

That's fair, and agreed. Let's just change the annotation.
As a general question, should one expect jit (with correct static_argnums marking, for naked jit are known to change strictness of arguments) to change the apparent strictness of a argument of f for f in jax.numpy?

Can you elaborate on what you mean by "apparent strictness"?

Ah, there was a typo, I meant staticness. Or, maybe "appeared un-staticness".
Staticness is enforced at runtime in two ways:

E1: Trying to concretise, example: in native control-flow
E2: Disallow certain types, example: jit(jnp.sum, static_argnums=(1,))(a, axis=jnp.int_(0)) errors out

Inside jit, (E1) catch error related to other aspect of staticness, like the one in jit(jnp.nonzero)(a), i.e. some extra information needed, but the argument itself remains 'dynamic'(no type conversion).
Outside of jit, one usually only have (E1), inside of jit (with correct staticness  marking), both. Knowing (E2), supposedly, I could deduce staticness (or rather un-strictness), from type annotation. But it's 'appeared' for sometimes it is really only enforced by (1) at runtime:
jnp.sum(a, axis=jnp.int_(0))  # runs, but type error

We could debug problem regarding 'real' staticness of a function f traversing following graph breadth-first, and would ideally back out before reaching state d:
flowchart TB
    A["a. Use knowledge about it's functionality"]
    B["b. Plug in some arrays and check for static type error (E2)"]
    C["c. Wrap in jit and check for runtime error (E1)"]
    D["d. Wrap the *outer* function with jit(static_argnums) and brute force"]
    A-->B
    A-->C
    B-->D
    subgraph jitted
    C-->D
    end
    B-->C

For most functions in jax.numpy, following a → b is enough, and only occasionally, a → c. Noticeably, even if b checks out and c doesn't (a → b → c, think jnp.nonzero), the fix in the end doesn't involve type conversion which is inherently contradict to the knowledge we aquired at state b.
The relaxed annotation for jnp.split forces us to reach d, and the staticness one can infer from the type is different from the real one acquires at the end. One might as well conclude it's jit that changes the staticness of argument indices_or_sections.
Of course, trade-offs, ease-of-use, python-typing-weak, etc. So I don't stand my ground 100%. Just really want to try out the flowchart functionality. :)

As a general question, should one expect jit (with correct static_argnums marking, for naked jit are known to change strictness of arguments) to change the apparent ~strictness~ staticness of some arguments of f for f in jax.numpy?

I believe jit will always cause a function's arguments to be non-static unless they're explicitly marked static using static_argnames or static_argnums. We might imagine a world where JIT tries to infer whether arguments should be static or traced, but JAX's current JIT implementation does not work that way.

I ran into this issue. I want to pass a list of plain Python ints to a jnp.split operation inside a jit. (The list is constructed by a complex series of function calls.)  Is there a plan to change the type annotation of jnp.split?

Try passing np.array(indices) instead: this will type-check as ArrayLike but remain static.

But I think the type annotation is wrong here, it should be indices_or_sections: Union[int, ArrayLike, Sequence[int]] I think. The implementation explicitly handles tuple or list of ints.

@jakevdp I think so, too. I'm looking at https://github.com/google/jax/blob/3c1f3abba2c2e9b2506dc6bd19a132f60e2c320b/jax/_src/numpy/lax_numpy.py#L1163

#15397 should fix it


Dev

:warning: Please install the  to ensure uploads and comments are reliably processed by Codecov.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.

Flag
Coverage Δ

unittests
98.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


CameraPreview exception due to version 0.8.1+6 fix

Steps to Reproduce
this change causing exception when switching cameraDescription.
when doing so, dispose is being called on current controller, before initiating new controller with the new selected description.
during the dispose, the camera preview ValueListenableBuilder added here is getting exception.
here is the code for switching description:
void onNewCameraSelected(CameraDescription? cameraDescription) async {
if (controller != null) {
      await controller!.dispose();
    }
    controller = CameraController(
      cameraDescription!,
      ResolutionPreset.max,
      enableAudio: enableAudio,
    );

    // If the controller is updated then update the UI.
    controller!.addListener(() {
      if (mounted) setState(() {});
      if (controller!.value.hasError) {
        logError("", 'Camera error ${controller!.value.errorDescription}');
      }
    });

    try {
      await controller!.initialize();
      await Future.wait([
        controller!.getMaxZoomLevel().then((value) => _maxAvailableZoom = value),
        controller!.getMinZoomLevel().then((value) => _minAvailableZoom = value),
      ]);
    } on CameraException catch (e) {
      _showCameraException(e);
    }

    if (mounted) {
      setState(() {});
    }
}

and, the code getting the error from CameraPreview:

Widget build(BuildContext context) {
    return controller.value.isInitialized
        ? ValueListenableBuilder(
            valueListenable: controller,
            builder: (context, value, child) {
              return AspectRatio(
                aspectRatio: _isLandscape()
                    ? controller.value.aspectRatio
                    : (1 / controller.value.aspectRatio),
                child: Stack(
                  fit: StackFit.expand,
                  children: [
                    _wrapInRotatedBox(child: controller.buildPreview()),
                    child ?? Container(),
                  ],
                ),
              );
            },
            child: child,
          )
        : Container();
  }

Expected results:
CameraPreview getting exception as controller already disposed.

Hi @RoiLaredo,
Thanks for filing the issue, Please provide the output of flutter doctor -v along with the exception logs, This helps to better investigate the issue.
Thank you.

Without additional information, we are unfortunately not sure how to resolve this issue.
We are therefore reluctantly going to close this bug for now.
Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.
Could everyone who still has this problem please file a new issue with the exact description of what happens, logs, and the output of flutter doctor -v.
All system setups can be slightly different, so it's always better to open new issues and reference related issues.


Doubt about the updating method of Lagrange Multipliers

from safepo.common.lagrange import Lagrange
nu = 1.0
nu_lr = 0.1
ep_cost = 35
lagrange = Lagrange(
cost_limit=25.0,
lagrangian_multiplier_init=1.0,
lagrangian_multiplier_lr=0.1,
)
print("Before update:")
print(f"Learning Rate: {lagrange.lambda_optimizer.param_groups[0]['lr']}")
lagrange.update_lagrange_multiplier(ep_cost)
learn_lag = lagrange.lagrangian_multiplier
nu += nu_lr * (ep_cost - 25.0)
print(f"Lagrange multiplier: {learn_lag}")
print(f"Nu: {nu}")
There are two methods: one is to treat it as a learnable parameter and use the Adam optimizer, and the other is to directly assign values. Due to the adaptive learning rate of the Adam optimizer, the multipliers obtained by the two are not consistent, and the multiplier changes rapidly in the case of direct assignment under the same learning rate.
I understand that the original code of PPO Lagrangian uses the former method, while the original code of FOCOPS and CUP seems to use the latter method. Should it be distinguished or can the former be used uniformly?

Why does PPO-Lagrangian employ the Adam optimizer? This is due to the absence of a universally accepted implementation reference for the PPO-Lagrangian method, and given the oscillatory nature and hyperparameter sensitivity of the Lagrange multipliers, our preliminary experiments indicated that employing the Adam optimizer augments the algorithm's stability and performance.
Why don't FOCOPS and CUP utilize the Adam optimizer? This is about the original paper's implementation, as neither the formulation nor the code implementation within the FOCOPS and CUP papers suggested the feasibility of using the Adam optimizer.
As to whether implementing the Adam optimizer within FOCOPS and CUP to enhance algorithmic performance is feasible, we're apprehensive that such a tactic could potentially clash with the original algorithm's convergence rate and direction. While it might yield positive results in some experiments, it's challenging to theoretically validate such effectiveness. Nonetheless, we welcome your attempt and will consider incorporating it as an optional trick in future versions.

In this case, can I consider that FOCOPS and CUP have no difference in handling cost constraints compared to Lagrangian methods such as PPO-Lagrangian, and their main difference is the way of updating actors?

Sure, in code implementation, these three algorithms bear striking similarities. Their difference, indeed, lies solely in the actor-update process.

The last question is about TRPO class algorithms, such as TRPO, TRPO-Lagrangian, CPO, should they use multiple epochs of full batch or multiple epochs of mini batch to update the critic networks, I found that most of the TRPO class algorithms on the internet use multiple epochs of full batch to update the critic, while most of the PPO class algorithms utilize mini batch. In your implementation, you uniformly use multiple epochs of mini-batch to update the critic, is it because it is more effective and fair to try to preserve the comparison with the first-order methods of the PPO class?
Also, I found that using multiple epochs of full batch to update the critic of TRPO-like algorithms, the training time is much faster than multiple epochs of mini-batch because the number of updates is much lower, is it possible to adopt multiple epochs of full batch to update the critic in TRPO-based algorithms?

In our implementation process, we've referred to Tianshou and Stable-Baselines and have employed multiple mini-batches for multiple rounds of critic updates. We've experimented with using full-batch updates for the critic in previous tests, but its performance didn't quite measure up to the mini-batch approach.


Add terms from dev-pt to main (live)

Describe your changes
Add the following terms to live:

content/pt-br/devsecops.md
content/pt-br/distributed-apps.md
content/pt-br/event-streaming.md
content/pt-br/nodes.md
content/pt-br/platform-as-a-service.md
content/pt-br/shift-left.md

And update a few tags.
Related issue number or link (ex: resolves #issue-number)
N/A
Checklist before opening this PR (put x in the checkboxes)

[x] This PR does not contain plagiarism

don’t copy other people’s work unless you are quoting and contributing it to them.

[x] I have signed off on all commits

signing off (ex: git commit -s) is to affirm that commits comply DCO. If you are working locally, you could add an alias to your gitconfig by running git config --global alias.ci "commit -s".

@seokho-son @jihoon-seo could you give us help on it? Thanks!

Happy new year!
Thanks!! LGTM :)


Fix grammar errors

[ ] I have read freeCodeCamp's contribution guidelines.
[ ] My pull request has a descriptive title (not a vague title like Update index.md)
[ ] My pull request targets the master branch of freeCodeCamp.
[ ] None of my changes are plagiarized from another source without proper attribution.
[ ] All the files I changed are in the same world language (for example: only English changes, or only Chinese changes, etc.)
[ ] My changes do not use shortened URLs or affiliate links.

Closes #XXXXX

@NachoCoding
Thank you for your contribution to the page! 👍
We're happy to accept these changes, and look forward to future contributions. 🎉


"ReferenceError: exports is not defined" when importing a module

Hi, I'm trying to use purs-loader to integrate some PureScript code in my Vue project (created with the latest vue-cli).
My vue.config.json (which allows to modify the Webpack's configuration) looks like this:
module.exports = {
  chainWebpack: config => {
    config.module
      .rule('purescript')
      .test(/\.purs$/)
      .use('purs-loader')
      .loader('purs-loader')
      .options({
        src: [
          'src/**/*.purs',
          'bower_components/purescript-*/src/**/*.purs'
        ],
        output: 'output',
        pscIde: false
      })

    config.resolve.extensions.add('.purs')
  }
}

I npm installed the packages purescript and purs-loader as dev-dependencies, created a bower.json file with the Purescript packages I needed for testing:
{
  "name": "purescript-webpack-example",
  "private": true,
  "dependencies": {
    "purescript-prelude": "^4.1.0",
    "purescript-arrays": "^5.3.0"
  }
}

and run bower install which completed successfully.
I then created a Test.purs file:
module Test where

import Prelude

data Point = Point { x :: Int, y :: Int }
type Polyline = Array Point

newPoint :: Int -> Int -> Point
newPoint x y = Point { x: x, y: y }

sumPoint :: Point -> Int
sumPoint (Point p) = p.x + p.y

newPolyline :: Int -> Int -> Polyline
newPolyline x y = [newPoint x y, newPoint x y]

and imported and tested it from JS:
import Test from<EMAIL_ADDRESS>
// ...

let p = Test.newPoint(3)(2)
console.log(p)
console.log(Test.sumPoint(p))

let pl = Test.newPolyline(3)(5)
console.log(pl)

with everything working as expected. Then I introduced this function in the Test.purs file:
import Data.Array (length)

polylineLen :: Polyline -> Int
polylineLen pl = length pl

Webpack compiled succesfully but, now, my app doesn't run anymore in the browser with the following error in the browser console:
ReferenceError: exports is not defined app.js line 915 > eval:13:1
    <anonymous> Array.js:7
    js app.js:915
    __webpack_require__ app.js:767
    fn app.js:130
    <anonymous> Array.purs:3
    purs app.js:927
    __webpack_require__ app.js:767
    fn app.js:130
    <anonymous> Test.purs:3
    purs app.js:4056
    __webpack_require__ app.js:767
    fn app.js:130
    <anonymous> cjs.js:4
    ./node_modules/cache-loader/dist/cjs.js?!./node_modules/babel-loader/lib/index.js!./node_modules/cache-loader/dist/cjs.js?!./node_modules/vue-loader/lib/index.js?!./src/App.vue?vue&type=script&lang=js& app.js:2223
    __webpack_require__ app.js:767
    fn app.js:130
    <anonymous> App.vue:1
    ./src/App.vue?vue&type=script&lang=js& app.js:4020
    __webpack_require__ app.js:767
    fn app.js:130
    <anonymous> App.vue:1
    vue app.js:4008
    __webpack_require__ app.js:767
    fn app.js:130
    <anonymous> main.js:11
    js app.js:4163
    __webpack_require__ app.js:767
    fn app.js:130
    1 app.js:4345
    __webpack_require__ app.js:767
    <anonymous> app.js:902
    <anonymous> app.js:905

If I click on the error hyperlink app.js line 915 > eval:13:1 on the developer console, I can see that the error refers to line 13 of the Array.js PureScript-transpiled file: which is
// ...
exports.range = function (start) {
  // ...

I don't understand what's happening, I'm not familiar with Webpack at all... what could be wrong? Also why can I succesfully use some functions from Prelude (like the basic operators) but not other functions or functions from other modules? For instance I also can't use show, and clicking on the error on the console takes me to the Show.js file with a similar line that assigns the exports.
Any help would be really appreciated,
thank you very much in advance.

Sorry for the delay. I will have to take a closer look at this. Are you able to provide your entire webpack config file?

Sure, by running vue inspect I get the following auto-generated WebPack config, it's pretty long... (almost 1500 lines), sorry about that...
https://pastebin.com/4ELNgu6L
Thank you very much for taking a look at this!

I should add that, after inspecting the configs a bit, I tried adding the bower_components directory to the resolve.modules array without any luck.
Then I tried setting bundle: true in the purs-loader config and that made it work. However I'm not sure if that's what I want. If I'm not mistaken now the PureScript compiler is generating a bundle for me and WebPack is including that as if I wrote a monolithic JavaScript file, right? I would prefer if WebPack could see the different PureScript modules (the ones I write and the ones I import) as different modules and then handle the bundling, so I can split stuff into chunks as I like (hope I'm not saying anything meaningless, as I said I have very little experience and understanding of WebPack).
Anyhow it doesn't feel "right" that the PureScript compiler is bundling stuff when that's WebPack's job.
Do you have any idea about the cause of this behaviour?
Thanks again for your time.

Thanks for the info. I am wondering what version of the purs-loader, Purescript, webpack, etc., you are using. Also, is your project available on GitHub by chance?

My package-lock.json reports the following versions installed:

webpack: 4.28.4
purs-loader: 3.6.0
purescript: 0.13.2
purescript-installer: 0.2.5

The project isn't on GitHub but I can share a ZIP file of the minimal reproduction project where I've been doing the tests reported above.
I used the Vue CLI to create the project and then added the required dependencies and Webpack configuration as I described in the first post of this thread.
Here is the project:
vuepurstest.zip
I'm really wondering what could be wrong at this point... I guess there's something weird in the scaffolding that the Vue CLI did at the beginning. I tried looking around but I couldn't figure out anything useful.
Thanks again for your time.

Hi, did you happen to find anything that could be related to why this still happens?

have same problem.  purs-loader only work for naive cases.
I guess better module support in purscript will solve the problem. https://github.com/purescript/purescript/issues/3613
without purs-loader,
If I change themodule.exports = to export default in the the bundled script using spago, can import without any problem.
https://github.com/webpack/webpack/issues/3997
all kinds of js module confuse me so much, just provide some infor I gathered. hope this is useful.

I ran into this issue today. I tried a view things, regarding webpack configuration, and order of imports. I'm still not sure what causes this issue. Webpack Devserver and Tests are working fine, but production build lead to an output with Uncaught ReferenceError: exports is not defined
The one thing that could lead to this issue, is that the project I'm working on is currently a mess, where create-react-app is patched with purs-loader. And TypeScript is importing PureScript, which itself is importing foreign JavaScript and again a mix PureScript and TypeScript.
Workaround: Using https://github.com/pelotom/purescript-easy-ffi to inline javascript as string. Temporary resolves the error.

This happened to me and I was wondering what the problem was(I was trying to make a lag sim)  man123beast.github.io/lag
https://github.com/Man123Beast/man123beast.github.io/blob/main/lag.html


Add in env variable to control job engine pull policy

Adding the environment variable tat can be set to control how the pull policy for jobs spawned by agent is controlled

@schaubl has suggested to set "Always" as the default policy...

I have set the default policy to "Always" following discussion with @schaubl

On the Docker version, env vars related to the job executors starts with JOB_ (for example JOB_PULL_TIMEOUT).
So for consistency between Docker Compose and Kubernetes/Helm installation, I would suggest to name it JOB_PULL_POLICY


Add an InTopic to DE OMAS

I think we should have an InTopic for the Data Engine OMAS, so that things like the data engine proxy can hand-over asynchronous messages to the Data Engine OMAS rather than relying on synchronous API calls.
At the moment the data engine proxy services are using the Data Engine OMAS client to make API calls, and there is a long wait until all of these calls are processed by the OMAS before state is persisted back into the underlying data engine. I think it would be more robust to generate messages, pass these asynchronously, and then immediately store the data engine's processing state while the Data Engine OMAS is still processing?  Any subsequent state changes within the data engine can then be picked up and asynchronously passed across again (queuing up behind any others already in the topic) while the Data Engine OMAS continues to process the topic.
To give a sense of timings (and why I think this addition / change is important), with our simple 3-4 job Coco Pharma example:

The data engine proxy services startup and processing of the samples takes ~15 seconds (~3 seconds of which is actual job lookup and transformation, the rest is service, connection, etc startup (one-off) overhead)
The data engine OMAS processing (and onwards) takes more than 2 minutes from there
Only once that is complete is the data engine (DataStage) given the go-ahead to store when it last sync'd changes

Should anything go wrong in the second bullet, the "last sync'd changes" marker in the underlying data engine is not updated -- despite it's actions (the first bullet) happening fairly quickly.
This relates to https://github.com/odpi/egeria-connector-ibm-information-server/issues/64, which is only possible if there is an InTopic on the OMAS to write into. This change would ensure there is minimal risk of a service disruption requiring changes to be re-processed from the data engine. (Instead they'd be state-persisted in the InTopic, ready for processing whenever service is restored.)

I assume this have to be done before the linege related release(https://egeria.odpi.org/release-notes/release-notes-1-3.html) ?

Hi Chris I am starting working on this user story and from what I understood over the description, after the inTopic of DE OMAS, the IGC Connector will publish events directly without any intermediate steps to DE Proxy right?

No, the IGC connector is not involved here...  The steps would be (after OMASes and proxies configured and an InTopic available):

DE Proxy polls for changes via its configured connection (in our example, the DataStage Connector)
DataStage Connector queries (via IGC, but not the IGC connector) for any changed objects since the last sync (or all, if no previous sync found)
All changed jobs (and their details: stages, links, columns, schemas, etc) are queried by the DataStage Connector
DataStage Connector translates all of these details into DE OMAS objects
DataStage Connector will push these DE OMAS objects onto the InTopic of DE OMAS
DataStage Connector will mark the last sync point (via IGC, but not the IGC connector) and hand-back control to DE Proxy
DE Proxy will sleep for the defined interval (60 seconds by default)
The DE Proxy will loop back to (1) again

Thanks thats very clear to me now. Just one more question to confirm:

No, the IGC connector is not involved here
The DataStage Connector you are mentioning is the module of this one?
egeria-connector-ibm-information-server/datastage-adapter

I think it is hehe

Yes, the DataStage Connector is under egeria-connector-ibm-information-server/datastage-adapter while the IGC Connector is under egeria-connector-ibm-information-server/igc-adapter.  Note that there is no dependency between them -- though they both rely on the underlying IGC REST client library (which is completely independent of Egeria): egeria-connector-ibm-information-server/igc-clientlibrary

Looks like we've merged the implementation of the InTopic -- next question from my side is how I should make use of it?  Is it something that should be exposed via the DataEngineClient (which currently still only appears to operate against the REST API)?  Or should I somehow be calling the InTopic directly?

Looks like we've merged the implementation of the InTopic -- next question from my side is how I should make use of it? Is it something that should be exposed via the DataEngineClient (which currently still only appears to operate against the REST API)? Or should I somehow be calling the InTopic directly?

Hi Chris, as I see from other existing connectors that are calling the in/out Topics of OMASes, it is done by governance server configuration POST calls with provided topic name and then being called directly in the connector. But now sure it is the good practice from the architectural design perspective. I will ask it during tomorrow functionality call to Mandy. :)

As a conclusion from what we have discussed from latest FC, I will add the functionalities from DE OMAS client that consumers can retrieve the connection objects of DE OMAS inTopic. For DS Proxy it can configure the inTopic by calling the DE OMAS client to use the inTopic connection further.

@popa-raluca Just realised I forgot to change the docs for previous user story of createExternalDataEngine. I will update it together with inTopic usage.

Just for clarity (to avoid mistake I just made changing labels) -- targeting the 1.4 release, as that's the lineage-related release...


fix(mediaQueryData): Compare only what is being used

Compare only what is being used on the _mediaQueryData Object, it was causing too much rebuilds(numbers being restarted)  on scrollable content.
I think resolves #9 #8

LGTM, Thanks


Simple request, please increase max font size?

Sorry I am new to github. I don't know how to do anything here, but I found the line of code, line 309 in Settings.as for max font size. Could someone please jack this up to like 500 or something I am trying to make a LARGE speedometer display with no border or anything. Apologies I would do it myself but I'm new and don't know how this website works. I hope this is ok.

I would have just edited the file myself but I could not open it with notepad++ so I didn't know what to do. If someone would like to help me do it myself to my own file instead, that would work as well!

I think it should be possible to Ctrl+Click the slider in the settings dialog and type a custom amount, bypassing the limit.
Doesn't hurt increasing the maximum of course, but I'm not sure about 500 😅 maybe 100 is reasonable enough.


GPU memory usage does not increase when using multithreading in python

Hi, I am working on deploy some yolo v3 models (keras) on the GPU of our server. However, I found that, when I use multithreading programming in python to deploy multiple models and let them predict in parallel, the GPU memory usage does not increase, the GPU memory usage is almost as much as one single model, which makes me very confused. Could someone help me?
load and predict one by one:
**model 0
gpu usage：total 16280.88 MB， used 859.56 MB， unused 15421.31 MB
model 1
gpu usage：total 16280.88 MB， used 1371.56 MB， unused 14909.31 MB
model 2
gpu usage：total 16280.88 MB， used 1371.56 MB， unused 14909.31 MB
model 3
gpu usage：total 16280.88 MB， used 1371.56 MB， unused 14909.31 MB
2021-07-05 16:45:00.227119: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
gpu usage：total 16280.88 MB， used 6649.56 MB， unused 9631.31 MB
gpu usage：total 16280.88 MB， used 6649.56 MB， unused 9631.31 MB
gpu usage：total 16280.88 MB， used 6649.56 MB， unused 9631.31 MB
gpu usage：total 16280.88 MB， used 6649.56 MB， unused 9631.31 MB
**
load one by one and predict through multithread:
**model 0
gpu usage：total 16280.88 MB， used 861.56 MB， unused 15419.31 MB
model 1
gpu usage：total 16280.88 MB， used 1373.56 MB， unused 14907.31 MB
model 2
gpu usage：total 16280.88 MB， used 1373.56 MB， unused 14907.31 MB
model 3
gpu usage：total 16280.88 MB， used 2397.56 MB， unused 13883.31 MB
2021-07-05 17:06:22.285915: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
thread 0 gpu usage：total 16280.88 MB， used 6651.56 MB， unused 9629.31 MB
thread 1 gpu usage：total 16280.88 MB， used 6651.56 MB， unused 9629.31 MB
thread 2 gpu usage：total 16280.88 MB， used 6651.56 MB， unused 9629.31 MB
thread 3gpu usage：total 16280.88 MB， used 6651.56 MB， unused 9629.31 MB
**

@Neronjust2017 Could you please fill the issue template.Also Please provide the simple standalone code/ colab link to reproduce the issue at our end.Thanks

System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):  yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Red Hat Enterprise Linux Server release 7.9 (Maipo)
TensorFlow installed from (source or binary): binary
TensorFlow version (use command below): gpu 1.14.0
Python version: 3.7.10
CUDA/cuDNN version: cuda 10.2 cudnn 8.2
GPU model and memory: Tesla P100-PCIE 16GB

You can collect some of this information using our environment capture
script
You can also obtain the TensorFlow version with:

TF 1.0: python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"
TF 2.0: python -c "import tensorflow as tf; print(tf.version.GIT_VERSION, tf.version.VERSION)"

Describe the current behavior
I am working on deploy some yolo v3 models (keras) on the GPU of our server. However, I found that, when I use multithreading programming in python to deploy multiple models and let them predict in parallel, the GPU memory usage does not increase, the GPU memory usage is almost as much as one single model, which makes me very confused.
load models one by one and measure the gpu memory:
model 0
gpu usage：total 16280.88 MB， used 859.56 MB， unused 15421.31 MB
model 1
gpu usage：total 16280.88 MB， used 1371.56 MB， unused 14909.31 MB
model 2
gpu usage：total 16280.88 MB， used 1371.56 MB， unused 14909.31 MB
model 3
gpu usage：total 16280.88 MB， used 1371.56 MB， unused 14909.31 MB
infer one by one and measure the gpu memory:
gpu usage：total 16280.88 MB， used 6649.56 MB， unused 9631.31 MB
gpu usage：total 16280.88 MB， used 6649.56 MB， unused 9631.31 MB
gpu usage：total 16280.88 MB， used 6649.56 MB， unused 9631.31 MB
gpu usage：total 16280.88 MB， used 6649.56 MB， unused 9631.31 MB
infer with multithreading and measure the gpu memory:
thread 0  gpu usage：total 16280.88 MB， used 6651.56 MB， unused 9629.31 MB
thread 1  gpu usage：total 16280.88 MB， used 6651.56 MB， unused 9629.31 MB
thread 2  gpu usage：total 16280.88 MB， used 6651.56 MB， unused 9629.31 MB
thread 3 gpu usage：total 16280.88 MB， used 6651.56 MB， unused 9629.31 MB
Standalone code to reproduce the issue
load and predict one by one:
`import os
import time
import numpy as np
from keras.models import Model, load_model
import tensorflow as tf
from keras.backend.tensorflow_backend import set_session
import pynvml
import cv2
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
sess = tf.Session(config=config)
set_session(tf.Session(config=config))
pynvml.nvmlInit()
handler = pynvml.nvmlDeviceGetHandleByIndex(0)
model_files= [
'/data/yolo_1',
'/data/yolo_2',
'/data/yolo_3',
'/data/yolo_4'
]
models = []
for i in range(len(model_files)):
model = load_model(model_files[i])
models.append(model)
print(i)
meminfo = pynvml.nvmlDeviceGetMemoryInfo(handler)
gpu_mem_total = round(meminfo.total / 1024 / 1024, 2)
gpu_mem_used = round(meminfo.used / 1024 / 1024, 2)
gpu_mem_free = round(meminfo.free / 1024 / 1024, 2)
print(r'gpu memory：total {} MB， used {} MB， unused {} MB'.format(gpu_mem_total, gpu_mem_used, gpu_mem_free))
image_paths = []
input_path = "/data/testing/"
if os.path.isdir(input_path):
for inp_file in os.listdir(input_path):
image_paths += [input_path + inp_file]
else:
image_paths += [input_path]
image_paths = [inp_file for inp_file in image_paths if (inp_file[-4:] in ['.jpg', '.png', 'JPEG'])]
new_w, new_h = 832, 832
t1 = time.time()
for i ,model in enumerate(models):
for image_path in image_paths:
    image = cv2.imread(image_path)
    image = cv2.resize(image / 255., (new_w, new_h))
    image = np.expand_dims(image, axis=0)
    boxes = model.predict(image)

meminfo = pynvml.nvmlDeviceGetMemoryInfo(handler)
gpu_mem_total = round(meminfo.total / 1024 / 1024, 2)
gpu_mem_used = round(meminfo.used / 1024 / 1024, 2)
gpu_mem_free = round(meminfo.free / 1024 / 1024, 2)
print(r'gpu memory：total {} MB， used {} MB， unused {} MB'.format(gpu_mem_total, gpu_mem_used, gpu_mem_free))

t2 = time.time()
print(t2-t1)
`
predict with multi threading:
`import os
import numpy as np
from keras.models import Model, load_model
import tensorflow as tf
from keras.backend.tensorflow_backend import set_session
import pynvml
import cv2
import threading
import time
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
sess = tf.Session(config=config)
set_session(tf.Session(config=config))
pynvml.nvmlInit()
handler = pynvml.nvmlDeviceGetHandleByIndex(0)
model_files= [
'/data/yolo_1',
'/data/yolo_2',
'/data/yolo_3',
'/data/yolo_4'
]
image_paths = []
input_path = "/data/testing/"
if os.path.isdir(input_path):
for inp_file in os.listdir(input_path):
image_paths += [input_path + inp_file]
else:
image_paths += [input_path]
image_paths = [inp_file for inp_file in image_paths if (inp_file[-4:] in ['.jpg', '.png', 'JPEG'])]
print(len(image_paths))
models = []
for i in range(len(model_files)):
model = load_model(model_files[i])
model._make_predict_function()
models.append(model)
print(i)
meminfo = pynvml.nvmlDeviceGetMemoryInfo(handler)
gpu_mem_total = round(meminfo.total / 1024 / 1024, 2)
gpu_mem_used = round(meminfo.used / 1024 / 1024, 2)
gpu_mem_free = round(meminfo.free / 1024 / 1024, 2)
print(r'gpu memory：total {} MB， used {} MB， unused {} MB'.format(gpu_mem_total, gpu_mem_used, gpu_mem_free))
def infer(i):
new_w, new_h = 832, 832

for image_path in image_paths:
    image = cv2.imread(image_path)
    image = cv2.resize(image / 255., (new_w, new_h))
    image = np.expand_dims(image, axis=0)
    boxes = models[i].predict(image)

meminfo = pynvml.nvmlDeviceGetMemoryInfo(handler)
gpu_mem_total = round(meminfo.total / 1024 / 1024, 2)
gpu_mem_used = round(meminfo.used / 1024 / 1024, 2)
gpu_mem_free = round(meminfo.free / 1024 / 1024, 2)
print(r'{} gpu memory：total {} MB， used {} MB， unused {} MB'.format(i, gpu_mem_total, gpu_mem_used, gpu_mem_free))

threads = []
for i, model_file in enumerate(model_files):
threads.append(threading.Thread(target=infer, args=(i,)))
for thread in threads:
thread.start()
`

@Neronjust2017
We see that you are using a old version of tensorflow [1.x] that is not supported now, please upgrade to tensorflow 2.x and let us know if you face any issues.