How to serialize and deserialize a cookieJar ?

I check the code about cookie of request,
'use strict'
var tough = require('tough-cookie')

var Cookie = tough.Cookie
var CookieJar = tough.CookieJar

exports.parse = function (str) {
  if (str && str.uri) {
    str = str.uri
  }
  if (typeof str !== 'string') {
    throw new Error('The cookie function only accepts STRING as param')
  }
  return Cookie.parse(str, {loose: true})
}

// Adapt the sometimes-Async api of tough.CookieJar to our requirements
function RequestJar (store) {
  var self = this
  self._jar = new CookieJar(store, {looseMode: true})
}
RequestJar.prototype.setCookie = function (cookieOrStr, uri, options) {
  var self = this
  return self._jar.setCookieSync(cookieOrStr, uri, options || {})
}
RequestJar.prototype.getCookieString = function (uri) {
  var self = this
  return self._jar.getCookieStringSync(uri)
}
RequestJar.prototype.getCookies = function (uri) {
  var self = this
  return self._jar.getCookiesSync(uri)
}

exports.jar = function (store) {
  return new RequestJar(store)
}

It don't have serialize and deserialize method,
I need a way to send the cookieJar to another progress ,so I need serialize and deserialize the cookieJar.
I know that the cookie of request is another project https://github.com/salesforce/tough-cookie.
but I can't use those API,because the cookieJar of request has been encapsulated as "RequestJar" and I can't access it directly.
Maybe I can do it as follow code:
jar._jar.xxxx();
But access a member with '_' prefix is not a good way.

I needed to save whole cookies on a file for later use, I did this:
const cookies = jar1.getCookies(url);
const cookiesJSON = JSON.stringify(cookies.map(cookie => cookie.toString()));
//save cookiesJSON to a file

then when you need them:
//load file into cookiesJSON
const jar2 = request.jar();
JSON.parse(cookiesJSON).forEach(cookieStr => jar2.setCookie(cookieStr, url));


Remove usages of network name

Determining network type by string comparisons is quite horrible.

https://dev.azure.com/Stratisplatformuk/StratisBitcoinFullNode/_workitems/edit/4058


post-import and post-export and some other issues

Hi,
could you please also implement something like a post import and export configuration option which adds own functions after the "bgp_large_community.add" statement in the filters? In my case I'm trying to filter for specific commuities and replace them but in the end the default community is set my the filter for all prefixes :D
    ipv4 {
        import keep filtered;
        import limit AS49697_IBGP_ROUTE4_REFLECTOR_MAXPFX_v4 action disable;
        next hop self;
        import filter {
            reject_bogons();

            strip_info_communities();
            bgp_local_pref = 100;
            honor_graceful_shutdown();
            AS49697_IBGP_RR_IN();
            bgp_large_community.add((ASN,0,102)); # Learned from peer

            accept;
        };

        export filter {
            AS49697_IBGP_RR_OUT();

            bgp_path.delete([64512..65534,<PHONE_NUMBER>..4294967294]); # Strip private ASNs

            accept_local(); # Originated
            process_prepends();
            if ((ASN,0,103) ~ bgp_large_community) then accept; # Downstream

            reject;
        };
    };

In the above example "AS49697_IBGP_RR_IN()" and "AS49697_IBGP_RR_OUT()" are my individual functions which are just matching for downstream, updateam and peer large-communites.
function AS49697_IBGP_RR_OUT() {

  if ((ASN,0,101) ~ bgp_large_community) then {
      accept;
    }

  else if ((ASN,0,102) ~ bgp_large_community) then {
      accept;
    }

  else if ((ASN,0,103) ~ bgp_large_community) then {
      accept;
    }

  else reject;
}

function AS49697_IBGP_RR_IN() {

  if ((ASN,0,101) ~ bgp_large_community) then {
      bgp_local_pref = 100;
      accept;
    }

  else if ((ASN,0,102) ~ bgp_large_community) then {
      bgp_local_pref = 200;
      accept;
    }

  else if ((ASN,0,103) ~ bgp_large_community) then {
      bgp_local_pref = 500;
      accept;
    }

  else reject;
}

Unfortunately there is also the function "strip_info_communities()" which just removes everything for which I want to match for :D
function strip_info_communities() {
  bgp_large_community.delete([(ASN, 0, *)]);
}

A workaround would be to use alternative communities but it would make it more complex. How could we make this work? By implementing another peer-type which has a more open filtering or something else?
Thanks!
Joey

removing strip_info_communities() from the protocol manually fixed it temporary.

I've added two new options, pre-import-final and pre-export-final to add a BIRD config expression right before the final return value (accept or reject). I don't want to add another peer type for this case, but this should work for your use case.
Closed in 769b3962388da91ca9d841e4a0f6b788d58d9656


Merge 7 -> 8

➡ Forward port
Port gz-sim7 to gz-sim8
Branch comparison: https://github.com/gazebosim/gz-sim/compare/gz-sim8...gz-sim7
Note to maintainers: Remember to Merge with commit (not squash-merge or rebase)

This needs an sdformat14 release.

This needs an sdformat14 release.

sdformat 14.5.0 is out. CI works now

Commented on a change of behavior in https://github.com/gazebosim/gz-sim/pull/2452.

@iche033 I've just merged #2527. Can you update this PR to include it?

merged from gz-sim7 and removed deprecations in 8bb720883c2f3954bb140fc25b41965830072776


Consider replacing actix-web with warp

Sample apps: mirakc/streaming-benchmarks

Basically, there is no significant difference in transfer rate between actix-web and warp.

actix-web v4.0.0-beta.7
warp v0.3.1
express.js

Build Time
1m 17s
52.62s
-

Binary Size (Release)
4.1M
2.6M
-

Tx Rate (ab -n 16 -c 4 with 2.5GB video)
2300759.44 [Kbytes/sec]
2749739.32 [Kbytes/sec]
2811317.21 [Kbytes/sec]

measured on macbook pro (2.3 GHz Quad-Core Intel Core i7, 32GB).

LOC might get smaller by replacing actix-web with warp.

Confirmed that warp can handle client disconnects properly.
Pending Futures and Streams will be dropped soon when clients disconnects.
use bytes::Bytes;
use futures::stream::Stream;
use std::convert::Infallible;
use std::future::Future;
use std::pin::Pin;
use std::task::Context;
use std::task::Poll;
use warp::Filter;
use warp::http::Response;
use warp::hyper::Body;

#[tokio::main]
async fn main() {
    let routes = warp::path("pending").and_then(pending_before_response);
    let routes = routes.or(warp::path("stream").and_then(pending_stream));
    warp::serve(routes).run(([127, 0, 0, 1], 3000)).await;
}

// A pending future will be dropped when a client disconnects.
async fn pending_before_response() -> Result<String, Infallible> {
    HeavyTask.await;
    unreachable!();
}

// A ending stream will be dropped when a client disconnects.
async fn pending_stream() -> Result<impl warp::Reply, Infallible> {
    Ok(Response::builder()
       .status(200)
       .body(Body::wrap_stream(PendingStream)))
}

struct HeavyTask;

impl Future for HeavyTask {
    type Output = ();

    fn poll(
        self: Pin<&mut Self>,
        _: &mut Context<'_>
    ) -> Poll<Self::Output> {
        eprintln!("HeavyTask: Pending");
        Poll::Pending
    }
}

impl Drop for HeavyTask {
    fn drop(&mut self) {
        eprintln!("HeavyTask: Dropped");
    }
}

struct PendingStream;

impl Stream for PendingStream {
    type Item = std::io::Result<Bytes>;

    fn poll_next(
        self: Pin<&mut Self>,
        _: &mut Context<'_>
    ) -> Poll<Option<Self::Item>> {
        eprintln!("PendingStream: Pending");
        Poll::Pending
    }
}

impl Drop for PendingStream {
    fn drop(&mut self) {
        eprintln!("PendingStream: Dropped");
    }
}

There are some missing features mirakc needs.  Another candidate is tokio-rs/axum.

Confirmed that axum can handle client disconnects properly.
use bytes::Bytes;
use std::convert::Infallible;
use std::future::Future;
use std::pin::Pin;
use std::task::Context;
use std::task::Poll;
use axum::http::header::HeaderMap;
use axum::routing;
use axum::response::IntoResponse;
use axum::response::Response;
use axum::Router;
use axum::Server;

#[tokio::main]
async fn main() {
    let app = Router::new()
        .route("/pending", routing::get(pending_before_response))
        .route("/stream", routing::get(pending_stream));
    Server::bind(&([127, 0, 0, 1], 3000).into())
        .serve(app.into_make_service())
        .await
        .unwrap();
}

// A pending future will be dropped when a client disconnects.
async fn pending_before_response() -> Result<String, Infallible> {
    HeavyTask.await;
    unreachable!();
}

// A ending stream will be dropped when a client disconnects.
async fn pending_stream() -> impl IntoResponse {
    PendingStream
}

struct HeavyTask;

impl Future for HeavyTask {
    type Output = ();

    fn poll(
        self: Pin<&mut Self>,
        _: &mut Context<'_>
    ) -> Poll<Self::Output> {
        eprintln!("HeavyTask: Pending");
        Poll::Pending
    }
}

impl Drop for HeavyTask {
    fn drop(&mut self) {
        eprintln!("HeavyTask: Dropped");
    }
}

struct PendingStream;

impl http_body::Body for PendingStream {
    type Data = Bytes;
    type Error = Infallible;

    fn poll_data(
        self: Pin<&mut Self>,
        _: &mut Context<'_>
    ) -> Poll<Option<Result<Self::Data, Self::Error>>> {
        eprintln!("PendingStream: Pending");
        Poll::Pending
    }

    fn poll_trailers(
        self: Pin<&mut Self>,
        _: &mut Context<'_>
    ) -> Poll<Result<Option<HeaderMap>, Self::Error>> {
        Poll::Ready(Ok(None))
    }
}

impl IntoResponse for PendingStream {
    fn into_response(self) -> Response {
        Response::new(axum::body::boxed(self))
    }
}

impl Drop for PendingStream {
    fn drop(&mut self) {
        eprintln!("PendingStream: Dropped");
    }
}


Problem with localStorage

There is a problem with localStorage on Incognito (Google Chrome). I tried to figure out what's wrong and i found the possibility to set the storage but the defaultStorage in constructor.js already "called" the localStorage. So this chance is gone.

Hey @valentin1009 ,
I didn't understand what you mean, what's the problem with localStorage at all? What error exactly appeared to you?
You want to use custom Store object?
import { EcomCart } from '@ecomplus/shopping-cart'

const cart = new EcomCart(100, 'ecomShoppingCart', customStorageObject)

Yes i know, but there is a specific case:

the cart is included in a web page which could be embed
test this case in incognito because in incognito window i think is restricted

I get this error: Failed to read the 'localStorage' property from 'Window'. The error point to constructor.js line 14

You may have to create a customStorageObject simulating Storage interface but using cookies to manipulate data, or just don't persisting it if not necessary for you.


Research: Can/which SDK packages can support batch transactions with minimal development

Background:
1inch has introduced batch transactions for their Safe App. The experience is glorious.
To my knowledge, it is the only "Dapp as a Safe App" that does this. We know from looking at data that most common transactions come from Defi protocols:

Uniswap
SushiSwap
Balancer
Aave

Problem:
1inch did the integration via the javascript SDK, it comes with more flexibility than say the web3 modules or onboard.js packages but requires more understanding and work to intergrate.
What can we do?
The purpose of this ticket is to answer the following questions:

Can we build or add to the existing packages (onboard.js, web3 modals) to facilitate batch transactions?
If yes, how much effort is required by the Dapp developer to facilitate batch transactions?
If no, how would a Dapp that uses a package like onboard.js(or other) leverage batch transactions?

What should the research unlock?
If we know that it is possible to facilitate batch transactions via existing web3 wallet libraries, then we can push it as a default standard. If it can't be done, then we need to incentivize and encourage dapp developers through promotion and placement in the Safe Apps UI.

Thanks @mikheevm
I have added a problem statement here https://github.com/gnosis/safe-pm/issues/1

My proposed solution is to support Argent's wc_multicall RPC method in the safe-apps-provider package and WalletConnect Safe App. It has the same method signature for Gnosis' multisend, so it's trivial to implement. And by doing that, the two most popular smart contract wallets will share the same method for batching transactions.
cc @rmeissner @sche

It turns out that argent's multicall is not an RPC method, it's a fake ABI that is then mapped to a different method on a smart contract:

ABI

"function wc_multiCall((address to, uint256 value, bytes data)[] _transactions)"

actual multicall

Personally, not a big fan of this approach. I've asked them if they're interested in collaborating in a shared RPC method.

I shared a proposal doc in this for team review

I would appreciate your feedback on the second round of wallet_batchTransaction RPC proposal, this time it is EOA “compatible”, and the transaction types are exactly the same as in eth_sendTransaction. https://hackmd.io/HFHohGDbRSGgUFI2rk22bA?view

Update: Argent team said they would be happy to support this too.

@clemoon

@clemoon


Android views: notifyDateChanged will not re-bind dates if there is a duplicate on another page

An example of this is a month page source that has in/out dates that are out of focus. Updating data for a date that is an in/out date on another page means the date is not re-bound on the other page.

Are there any cases where there might be a duplicate date that's more than 1 page away? The only case I can think of is in/out dates, in which case notifying the next/previous page should suffice


Detect Visibility tag

Detect Visibility tag under Polygon tag, if value is 0 the polgyon will be not showed on map

Please provide test kml data file

ping

I implemented tag parse code for other tags and https://pastebin.com/TGfWuRsx is kml example file

Thank you for your contribution.


Broken link in 'Contributing code to Oppia'

Hi, in the' Contributing code to Oppia', the link for "Backend" does not direct to anything. Clicking on the link keeps me on the same page. Here's the link to 'Contributing code to Oppia': https://github.com/oppia/oppia/wiki/Contributing-code-to-Oppia
Here's a screenshot of the issue:

@howtofly-lab Nice catch! Thanks for reporting the issue.

Hi @gp201 I saw your pull request and saw that you deleted the "Backend" and "Frontend" labels. But I was thinking instead of deleting the labels, I can add a link to the Issues tab in the oppia repo that is filtered by "good first issue" and "backend" labels. Same for "Frontend".


Spyder 4.2.4 for Windows ignores window sizing

Issue Report Checklist

[x ] Searched the issues page for similar reports
[ x] Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
[x ] Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
[ ] Could not reproduce inside jupyter qtconsole (if console-related)
[x ] Tried basic troubleshooting (if a bug/error)

[ x] Restarted Spyder
[x ] Reset preferences with spyder --reset
[ ] Reinstalled the latest version of Anaconda
[x ] Tried the other applicable steps from the Troubleshooting Guide

[x ] Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description
I just updated from 4,2,3 to 4,2,4 via pip. I'm using WIndows 10. When I start Spyder, it always opens in a maximized window. When I resize the window by dragging, it is not remembered (unlike all previous versions of Spyder that I have used) and the next time I start Spyder, either from a command prompt or a shortcut icon(with "normal window" specified) it starts again in a maximized window. When I click the "Restore Down" button in the window frame, the window shrinks to an arbitrary size that has nothing to do with my previous resizing. In  spyder.ini, both "window/is_maximized" and "window/is_fullscreen" remain "False". In transient.ini, the "window/position" and "window size" get resized to whatever Spyder arbitrarily wants, regardless of how I edit them. (But with 4.2.3, the window size and position are remembered and written properly to transient.ini as usual.)
What steps reproduce the problem?

Starting and restarting Spyder

What is the expected output? What do you see instead?
Window size is remembered. Instead, window size is not remembered.
 Thanks for noticing it @brhubbar!
Closing in favor of #14962.


Feature Request: Ability to set minimum required battery percentage

Since SYM is intended for end users to setup, it'd great if we can incorporate a battery check feature into SYM process. This addition would help users avoid interruptions due to low battery levels, contributing to a smoother user experience. Whether the computer was shipped with low battery, organizations need to deploy multiple apps, or FileVault processes are time-consuming, this feature could save users from potential interruptions
Is your feature request related to a problem? Please describe.
Nope.
Describe the solution you'd like
An option for us to set minimum required battery percentage. By not meeting that required percentage, user will be prompted a message (with icon?) to connect their mac to a power source. Preferably at the very beginning of the SYM process, where the timer is counting down for 60 seconds right now.
pmset -g batt | grep -Eo "\d+%" | cut -d% -f1 can provide the percentage.
system_profiler SPPowerDataType | grep "Connected" | awk '{print $2}' can provide the status if computer is connected to power source or not.
Describe alternatives you've considered
Add a custom script to run before SYM script starts. OR add a function within SYM script to check power connection before starting the script.
Additional context

Happy New Year, @arnoldtaw!
Excellent idea! (I'm confident Graham has some code we could copy-pasta.)

What about ensuring AC power is connected?
https://github.com/grahampugh/erase-install/blob/main/erase-install.sh#L574-L654

That logic seems right. Not sure if it's a better idea to spin up a new dialog process before the SYM process starts or integrated as part of the SYM, where the count down is. Do you plan to add this in the future version of SYM? If so, would love to request the ability to set minimum % too 😅

Updated lines:
https://github.com/grahampugh/erase-install/blob/main/erase-install.sh#L632-L712

@arnoldtaw:
Please test 1.15.0-b11.

Thanks @dan-snelson
I wasn't sure if this will be added so I added myself something similar.
The following will
(1) use swiftDialog
(2) allow admin to set preferred %
(3) allow user to connect to power source and continue (instead of ending the process)
function acPowerCheck () {
    required_battery_percentage=60
    current_battery_percentage=$(pmset -g batt | grep -Eo "\d+%" | cut -d% -f1)
    current_power=null

    check_ac_status () {
        if /usr/bin/pmset -g ps | /usr/bin/grep "AC Power" > /dev/null ; then
            current_power="Yes"
        fi
    }

    # Initial Check (mostly for desktop type device)
    check_ac_status

    if [[ $current_power == "Yes" ]]; then
        updateScriptLog "PRE-FLIGHT CHECK: Device connected to AC power."
    else
        updateScriptLog "PRE-FLIGHT CHECK: Device is not connected to AC power."
        # IF low battery, display message and loop
        if [[ $current_battery_percentage -lt $required_battery_percentage ]]; then
            # Does not meet required %
            updateScriptLog "PRE-FLIGHT CHECK: Current battery ($current_battery_percentage %) is lower than required battery ($required_battery_percentage %). Prompting to connect to AC power."

            /usr/local/bin/dialog --title "Waiting for AC Power Connection" \
                --icon "SF=powerplug.fill,colour=red,bgcolor=none" \
                --message "Please connect your Mac to an AC power adapter. \n\nAC power is required to continue."
            /bin/echo "icon: SF=powerplug.fill,colour=green,bgcolor=none" >> /var/tmp/deployment_power_check.log
            sleep 2
            /bin/echo "quit: " >> /var/tmp/deployment_power_check.log
        else
            # Meet required %
            updateScriptLog "PRE-FLIGHT CHECK: Current battery ($current_battery_percentage %) is equal or more than required battery ($required_battery_percentage %)."
        fi
    fi
}

Thanks, @arnoldtaw.
You’re invited to submit a PR; have you had a chance to test your code with the latest 1.15.0 ?
(Just skimming while AFK, dialog has yet to be installed.)

@arnoldtaw:
Your Item No. 3 above inspired me; please take a look at 1.15.0-b16:

Addressed in SYM 1.15.0.


fix: webhooks were broken until this commit, and no version was cut

A fix was committed, but no version was cut. I've raised https://github.com/maasglobal/serverless-plugin-notification/issues/4 but in the meanwhile we can use the commit directly.

I'm going to merge this myself, again: harder to replicate, does not impact functionality of the project itself 🙇


Player search

Is it possible to have the program only look at players with 50-60 mins left on auction. I want to use this to snipe players and could be helpful 8f possible.
Thankyou again big man!

Download the latest release you will have expires in option


Problem when creating a new user via SCIM that already exists

I'm running into a problem where my users try to enable SCIM provisioning against an already-existing set of users in my application. When the username in our application already exists and already matches what the directory provider is trying to provide, we return an error for the SCIM request. What seems to happen is the SCIM provisioner tries to create the user, fails our model-level validation, and the SCIM provisioner thinks that the user has not been created. They've been able to sometimes work around the problem by 'resetting' the SCIM provisioning (starting, again, from scratch). This may be an Azure AD problem, as that's the only place where I've seen it so far (though it's also where most of our users try to do SCIM from, so that may not mean much).
I feel like another behavior that might work better for my users on the 'create' method would be to look up the already-existing user, and return that user - with the appropriate attributes modified as requested by the 'create' - as the "newly" created user. From SCIM's perspective, it doesn't matter that the userName was an already existing user ID; it's just able to now refer to that user uniquely, and update the attributes appropriately.
I'm happy to take direction if this means I should tweak my implementation however you recommend - or, if this is something that we can provide a PR for, we'll happily provide one, if it's something you'd be comfortable merging.
Thanks again for providing this library - I absolutely would not have been able to add SCIM support to our product without this, and it's been a big draw for our users. I deeply appreciate it.

So if I change this line: https://github.com/arietimmerman/laravel-scim-server/blob/master/src/Http/Controllers/ResourceController.php#L116 to instead be:
        $resourceObject = $class::firstOrNew(['username' => $input['userName']]);

The user syncs as expected. Obviously, for the purposes of this library I wouldn't want to hardcode that.
I was thinking of something in the $config like:
{
  //....
  'key' => ['username' => 'userName']
  // ...
}

Though, if it were to come to an email address needing to be unique, that would be much trickier and this approach might not make sense.
Please let me know if you'd be interested in such a change, or if you have a better idea on how to solve the problem. Thanks again!

I could also use this as well as my application needs to have unique email addresses. @arietimmerman are you open to a PR for this? The config option seems like it would be an ideal solution @uberbrady.

I don't think the supposed SCIM behavior for a create request is that it would update an existing object, if it exists.
I think it should fail, isn't it?
Perhaps it should be possible to configure a set of validation rules specifically for create, this would allow using the unique validation rule.

@arietimmerman I think you are right. I just did some more testing with Okta and they do a GET request to the resource route with a filter on the username attribute to determine if the user already exists and not will then proceed to create with a second request to POST to the users route and if it does they do a PUT request to the users route. (Looks like<EMAIL_ADDRESS>Documented here: https://support.okta.com/help/s/article/Existing-SCIM-User-Being-Created-at-Assignment?language=en_US


Add imdb Urdu Reviews dataset.

Added the imdb Urdu reviews dataset. More info about the dataset over here.

merging since the CI is fixed on master


Background for certain dates for a month repeats every six months

I am highlighting certain dates with certain drawables by settings background to the TextView used in attribute cv_dayViewResource
in my onViewCreated( ) in fragment, after setting up calendar's currentmonth, weekdays, start and end month; I am using dayBinder to set background for the dates as below :
calendarView.dayBinder = object : DayBinder<DayViewContainer> {
            override fun create(view: View) = DayViewContainer(view)

            override fun bind(container: DayViewContainer, day: CalendarDay) {
                    //code to set backgrounds for start, middle and end dates here
            }
}

Everything works fine but the same dates which are highlighted repeats after every 6 months which shouldn't be the case

I tried using notifyCalendarChanged() after every month change but that didn't help
If you have any suggestions as to what might be causing this issue, can you please point me in the right direction

This is due to view reuse, you have to set the view background to null for the cells where you don't want the background to show. If you can share your logic for setting the background, maybe I can figure out exactly what needs to change.


Amend article to show details on "Antivirus status" and its various values

Please amend article to show details on "Antivirus status" and its various values similar to Onboarding Status.
We see "Not supported", "Not updated", "Updated" and "Uknown" values when export Device Inventory.

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

ID: d401bb34-5a2e-7f66-8fcd-28a395c62a99
Version Independent ID: 1022827b-273c-7351-ee5d-189e6caa5fee
Content: View and organize the Microsoft Defender for Endpoint devices list
Content Source: microsoft-365/security/defender-endpoint/machines-view-overview.md
Product: m365-security
Technology: mde
GitHub Login: @mjcaparas
Microsoft Alias: macapara

@msbemba

@benpaul4u Thank you for your feedback. I'm currently working with the author to get more information on these statuses.
Thanks
Sri

@mjcaparas Please help us in resolving this issue. Thanks

Still pending PG response.

Table reflects correct status - Disabled, not updated, unknown.

Was this issue addressed as the report dose indeed include the following status:
Updated
Not Supported
Unknown
Not Updated
Disabled
The status I am most curious about is Not Supported.


locateOnScreen not working

Hi ,I'm on Macos with python 3.12.
That's my code
import pyautogui
pyautogui.locateOnScreen('c.png')
That's what it returns :
File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages/pyscreeze/init.py", line 527, in screenshot_osx
if tuple(PIL__version_) < (6, 2, 1):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '<' not supported between instances of 'str' and 'int'

function locate - get samenumber of coordinats for variable. you need write r= pyautogui.locateOnScreen('c.png')

I had the same problem. I suspect there's a missing ".". It should be tuple(PIL.version) instead i think. I've no idea how to submit a fix for this. Eventually I solve the problem by using the Image directly from PIL module.


tensorflow not working with RTX 3070 cuda 11.1+cudnn 8.0 and 11.2+cudnn 8.1

Please make sure that this is a bug. As per our
GitHub Policy,
we only address code/doc bugs, performance issues, feature requests and
build/installation issues on GitHub. tag:bug_template
I have first installed cuda 11.1 and cudnn 8.0 but i was getting error could not find file libcusolver.so.10
to solve this i run command
sudo ln -s /usr/local/cuda-11.1/lib64/libcusolver.so.11 /usr/local/cuda-11.1/lib64/libcusolver.so.10
error was resolved and showed message
Successfully opened dynamic library libcusolver.so.10
but now i got another error shown below
I also tried cuda 11.2 and cudnn 8.1 there with the same error could not find file libcusolver.so.10  i am getting error could not find libcudnn.so.8
Please help me i just re installed multiple cuda versions cudnn versions and nvidia drivers but could not resolve the issue
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Ubuntu 20
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
TensorFlow installed from (source or binary): pip install tensorflow-gpu
TensorFlow version (use command below): 2.4.1
Python version:3.8
Bazel version (if compiling from source):
GCC/Compiler version (if compiling from source):
CUDA/cuDNN version: cuda 11.1 cudnn 8.0
GPU model and memory: RTX 3070

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
2021-02-07 02:05:18.468688: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
x_train shape: (60000, 28, 28, 1)
60000 train samples
10000 test samples
2021-02-07 02:05:19.608268: I tensorflow/compiler/jit/xla_cpu_device.cc:41] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-02-07 02:05:19.608796: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcuda.so.1
2021-02-07 02:05:19.636743: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-02-07 02:05:19.637151: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: Graphics Device computeCapability: 8.6
coreClock: 1.725GHz coreCount: 46 deviceMemorySize: 7.79GiB deviceMemoryBandwidth: 417.29GiB/s
2021-02-07 02:05:19.637166: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2021-02-07 02:05:19.638801: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.11
2021-02-07 02:05:19.638838: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.11
2021-02-07 02:05:19.639414: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10
2021-02-07 02:05:19.639618: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10
2021-02-07 02:05:19.835524: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusolver.so.10
2021-02-07 02:05:19.837327: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.11
2021-02-07 02:05:19.837692: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.8
2021-02-07 02:05:19.837958: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-02-07 02:05:19.839606: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-02-07 02:05:19.851728: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0
2021-02-07 02:05:19.852873: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2021-02-07 02:05:19.854566: I tensorflow/compiler/jit/xla_gpu_device.cc:99] Not creating XLA devices, tf_xla_enable_xla_devices not set
2021-02-07 02:05:19.854939: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-02-07 02:05:19.856558: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1720] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: Graphics Device computeCapability: 8.6
coreClock: 1.725GHz coreCount: 46 deviceMemorySize: 7.79GiB deviceMemoryBandwidth: 417.29GiB/s
2021-02-07 02:05:19.856623: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2021-02-07 02:05:19.856695: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.11
2021-02-07 02:05:19.856746: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.11
2021-02-07 02:05:19.856795: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10
2021-02-07 02:05:19.856844: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10
2021-02-07 02:05:19.856893: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusolver.so.10
2021-02-07 02:05:19.856942: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.11
2021-02-07 02:05:19.856991: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.8
2021-02-07 02:05:19.857186: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-02-07 02:05:19.858869: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-02-07 02:05:19.860412: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1862] Adding visible gpu devices: 0
2021-02-07 02:05:19.866190: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2021-02-07 02:05:22.758155: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1261] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-02-07 02:05:22.758203: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1267]      0
2021-02-07 02:05:22.758221: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1280] 0:   N
2021-02-07 02:05:22.758447: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-02-07 02:05:22.759222: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-02-07 02:05:22.759935: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:941] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-02-07 02:05:22.760605: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1406] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 6864 MB memory) -> physical GPU (device: 0, name: Graphics Device, pci bus id: 0000:01:00.0, compute capability: 8.6)
2021-02-07 02:05:22.990187: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:116] None of the MLIR optimization passes are enabled (registered 2)
2021-02-07 02:05:23.007092: I tensorflow/core/platform/profile_utils/cpu_utils.cc:112] CPU Frequency:<PHONE_NUMBER> Hz
Epoch 1/12
2021-02-07 02:05:23.350598: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.11
2021-02-07 02:05:27.235033: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.11
2021-02-07 02:05:27.282436: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudnn.so.8
2021-02-07 02:05:29.037626: E tensorflow/stream_executor/cuda/cuda_dnn.cc:336] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
2021-02-07 02:05:29.061028: E tensorflow/stream_executor/cuda/cuda_dnn.cc:336] Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
Traceback (most recent call last):
File "main.py", line 63, in
validation_data=(x_test, y_test))
File "/home/mohsin/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py", line 1100, in fit
tmp_logs = self.train_function(iterator)
File "/home/mohsin/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 828, in call
result = self._call(*args, **kwds)
File "/home/mohsin/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py", line 888, in _call
return self._stateless_fn(*args, **kwds)
File "/home/mohsin/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 2943, in call
filtered_flat_args, captured_inputs=graph_function.captured_inputs)  # pylint: disable=protected-access
File "/home/mohsin/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 1919, in _call_flat
ctx, args, cancellation_manager=cancellation_manager))
File "/home/mohsin/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/function.py", line 560, in call
ctx=ctx)
File "/home/mohsin/anaconda3/lib/python3.7/site-packages/tensorflow/python/eager/execute.py", line 60, in quick_execute
inputs, attrs, num_outputs)
tensorflow.python.framework.errors_impl.UnknownError:  Failed to get convolution algorithm. This is probably because cuDNN failed to initialize, so try looking to see if a warning log message was printed above.
[[node sequential/conv2d/Conv2D (defined at main.py:63) ]] [Op:__inference_train_function_790]
Function call stack:
train_function
Describe the expected behavior
Standalone code to reproduce the issue
Provide a reproducible test case that is the bare minimum necessary to generate
the problem. If possible, please share a link to Colab/Jupyter/any notebook.
Other info / logs Include any logs or source code that would be helpful to
diagnose the problem. If including tracebacks, please include the full
traceback. Large logs and files should be attached.

@game-sys
Please take a look at this comment from issue #43947 and #45848  with a similar error and let us know if it helps. Thanks!

https://github.com/tensorflow/tensorflow/issues/45848#issuecomment-748130779 and other mentioned downgrading cuda to 11.0 and cudnn 8.0, but I think cuda 11.0 is not supported in rtx 3070. Please can you confirm

#45848 (comment) and other mentioned downgrading cuda to 11.0 and cudnn 8.0, but I think cuda 11.0 is not supported in rtx 3070. Please can you confirm

see https://docs.nvidia.com/deeplearning/cudnn/support-matrix/index.html

i tried to install cuda 11.0 using :
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget http://developer.download.nvidia.com/compute/cuda/11.0.2/local_installers/cuda-repo-ubuntu2004-11-0-local_11.0.2-450.51.05-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-11-0-local_11.0.2-450.51.05-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu2004-11-0-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda
but i got error :
Processing triggers for initramfs-tools (0.136ubuntu6.3) ...
update-initramfs: Generating /boot/initrd.img-5.8.0-41-generic
Errors were encountered while processing:
nvidia-dkms-450
nvidia-driver-450
cuda-drivers-450
cuda-drivers
cuda-runtime-11-0
cuda-11-0
cuda-demo-suite-11-0
cuda
E: Sub-process /usr/bin/dpkg returned an error code (1)
i think cuda 11.0 or 450 driver do not support rtx 3000 series, although https://docs.nvidia.com/deeplearning/cudnn/support-matrix/index.html state it support 11.0 or i dont if it not support with ubuntu 20 as i installed cuda 11.1 which use 455 driver and 11.2 which use 460 driver using above method and I got no error.

I purge cuda 11.0 using command:
Remove existing CuDA versions
sudo apt --purge remove "cublas*" "cuda*"
sudo apt --purge remove "nvidia*"
rm -rf /usr/local/cuda*
sudo apt-get autoremove && sudo apt-get autoclean
and upgrade to cuda 11.1 using command:
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
wget https://developer.download.nvidia.com/compute/cuda/11.1.0/local_installers/cuda-repo-ubuntu2004-11-1-local_11.1.0-455.23.05-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu2004-11-1-local_11.1.0-455.23.05-1_amd64.deb
sudo apt-key add /var/cuda-repo-ubuntu2004-11-1-local/7fa2af80.pub
sudo apt-get update
sudo apt-get -y install cuda
updated paths

run my code on terminal using command:
python main.py
obviously not installed CUDNN so got a message
2021-02-09 00:39:50.118328: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcudart.so.11.0
2021-02-09 00:39:50.119809: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublas.so.11
2021-02-09 00:39:50.119836: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcublasLt.so.11
2021-02-09 00:39:50.120394: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcufft.so.10
2021-02-09 00:39:50.120525: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcurand.so.10
2021-02-09 00:39:50.120603: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcusolver.so.10'; dlerror: libcusolver.so.10: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-11.1/lib64:/usr/local/cuda-11.1/lib64:
2021-02-09 00:39:50.120943: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library libcusparse.so.11
2021-02-09 00:39:50.120991: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library 'libcudnn.so.8'; dlerror: libcudnn.so.8: cannot open shared object file: No such file or directory; LD_LIBRARY_PATH: /usr/local/cuda-11.1/lib64:/usr/local/cuda-11.1/lib64:
2021-02-09 00:39:50.120999: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1757] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
Skipping registering GPU devices...
then i downloaded CUDNN 8.0 and
installed it using command:
sudo cp cuda/include/cudnn*.h /usr/local/cuda/include
sudo cp -P cuda/lib64/libcudnn* /usr/local/cuda/lib64
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*

Still issue is not solved waiting for your reply :(

hey @game-sys FWIW I have TensorFlow running with cuda 11.0 + cudnn 8.0.4
Perhaps cuda 11.1 would bring performance improvements, but if you're blocked from working at all because of this, there are options. Cheers

@nathanin how did u install cuda 11.0 did u install it like i showed above or some another way because using above method it also install Nvidia 450 driver which is the problem i think and can u please confirm your driver version. Thanks

I observe the same issue - I install tensorflow 2.4.1 into a docker container and run jupyter lab from there... nvidia-smi works fine but tensorflow reports zero GPUs available ... adding two lines to the docker file solves the problem:
`# Copyright (c) Jupyter Development Team.
Distributed under the terms of the Modified BSD License.
ARG BASE_CONTAINER=jupyter/scipy-notebook
FROM $BASE_CONTAINER
LABEL maintainer="Jupyter Project<EMAIL_ADDRESS>Install Tensorflow
RUN pip install --quiet --no-cache-dir
'tensorflow==2.4.1' &&
fix-permissions "${CONDA_DIR}" &&
fix-permissions "/home/${NB_USER}"
BUG FIX:
ENV LD_LIBRARY_PATH=/usr/local/cuda-11.2/targets/x86_64-linux/lib:$LD_LIBRARY_PATH
RUN ln -s /usr/local/cuda-11.2/targets/x86_64-linux/lib/libcusolver.so.11 $(python -c "import tensorflow.python as x; print(x.path[0])")/libcusolver.so.10`

nvidia-smi:
Mon Feb 15 13:31:01 2021
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 460.32.03    Driver Version: 460.32.03    CUDA Version: 11.2     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  GeForce RTX 3070    Off  | 00000000:08:00.0 Off |                  N/A |
|  0%   40C    P8    18W / 240W |     18MiB /  7979MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|    0   N/A  N/A      1628      G   /usr/lib/xorg/Xorg                  9MiB |
|    0   N/A  N/A      1937      G   /usr/bin/gnome-shell                4MiB |
+-----------------------------------------------------------------------------+

I'm not entirely sure where the CUDA Version: 11.2 comes from, it must have been installed when I installed the driver from the nvidia ppa. The environment I have working was built by installing cudatoolkit from conda with: conda install -c nvidia cudatoolkit=11.0 (the pytorch conda channel will probably also work):
conda list | grep cuda
cudatoolkit               11.0.221             h6bb024c_0    nvidia
cudnn                     8.0.4                cuda11.0_0    nvidia

I have found cudnn=8.0.4 to be necessary with the 3070. With cudnn=8.0 everything appears to load, but actually calling a 2D convolution will error.

@nathanin nvidia-smi return cuda version 11.2 it state that your driver can support cuda 11.2 you can check actual version  of cuda using nvcc --version and i installed all cuda cudnn using Nvidia guidelines on webpage while i will also try conda and let u know.

Hi,
TensorFlow 2.4 needs CUDA 11.0.  Can you confirm that you've tried running it with CUDA 11.0 and it didn't work?

In above comment i mentioned i installed cuda 11.0 https://github.com/tensorflow/tensorflow/issues/46975#issuecomment-775356022
Method used for installation is also mentioned and error i got is also mentioned please let me know did i follow correct steps to install cuda 11.0.

one thing to note is that with cuda 11.x :

nvidia-smi IS able to detect the GPU
tensorflow is NOT able to detect the GPU
pytorch IS able to detect the GPU

@miramar-labs same issue here :(

@game-sys   try running this workaround:
'''ln -s /usr/local/cuda-11.2/targets/x86_64-linux/lib/libcusolver.so.11 $(python -c "import tensorflow.python as x; print(x.path[0])")/libcusolver.so.10'''

I wrote a utility to test this ..
https://github.com/miramar-labs/cuda-tf-torch-test

Looking at the TF build docs I noticed that TF 2.4.0 is tested for compatibility with CUDA 11.0 and cuDNN 8.0 .... so I downgraded to those versions and things went a lot smoother :)
11.2 != 11.0  ....
What I learned: stick to the versions of TF/CUDA/cuDNN mentioned in the docs ... go beyond at your own risk :)

@miramar-labs which driver u are using is it 460 and how u install cuda because when i install cuda 11.0 it also come with driver and it install driver automatically and rtx 3070 dont support driver 450 can u please run nvidia smi, and nvcc -- version what it is returning

@game-sys  I have a repo on github for building TF ... I added some pretty detailed notes as to exactly what versions of things I ended up using .. hope it helps :)

Ok i will try and let u know. @miramar-labs

I solve it by just creating a conda environment
using command
conda create -n tensor2 python=3.6 tensorflow-gpu cudatoolkit cudnn
and then I ran command
python

import tensorflow as tf
tf.test.is_gpu_available(
cuda_only=False, min_cuda_compute_capability=None
)

It returned
WARNING:tensorflow:From :1: is_gpu_available (from tensorflow.python.framework.test_util) is deprecated and will be removed in a future version.
Instructions for updating:
Use tf.config.list_physical_devices('GPU') instead.
2021-03-06 11:39:38.634479: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2021-03-06 11:39:38.658818: I tensorflow/core/platform/profile_utils/cpu_utils.cc:102] CPU Frequency:<PHONE_NUMBER> Hz
2021-03-06 11:39:38.659188: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5621530cce70 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2021-03-06 11:39:38.659204: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2021-03-06 11:39:38.659809: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2021-03-06 11:39:38.701441: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-06 11:39:38.703134: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1561] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce RTX 3070 computeCapability: 8.6
coreClock: 1.725GHz coreCount: 46 deviceMemorySize: 7.79GiB deviceMemoryBandwidth: 417.29GiB/s
2021-03-06 11:39:38.733974: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
2021-03-06 11:39:38.958161: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10
2021-03-06 11:39:39.074762: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10
2021-03-06 11:39:39.128519: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10
2021-03-06 11:39:39.348554: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10
2021-03-06 11:39:39.399564: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10
2021-03-06 11:39:39.851696: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2021-03-06 11:39:39.851985: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-06 11:39:39.853718: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-06 11:39:39.855140: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1703] Adding visible gpu devices: 0
2021-03-06 11:39:39.855246: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
2021-03-06 11:39:40.116405: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-03-06 11:39:40.116440: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1108]      0
2021-03-06 11:39:40.116448: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1121] 0:   N
2021-03-06 11:39:40.116630: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-06 11:39:40.117258: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-06 11:39:40.117840: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-06 11:39:40.118403: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1247] Created TensorFlow device (/device:GPU:0 with 6987 MB memory) -> physical GPU (device: 0, name: GeForce RTX 3070, pci bus id: 0000:01:00.0, compute capability: 8.6)
2021-03-06 11:39:40.140623: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x5621541ecce0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2021-03-06 11:39:40.140679: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): GeForce RTX 3070, Compute Capability 8.6
True
but i dont know what this mean
successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-06 11:39:40.117840: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
is it correctly installed

I ran a simple python file

import keras
from keras.datasets import mnist
from keras.models import Sequential
from keras.layers import Dense, Dropout, Flatten
from keras.layers import Conv2D, MaxPooling2D
from keras import backend as K

batch_size = 128
num_classes = 10
epochs = 12
input image dimensions
img_rows, img_cols = 28, 28
the data, split between train and test sets
(x_train, y_train), (x_test, y_test) = mnist.load_data()
if K.image_data_format() == 'channels_first':
x_train = x_train.reshape(x_train.shape[0], 1, img_rows, img_cols)
x_test = x_test.reshape(x_test.shape[0], 1, img_rows, img_cols)
input_shape = (1, img_rows, img_cols)
else:
x_train = x_train.reshape(x_train.shape[0], img_rows, img_cols, 1)
x_test = x_test.reshape(x_test.shape[0], img_rows, img_cols, 1)
input_shape = (img_rows, img_cols, 1)
x_train = x_train.astype('float32')
x_test = x_test.astype('float32')
x_train /= 255
x_test /= 255
print('x_train shape:', x_train.shape)
print(x_train.shape[0], 'train samples')
print(x_test.shape[0], 'test samples')
convert class vectors to binary class matrices
y_train = keras.utils.to_categorical(y_train, num_classes)
y_test = keras.utils.to_categorical(y_test, num_classes)
model = Sequential()
model.add(Conv2D(32, kernel_size=(3, 3),
activation='relu',
input_shape=input_shape))
model.add(Conv2D(64, (3, 3), activation='relu'))
model.add(MaxPooling2D(pool_size=(2, 2)))
model.add(Dropout(0.25))
model.add(Flatten())
model.add(Dense(128, activation='relu'))
model.add(Dropout(0.5))
model.add(Dense(num_classes, activation='softmax'))
model.compile(loss=keras.losses.categorical_crossentropy,
optimizer=keras.optimizers.Adadelta(),
metrics=['accuracy'])
model.fit(x_train, y_train,
batch_size=batch_size,
epochs=epochs,
verbose=1,
validation_data=(x_test, y_test))
but it hang on
x_train shape: (60000, 28, 28, 1)
60000 train samples
10000 test samples
2021-03-06 11:47:01.777594: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcuda.so.1
2021-03-06 11:47:01.812831: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-06 11:47:01.813431: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1561] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce RTX 3070 computeCapability: 8.6
coreClock: 1.725GHz coreCount: 46 deviceMemorySize: 7.79GiB deviceMemoryBandwidth: 417.29GiB/s
2021-03-06 11:47:01.813620: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
2021-03-06 11:47:01.815197: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10
2021-03-06 11:47:01.816635: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10
2021-03-06 11:47:01.816843: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10
2021-03-06 11:47:01.818293: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10
2021-03-06 11:47:01.819109: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10
2021-03-06 11:47:01.822096: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2021-03-06 11:47:01.822182: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-06 11:47:01.822686: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-06 11:47:01.823101: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1703] Adding visible gpu devices: 0
2021-03-06 11:47:01.823360: I tensorflow/core/platform/cpu_feature_guard.cc:143] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 FMA
2021-03-06 11:47:01.828401: I tensorflow/core/platform/profile_utils/cpu_utils.cc:102] CPU Frequency:<PHONE_NUMBER> Hz
2021-03-06 11:47:01.828730: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55d67c663200 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2021-03-06 11:47:01.828744: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2021-03-06 11:47:01.828871: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-06 11:47:01.829358: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1561] Found device 0 with properties:
pciBusID: 0000:01:00.0 name: GeForce RTX 3070 computeCapability: 8.6
coreClock: 1.725GHz coreCount: 46 deviceMemorySize: 7.79GiB deviceMemoryBandwidth: 417.29GiB/s
2021-03-06 11:47:01.829393: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
2021-03-06 11:47:01.829404: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10
2021-03-06 11:47:01.829413: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcufft.so.10
2021-03-06 11:47:01.829422: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcurand.so.10
2021-03-06 11:47:01.829431: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusolver.so.10
2021-03-06 11:47:01.829439: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcusparse.so.10
2021-03-06 11:47:01.829448: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7
2021-03-06 11:47:01.829492: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-06 11:47:01.829898: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-06 11:47:01.830287: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1703] Adding visible gpu devices: 0
2021-03-06 11:47:01.830310: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudart.so.10.1
2021-03-06 11:47:01.896638: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1102] Device interconnect StreamExecutor with strength 1 edge matrix:
2021-03-06 11:47:01.896662: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1108]      0
2021-03-06 11:47:01.896666: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1121] 0:   N
2021-03-06 11:47:01.896778: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-06 11:47:01.897152: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-06 11:47:01.897498: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:981] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2021-03-06 11:47:01.897840: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1247] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 7007 MB memory) -> physical GPU (device: 0, name: GeForce RTX 3070, pci bus id: 0000:01:00.0, compute capability: 8.6)
2021-03-06 11:47:01.899080: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x55d67d8d3850 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:
2021-03-06 11:47:01.899090: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): GeForce RTX 3070, Compute Capability 8.6

After 5 min
Epoch 1/12
2021-03-06 11:51:58.746746: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcublas.so.10
After 2 min
2021-03-06 11:53:25.153184: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library libcudnn.so.7

LICENSE

Alomaisi

Hi I want to share my results with you:
Operative System: Ubuntu 20.04
CPU : AMD Ryzen 7 3800X
TensorFlow version: 2.4
Python version: 3.8 (default with Ubuntu)
Cuda version :  11.1.0   The installer name is : cuda_11.1.0_455.23.05_linux.run
CudNN version: 8.0.5    The installer package is : libcudnn8_<IP_ADDRESS>-1+cuda11.1_amd64.deb
The first error a got was:
Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.
I solved it creating the symbolic link with:
sudo ln -s ./libcusolver.so.11 ./libcusolver.so.10
The current directory was: /usr/local/cuda-11.1/lib64
The second error was:
Could not create cudnn handle: CUDNN_STATUS_INTERNAL_ERROR
I solved it adding the following two lines of code after the imports in my python code:
physical_devices = tf.config.list_physical_devices('GPU')
tf.config.experimental.set_memory_growth(physical_devices[0], True)
Finally i want to share my speed results:
With my MacBook Pro 2019 15" Core i7 + AMD GPU 555X + Apple Custom TensorFlow 2.4 the training of a model takes 45minutes per epoch, using TensorFlow 2.2 and CPU it takes 60 minutes per epoch.
With my new Ryzen 7 3080X custom assembled PC, using CPU it takes 24 minutes per epoch.
With my new Ryzen 7 3080X custom assembled PC, using RTX 3070 GPU it only takes 5:20 minutes per epoch, this is a super improvement in my training.
I hope it can help you, i spent 2 days trying to solve this errors.

Hy I hope that  you all are doing good. I need to train my mrcnn model on gtx 3070. Model loads onto the gpu but stuck while starting training no error appears but it stuck.
Versions I am using:

Tensorflow 2.4
cudnn 8
cuda 11.0
nvidia-drivers 460

I will really be thankful to you for helping me out. Thank you

Hi, sorry I can't help you, because I only work with local training and never use Jupiter and/or Notebooks.

Hi, sorry I can't help you, because I only work with local training and never use Jupiter and/or Notebooks.

I am currently using this repo
Github Link: https://github.com/SohaibAnwaar/Mask-Rcnn-Tensorflow-2.0
I tried by using py file But still stuck on the same point

I struggled with this as well, having just purchased a 3070 TI. I had to symlink the libcusolver.so as well, but it didn't resolve all of my issues. I got everything working with these additional steps:

Upgrade Tensorflow 2.4 -> 2.5
Upgrade CUDA 11.1 -> 11.2 (link)
Install cudnn-11.2-linux-x64-v<IP_ADDRESS>

I kept the 460.91.03 driver I used with the previous 1080 TI. Actually I intended to update it first but couldn't get it to work via a ".run" installer or apt :D

@game-sys Could you try with the latest TF version (2.9.0) and let us know the outcome?
Thank you!


Typehead & buutons="no"

With buttons="no" a value selected does not update ng-model. It is necessary hit Enter key to update the model. Could be fixed ?
http://jsfiddle.net/SSchaaf/yz1Lb7hk/3/

Same to control type Text.

Pull requests are welcome :)


[Federated Learning] train worker was error when it was failed firstly to connect the avg worker

What happened:
Following this federated learning example, I created a federated learning job.
Train worker failed firstly to connect avg worker,  because the avg worker didn't run successfully.
Then, train worker was error and restarted.
Below is the error log of the train worker:
2021-08-17 08:01:21.380224: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.
[2021-08-17 08:01:23,885] federated_learning.py(57) [INFO] - Node trainworker-lgszc connect to : ws://<IP_ADDRESS>:32254/FedAvg
[2021-08-17 08:01:23,886] client.py(153) [INFO] - ws://<IP_ADDRESS>:32254/FedAvg connection by trainworker-lgszc
[2021-08-17 08:01:24,898] client.py(165) [INFO] - ws://<IP_ADDRESS>:32254/FedAvg connection was refused by server
Traceback (most recent call last):
  File "train.py", line 81, in <module>
    main()
  File "train.py", line 67, in main
    aggregation=aggregation_algorithm)
  File "/home/lib/sedna/core/federated_learning/federated_learning.py", line 53, in __init__
    self.register(timeout=connect_timeout)
  File "/home/lib/sedna/core/federated_learning/federated_learning.py", line 61, in register
    ping_timeout=timeout
  File "/home/lib/sedna/service/client.py", line 149, in __init__
    asyncio.wait_for(self.connect(), timeout=timeout)
  File "/usr/lib/python3.6/asyncio/base_events.py", line 484, in run_until_complete
    return future.result()
  File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/home/lib/sedna/service/client.py", line 158, in connect
    ), self._ws_timeout)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 358, in wait_for
    return fut.result()
  File "/usr/lib/python3.6/asyncio/tasks.py", line 537, in _wrap_awaitable
    return (yield from awaitable.__await__())
  File "/usr/local/lib/python3.6/dist-packages/websockets/legacy/client.py", line 622, in __await_impl__
    transport, protocol = await self._create_connection()
  File "/usr/lib/python3.6/asyncio/base_events.py", line 794, in create_connection
    raise exceptions[0]
  File "/usr/lib/python3.6/asyncio/base_events.py", line 781, in create_connection
    yield from self.sock_connect(sock, address)
  File "/usr/lib/python3.6/asyncio/selector_events.py", line 439, in sock_connect
    return (yield from fut)
  File "/usr/lib/python3.6/asyncio/selector_events.py", line 469, in _sock_connect_cb
    raise OSError(err, 'Connect call failed %s' % (address,))
ConnectionRefusedError: [Errno 111] Connect call failed ('<IP_ADDRESS>', 32254)

What you expected to happen:
When train worker cannot connect to the avg worker, it should try N(e.g., 5) times.
After N times's tries,  the train worker should be restarted.
Why is this needed:

the avg worker restarts unexpectedly
edge node offline and the network is abnormal
GM can not create train worker and avg worker almost at the same time.

How to reproduce it (as minimally and precisely as possible):
Anything else we need to know?:
Environment:
Sedna Version: v0.3.1
$ kubectl get -n sedna deploy gm -o jsonpath='{.spec.template.spec.containers[0].image}'
# paste output here

$ kubectl get -n sedna ds lc -o jsonpath='{.spec.template.spec.containers[0].image}'
# paste output here

Kubernets Version
$ kubectl version
# paste output here

KubeEdge Version
$ cloudcore --version
# paste output here

$ edgecore --version
# paste output here

CloudSide Environment:
Hardware configuration
$ lscpu
# paste output here

OS
$ cat /etc/os-release
# paste output here

Kernel
$ uname -a
# paste output here

Others

EdgeSide Environment:
Hardware configuration
$ lscpu
# paste output here

OS
$ cat /etc/os-release
# paste output here

Kernel
$ uname -a
# paste output here

Others

/assign @jaypume @JoeyHwong-gk


docs(config): add snippet for publishing config file

This PR:

[x] Adds a code snippet for publishing the configuration file in Laravel.

Thank you!

Thank you @innocenzi !


Performance Improvement

Instead of loading acronym.json on each page load, that should be placed in background script
or that could be made offline.
and acronym dictionary should be formed once.

Hi @joelmalissa , I would like to submit a PR if that seems ok.

This is open source; submitting the PR is fine.  How would you code this to use the list in a background script?
From: hitesh saini<EMAIL_ADDRESS>Sent: Wednesday, October 16, 2019 3:57 PM
To: nasa/NASA-Acronyms<EMAIL_ADDRESS>Cc: Malissa, Joel D. (KSC-UBG00<EMAIL_ADDRESS>Mention<EMAIL_ADDRESS>Subject: [EXTERNAL] Re: [nasa/NASA-Acronyms] Performance Improvement (#8)
Hi @joelmalissahttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_joelmalissa&d=DwMCaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=87bZhT_dcb6RVSR4mBdmJ-cu3ZEEyJouGUVXWN_Fmbs&m=-YLgJdYMEirauCnNluZEt8WhS5jCPhhXGTIx7-EQmg4&s=D_Yq6SD5klqtEZu827AFvDM87imEM1hU8e6x03Y0L_0&e= , I would like to submit a PR if that seems ok.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_nasa_NASA-2DAcronyms_issues_8-3Femail-5Fsource-3Dnotifications-26email-5Ftoken-3DAKV5PFDAGFR6VYHFM4OZJHDQO5WYVA5CNFSM4JBQIWO2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEBNXUNY-23issuecomment-2D542865975&d=DwMCaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=87bZhT_dcb6RVSR4mBdmJ-cu3ZEEyJouGUVXWN_Fmbs&m=-YLgJdYMEirauCnNluZEt8WhS5jCPhhXGTIx7-EQmg4&s=7oiO8eIs7zM5mRdIDD-8vP7IwjgDMl8FTPJNdBUpuSU&e=, or unsubscribehttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AKV5PFE5SC4CBMBZQN4F5ALQO5WYVANCNFSM4JBQIWOQ&d=DwMCaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=87bZhT_dcb6RVSR4mBdmJ-cu3ZEEyJouGUVXWN_Fmbs&m=-YLgJdYMEirauCnNluZEt8WhS5jCPhhXGTIx7-EQmg4&s=eyQ_G0FewejseAlflx3QF5G9JCcyn26RzMuA38w27aA&e=.

Hi @joelmalissa ,

How would you code this to use the list in a background script?

I would introduce message passing between background script and content script eg. Message Passing

I will be submitting a PR later today. Half way through already.

Hi @joelmalissa , have a look.


Reduce RAM usage

All Buttons are read in a for loop. Every button stores it's own time when it is read the last time, but for all buttons this is the same time (for loop). To save some RAM usage (60bytes for the proMicro) the "debouncing" can be done in the central function (readButtons() ).
Same could be applied to the encoder function, but is not part of the existing pull request. It will "only" save 12Bytes for the proMicro (4 Encoder * 4Byte(_lastmillis in MFENcoder.h) - 4Byte(mobiflight.cpp))...

I just saw that there is a typo in there.
In the mobiflight.cpp#1072 is
uint32_t _lastButtonRead;
But it should be:
uint32_t lastButtonRead;
(w/o the underline). Applies also to line 1076 and 1077.

If you make the change in your branch and push it the pull request to update automatically.

Done.
Much to learn with these github things....


cStor volumes offline, cStor volume replicas are offline or degraded, not possible to mount volumes to PODS.

Hi,
I'm looking for help. I have small cluster build with Rancher. Latests current versions of OpenEBS and cStor installed via helm charts.
After the installation I was trying to use the cstor storage class to mount some test pod like grafana or empty nginx. Unfortunently Im getting from Kubelet message like:
"Unable to attach or mount volumes: unmounted volumes=[task-pv-storage], unattached volumes=[kube-api-access-kdm5 task-pv-storage[]: timed out waiting for the condition"
and
"MountVolume.MountDevice failed for volume "pvc-c20bcaac-acd8-4ce3-8e76-79e46ba9526c" : rpc error: code = Internal desc = Volume pvc-c20bcaac-acd8-4ce3-8e76-79e46ba9526c is not ready: Replicas yet to connect to controller"
Do you have any idea why it's happening ? I did not find any similar topic, only information that I should contact community for help on OpenEBS page (https://openebs.io/docs/troubleshooting/cstor)

Hi @OlafHappyson, Looks like cStor Volume is Unhealthy(This might be because replicas are not yet connected to target). Can you share the following outputs:

kubectl get cv -n openebs
kubectl get cvr -n openebs
kubectl get po -n openebs
kubectl logs <cstor_pod_name_where_volume_replica_exist> -c cstor-pool -n openebs
kubectl logs <cstor_pod_name_where_volume_replica_exist> -c cstor-pool-mgmt -n openebs

I may request few other outputs if unable to figure out the issue from above outputs

Hello @mittachaitu ,
Thanks for reply, here are the outputs:
➜  ~ kubectl get cv -n openebs NAME                                       CAPACITY   STATUS   AGE pvc-e168a51b-aeea-47ab-8f74-905cfb427809   0          Init     45s
➜  ~ kubectl get cvr -n openebs NAME                                                            ALLOCATED   USED   STATUS    AGE pvc-e168a51b-aeea-47ab-8f74-905cfb427809-cstor-disk-pool-mx7f   6K          6K     Offline   58s pvc-e168a51b-aeea-47ab-8f74-905cfb427809-cstor-disk-pool-sj68   6K          6K     Offline   58s
➜  ~ kubectl get po -n openebs NAME                                                              READY   STATUS    RESTARTS      AGE cstor-disk-pool-mx7f-6d7d9477c9-gc4lx                             3/3     Running   0             6m39s cstor-disk-pool-sj68-88b48dd59-wrfvr                              3/3     Running   0             6m39s cstor-disk-pool-vszg-7f57dfdfd8-zwp8f                             3/3     Running   0             6m38s openebs-cstor-admission-server-7fcb956884-tdlwj                   1/1     Running   1 (10m ago)   11m openebs-cstor-csi-controller-0                                    6/6     Running   0             11m openebs-cstor-csi-node-4hck2                                      2/2     Running   0             11m openebs-cstor-csi-node-xsrlc                                      2/2     Running   0             11m openebs-cstor-csi-node-zbgv4                                      2/2     Running   0             11m openebs-cstor-cspc-operator-767457978c-8gs5k                      1/1     Running   0             11m openebs-cstor-cvc-operator-559d96bf8b-dz8h5                       1/1     Running   0             11m openebs-localpv-provisioner-7698c49bbf-nv4bl                      1/1     Running   0             11m openebs-ndm-29jv9                                                 1/1     Running   0             11m openebs-ndm-ddb5c                                                 1/1     Running   0             11m openebs-ndm-ncv9w                                                 1/1     Running   0             11m openebs-ndm-operator-69b5fcf66b-j76rz                             1/1     Running   0             11m pvc-e168a51b-aeea-47ab-8f74-905cfb427809-target-f84d7ddcc-nswq9   3/3     Running   0             64s
About the logs Im not sure if this is correct output:
➜  ~ kubectl logs cstor-disk-pool-vszg-7f57dfdfd8-zwp8f -c cstor-pool -n openebs Disabling dumping core sleeping for 2 sec 2022-05-04/08:30:18.552 disabled auto import (reading of zpool.cache) physmem = 16467102 pages (62.82 GB)
`➜  ~ kubectl logs cstor-disk-pool-vszg-7f57dfdfd8-zwp8f -c cstor-pool -n openebs
Disabling dumping core
sleeping for 2 sec
2022-05-04/08:30:18.552 disabled auto import (reading of zpool.cache)
physmem = 16467102 pages (62.82 GB)
➜  ~ kubectl logs cstor-disk-pool-vszg-7f57dfdfd8-zwp8f -c cstor-pool-mgmt -n openebs

rm /usr/local/bin/zrepl
pool_manager_pid=8
trap _sigint INT
trap _sigterm SIGTERM
wait 8
/usr/local/bin/pool-manager start
E0504 08:30:19.264523       8 pool.go:112] zpool status returned error in zrepl startup : exit status 1
I0504 08:30:19.264670       8 pool.go:113] Waiting for pool container to start...
I0504 08:30:19.276998       8 controller.go:109] Setting up event handlers for CSPI
I0504 08:30:19.277438       8 controller.go:118] will set up informer event handlers for cvr
I0504 08:30:19.277802       8 new_restore_controller.go:106] Setting up event handlers for restore
I0504 08:30:19.293769       8 controller.go:111] Setting up event handlers for backup
I0504 08:30:19.299538       8 runner.go:38] Starting CStorPoolInstance controller
I0504 08:30:19.299563       8 runner.go:41] Waiting for informer caches to sync
I0504 08:30:19.306997       8 common.go:263] CStorPool found: [cannot open 'name': no such pool ]
I0504 08:30:19.307057       8 run_restore_controller.go:38] Starting CStorRestore controller
I0504 08:30:19.307066       8 run_restore_controller.go:41] Waiting for informer caches to sync
I0504 08:30:19.307076       8 run_restore_controller.go:53] Started CStorRestore workers
I0504 08:30:19.307099       8 runner.go:38] Starting CStorBackup controller
I0504 08:30:19.307126       8 runner.go:41] Waiting for informer caches to sync
I0504 08:30:19.307098       8 runner.go:39] Starting CStorVolumeReplica controller
I0504 08:30:19.307140       8 runner.go:53] Started CStorBackup workers
I0504 08:30:19.307150       8 runner.go:42] Waiting for informer caches to sync
I0504 08:30:19.307169       8 runner.go:47] Starting CStorVolumeReplica workers
I0504 08:30:19.307189       8 runner.go:54] Started CStorVolumeReplica workers
I0504 08:30:19.399816       8 runner.go:45] Starting CStorPoolInstance workers
I0504 08:30:19.399873       8 runner.go:51] Started CStorPoolInstance workers
I0504 08:30:19.420382       8 handler.go:442] Added Finalizer: cstor-disk-pool-vszg, c036ed9b-59a4-44c4-b770-7dd703a46d9d
I0504 08:30:19.434975       8 import.go:73] Importing pool c036ed9b-59a4-44c4-b770-7dd703a46d9d cstor-cd9e6c7c-2c85-4e1c-9703-daed6d26d91d
E0504 08:30:19.442111       8 import.go:94] Failed to import pool by reading cache file: cannot import 'cstor-cd9e6c7c-2c85-4e1c-9703-daed6d26d91d': no such pool available
: exit status 1
E0504 08:30:19.463121       8 import.go:114] Failed to import pool by scanning directory: 2022-05-04/08:30:19.448 Iterating over all the devices to find zfs devices using blkid
2022-05-04/08:30:19.454 Iterated over cache devices to find zfs devices
cannot import 'cstor-cd9e6c7c-2c85-4e1c-9703-daed6d26d91d': no such pool available
: exit status 1
I0504 08:30:19.483806       8 create.go:41] Creating a pool for cstor-disk-pool-vszg cstor-cd9e6c7c-2c85-4e1c-9703-daed6d26d91d
I0504 08:30:19.818143       8 event.go:282] Event(v1.ObjectReference{Kind:"CStorPoolInstance", Namespace:"openebs", Name:"cstor-disk-pool-vszg", UID:"c036ed9b-59a4-44c4-b770-7dd703a46d9d", APIVersion:"cstor.openebs.io/v1", ResourceVersion:"1953602", FieldPath:""}): type: 'Normal' reason: 'Created' Pool created successfully`

Anyway I saw another action happend. After I created the poolcluster I have new Blockdevices available. Should I also set them to the poolcluster ?
➜  ~ kubectl get blockdevice -n openebs
NAME                                           NODENAME   SIZE            CLAIMSTATE   STATUS     AGE
blockdevice-013502c52aa5140a292cff54fb07a7e5   node3<PHONE_NUMBER>336   Claimed      Active     23m
blockdevice-15c3ce20a1981bd2bd15c9921282e839   node1<PHONE_NUMBER>504   Claimed      Active     23m
blockdevice-433352992577e922bfd83ad51de5676e   node3<PHONE_NUMBER>576   Unclaimed    Active     18m
blockdevice-c74bce22d236ef2a406fad5c0384f1f2   node2<PHONE_NUMBER>504   Claimed      Active     23m
blockdevice-f139c908b809a7d2db31a081b15436a0   node2<PHONE_NUMBER>744   Unclaimed    Inactive   17m
blockdevice-fc069971412a2e0746986fa55714a424   node1<PHONE_NUMBER>744   Unclaimed    Inactive   17m

In a description of CVR  is this:
Warning  SyncFailed  105s (x254 over 126m)  CStorVolumeReplica  failed to sync CVR error: unable to update snapshot list details in CVR: failed to get the list of snapshots: Output: failed listsnap command for cstor-cd9e6c7c-2c85-4e1c-9703-daed6d26d91d/pvc-e168a51b-aeea-47ab-8f74-905cfb427809 with err 11
Error: exit status 11

Hi @OlafHappyson. I am suspecting it to a network issue. Can you confirm whether the output of the following from above are still the same of not?

kubectl get cv -n openebs
kubectl logs <cstor_pod_name_where_volume_replica_exist> -c cstor-pool -n openebs(Is there just the above 2-3 lines of logs present?)
kubectl logs <cstor_pod_name_where_volume_replica_exist> -c cstor-pool-mgmt -n openebs

Also, to just cross confirm you can ping pvc-c20bcaac-acd8-4ce3-8e76-79e46ba9526c-target-XXX  pod IP(present inside openebs namespace) from inside any cstor-disk-pool pod container?

Yes, I came to the same conclusion. The issue combined access rights and network configuration.

Can you just mention the steps that you performed to resolve the issues so that it can benefit others who encounter the same issue. After that we can close the issue.

Don't remember exact steps, but I reviewed the network configuration of Rancher and configured correct interface and IP settings. After that, I assigned ownership of the docker processes to the account which were working with the docker and RKE cluster.
After that it started working.

I'm facing the same situation,  any ideia to fix it ?

I'm facing same issue; but sometimes I have seen cstor volumes are Healthy when I delete the pvc pod.
It looks like the intermittent issue.
What could be the reason and any idea to fix this issue?

I'm facing same issue; but sometimes I have seen cstor volumes are Healthy when I delete the pvc pod. It looks like the intermittent issue. What could be the reason and any idea to fix this issue?

In my case issue is because of nft rules, issue fix by removing/flush nft rules.


error while running script

Running this PHP script in the addess bar.
i have this error::
ERR/401 Go Away

see https://github.com/Seldaek/php-console/blob/master/config.php.dist#L9 to configure the IPs which can access the console. By default it's restricted to localhost as it allows executing arbitrary code on the machine hosting it I'd be very careful opening this up much further..


I need a vehicle to make multiple trips

I am using OR Tools using Python and would like to use multiple trips of a vehicle as the cost of using that vehicle is less compare to other vehicle. Could you please suggest me about the same?
Problem Statement:

TS09UA5627 - (Capacity - 20) - (Cost - 5)
TS09UB7297 - (Capacity - 50) - (Cost - 100)
TS09UA8646 - (Capacity - 75) - (Cost - 150)
TS08UV9283 - (Capacity - 80) - (Cost - 160)
TS09UA2435 - (Capacity - 85) - (Cost - 170)

I would like to use vehicle 1 many times as cost is saved.

Thanks a lot for the information. I have duplicated the depots as you mentioned. Added last 2 in the attached sheet.
SetFixedCostOfVehicle was already added in my python script as I am using cvrptw_plot.py to solve my constraints.
This still is not repeating the vehicle and using the individual vehicles. Could you please let me know what am I doing wrong.  (I have added comments in the CSV file attached below)
Thanks in advance !!
routeParameters.xlsx

Are you sure the TW allow one vehicle to travel back to depot then perform the next "trip".
Otherwise the solver has to use other vehicle to be on time at each location...

Yes, I have tried with a large time window of 16 hours for nearby locations but its not working. Also, I can give only time in hours and minutes, I cannot assign dates in time windows - is there a way out please?

Please provide a code source, otherwise take a second look at cvrp_reload.py

Please find the code in the zip format.
final.py is the file which takes parameters from routeParameters.csv
Thank you for all the help.
final code.zip

Did you get some time to check the code please?

Can anybody let me know as to when this would be added?

See https://github.com/google/or-tools/blob/master/ortools/constraint_solver/samples/cvrp_reload.py

when run this code, it has the error information like bellow:
Traceback (most recent call last):
File "/Users/sf/Desktop/code/python/VRP/code/cvrp_reload.py", line 326, in
main()
File "/Users/sf/Desktop/code/python/VRP/code/cvrp_reload.py", line 292, in main
manager = pywrapcp.RoutingIndexManager(data['num_locations'],
AttributeError: module 'ortools.constraint_solver.pywrapcp' has no attribute 'RoutingIndexManager'

You should use the latest version of or-tools (7.3).
Le mer. 7 août 2019 à 01:14, kongxiangmao<EMAIL_ADDRESS>a
écrit :

https://github.com/google/or-tools/blob/master/ortools/constraint_solver/samples/cvrp_reload.py
when run this code, it has the error information like bellow:
Traceback (most recent call last):
File "/Users/sf/Desktop/code/python/VRP/code/cvrp_reload.py", line 326, in
main()
File "/Users/sf/Desktop/code/python/VRP/code/cvrp_reload.py", line 292, in
main
manager = pywrapcp.RoutingIndexManager(data['num_locations'],
AttributeError: module 'ortools.constraint_solver.pywrapcp' has no
attribute 'RoutingIndexManager'
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/google/or-tools/issues/976?email_source=notifications&email_token=ACUPL3KWXNPUST567BUYGBTQDJ77JA5CNFSM4GKYIMEKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3XTBBY#issuecomment-518992007,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ACUPL3NUE5AZKT3WYARYUH3QDJ77JANCNFSM4GKYIMEA
.

You need two things:

duplicate the depot to allow reload/multi trip: see https://github.com/google/or-tools/blob/master/examples/python/cvrp_reload.py
set a Vehicle fixed cost so the solver has incentive to use the same vehicle to minimize the objective. see https://github.com/google/or-tools/blob/0d93b2079cb0192f151e32a17b336d07ce22dc50/ortools/constraint_solver/routing.h#L697-L705

Hi @Mizux ,
Actually trying to find a workaround for the exact same goal, to be able to use the same vehicle to do multiple trips, i.e. any number of trips that is feasible in the given time window.
Your solution references a code link, but it's broken. Could you update the link or point me to a solution for the problem mentioned here?
Thanks.

@jagratigogia42  moved to ortools/constraint_solver/samples:
https://github.com/google/or-tools/blob/stable/ortools/constraint_solver/samples/cvrp_reload.py

Hello @Mizux
I'm also trying to solve for the same vehicle to do multiple trips feasible in the time window.
I have tried out the cvrp_reload sample: https://github.com/google/or-tools/blob/stable/ortools/constraint_solver/samples/cvrp_reload.py
I have modified it, so that I can handle lat lng in locations and I'm using radial distance instead of manhattan distance.
But I'm getting 0km output for all vehicles, basically the solver is saying there is a solution, but all are 0.
Objective: 300000
dropped orders: [6, 7, 8]
dropped reload stations: [6, 7, 8, 1, 2, 3, 4, 5]
Route for vehicle 0:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 1:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 2:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 3:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 4:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 5:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 6:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 7:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 8:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 9:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Total Distance of all routes: 0m
Total Load of all routes: 0
Total Time of all routes: 0min

This is gist link to the modified code: https://gist.github.com/ViveK-PothinA/a85445d79e6ee302129f927b29c55c33
Please help me identify where I'm going wrong. Thanks in advance.

@jagratigogia42 moved to ortools/constraint_solver/samples:
https://github.com/google/or-tools/blob/stable/ortools/constraint_solver/samples/cvrp_reload.py
EDIT: Just fixed the path in the previous post...

Thanks for the link. But can you help in a case where the capacity of the vehicles are different ?
I have 31 vehicles with 4 different capacities. I'm looking for a solution where the vehicles return to the depot when they're empty but can't get the solution ...

Hello @Mizux
I'm also trying to solve for the same vehicle to do multiple trips feasible in the time window.
I have tried out the cvrp_reload sample: https://github.com/google/or-tools/blob/stable/ortools/constraint_solver/samples/cvrp_reload.py
I have modified it, so that I can handle lat lng in locations and I'm using radial distance instead of manhattan distance. But I'm getting 0km output for all vehicles, basically the solver is saying there is a solution, but all are 0.
Objective: 300000
dropped orders: [6, 7, 8]
dropped reload stations: [6, 7, 8, 1, 2, 3, 4, 5]
Route for vehicle 0:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 1:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 2:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 3:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 4:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 5:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 6:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 7:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 8:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 9:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Total Distance of all routes: 0m
Total Load of all routes: 0
Total Time of all routes: 0min

This is gist link to the modified code: https://gist.github.com/ViveK-PothinA/a85445d79e6ee302129f927b29c55c33
Please help me identify where I'm going wrong. Thanks in advance.

Hello,
Did you manage to find a solution for this issue?

@GeorgeLeucuta

Your distance callback must return an int

    def distance_evaluator(manager, from_index, to_index):
        """Returns the manhattan distance between the two nodes"""
        from_node = manager.IndexToNode(from_index)
        to_node = manager.IndexToNode(to_index)
        dst = int(_distances[from_node][to_node]) # see the cast here
        #print(f'dst: {dst}') # for debug purpose
        return dst

also all your distance seems to be around 30k-50k so to incentive the solver to avoid to drop the node you need to increase the penalty

    # Allow to drop regular node with a cost.
    for node in range(6, len(data['demands'])):
        node_index = manager.NodeToIndex(node)
        capacity_dimension.SlackVar(node_index).SetValue(0)
        routing.AddDisjunction([node_index], 10_000_000)

Then possible output:
./cvrp_reload_1.py
Objective: 9258964
dropped orders: []
dropped reload stations: [1, 2, 3, 4, 5]
Route for vehicle 0:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 1:
 0 Load(0) Time(0,0) -> 8 Load(0) Time(109,120) -> 0 Load(3) Time(233,1500)
Distance of the route: 90956m
Load of the route: 3
Time of the route: 233min

Route for vehicle 2:
 0 Load(0) Time(0,0) -> 7 Load(0) Time(61,120) -> 0 Load(3) Time(137,1500)
Distance of the route: 51538m
Load of the route: 3
Time of the route: 137min

Route for vehicle 3:
 0 Load(0) Time(0,0) -> 6 Load(0) Time(60,120) -> 0 Load(3) Time(100,1500)
Distance of the route: 20870m
Load of the route: 3
Time of the route: 100min

Total Distance of all routes: 163364m
Total Load of all routes: 9
Total Time of all routes: 470min

note: I set vehicle to 4 instead of 10 (BTW you only have 3 node other are reload nodes...)

@GeorgeLeucuta

Your distance callback must return an int

    def distance_evaluator(manager, from_index, to_index):
        """Returns the manhattan distance between the two nodes"""
        from_node = manager.IndexToNode(from_index)
        to_node = manager.IndexToNode(to_index)
        dst = int(_distances[from_node][to_node]) # see the cast here
        #print(f'dst: {dst}') # for debug purpose
        return dst

also all your distance seems to be around 10k-25k so to incentive the solver to avoid to drop the node you need to increase the penalty

    # Allow to drop regular node with a cost.
    for node in range(6, len(data['demands'])):
        node_index = manager.NodeToIndex(node)
        capacity_dimension.SlackVar(node_index).SetValue(0)
        routing.AddDisjunction([node_index], 10_000_000)

Then possible output:
./cvrp_reload_1.py
Objective: 9258964
dropped orders: []
dropped reload stations: [1, 2, 3, 4, 5]
Route for vehicle 0:
 0 Load(0) Time(0,0) -> 0 Load(0) Time(0,1500)
Distance of the route: 0m
Load of the route: 0
Time of the route: 0min

Route for vehicle 1:
 0 Load(0) Time(0,0) -> 8 Load(0) Time(109,120) -> 0 Load(3) Time(233,1500)
Distance of the route: 90956m
Load of the route: 3
Time of the route: 233min

Route for vehicle 2:
 0 Load(0) Time(0,0) -> 7 Load(0) Time(61,120) -> 0 Load(3) Time(137,1500)
Distance of the route: 51538m
Load of the route: 3
Time of the route: 137min

Route for vehicle 3:
 0 Load(0) Time(0,0) -> 6 Load(0) Time(60,120) -> 0 Load(3) Time(100,1500)
Distance of the route: 20870m
Load of the route: 3
Time of the route: 100min

Total Distance of all routes: 163364m
Total Load of all routes: 9
Total Time of all routes: 470min

note: I set vehicle to 4 instead of 10 (BTW you only have 3 node other are reload nodes...)

Hello @Mizux,
First of all thank you very much for your support!
Your scenario seems to only work when the vehicle capacity is equal between all the vehicles. In my case the cars have different capacities. It is possible to adapt it to take this factor into consideration?
Or is it possible to modify the demand_callback function so that it sets the vehicle load to 0 for specific nodes(depot)? If so, can you please provide an example?
Thanks a lot!

yes you'll need to duplicate depot several times i.e. one per "potential reload"

yes you'll need to duplicate depot several times i.e. one per "potential reload"

@Mizux
Thank you!
Can you please give me an idea on how to approach the first issue?
"Your scenario seems to only work when the vehicle capacity is equal between all the vehicles. In my case the cars have different capacities. It is possible to adapt it to take this factor into consideration?
Or is it possible to modify the demand_callback function so that it sets the vehicle load to 0 for specific nodes(depot)? If so, can you please provide an example?"
Best regards!