TF2 porting: Regularizer Unit Test

Code Pull Requests
This is the start for the regularizer unit tests.  This is the 'micro' version that tests encoder/decoder.  For each encoder/decoder, the test cycles through None, l1, l2 and l1_l2 as regularizer settings.   After cycling through the regularizer settings, various tests are done on the regularizer losses.  Additional unit tests are specified by adding entries to the @pytest.mark.parametrize decorator arguments.
This current test covers:

Input features: numerical and images
output features numerical

Let me know if this approach looks reasonable.  If looks OK, I'll work on adding more encoders/decoders for other features.
While working on this, I noted some items to discuss.  I'll send a separate note.

Still work-in-progress.   One of the last commits fixed this error
        if regularizer:
>           regularizer_obj = tf.keras.regularizers.get(regularizer)()
E           TypeError: __call__() missing 1 required positional argument: 'x'

Other commits added encoder and decoder tests.
While working on the unit test for the SequenceGeneratorDecoder, I noticed that regularizer and initializer specifications are not propagated to the embed layers of sequence generator decoder.  Fixing this will be the next area of focus.

work-in-progress:

resolved issue of propagating initializer/regularizer specification to inner layers of sequence generator decoder
modified regularizer/initializer parameter name for embedding classes to conform with naming convention found in other encoders/decoders.  Specifically changed regularizer to embedding_regularizer and initializer to embedding_initializer.
unit test for date encoder, set encoder, parallel_cnn encoder, tagger decoder, generator decoder

I'm now going to focus on the 'macro' unit test for regularization.

This PR is ready for review and merge.
The last commit adds a 'macro' level unit tests.  The unit test confirms the loss values per epoch w/o regularization are less than per epoch loss value with regularization.
Summary of other changes:
micro level tests for sampling of encoders and decoders:
Tested encoders with regularization

numerical regression
image resnet and stacked_cnn
categorical dense
date encoder
parallel_cnn encoder
set encoder

Tested decoder with regularization

numerical regressor
Tagger decoder
Generator decoder (cell_type gru)

Fixed error in embedding module related to regularization setup


CLOUD-653 Originating exceptions wrapped into CB specific runtime exc…

…eptions (cause and messages kept); log messages corrected and unified

Jenkins build finished, all tests passed.
Refer to this link for build results: http://ci.sequenceiq.com/job/cloudbreak-pull-request/1206/


Adding probability of a event calculator

Is your feature request related to a problem? Please describe.
I want to implement a calculator to find probability of a event by asking no of possible trials and actual trails
Describe the solution you'd like

A clear and concise description of what you want to happen.

Do show steps for it
Go ahead
Deadline 31 March,2021 (11:59 PM IST)


only reconcile gatewayvmconfiguration upon node create/delete events

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
Reconciling gatewayvmconfiguration requires vmss ARM requests, which are expensive. We only reconcile these resources upon node create/delete events to reduce the number of vmss calls.
Which issue(s) this PR fixes:

Fixes #
Special notes for your reviewer

coverage: 80.528% (+0.08%) from 80.447%
when pulling 96d4764beeb11c0e315b0732b8105662a03309b2 on jwtty/nodeevent
into 4f9b21e2ecadd6955fbffb3abd3853f829308d10 on main.


Properly mark optional parameters with a ?

Changes
This makes it so a ? is added to optional parameters inside completions, like it does inside .ts files. Also added this for props, like in JSX files. Optional props are now sorted below required ones
This makes a really nice result for components with many props, such as astro-eleventy-img's <Image>
Screenshots

Testing
Updated tests with new sorting text, added new test for components
Docs
No docs needed

lgtm, good tests!

Oh, needs changeset.


Updating pull_outputs.py command

The outputs.json file for both my recent runs was in the $WORKFLOW_ID directory as opposed to the $WORKFLOW_ID/artifacts/ directory.

Sorry I thought there was just an issue for this instead of a PR.


dumppdf.py unable to extract ToC

File "./dumppdf.py", line 143, in dumpoutline
pageno = pages[dest[0].objid]
AttributeError: 'int' object has no attribute 'objid'
Will inspect this issue further, as soon as i got some time on my hands

Please, I have encountered the same error, has anyone try to fix this issue already?

Same here

@ortenburger, thanks for raising the issue. This is a very late response. Do you have any possibility to find the pdf that caused the issue?

Closing this because not reproducible.

I have no idea if this will help anyone else, but I was able to resolve the problem by deleting a random page of the document in Preview (MacOS) (both the last page and a random page in the middle worked).
I did some very basic debugging, the value of dest passed to resolve_dest was a bytes object (b'merged-report.toc'), which doesn't seem to match any of the cases.
Unfortunately, I cannot share the example pdf as a reproducible example because I don't have permission to share the file.
Happy to help in whatever way I can without sharing docouments.

I can reproduce this issue with the current version of the ARMv8-a reference manual PDF:
https://developer.arm.com/documentation/ddi0487/latest/arm-architecture-reference-manual-armv8-for-armv8-a-architecture-profile

@tycho can you create a new issue for this? Make sure to also include the code/commands that you use.

@pietermarsman It's an identical issue to the OP though, why make a new issue? Basically just dumppdf.py --extract-toc $pdffile with the PDF from the link I provided above.

This issue was closed because it is not reproducible. If you create a new issue you should include the command you use, and the pdf you are testing on (unlike this issue).


Migrate from dep to Go modules

Towards giantswarm/giantswarm#6302
As part of updating k8s dependencies I'm taking the opportunity to try to switch to Go modules as well in the same go, starting from our leaf libraries like microerror. Our tooling like architect and e2e-harness have already been updated to Go 1.13 so Go modules support should be best ever.
Related:
giantswarm/giantswarm#5680

@sslavic I force-pushed to the branch with the same name hoping to update it but it closed the PR. I'll create another one.


BEPUPhysics vs Unity's new Havok in terms of performance

Hello :) I'm really interested in BEPUPhysics and this project :)
What comments do you have in regards to BEPUPhysics and the DOTS/ HAVOK Physics that Unity is working on and rn available to use?
I'm starting to work on a new game, and seeing the performance of Bepu really got me hyped when I saw its video yesterday.
Please let me know your thoughts in comparision to Bepu vs the new physics engine Unity is currently developing.. I really have to choose one for those massive physics requirements for my Android game :)
Kind regards.

Wouldn't it be possible to use Burst for this ?

It would be possible but it would involve rewriting every part that involves SIMD inside Bepu. This repo is about taking Bepu code and making a wrapper for Unity not rewriting the engine itself. I would say the best ending for this would be to have a CoreCLR support for unity on which Bepu has really good performances and wouldn't require anything to change in here.


Include port number in haproxy config for hdr(host) acl.

In order for HA proxy to route traffic based on the Host header, when the client includes the port number in the Host header, the acl must also include the port number in order for it to match.
See http://serverfault.com/questions/502443/ignore-port-numbers-in-haproxy-host-header-matches for a related issue that describes the use case this solves.

@kaos nvm my last comment, there seems to be 3 valid ways of creating OR condition in haproxy ACLs:

yours
Putting 2 conditions into the same ACL separated by space: acl ${backend.uuid}_host hdr(host) -i ${backend.portSpec.domain} ${backend.portSpec.domain}:${sourcePort}
creating 2 ACLs with diff name, and mention them with OR in "use_backend" condition.

Tested all, works fine.
LGTM

LGTM


Add zoom awareness to tmux conf

The window_zoomed_flag can be used to check the status of whether a pane is zoomed. The code below changes the color on zoom and adds [ ] around the process name.
set -g window-status-current-format "#{?window_zoomed_flag,#[bg=colour9],#[bg=colour39]}#[fg=colour234]⮀#[fg=black,noreverse,bold] #I: #{?window_zoomed_flag,[,}#W#{?window_zoomed_flag,]#[fg=colour9],#[fg=colour39]} #[bg=colour234,nobold]⮀"

normal / one pane:

zoomed pane in a multi-pane window:

Just merged a PR that did this


State accounting:

Record total duration spent in and every transition to each
possible server state. Display as counters through server_info
RPC call.

Current coverage is 48.87%

Merging #1370 into develop will decrease coverage by -0.01% as of eab097e

@@            develop   #1370   diff @@
=======================================
  Files           962     962
  Stmts         66053   66087    +34
  Branches          0       0
  Methods           0       0
=======================================
+ Hit           32291   32301    +10
  Partial           0       0
- Missed        33762   33786    +24

Review entire Coverage Diff as of eab097e

Powered by Codecov. Updated on successful CI builds.

Similar to #1354 - please consider exposing this via the statsd interface too.

@miguelportilla @scottschurr I just rebased this against the tip of develop.

I just took a quick look at the feature set you're providing.  For similar measurements I've made in the past it has been really useful to be able to clear the counters.  Is there an RPC command you could leverage to clear the counters?  If that's possible, then I'd suggest reporting your five value pairs plus the time that this recording session started.
Does that seem to you like it would be useful?

@scottschurr Hi, Scott. Sampling this data over time and then diffing the results from each sample has the same effect that you're describing. That's how monitoring systems calculate network interface bandwidth usage, for example.
I've been collecting this data from a couple of servers for the past week or so on systems that are using the commit in this PR. I wrote a python script that gathers the data and formats into tab-delimited. The 1st 5 columns after timestamp and hostname are the # of transitions. The last 5 columns are the total microseconds in each state:
2015-10-21 20:48:48.249404	estch15	1	2	5942	2351	5861	1092769	11019243<PHONE_NUMBER>3	671320512<PHONE_NUMBER>60
2015-10-21 20:49:48.804219	estch15	1	2	5944	2352	5864	1092769	11019243<PHONE_NUMBER>9	671320532<PHONE_NUMBER>06
2015-10-21 20:50:49.368213	estch15	1	2	5944	2352	5864	1092769	11019243<PHONE_NUMBER>9	671320532<PHONE_NUMBER>84
2015-10-21 20:51:49.927837	estch15	1	2	5945	2352	5865	1092769	11019243<PHONE_NUMBER>7	671320532<PHONE_NUMBER>05
2015-10-21 20:52:50.500131	estch15	1	2	5945	2352	5865	1092769	11019243<PHONE_NUMBER>7	671320532<PHONE_NUMBER>55
2015-10-21 20:53:51.009783	estch15	1	2	5945	2352	5865	1092769	11019243<PHONE_NUMBER>7	671320532<PHONE_NUMBER>73
2015-10-21 20:54:51.558449	estch15	1	2	5945	2352	5865	1092769	11019243<PHONE_NUMBER>7	671320532<PHONE_NUMBER>81
2015-10-21 20:55:52.078287	estch15	1	2	5945	2352	5865	1092769	11019243<PHONE_NUMBER>7	671320532<PHONE_NUMBER>53
2015-10-21 20:56:52.640976	estch15	1	2	5945	2352	5865	1092769	11019243<PHONE_NUMBER>7	671320532<PHONE_NUMBER>26
2015-10-21 20:57:53.160925	estch15	1	2	5945	2352	5865	1092769	11019243<PHONE_NUMBER>7	671320532<PHONE_NUMBER>38
From here it is a matter of calculating differences and we'd have a per-minute rate for each column. And the durations can be compared against one another to report % of time in each state, or not-full, and so forth.

Of note in those particular data points is that there were 3 transition to the syncing state during the sampling period (5945-5942), 1 to tracking (2352-2351) and 4 to full (5865-5861). The corresponding durations for each field increased as a result.

Fair enough.  You've clearly thought about it.  Thanks for the explanation.

Hi, @miguelportilla @scottschurr
I just pushed changes based on Mickey's recent suggestions. I don't know how to reply to each comment individually now that the new commit has been made, so I'm just putting all of Mickey's suggestions, with my responses, as follows:
==================================
miguelportilla added a note 8 hours ago
This member is not necessary and can be removed. Use stateNames in its place instead.
As Scott S alluded, feeding Json::Value a Json::StaticString means it doesn't
have to construct a StaticString out of a string. Creating the object once
for each JSON value name saves that construction on each call.
..............
miguelportilla added a note 8 hours ago
This member is not necessary and can be removed. Use stateNames in its place instead.
see above about setting Json::Value names.
..............
miguelportilla added a note 8 hours ago
This should be const. The element type should be std::string. The assignment and double curlies should not be necessary.
static std::array const stateNames {"disconnected", "connected", "syncing", "tracking", "full"};
Fixed. I had to add a constructor for Json::StaticString to take std::string.
.................
miguelportilla added a note 8 hours ago
This member is not necessary and can be removed. Use stateNames in its place instead.
Repeat suggestion, see above.
................
miguelportilla added a note 9 hours ago
This member is not necessary and can be removed. Use stateNames in its place instead.
Repeat suggestion, see above.
.................
miguelportilla added a note 8 hours ago
'transitions_' and 'dur_' add no value. I recommend in-lining "transitions" and "duration_us" in the single spot they are used.
What does '_us' signify?
transitions_ and dur_ are both StaticString objects, constructed once.
Otherwise, Json::Value needs to construct StaticString objects each time
JSON is output with those names. us is microseconds like Scott S said.
......................
miguelportilla added a note 8 hours ago
'now' can be in-lined, the local is unnecessary and not useful. If you are going to create a local here I recommend 'elapsed', which would be useful for debugging purposes.
Fixed.
........................
miguelportilla added a note 8 hours ago
Consider something like this non const implementation which avoids making copies and updates the current mode duration.
I think it's better to optimize for spending minimum time in locks even
if it means possibly spending more time overall, such as the trade-off between
only doing a copy within the lock vs doing all of the work within the lock but
avoiding the copy.
Sampling the system time generally requires a syscall, for example, which can
be relatively expensive.
.........................
miguelportilla added a note 6 hours ago
You may want to consider having each counter initialized with a member state name. That would remove the necessity of copying it each time json() is called. It would also simplify this loop. You might also be able to write transitions as integer rather than a string which would remove the conversion.
Same answer as above about avoiding a copy vs minimizing lock usage.

@scottschurr I've put the extra curly braces back to avoid clang warnings.
@miguelportilla I've moved the JSON fields "transitions" and "duration_us" to a better place so that they're out of the StateAccounting class. The array still needs to be there so that the names can be assigned by iterating through the mode/state enumerator.
@miguelportilla I've also made Counters.transitions 32bit so it doesn't require converting to a string for JSON. I don't think it's conceivable for there to be billions of state transitions to overflow the counter.

@scottschurr I reverted the StaticString construction.

Looks great to me.  :+1:

:+1:

Merged as fdd012c4206b4ad6242fc3dc6ede248e193f36b6.


fix(k8sprocessor) owner meta deletion grace period

Adds a deferred deletion queue to the owner metadata cache, allowing time for telemetry data to be processed with correct metadata after the owning resource(s) have been deleted.
Closes https://github.com/SumoLogic/sumologic-otel-collector/issues/1242

@swiatekm-sumo you cool with yanking the commented out benchmarks? They had drifted a bit even before this CL. Saw that you had been "using" them in earlier PR/issue discussion.

@swiatekm-sumo Updated godocs and tests with assertions on honoring the grace period.
Have dug into the E2E tests and may yet manually validate the change.


Use zap or zerolog instead of logrus

They're much faster logging libraries compared to logrus.

oh I did not know this! we should def switch

It's super low-priority but yeah it's significantly slower than some competitors, see these benchmarks. I don't think it'll be in the hot path for anyone but at some point we should change, I think it'd help us look more professional + legit to Go-heavy customers.

yeah that is dope

one thing that is interesting is we only use logrus for the generation code, not the lib, but idk how to denote that in terms of the deps file

Oooh, that's interesting. I just assumed we used logrus in the client because of the Dependabot PRs to bump it. So that makes it much lower priority if it's not actually being included in client code.


Empty variables skipped when dereferencing

I found that when using a local template recursively along with dynamic arrays, the template engine is deferencing an incorrect variable.  In the following example, it should output "Parent" and then "Child" and stop, but it ends up in a stack overflow.
It appears it is dereferencing the "members" variable in the "if members" line to the root "members" variable rather than the one local to template, if that makes sense.
program EmptyVariable;

uses
  Sempare.Template;

type
  TMember = record
    Name: String;

    Members: TArray<TMember>;
  end;

begin
    var tpl := Template.Parse(
	       '<% template ''showmember'' %>'+
           '<% name %>'+
           '<% if members %>'+
             '<% for member in members %>'+#13#10+
               '<% include (''showmember'', member) %>'+
             '<% end %>'+
           '<% end %>'+
         '<% end %>'+
         '<% include (''showmember'', _) %>');

    var member: TMember;
    member.Name := 'Parent';

    SetLength(member.Members, 1);
    member.Members[0].Name := 'Child';

    writeln(Template.Eval(tpl, member));

    Readln;
end.

Thanks. Your explanation is understood. I will try validate it tomorrow and thank you for poking into the internals.

I think the issue is actually with the way the 'include' is being handled. The current code uses a trick combing the 'with' statement and the sub template. I suspect a bug there in not initialising variables correctly in the stack frame. I think this could be a bit more flexible (and remain backwards compatible).
In the include example you presented above, '<% include (''showmember'', member) %>'  doesn't work as it expects data passed to the template to be a record or a class so that the stack frame can be populated with some variables. As you figured out with the other ticket raised, the for-in would enumerate over the keys into the array.
So '<% include (''showmember'', members[member]) %>' should theoretically do the trick, or with the use of 'for-of', The 'member' would be able to be used. However, I still have an error, so must dig deeper.
Anyways, I'll dig into this asap, but will be easier to do next week when I'm back in the office.

Hi Craig.
I've pushed a better fix onto the dev branch. Please confirm this works for you. Unfortunately, as I suspected, it was the way I had implemented the include was not 100% correct. This helped with some refactoring as well.
Regards
Conrad


Internal Server Error (500)

Yesterday worked but not anymore (0.9.7)
Internal Server Error (500)
Request Method: 	GET
Request URL: 	http://<IP_ADDRESS>:8080/
(Encoding::CompatibilityError) incompatible encodings: UTF-8 and CP850
You're seeing this error because you use Rack::ShowStatus.
What to do?

Hi @Temporary-Failure,
Seems that you're running Tabula under Windows, that's a bug we're aware of. Please try the steps described here, it should fix the issue.


Implement remainder of chat API

This pull-request implements the remainder of the /chats/ api in V1. It implements the following methods:

FindOne<Message>
FindOne<Chat>
FindOne<ChatUser>
FindMany<ChatUser>
PatchOne<Chat>
DeleteOne<ChatMessage>
DeleteMany<ChatMessage>

Necessary for https://github.com/WatchBeam/Android/issues/9.

/to @angelkjos @connor4312

Merged in https://github.com/WatchBeam/beam-client-java/commit/5328a45ad00a66b3348d84b0e815dfa9406edf68


writeLogEntries: what happens if no logName is provided?

@jabubake Can you try this and tell us the results.

Logs are not written out when no filename is specified, it gets blocked but no exception is thrown.
We require a Preconditions.checkNotNull and  a <default-log-name>

@jabubake I am not finding the same issue - what can I do to reproduce?
I am finding that if the log name is set to null in LoggingHandler then the default value of "java.log" is used. There is an error case if the user sets the log name to an empty string, which is guaranteed to fail.
And if you use the generated LoggingClient directly, we get an exception back from the service, which is what we expect.

@michaelbausor  : retested, looks like this is fine. I am seeing the exception, I think my test was incorrect earlier.
With the generated LoggingClient, I am seeing : Exception in thread "main" com.google.cloud.logging.LoggingException: io.grpc.StatusRuntimeException: INVALID_ARGUMENT
Code used to test : https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/logging/cloud-client/src/main/java/com/example/logging/QuickstartSample.java


Add package for netgen

Needed by the skywater-pdk to do LVS checks (also needed by OpenRAM).

http://opencircuitdesign.com/netgen/index.html


Create a configcat kind of feature flag but directly from the repo, using a JSON file

Is your feature request related to a problem? Please describe.
Create a config.json file in repo so we do a version of configcat/firebase remote config, but directly from the repo, and consume those configuration variables from there.
Describe the solution you'd like
There should be a config.json in the main repo path, and this should include all prompts from prompts.dart in a "template" way,
Based on the following recording transcript of a conversation, provide structure and clarity to the memory in JSON according rules stated below.
The conversation language is $languageCode. Make sure to use English for your response.

${forceProcess ? "" : "It is possible that the conversation is not worth storing, there are no interesting topics, facts, or information, in that case, output an empty title, overview, and action items."}

For the title, use the main topic of the conversation.
For the overview, use a brief overview of the conversation.
For the action items, include a list of commitments, scheduled events, specific tasks or actionable steps.
For the category, classify the conversation into one of the available categories.

Here is the transcript ```$transcript```.

The output should be formatted as a JSON instance that conforms to the JSON schema below.

This config should be retrieved on main.dart, and stored in preferences.

should be in the JSON file in a way we could do .replaceAll and set the proper variables, so we can change the repo, and users will receive the updates.
Describe alternatives you've considered
Config cat/firebase, but this is better.

Closing for now, not needed with backend.


Added REPO_API_ROOT

PR for https://github.com/adobe/petridish/issues/18

Can you fix the lint?

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@6bd49a5). Click here to learn what that means.
The diff coverage is 0%.

@@           Coverage Diff            @@
##             master     #20   +/-   ##
========================================
  Coverage          ?   83.7%
========================================
  Files             ?       7
  Lines             ?     313
  Branches          ?      39
========================================
  Hits              ?     262
  Misses            ?      51
  Partials          ?       0

Impacted Files
Coverage Δ

src/HelixServer.js
53.94% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6bd49a5...0553aab. Read the comment docs.

isn't the API root computable from the RAW root? or the other way around ?


Consider setters for directoryHandler or errorHandler in VirtualDirectory

 Issue by sethladd
Originally opened as dart-lang/sdk#14193

Currently we have setDirectoryHandler and setErrorHandler. Can we consider regular setters?
Thanks!

 Comment by skabet

Fixed as part of dart-lang/sdk@31bfc414098db5c65ea97a41981194c83d115689.

Set owner to @skabet.

 Comment by sethladd

cc @skabet.

 Comment by skabet

Added Fixed label.

 Comment by anders-sandholm

Removed Library-HttpServer label.
Added Pkg-HttpServer label.


Check failed: CUDA_SUCCESS == cuCtxSetCurrent(cuda_context->context()) (0 vs. 4)

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
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow):
Yes
OS Platform and Distribution (e.g., Linux Ubuntu 16.04):
Ubuntu 18.04
Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device:
No
TensorFlow installed from (source or binary):
No, compiled from Source
TensorFlow version (use command below):
1.12
Python version:
2.7
Bazel version (if compiling from source):
Bazel release 0.17.2
GCC/Compiler version (if compiling from source):
gcc (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
CUDA/cuDNN version:
Cuda 10.0/ cuDNN 7.3.1
GPU model and memory:
Nvidia GeForce RTX 2080 (Two gpus) each with 8 GM memory

Describe the current behavior
I've compiled tensorflow using the following command to get libtensorflow_cc.so. (Non Monolithic build)
bazel build --config=cuda //tensorflow:libtensorflow_cc.so
I would like to use multiple gpus at inference time in C++. Currently I have two GeForce RTX 2080 GPUs. So I'm running two threads (with thread id 0 and 1) in a c++ standalone example. Currently I'm using label_image (main.cc).
I want to have two tensorflow session, one session for each thread using each gpu. Thread with thread_id 0 uses gpu:0 and thread with thread_id 1 uses gpu:1
My load_graph method looks as follows:
Status LoadGraph(const string& graph_file_name,
                 std::shared_ptr<tensorflow::Session>* session, int i_threadid) {
  tensorflow::GraphDef graph_def;
  printf(".. IN load graph %d\n", i_threadid);
  Status load_graph_status =
      ReadBinaryProto(tensorflow::Env::Default(), graph_file_name, &graph_def);
  if (!load_graph_status.ok()) {
    return tensorflow::errors::NotFound("Failed to load compute graph at '",
                                        graph_file_name, "'");
  }
  tensorflow::SessionOptions session_options;
  if(i_threadid == 0) {
    session_options.config.mutable_gpu_options()->set_visible_device_list("0");
    tensorflow::graph::SetDefaultDevice("/device:GPU:0", &graph_def);
  } else if(i_threadid == 1) {
    session_options.config.mutable_gpu_options()->set_visible_device_list("0,1");
    tensorflow::graph::SetDefaultDevice("/device:GPU:1", &graph_def);
  }
  session_options.config.mutable_gpu_options()->set_allow_growth(true);
  session_options.config.set_allow_soft_placement(true);
  session->reset(tensorflow::NewSession(session_options));

  //tensorflow::graph::SetDefaultDevice("/cpu:0", &graph_def);
  Status session_create_status = (*session)->Create(graph_def);
  if (!session_create_status.ok()) {
    return session_create_status;
  }
  return Status::OK();
}

In the else part: if I use the following line:
session_options.config.mutable_gpu_options()->set_visible_device_list("1");, I'm getting the following error:
2019-01-26 21:47:00.872434: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 AVX512F FMA
2019-01-26 21:47:01.130371: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1432] Found device 0 with properties:
name: GeForce RTX 2080 major: 7 minor: 5 memoryClockRate(GHz): 1.8
pciBusID: 0000:17:00.0
totalMemory: 7.77GiB freeMemory: 7.62GiB
2019-01-26 21:47:01.130396: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1511] Adding visible gpu devices: 0
2019-01-26 21:47:01.388128: I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-01-26 21:47:01.388163: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988]      0
2019-01-26 21:47:01.388170: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0:   N
2019-01-26 21:47:01.388331: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 7337 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2080, pci bus id: 0000:17:00.0, compute capability: 7.5)
2019-01-26 21:47:01.632637: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1432] Found device 0 with properties:
name: GeForce RTX 2080 major: 7 minor: 5 memoryClockRate(GHz): 1.8
pciBusID: 0000:65:00.0
totalMemory: 7.76GiB freeMemory: 7.47GiB
2019-01-26 21:47:01.632673: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1511] Adding visible gpu devices: 1
2019-01-26 21:47:01.898614: I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-01-26 21:47:01.898649: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988]      1
2019-01-26 21:47:01.898655: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 1:   N
2019-01-26 21:47:01.898776: E tensorflow/core/common_runtime/session.cc:64] Failed to create session: Already exists: TensorFlow device (GPU:0) is being mapped to multiple CUDA devices (1 now, and 0 previously), which is not supported. This may be the result of providing different GPU configurations (ConfigProto.gpu_options, for example different visible_device_list) when creating multiple Sessions in the same process. This is not  currently supported, see https://github.com/tensorflow/tensorflow/issues/19083
Segmentation fault (core dumped)

So I added    session_options.config.mutable_gpu_options()->set_visible_device_list("0,1"); so the second thread with thread_1 is creating session that uses both GPUs (or atleast initializing to utilize both gpus) but the graph runs on the second gpu.
Now I'm getting the output as follows without any error:
2019-01-26 21:51:20.126025: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX AVX2 AVX512F FMA
2019-01-26 21:51:20.380183: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1432] Found device 0 with properties:
name: GeForce RTX 2080 major: 7 minor: 5 memoryClockRate(GHz): 1.8
pciBusID: 0000:17:00.0
totalMemory: 7.77GiB freeMemory: 7.62GiB
2019-01-26 21:51:20.380209: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1511] Adding visible gpu devices: 0
2019-01-26 21:51:20.637473: I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-01-26 21:51:20.637508: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988]      0
2019-01-26 21:51:20.637513: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0:   N
2019-01-26 21:51:20.637668: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 7337 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2080, pci bus id: 0000:17:00.0, compute capability: 7.5)
2019-01-26 21:51:20.892308: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1432] Found device 1 with properties:
name: GeForce RTX 2080 major: 7 minor: 5 memoryClockRate(GHz): 1.8
pciBusID: 0000:65:00.0
totalMemory: 7.76GiB freeMemory: 7.47GiB
2019-01-26 21:51:20.892414: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1511] Adding visible gpu devices: 0, 1
2019-01-26 21:51:21.142666: I tensorflow/core/common_runtime/gpu/gpu_device.cc:982] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-01-26 21:51:21.142699: I tensorflow/core/common_runtime/gpu/gpu_device.cc:988]      0 1
2019-01-26 21:51:21.142705: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 0:   N N
2019-01-26 21:51:21.142709: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1001] 1:   N N
2019-01-26 21:51:21.142932: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 7337 MB memory) -> physical GPU (device: 0, name: GeForce RTX 2080, pci bus id: 0000:17:00.0, compute capability: 7.5)
2019-01-26 21:51:21.143217: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1115] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:1 with 7187 MB memory) -> physical GPU (device: 1, name: GeForce RTX 2080, pci bus id: 0000:65:00.0, compute capability: 7.5)

And the resizing image is done using the following code as I want to run this resizing computation on CPU to get better efficiency
Status LoadImageResizeGraph(std::shared_ptr<tensorflow::Session>* session, const int input_height,
                               const int input_width, const float input_mean,
                               const float input_std) {
  string output_name = "normalized";
  auto root = tensorflow::Scope::NewRootScope();
  using namespace ::tensorflow::ops;  // NOLINT(build/namespaces)

  // use a placeholder to read input data
  auto file_reader =
      Placeholder(root.WithOpName("input"), tensorflow::DataType::DT_STRING);

  // Now try to figure out what kind of file it is and decode it.
  const int wanted_channels = 3;
  tensorflow::Output image_reader;

    image_reader = DecodeJpeg(root.WithOpName("jpeg_reader"), file_reader,
                              DecodeJpeg::Channels(wanted_channels));
  // Now cast the image data to float so we can do normal math on it.
  auto float_caster =
      Cast(root.WithOpName("float_caster"), image_reader, tensorflow::DT_FLOAT);
  // The convention for image ops in TensorFlow is that all images are expected
  // to be in batches, so that they're four-dimensional arrays with indices of
  // [batch, height, width, channel]. Because we only have a single image, we
  // have to add a batch dimension of 1 to the start with ExpandDims().
  auto dims_expander = ExpandDims(root, float_caster, 0);
  // Bilinearly resize the image to fit the required dimensions.
  auto resized = ResizeBilinear(
      root, dims_expander,
      Const(root.WithOpName("size"), {input_height, input_width}));
  // Subtract the mean and divide by the scale.
  Div(root.WithOpName(output_name), Sub(root, resized, {input_mean}),
      {input_std});

  // This runs the GraphDef network definition that we've just constructed, and
  // returns the results in the output tensor.
  tensorflow::GraphDef graph_def;
  TF_RETURN_IF_ERROR(root.ToGraphDef(&graph_def));

  tensorflow::SessionOptions session_options;
  session_options.config.mutable_gpu_options()->set_visible_device_list("0");
  session_options.config.mutable_gpu_options()->set_allow_growth(true);
  session_options.config.set_allow_soft_placement(true);
  session->reset(tensorflow::NewSession(session_options));
  tensorflow::graph::SetDefaultDevice("/cpu:0", &graph_def);
  TF_RETURN_IF_ERROR((*session)->Create(graph_def));
  return Status::OK();
}

I'm using Inception_v3 as specified in the main.cc and want to run inference on 1000 images. Each thread runs 500 images each in parallel for efficient runtime.
But at the end of the program, I'm getting the following error
[8.853 s] Finished running 1000 images successfully
2019-01-26 21:59:10.712562: F tensorflow/stream_executor/cuda/cuda_driver.cc:206] Check failed: CUDA_SUCCESS == cuCtxSetCurrent(cuda_context->context()) (0 vs. 4)
Aborted (core dumped)

I searched the issues history and seems other people are facing the similar problem but no successful resolution has been metioned
https://github.com/tensorflow/tensorflow/issues/3509
https://github.com/tensorflow/tensorflow/issues/10961
https://github.com/tensorflow/tensorflow/issues/526
In the issue #526, one of the owners of the StreamExecutor has mentioned some resolution
https://github.com/tensorflow/tensorflow/issues/526#issuecomment-236259722
But it is not working for me.
Can someone please help me to fix this error and use multiple gpus with multiple threads in a single program.
Thank you
Code to reproduce the issue
My sample code:

int Initialize(const string& graph_file_name, int i_nthreads) {
  int32 input_width = 299;
  int32 input_height = 299;
  float input_mean = 0;
  float input_std = 255;
  nthreads = i_nthreads;

  // Initialize all sessions;
  for(int i = 0; i < nthreads; i++) {

    int threadid = i;
    if(threadid == 0) {
      LoadGraph(graph_file_name, &global_session_00, 0);
    } else if (threadid == 1) {
      LoadGraph(graph_file_name, &global_session_10, 1);
    }
  }

  LoadImageResizeGraph(&global_session_01, input_height, input_width, input_mean, input_std);
}

void *Perform_Computation_Parallel(void *arg1)
{

  string input_layer = "input";
  string output_layer = "InceptionV3/Predictions/Reshape_1";

  int threadid = (int)(((size_t)(arg1)));
  printf("threadid %d\n", threadid);

  std::shared_ptr<tensorflow::Session> session;
  if(threadid == 0) {
    session = global_session_00;
  } else if(threadid == 1) {
    session = global_session_10;
  }

  char *image_path = (char *)malloc(1000000);
  for(int r = threadid; r < global_number_of_images; r += nthreads)
  {
    sprintf(image_path, "%s", global_images[r]);
    printf("%s --------> %d \n", image_path, threadid);

    std::string image_file(image_path);
    std::vector<Tensor> resized_tensors;

    // read file_name into a tensor named input
    Tensor input_image(tensorflow::DT_STRING, tensorflow::TensorShape());

    ReadEntireFile(tensorflow::Env::Default(), image_file, &input_image);

    Status run_resize_status = global_session_01->Run({{"input", input_image}},
                                      {"normalized"}, {}, &resized_tensors);

    if (!run_resize_status.ok()) {
      LOG(ERROR) << "Running resize graph failed: " << run_resize_status;
    }
    // else if(run_resize_status.ok()){
    //   std::cout << "successfully resized image "<< image_file << "\n";
    // }

    // Status read_tensor_status =
    //         ReadTensorFromImageFile(image_file, input_height, input_width, input_mean,
    //                                 input_std, &resized_tensors);
    // if (!read_tensor_status.ok()) {
    //   LOG(ERROR) << read_tensor_status;
    //   //return -1;
    // }
    const Tensor& resized_tensor = resized_tensors[0];

    // Actually run the image through the model.
    std::vector<Tensor> outputs;
    Status run_status = session->Run({{input_layer, resized_tensor}},
                                     {output_layer}, {}, &outputs);
    if (!run_status.ok()) {
      LOG(ERROR) << "Running model failed: " << run_status;
      //return -1;
    }
  }

}

void Perform_Computation(void)
{
    for(long long int i = 1; i < nthreads; i++) pthread_create(&threads[i], NULL, Perform_Computation_Parallel, (void *)(i));
    Perform_Computation_Parallel(0);
    for(long long int i = 1; i < nthreads; i++) pthread_join(threads[i], NULL);
}

int main(int argc, char* argv[]) {
  //printf("Hello World!!!\n");

  // These are the command-line flags the program can understand.
  // They define where the graph and input data is located, and what kind of
  // input the model expects. If you train your own model, or use something
  // other than inception_v3, then you'll need to update these.
  string image = "./data/grace_hopper.jpg";
  string graph =
      "./data/inception_v3_2016_08_28_frozen.pb";
  string labels =
      "./data/imagenet_slim_labels.txt";
  int32 input_width = 299;
  int32 input_height = 299;
  float input_mean = 0;
  float input_std = 255;
  string input_layer = "input";
  string output_layer = "InceptionV3/Predictions/Reshape_1";
  bool self_test = false;
  string root_dir = "";
  string test_file = "./data/images/test_images_1000.txt";
  string out_file = "./data/results/test_results_1000.txt";

  //nthreads = 2;
  int ret_init_val = Initialize(graph, nthreads);
  std::cout << " Initialization done --------------------------\n";
  FILE *fp = fopen(test_file.c_str(), "r");
  int nol = 0;

  char *line = (char *)malloc(2048);

  while (!feof(fp))
  {
    line[0] = '\0';
    fgets(line, 2048, fp);
    if (line[0] == '\0')  break;
    nol++;
  }
  fclose(fp);

  global_number_of_images = nol;

  global_images = (char **)malloc(global_number_of_images * sizeof(char *));

  fp = fopen(test_file.c_str(), "r");
  for(int q = 0; q < global_number_of_images; q++)
  {
    line[0] = '\0';
    fgets(line, 2048, fp);
    line[strlen(line)-1] = '\0';
    global_images[q] = (char *)malloc(strlen(line)+10);
    sprintf(global_images[q], "%s", line);
  }
  fclose(fp);
  double t0 = elapsed();
  Perform_Computation();
  printf ("[%.3f s] Finished runnning %d images successfully\n", elapsed() - t0, nol);
  return 0;
}

Hi @azaks2 ,
Can you please let me know if I'm doing something wrong here ? Or how can I resolve this issue to efficiently use both of my GPUs at inference time in two separate sessions ?
Thank you

Ping.. Any update on this one ? Is there a way I can resolve this issue ?

@tumusudheer sorry for the late response. I was trying to reproduce your problem. Your repro code is incomplete and missing things like the model file, the #includes, build script, etc. It would be very helpful if you could provide a complete example. Thanks.

Hi @aaroey,
Thank you very much. I pushed the code to my git
Please let me know if you have any trouble accessing the code.
The .so file is compiled using bazel build --config=cuda //tensorflow:libtensorflow_cc.so please refer to README file
Basically I've a bunch of images (assume 1000),  and I've two gpus. I want to create two sessions, each one using one gpu.  And want to run two parallel threads so that each thread can take a session and run inference for half of the input images (500) each. So in that way to gpus are sharing the load. Preporcessing such as resizing the images should be handled by cpu.
I'm using inceptionv3 graph as given here
Thank you

Thanks for the code. I ran it with TF HEAD instead of r1.12 and it seemed to work well, below are the logs:
++ ./bin/main_multiple_images_parallel_gpu.out
.. IN load graph 0
2019-05-13 13:23:32.728379: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-05-13 13:23:32.765179: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency:<PHONE_NUMBER> Hz
2019-05-13 13:23:32.769016: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x561cc3c7f1b0 executing computations on platform Host. Devices:
2019-05-13 13:23:32.769043: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined>
2019-05-13 13:23:32.772489: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcuda.so.1
2019-05-13 13:23:33.310919: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x561cc3d39010 executing computations on platform CUDA. Devices:
2019-05-13 13:23:33.310986: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): TITAN V, Compute Capability 7.0
2019-05-13 13:23:33.311001: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (1): Quadro M2000, Compute Capability 5.2
2019-05-13 13:23:33.312823: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1638] Found device 0 with properties:
name: TITAN V major: 7 minor: 0 memoryClockRate(GHz): 1.455
pciBusID: 0000:04:00.0
2019-05-13 13:23:33.313799: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1638] Found device 1 with properties:
name: Quadro M2000 major: 5 minor: 2 memoryClockRate(GHz): 1.1625
pciBusID: 0000:03:00.0
2019-05-13 13:23:33.317937: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1705] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda compute capability 5.2. The minimum required Cuda capability is 7.0.
2019-05-13 13:23:33.317970: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1751] Adding visible gpu devices: 0
2019-05-13 13:23:33.318438: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.9.0
2019-05-13 13:23:33.320926: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1179] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-05-13 13:23:33.320958: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1185]      0 1
2019-05-13 13:23:33.320976: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1198] 0:   N N
2019-05-13 13:23:33.320990: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1198] 1:   N N
2019-05-13 13:23:33.323733: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1324] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10508 MB memory) -> physical GPU (device: 0, name: TITAN V, pci bus id: 0000:04:00.0, compute capability: 7.0)
.. IN load graph 1
2019-05-13 13:23:33.572213: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1638] Found device 0 with properties:
name: TITAN V major: 7 minor: 0 memoryClockRate(GHz): 1.455
pciBusID: 0000:04:00.0
2019-05-13 13:23:33.572805: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1638] Found device 1 with properties:
name: Quadro M2000 major: 5 minor: 2 memoryClockRate(GHz): 1.1625
pciBusID: 0000:03:00.0
2019-05-13 13:23:33.575175: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1705] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda compute capability 5.2. The minimum required Cuda capability is 7.0.
2019-05-13 13:23:33.575195: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1751] Adding visible gpu devices: 0
2019-05-13 13:23:33.575247: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1179] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-05-13 13:23:33.575259: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1185]      0 1
2019-05-13 13:23:33.575268: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1198] 0:   N N
2019-05-13 13:23:33.575276: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1198] 1:   N N
2019-05-13 13:23:33.576871: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1324] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10508 MB memory) -> physical GPU (device: 0, name: TITAN V, pci bus id: 0000:04:00.0, compute capability: 7.0)
2019-05-13 13:23:33.736453: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1638] Found device 0 with properties:
name: TITAN V major: 7 minor: 0 memoryClockRate(GHz): 1.455
pciBusID: 0000:04:00.0
2019-05-13 13:23:33.737695: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1751] Adding visible gpu devices: 0
2019-05-13 13:23:33.737739: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1179] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-05-13 13:23:33.737753: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1185]      0
2019-05-13 13:23:33.737762: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1198] 0:   N
2019-05-13 13:23:33.739178: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1324] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10508 MB memory) -> physical GPU (device: 0, name: TITAN V, pci bus id: 0000:04:00.0, compute capability: 7.0)
 Initialization done --------------------------
threadid 0
./data/grace_hopper.jpg --------> 0
threadid 1
./data/grace_hopper.jpg --------> 1
2019-05-13 13:23:33.748316: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1328] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set.  If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU.  To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
2019-05-13 13:23:37.116325: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
MOdel ran succesfully : output size MOdel ran succesfully : output size 11

[5.178 s] Finished runnning 2 images successfully
2019-05-13 13:23:39.110162: E tensorflow/stream_executor/event.cc:34] error destroying CUDA event in context 0x7f627888eb80: UNKNOWN ERROR (4)
2019-05-13 13:23:39.118689: E tensorflow/stream_executor/event.cc:34] error destroying CUDA event in context 0x7f627888eb80: UNKNOWN ERROR (4)

There are errors at the end about failures of destroying cuda events, but I think they're not related to this issue. So would you help to check that the problem is gone with TF master branch?
I also did a minor change to your code:
$ git diff src/main_multiple_images_parallel.cc
diff --git a/src/main_multiple_images_parallel.cc b/src/main_multiple_images_parallel.cc
index ebc498c4..18e06185 100644
--- a/src/main_multiple_images_parallel.cc
+++ b/src/main_multiple_images_parallel.cc
@@ -171,7 +171,7 @@ Status LoadGraph(const string& graph_file_name,
   }
   tensorflow::SessionOptions session_options;
   if(i_threadid == 0) {
-    session_options.config.mutable_gpu_options()->set_visible_device_list("0");
+    session_options.config.mutable_gpu_options()->set_visible_device_list("0,1");
     tensorflow::graph::SetDefaultDevice("/device:GPU:0", &graph_def);
   } else if(i_threadid == 1) {
     session_options.config.mutable_gpu_options()->set_visible_device_list("0,1");

as otherwise there would be gpu device initialization problems.

Sorry, in my run above it actually ignored my second GPU. I'll retry and get back later.

Hi @aaroey,
Just checking if you are waiting for me to check something from my side ? Did you find the reason for the error and how to fix it?
Thank you

@tumusudheer I can reproduce the error now. From the cuda documentation:
CUDA_ERROR_DEINITIALIZED = 4
This indicates that the CUDA driver is in the process of shutting down.

I'm not sure what caused that, maybe something related to stream executor.
@chsigg could you help to take a look?

Thank you very much @aaroey.

Ugh, yeah -- session options are weird. You cannot have two sessions with different visible_device_list. The config is statically initialized along with the first session.
What I've done in the past is to update the graph to assign the nodes to one or the other GPU:
https://github.com/mlperf/training/blob/e8237dc295deab8f9064dc2e0651c8234710c0d5/reinforcement/tensorflow/minigo/cc/dual_net/tf_dual_net.cc#L136
Let me know if this works.

Thanks for the code. I ran it with TF master instead of r1.12 and it seemed to work well, below are the logs:
++ ./bin/main_multiple_images_parallel_gpu.out
.. IN load graph 0
2019-05-13 13:23:32.728379: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
2019-05-13 13:23:32.765179: I tensorflow/core/platform/profile_utils/cpu_utils.cc:94] CPU Frequency:<PHONE_NUMBER> Hz
2019-05-13 13:23:32.769016: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x561cc3c7f1b0 executing computations on platform Host. Devices:
2019-05-13 13:23:32.769043: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): <undefined>, <undefined>
2019-05-13 13:23:32.772489: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcuda.so.1
2019-05-13 13:23:33.310919: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x561cc3d39010 executing computations on platform CUDA. Devices:
2019-05-13 13:23:33.310986: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (0): TITAN V, Compute Capability 7.0
2019-05-13 13:23:33.311001: I tensorflow/compiler/xla/service/service.cc:175]   StreamExecutor device (1): Quadro M2000, Compute Capability 5.2
2019-05-13 13:23:33.312823: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1638] Found device 0 with properties:
name: TITAN V major: 7 minor: 0 memoryClockRate(GHz): 1.455
pciBusID: 0000:04:00.0
2019-05-13 13:23:33.313799: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1638] Found device 1 with properties:
name: Quadro M2000 major: 5 minor: 2 memoryClockRate(GHz): 1.1625
pciBusID: 0000:03:00.0
2019-05-13 13:23:33.317937: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1705] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda compute capability 5.2. The minimum required Cuda capability is 7.0.
2019-05-13 13:23:33.317970: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1751] Adding visible gpu devices: 0
2019-05-13 13:23:33.318438: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudart.so.9.0
2019-05-13 13:23:33.320926: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1179] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-05-13 13:23:33.320958: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1185]      0 1
2019-05-13 13:23:33.320976: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1198] 0:   N N
2019-05-13 13:23:33.320990: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1198] 1:   N N
2019-05-13 13:23:33.323733: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1324] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10508 MB memory) -> physical GPU (device: 0, name: TITAN V, pci bus id: 0000:04:00.0, compute capability: 7.0)
.. IN load graph 1
2019-05-13 13:23:33.572213: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1638] Found device 0 with properties:
name: TITAN V major: 7 minor: 0 memoryClockRate(GHz): 1.455
pciBusID: 0000:04:00.0
2019-05-13 13:23:33.572805: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1638] Found device 1 with properties:
name: Quadro M2000 major: 5 minor: 2 memoryClockRate(GHz): 1.1625
pciBusID: 0000:03:00.0
2019-05-13 13:23:33.575175: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1705] Ignoring visible gpu device (device: 1, name: Quadro M2000, pci bus id: 0000:03:00.0, compute capability: 5.2) with Cuda compute capability 5.2. The minimum required Cuda capability is 7.0.
2019-05-13 13:23:33.575195: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1751] Adding visible gpu devices: 0
2019-05-13 13:23:33.575247: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1179] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-05-13 13:23:33.575259: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1185]      0 1
2019-05-13 13:23:33.575268: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1198] 0:   N N
2019-05-13 13:23:33.575276: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1198] 1:   N N
2019-05-13 13:23:33.576871: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1324] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10508 MB memory) -> physical GPU (device: 0, name: TITAN V, pci bus id: 0000:04:00.0, compute capability: 7.0)
2019-05-13 13:23:33.736453: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1638] Found device 0 with properties:
name: TITAN V major: 7 minor: 0 memoryClockRate(GHz): 1.455
pciBusID: 0000:04:00.0
2019-05-13 13:23:33.737695: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1751] Adding visible gpu devices: 0
2019-05-13 13:23:33.737739: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1179] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-05-13 13:23:33.737753: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1185]      0
2019-05-13 13:23:33.737762: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1198] 0:   N
2019-05-13 13:23:33.739178: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1324] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 10508 MB memory) -> physical GPU (device: 0, name: TITAN V, pci bus id: 0000:04:00.0, compute capability: 7.0)
 Initialization done --------------------------
threadid 0
./data/grace_hopper.jpg --------> 0
threadid 1
./data/grace_hopper.jpg --------> 1
2019-05-13 13:23:33.748316: W tensorflow/compiler/jit/mark_for_compilation_pass.cc:1328] (One-time warning): Not using XLA:CPU for cluster because envvar TF_XLA_FLAGS=--tf_xla_cpu_global_jit was not set.  If you want XLA:CPU, either set that envvar, or use experimental_jit_scope to enable XLA:CPU.  To confirm that XLA is active, pass --vmodule=xla_compilation_cache=1 (as a proper command-line flag, not via TF_XLA_FLAGS) or set the envvar XLA_FLAGS=--xla_hlo_profile.
2019-05-13 13:23:37.116325: I tensorflow/stream_executor/platform/default/dso_loader.cc:42] Successfully opened dynamic library libcudnn.so.7
MOdel ran succesfully : output size MOdel ran succesfully : output size 11

[5.178 s] Finished runnning 2 images successfully
2019-05-13 13:23:39.110162: E tensorflow/stream_executor/event.cc:34] error destroying CUDA event in context 0x7f627888eb80: UNKNOWN ERROR (4)
2019-05-13 13:23:39.118689: E tensorflow/stream_executor/event.cc:34] error destroying CUDA event in context 0x7f627888eb80: UNKNOWN ERROR (4)

There are errors at the end about failures of destroying cuda events, but I think they're not related to this issue. So would you help to check that the problem is gone with TF master branch?
I also did a minor change to your code:
$ git diff src/main_multiple_images_parallel.cc
diff --git a/src/main_multiple_images_parallel.cc b/src/main_multiple_images_parallel.cc
index ebc498c4..18e06185 100644
--- a/src/main_multiple_images_parallel.cc
+++ b/src/main_multiple_images_parallel.cc
@@ -171,7 +171,7 @@ Status LoadGraph(const string& graph_file_name,
   }
   tensorflow::SessionOptions session_options;
   if(i_threadid == 0) {
-    session_options.config.mutable_gpu_options()->set_visible_device_list("0");
+    session_options.config.mutable_gpu_options()->set_visible_device_list("0,1");
     tensorflow::graph::SetDefaultDevice("/device:GPU:0", &graph_def);
   } else if(i_threadid == 1) {
     session_options.config.mutable_gpu_options()->set_visible_device_list("0,1");

as otherwise there would be gpu device initialization problems.

hi @aaroey , i came up with the same error when using multiple sessions on different GPUs.
the error occurs when destroying CUDA context at the end of my program,  which is the same as yours . have you figure it out?

2019-07-10 12:02:06.644458: E tensorflow/stream_executor/event.cc:34] error destroying CUDA event in context 0x37bb990: UNKNOWN ERROR (4)
2019-07-10 12:02:06.644493: E tensorflow/stream_executor/event.cc:34] error destroying CUDA event in context 0x37bb990: UNKNOWN ERROR (4)
2019-07-10 12:02:06.644507: E tensorflow/stream_executor/event.cc:34] error destroying CUDA event in context 0x37bb990: UNKNOWN ERROR (4)
2019-07-10 12:02:06.644512: E tensorflow/stream_executor/event.cc:34] error destroying CUDA event in context 0x37bb990: UNKNOWN ERROR (4)

Closing because of lack of activity.  If you want to reopen please first try @chsigg 's suggestion.

I have the same problem. This problem may be caused by cudaSetDevice again。
First load savedmode not have the problem， Second load savedmode caused the problem, because cudaSetDevicem could reset context.
The cudaSetDevicem,  If the current context bound to the calling thread is not the primary context, this call will bind the primary context to the calling thread and all the subsequent memory allocations, stream and event creations, and kernel launches will be associated with the primary context.
https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb

I have the same problem. This problem may be caused by cudaSetDevice again。 First load savedmode not have the problem， Second load savedmode caused the problem, because cudaSetDevicem could reset context. The cudaSetDevicem, If the current context bound to the calling thread is not the primary context, this call will bind the primary context to the calling thread and all the subsequent memory allocations, stream and event creations, and kernel launches will be associated with the primary context. https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb

I have the same problem. This problem may be caused by cudaSetDevice again。 First load savedmode not have the problem， Second load savedmode caused the problem, because cudaSetDevicem could reset context. The cudaSetDevicem, If the current context bound to the calling thread is not the primary context, this call will bind the primary context to the calling thread and all the subsequent memory allocations, stream and event creations, and kernel launches will be associated with the primary context. https://docs.nvidia.com/cuda/cuda-runtime-api/group__CUDART__DEVICE.html#group__CUDART__DEVICE_1g159587909ffa0791bbe4b40187a4c6bb

I met it today. How can I solve it


Running pip3 install -r requirements.txt breaks jupyter installation

I installed jupyter using pip3 following these instructions on an otherwise clean system running Ubuntu 19.10. I then attempted to install IHaskell, but when I reach the step
pip3 install -r requirements.txt

it breaks my installation of jupyter notebook. When I try to start up a python kernel, I get the following message:
ModuleNotFoundError: No module named 'prompt_toolkit.formatted_text'

It repeatedly tries to start the kernel but fails to do so.
Update: Temporary fix by skipping pip3 install -r requirements.txt
I rolled my system back to it's state before I attempted to install IHaskell. My jupyter installation works again.
I went through the installation again, this time the only difference being that I skipped the pip3 install -r requirements.txt command.
The install completed successfully and I'm able to properly use IHaskell, however I believe that requirements.txt needs to be fixed as it uninstalled IPython and left my jupyter notebook in a broken state.

The instructions assume a clean system without Jupyter installed. I've updated requirements.txt and the README to reflect this.


Upgrade python packages.

@peterbe r?

Travis checks this automatically, right? Its tests installs this, right? If so, automatic r+ if travis says so :)

yap! gracias :)


feat(page): use MaterialUI in the  404 page

Based on our team's decision, we no longer require approval of the refactoring pull request. Instead, we will review and approve the refactoring once all changes related to a specific component have been completed.
⚠ The text can have not the same font size as the original design, due to the Typography of Material Kit.
It's possible to adjust after all changes are done in the end.
Covers https://github.com/process-analytics/process-analytics.dev/issues/831

BeforeNow


[Features] - adds support to open a selection of files

@ahmed-dj - are you happy for me to merge this in?

@a-r-j  I only tested it in debug mode and it worked fine. If you're happy with it, sure.

@a-r-j Very happy to contribute :) Thank for this extension, it is really useful! As you may have guessed, I initially wanted to open any combination of selected/clicked files in the explorer but VSCode API doesn't seem to support that functionality unfortunately (see https://github.com/microsoft/vscode/issues/3553) :confused:


Add all-inclusive ES6 module

This is my solution to https://github.com/material-components/material-components-web/issues/4507.
Since I plan on using mdc in a plain ES6 environment, I made this PR so that mdc may adopt the new version to enable just that.
In terms of output, only the esm file and its source map are new, the rest of the files should stay the same.

Well they have been changed slightly:

The npm deps are now inlined in the dist file. Which is o'right in this case I guess?
(PR looks great.)

Any chance that will get merged? Having the same issue with importing material-components-web.

@TpmKranz Thanks for this PR! I'm a new maintainer, trying to catch-up on things here. 😄  tabbable provides an ESM build with rollup similar to your solution here, so I'm going to see if I can update this branch after all the changes to master since, and take it in.
This would fix #30


Fix layout of header on ie11

The header is currently laying out funky on ie11. This fixes it.

@jkfcheng @rafibomb please review - I removed shrink on the hero image b/c it didn't appear to be needed or helpful, but I want to make sure you didn't have that on there a reason I'm not understanding.


Build mode

Introduces BuildMode with release and debug values.
This is not an enum, but a collection with two opaque objects. (Similar to Target.) This way adding more values later will not be a breaking change.
Package c_compiler picks up the configuration and sets either the DEBUG or RELEASE macro to 1.
We should probably do the mapping from BuildMode to defines in build.dart files, because it might be project specific. The defines should be added to the CBuilder constructors or run function. (Filed https://github.com/dart-lang/native/issues/61 to track this.)
Bug:

https://github.com/dart-lang/native/issues/50

coverage: 99.338% (-0.07%) from 99.404% when pulling c0e8d4436485681bf144f918b0c55f36e05c5f7d on build-mode into 973f3ed93dace19864903e17e771a44a2d9955b7 on main.


squash commits.

squash commits
ea61a3b295ac7dfdc2d9d1b5593c63fb1a190077
and
50dc32b4bbc99a133fd11ad6178c7cd8c41bb36c

dont worry about the commit message. :0

@bluebill1049 github generates new commit with postfix number PR. I think you can squash directly to master.

it's all good @ejuo , not going to be too fuzzy about a commit message. as long as release note have the correct information for the next publish.


How to solve the problem of slow loading of k8s resource data?

Clicking on the pods list or other tags randomly results in very slow data loading

Hello @daypy thanks so much for trying.
We use kubewall daily on a large clusters things are working well for us.
Are you using it behind some VPN ?
Can you please add more details about the cluster and how you use it, it will be a great help.
There is an option to set --k8s-client-burst and --k8s-client-qps which will help in a performance boost.
kubewall --k8s-client-qps 200 --k8s-client-burst 200

kubewall --k8s-client-qps 200 --k8s-client-burst 200

I have same problem. Also i have VPN between kubewall and k8s-cluster.


Intel Fixes & Multiselect

Added the ability to multi select using ctrl + click
Added the ability to right click "collect" intel from the list
Added more options for selecting/deselecting all items shown (all items currently filtered)
Added options to mark all selected as collected or not

Lost Souls: Piotr 4
Season 6
Audio Logs
Dark Aether
id: DS6Au2
cant be collected


Restore support for map arguments

Support for map (i.e. keyed collection) arguments was dropped in HTTP-RPC 3.0. This feature could potentially be restored, and could also add support for URL values.
The key for a URL map could be the file name. This would preclude sending multiple files with the same name; however, in this case a List argument could be used instead.

Closing. While this might be an interesting feature, it isn't strictly necessary. It would needlessly complicate both the implementation and documentation.


Spanish full text search does not get records containing value with special chars.

OrientDB Version: 3.0.14
OS: Mac OS X 10.14.2
Expected behavior
I would like to get results containing special chars in Spanish. Is there a solution for a case like this yet?
Actual behavior
There are no results when I try to search for "arb" and I wish to get results containing also "árb". The issue is caused by special char "á" in the field.
SELECT * FROM Table1 WHERE SEARCH_CLASS("arb*") = true; does get 0 results.
Steps to reproduce
CREATE CLASS Table1 IF NOT EXISTS EXTENDS V;
CREATE PROPERTY Table1.field STRING;
CREATE INDEX Table1.field ON Table1(field) FULLTEXT ENGINE LUCENE METADATA { "default": "org.apache.lucene.analysis.es.SpanishAnalyzer" };

CREATE VERTEX Table1 SET field = 'árbol';

My current solution is Javascript custom function :
if (columnValue !== undefined && columnValue !== null && needle !== undefined && needle !== null ) {

    var replacements = [
        [/\s/g, ""],
        [/[àáâãäå]/g, "a"],
        [/æ/g, "ae"],
        [/ç/g, "c"],
        [/[èéêë]/g, "e"],
        [/[ìíîï]/g, "i"],
        [/ñ/g, "n"],
        [/[òóôõö]/g, "o"],
        [/œ/g, "oe"],
        [/[ùúûü]/g, "u"],
        [/[ýÿ]/g, "y"],
        [/\W/g, ""]
    ];

    var columnValue = columnValue.toLowerCase();

    // Replace column value
    for (var i = 0; i < replacements.length; i++) {

        columnValue = columnValue.replace(
            new RegExp(replacements[i][0]), replacements[i][1]
        );

    }

    var needle = needle.toLowerCase();

    // Replace needle
    for (var i = 0; i < replacements.length; i++) {

        needle = needle.replace(
            new RegExp(replacements[i][0]), replacements[i][1]
        );

    }

    return (columnValue.indexOf(needle) !== -1);

}

return false;

CREATE FUNCTION CompareInSpanish "!!!function code above!!!" PARAMETERS [columnValue, needle] LANGUAGE Javascript;
This is used in the most used query of my app so my concern is the speed. Should I be worried?

Hi @petervavro
with your setup and this query
SELECT * FROM Table1 WHERE SEARCH_CLASS("arb*") = true;

i get the results


K8SPXC-738: Add serviceLabels example in cr.yaml

https://jira.percona.com/browse/K8SPXC-738

Test name
Status

haproxy
passed

upgrade-haproxy
passed

big-data
passed

storage
passed

recreate
passed

scaling
passed

scheduled-backup
passed

self-healing
passed

self-healing-chaos
passed

scaling-proxysql
passed

init-deploy
passed

restore-to-encrypted-cluster
passed

security-context
passed

upgrade-proxysql
passed

self-healing-advanced
passed

self-healing-advanced-chaos
passed

limits
passed

monitoring-2-0
passed

demand-backup
passed

smart-update
passed

affinity
passed

operator-self-healing
passed

operator-self-healing-chaos
passed

one-pod
passed

auto-tuning
passed

proxysql-sidecar-res-limits
passed

pitr
passed

users
passed

upgrade-consistency
passed

tls-issue-self
passed

tls-issue-cert-manager
passed

demand-backup-encrypted-with-tls
passed

tls-issue-cert-manager-ref
passed

validation-hook
passed

commit: https://github.com/percona/percona-xtradb-cluster-operator/pull/1069/commits/bd7e256e8489a607034921357403e520e5c26bbd
image: perconalab/percona-xtradb-cluster-operator:PR-1069-bd7e256e


More Doc comments

Is your feature request related to a problem? Please describe.
Going to individual parts of the API should be document with short usage examples.  For instance going to fltk::group::Group should give a very basic usage.
Describe the solution you'd like
multiline comments including
// actual examples

Describe alternatives you've considered
remembering everything without needing it.
Additional context
Some things from the original API docs are not clearly documented.
I can document code decently, I just do not know where it should go.  If you give me direction I will make PRs as I go through.

Hi
I plan to provide nore thorough examples in the doc comments. There is also a new nightly feature in rustdoc which basically scrapes the examples directory for usage examples, so people using docs.rs would see more usage examples for structs and methods.

Really?  That feature sounds great!  I've been meaning to ask them about allowing ```rs in Doc Comments so I can copy paste README.md and vice versa, retaining syntax highlighting in both...


Garbaled text file instead of robots.txt in browser

This package is configured properly on my local machine. However when I pushed it on our staging server (apache + uwsgi), it is behaving weirdly.
When I go to https://test.mysite.com/robots.txt, it actually downloads the file of same name(robots.txt), but I cannot open it in gedit. cat command shows garbled texts in it.
Googled about this but couldn't find specific info.
What could be the problem here?

Looks like an encoding issue. Could you check through the inspector the file encoding when downloading from apache?

See this screenshot. This is what I'm getting.

Used this library to find out encoding.
https://github.com/BYVoid/uchardet
It shows ascii/unknown.

Through curl, it looks OK. I don't know what is the problem with browser.
I tried logging response objects at each middleware and all looked ok. Even in curl, it looks ok. But in browser the response looks garbled.
I tried this command to dump the headers through curl.
curl -s -D - http://<IP_ADDRESS>/robots.txt /dev/null
Response Header:
HTTP/1.1 200 OK
Vary: Cookie
X-Frame-Options: SAMEORIGIN
Content-Type: text/plain

Above response also looks ok to me. But in browser it is garbled. I wondor whether bots will be able to parse this robots.txt file

@arayate how about the response dump from the browser? 99% there is some error in the browser-server content negotiation, outside the scope of robots application.
If curl looks good, I bet bots will get the right file from the server

There are a few possible reasons for this issue:

Misconfiguration of the Apache server or uWSGI: Check your Apache and uWSGI configuration files to ensure you're serving the correct robots.txt file and routing requests properly. You might want to look at the Alias and RewriteRule directives in your Apache configuration file as they are used to define paths for static files. For uWSGI, ensure that the correct application is being served.

Improper file encoding: This is less likely since you mentioned the file shows ASCII/unknown encoding, but it's still worth checking. Make sure your robots.txt file is saved with the proper encoding, such as UTF-8.

Server/Operating system-specific issues: Some operating systems or configurations might cause issues when reading or serving text files. Ensure your server is up-to-date and configured correctly.

It's also important to ensure that your django-robots configuration is correct in your Django settings. Double-check that the ROBOTS_USE_SITEMAP and other settings are set correctly, and that the package is included in your INSTALLED_APPS. If you have not done so already, also make sure to restart your Apache and uWSGI services after changes have been made.
As a side note, consider testing your setup with a different browser and/or incognito mode to rule out any browser cache or session-specific issues.

It's possible that the issue you are experiencing with the robots.txt file being garbled is related to an incorrect server or file encoding. Since the Content-Type of the file is set to text/plain, it's likely that the encoding used on the server is not compatible with the encoding used by your local machine.
To fix this issue, you should try changing the encoding of the file to a compatible encoding, such as UTF-8. You could also try adding an Accept-Encoding header to your curl command to specify an encoding that is compatible with your local machine.
Here's an example of how to change the encoding of the robots.txt file to UTF-8 in Django:

Open the robots/views.py file in the django-robots package.

Add the following import at the top of the file:
from django.http import HttpResponse

Modify the RobotsView class to return an HttpResponse object with the appropriate encoding:

class RobotsView(View):
def get(self, request, *args, **kwargs):
content = render_to_string('robots/robots.txt', {'url': get_current_site(request)})
# Set the encoding of the file to UTF-8
response = HttpResponse(content, content_type='text/plain; charset=utf-8')
return response
This code will render the robots.txt template and return an HttpResponse object with the appropriate encoding set to UTF-8.
Another option is to check the encoding of the robots.txt file on the server and ensure that it is compatible with the encoding used by your local machine. You could also try using a different text editor or tool to download the file and see if that resolves the issue.


AppTheme & SystemTheme functions

#14

Added the ability to set system and app themes. No Explorer restart is required.
This contribution is my original work.
I license the work under the project's open source license.

Don't think this repo is monitored so closing :)


Conventions to migration names – why and how?

[root@virtualbox]-[/var/www/myprojectdir]-[git feature/phinx]
# phinx create v133
Phinx by Rob Morgan - https://phinx.org. version 0.4.6

using config file ./phinx.yml
using config parser yaml
using migration path /var/www/myprojectdir/migrations

  [InvalidArgumentException]
  The migration class name "v133" is invalid. Please use CamelCase format.

create [-c|--configuration CONFIGURATION] [-p|--parser PARSER] [-t|--template TEMPLATE] [-l|--class CLASS] [--] <name>

What's wrong? How can i start and use my application versioning with Phinx?

Hi Roman,
You can't. You must use CamelCase notation when creating your migrations.
Try Version133 instead. It may work but I'm not in front of my computer.
Alternatively read the docs for more information.
Regards,
Rob

On 21 Oct 2015, at 12:17 AM, Roman<EMAIL_ADDRESS>wrote:
[root@virtualbox]-[/var/www/myprojectdir]-[git feature/phinx]
phinx create v133
Phinx by Rob Morgan - https://phinx.org. version 0.4.6
using config file ./phinx.yml
using config parser yaml
using migration path /var/www/myprojectdir/migrations
[InvalidArgumentException]
The migration class name "v133" is invalid. Please use CamelCase format.
create [-c|--configuration CONFIGURATION] [-p|--parser PARSER] [-t|--template TEMPLATE] [-l|--class CLASS] [--]
What's wrong? How can i start and use my application versioning with Phinx?
—
Reply to this email directly or view it on GitHub.

@robmorgan , ah, okay, thank you, that was my bad. "V133" works fine. I was suprised when "versionApp133" triggers same error.


Running automatically from VSTS online

Hi,
Can anyone help me setting Easy Repro up for running in VSTS online, scheduled or within builds?
or guide me in the right way..
Kind regards,
Rick

Hi @rbasten - Are you looking for something like the following: Run Your Independent Automated Tests Using vNext Build In Visual Studio Online

I can discuss this with the team in further detail to see if we can consider setting up a Wiki article to outline this scenario. If you find that the article above will suit your needs, please let me know!
Best Regards,
Tyler

Are you still having difficulties here? I've set up a full automated Azure DevOps with easy repro, Specflow and MsTest. The tests can be easily executed on demand or scheduled.


async: use some sort of chunking when calling put()/get()

The current implementation of async put runs all _put_file calls under the hood concurrently, which results with python opening all files at the same time and possibly hitting the open file limit.
https://github.com/intake/filesystem_spec/blob/39f5137a66040ea70ede0f4a0e81d12ab41fd80d/fsspec/asyn.py#L205-L219
The limit that the user hits can be configured (ulimit) though I think it makes sense for fsspec to adjust the defaults (maybe spawn 200 coroutines at most, and then put these into a loop of running, done = wait(bunch) + coros.update(create_coros(200 - len(running))).

That sounds like a good idea. I think gcsfs might happen to do this already.


kubernetes-helm: Bring sample up to date with latest prometheus helm chart

Thanos, Prometheus and Golang version used: Thanos v0.31.0 Prometheus helm chart v 20.0.2

Object Storage Provider: NA
What happened:
The sidecar configuration for the official prometheus helm chart is not up to date (https://github.com/thanos-io/thanos/tree/main/tutorials/kubernetes-helm):

It doesn't know that configmapReload can be simply disabled
it doesn't describe the solution for the alert manager.
sidecarContainers is no longer an array
even after doing the changes to fix the above, it fails mounting the new volumes and secrets.

What you expected to happen:
To find a working configuration with the latest prometheus chart version.
How to reproduce it (as minimally and precisely as possible): Try to run the configuration from the docs
Full logs to relevant components: NA

Anything else we need to know: NA

Thanks for flagging this @rubenvw-ngdata, if you'd be up to working on this let me know 🙂

@matej-g So far I haven't got it working yet. If I get it working, I can share the configuration.

Hi @matej-g, can I pick this task

@TheSwarnim Go for it!

Hi @TheSwarnim, is there any progress on this?

I would like to work on this now @rubenvw-ngdata Sir
Please assign


[Release 1.23] Add flannel-external-ip when there is a k3s node-external-ip

Backport: https://github.com/k3s-io/k3s/pull/6180
Issue: https://github.com/k3s-io/k3s/issues/6190

Codecov Report
Base: 9.77% // Head: 9.77% // Decreases project coverage by -0.00% :warning:

Coverage data is based on head (be9c26a) compared to base (66309a8).
Patch coverage: 0.00% of modified lines in pull request are covered.

Additional details and impacted files
@@               Coverage Diff               @@
##           release-1.23   #6191      +/-   ##
===============================================
- Coverage          9.77%   9.77%   -0.01%
===============================================
  Files               136     136
  Lines             10003   10007       +4
===============================================
  Hits                978     978
- Misses             8826    8830       +4
  Partials            199     199

Flag
Coverage Δ

unittests
9.77% <0.00%> (-0.01%)
:arrow_down:

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

Impacted Files
Coverage Δ

pkg/agent/flannel/flannel.go
0.00% <0.00%> (ø)

pkg/agent/run.go
0.00% <0.00%> (ø)

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

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


Support localized java annotations

🤔 What's the problem you're trying to solve?
Our java codebase contains a lot of german annotations like @Gegebensei (@Given). Those localized annotations don't seem to be picked up by the plugin.
✨ What's your proposed solution?
Add support for all supported localized annotations.
⛏ Have you considered any alternatives or workarounds?
Yes, using the english annotations. Alternatively we could change our steps code.

+1 interested by this feature


Impossible to save models other than those 'prepared' (e.g., EMAModel)

System Info
- `Accelerate` version: 0.20.0
- Platform: Linux-5.15.0-1030-aws-x86_64-with-glibc2.31
- Python version: 3.10.9
- Numpy version: 1.25.0
- PyTorch version (GPU?): 2.0.1 (True)
- PyTorch XPU available: False
- System RAM: 1121.82 GB
- GPU type: NVIDIA A100-SXM4-80GB
- `Accelerate` default config:
        - compute_environment: LOCAL_MACHINE
        - distributed_type: MULTI_GPU
        - mixed_precision: fp16
        - use_cpu: False
        - num_processes: 8
        - machine_rank: 0
        - num_machines: 1
        - gpu_ids: all
        - rdzv_backend: static
        - same_network: True
        - main_training_function: main
        - downcast_bf16: no
        - tpu_use_cluster: False
        - tpu_use_sudo: False
        - tpu_env: []

Information

[X] The official example scripts
[ ] My own modified scripts

Tasks

[X] One of the scripts in the examples/ folder of Accelerate or an officially supported no_trainer script in the examples folder of the transformers repo (such as run_no_trainer_glue.py)
[ ] My own task or dataset (give details below)

Reproduction
It seems like it's not (easily) possible to save models other than the one being prepared, which will then be in ._models. This makes using things like an EMAModel (or any other moving average model) very difficult.
In this example, a custom saving hook is used (line 309), which as is requires the EMAModel to be global and everything to be in one big script (which is incompatible with a lot of codebases).
https://github.com/huggingface/diffusers/blob/main/examples/unconditional_image_generation/train_unconditional.py
Expected behavior
An additional optional parameter for save state pre hooks and load state pre hooks that allow for additional inputs to be specified without everything being global
(If this is a misunderstanding and there's a better way to do it I'd love to know!)

I'm not too sure I understand how this is linked to Accelerate. Shouldn't you report this in Diffusers?

Hi, sorry for the miscommunication -- the example is from diffusers, but the usage limitation stems from Accelerate. Specifically, the Accelerate saving hook functions don't give the ability to save anything other than the model that's been prepared, which prevents things like exponential moving averages (a very common use case). Does that make more sense? Is there a way around this other than making everything global like in the linked example?

I still don't understand what the issue is. Could you share a code reproducer?


define a query language and execute with a map of functions

Describe the problem you'd like to have solved

Related #34


code release

This work is great! I used to do research on reference-guided image inpainting task before. I hope the code can be released as soon as possible！

Thanks for your attention. I am trying to communicate with the project leader for releasing codes and datasets as soon as possible.


[sival] Mark fixed entropy complex tests as unbroken in ROM_EXT

These tests are all working in ROM_EXT on master and earlgrey_es_sival now that we've fixed the underlying keymgr issue. For details, see
https://github.com/lowRISC/opentitan/issues/22819#issuecomment-2095648654
This is related to lowRISC/OpenTitan#21706 and lowRISC/OpenTitan#22140.
This is a cherry-pick of #23035.

Thanks both. I've updated the exec_env as suggested.

We've lost the "//hw/top_earlgrey:silicon_creator": None, environment from edn_kat but otherwise LGTM

That's now fixed as well, thanks @jwnrt for explaining and for your patience :-)


Is time series classification supported?

Hi,
Given I have a time-series data with X_train shape = (samples, sequences, features) and a binary y_train shape = (samples,), how can I fit and predict using pyRCN ESNClassifier?
For example, if I generate the following variables
X_train = np.arange(27).reshape(3,3,3)
y_train = np.random.randint(0,2,3) # assume it generates [1,1,0]

X_test = X_train

When I call predict(X=X_test), it should be returning [1,1,0]. So far as I understand from the codebase, pyRCN only takes X as shape (n_samples, n_features) for the fit and predict functions.
On a side note, I am not sure whether the question I raised is similar to https://github.com/TUD-STKS/PyRCN/issues/12.

Hi @jagandecapri,
I see. In that case, I have understood it wrong in your original example. However, as you say it, the user just would need to transpose the dimensions.
I will allow 3D numpy arrays as (time_sequence, samples, features) and internally convert it as explained in my example.
The idea behind my current solution is that I want to deal with arbitrary sequence lengths. Using 3D numpy arrays (time_sequence, samples, features), this is only possible by zeropadding all sequences to the same length.
Can you work with the workaround I proposed in my first comment for now?

Hi @renierts,
Working with a toy example as code below, I find that the prediction array is shorter than my expectation. Any idea why?
BATCH_LENGTH = 3
SEQUENCE_LENGTH = 2
FEATURES = 3

BATCH_IDX = 0
SEQUENCE_IDX = 1
FEATURE_IDX = 2

time_series_input = np.arange(18).reshape(BATCH_LENGTH,SEQUENCE_LENGTH,FEATURES)

# Transpose from (BATCH, SEQUENCE, FEATURE) to (SEQUENCE, BATCH, FEATURE)
time_series_input_T = np.transpose(time_series_input, (SEQUENCE_IDX,BATCH_IDX,FEATURE_IDX))

# Generate time series label equivalent to BATCH_LENGTH
time_series_label = np.random.randint(0,2,BATCH_LENGTH)

# Convert to dtype=object
X_train = np.empty(shape=(SEQUENCE_LENGTH, ), dtype=object)
for i, x in enumerate(time_series_input_T):
    X_train[i] = x

# Expand dim of labels
y_train = np.expand_dims(time_series_label, axis=1)
print(f'y_train: {y_train}')

X_test = X_train
esn = SeqToLabelESNClassifier().fit(X_train, y_train)

# Prediction array length is only 2. It should be 3, I suppose?
print(f'y_pred: {esn.predict(X_test)}')

Hi @jagandecapri,
I think I misunderstood you at first. Sorry therefore. Some questions:

BATCH_LENGTH = 3: Do you have three sequences?
SEQUENCE_LENGTH = 2: Do you have a sequence length of 2?

If this is true, the solution is that X_train = np.empty(shape=(BATCH_LENGTH, ), dtype=object). The following code snippet should work:
import numpy as np
from pyrcn.echo_state_network import SeqToLabelESNClassifier

BATCH_LENGTH = 3
SEQUENCE_LENGTH = 2
FEATURES = 3

BATCH_IDX = 0
SEQUENCE_IDX = 1
FEATURE_IDX = 2

time_series_input = np.arange(18).reshape(BATCH_LENGTH,SEQUENCE_LENGTH,FEATURES)

# Generate time series label equivalent to BATCH_LENGTH
time_series_label = np.random.randint(0,2,BATCH_LENGTH)

# Convert to dtype=object
X_train = np.empty(shape=(BATCH_LENGTH, ), dtype=object)

for i, x in enumerate(time_series_input):
    # Each element of X_train has the shape (SEQUENCE_LENGTH, FEATURES)
    X_train[i] = x

# Expand dim of labels
y_train = np.expand_dims(time_series_label, axis=1)
print(f'y_train: {y_train}')

X_test = X_train
esn = SeqToLabelESNClassifier().fit(X_train, y_train)

# Prediction array length is only 2. It should be 3, I suppose?
print(f'y_pred: {esn.predict(X_test)}')

That's what I understood too. You have BATCH_LENGTH recordings, where each recording has a duration of SEQUENCE_LENGTH and where each recording has FEATURE_LENGTH features.


Add DubboRegistryServiceIdHandler Bean to customize Service Id

Codecov Report

Merging #408 into master will increase coverage by 0.14%.
The diff coverage is 18.07%.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7513ea...892216f. Read the comment docs.


ip子网支持city过滤

这个 PR 实现什么功能/修复什么问题:
ip子网支持city过滤
是否需要 backport 到之前的 release 分支:

release/2.8.0

/cc @swordqiu @yousong

/cherrypick release/2.8.0

Codecov Report

Merging #537 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

@@            Coverage Diff            @@
##           master    #537      +/-   ##
=========================================
- Coverage    7.42%    7.4%   -0.02%
=========================================
  Files         345     345
  Lines       54279   54290      +11
=========================================
- Hits         4031    4022       -9
- Misses      49872   49892      +20
  Partials      376     376

Flag
Coverage Δ

#aFlag
7.4% <0%> (-0.02%)
:arrow_down:

Impacted Files
Coverage Δ

pkg/compute/models/networks.go
0.86% <0%> (-0.01%)
:arrow_down:

pkg/util/rbacutils/rabc.go
68.56% <0%> (-4.17%)
:arrow_down:

pkg/util/seclib2/seclib.go
95.74% <0%> (+4.25%)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 409e8cf...bac1498. Read the comment docs.

/cherrypick release/2.9.0

/approve
/lgtm


Fix: redundant casting to SecretStr API keys

Description: This PR serves as standardization of the masking and testing.
Some API keys were not really masked when stored in the values dict. They should be masked and cast back to string only during the POST request. I fixed 1 occurance of this.
Some tests were not covering this flaw because they were repeating the back-and-forth pattern of casting to SecretStr and invoking .get_secret_value() immediately. This pattern is confusing, and in order to clear this out I added an extract_secret_str : SecretStr | Str | None -> str method.
The code-base was filled with secretstr, secret_str, secret_string names. I replaced all of them with secretstr.
Issue: fixes https://github.com/langchain-ai/langchain/issues/14445, related https://github.com/langchain-ai/langchain/issues/12165
Dependencies: None
Tag maintainer: @eyurtsev @hwchase17

Hey @efriis ! Thanks, I was actually not aware of that big move. I'll revisit this PR after the merge is complete.

As you can see from the merge conflict list, it's in 😅
Feel free to ping when this PR is updated!

Hey @efriis , can you check it out now? There's another thing I wanted to do which is clean up the tests, but I think it's better to separate it to another PR.

is it possible to keep the name of the function as-is in master for this pr? two reasons:

makes it tough to see what logic is actually changing
with that change in naming, is not backwards compatible, so we'd need to make sure to bump versions across langchain/langchain-community/langchain-core at the same time which is tricky

also, in general trying to NOT make backwards incompatible changes to langchain-core, which this is

is it possible to keep the name of the function as-is in master for this pr? two reasons:

makes it tough to see what logic is actually changing
with that change in naming, is not backwards compatible, so we'd need to make sure to bump versions across langchain/langchain-community/langchain-core at the same time which is tricky

also, in general trying to NOT make backwards incompatible changes to langchain-core, which this is

hey. yeah definitely agree with you.

@hwchase17 @efriis I have a small change I'm proposing within langchain-core over the convert_to_secret_str method.  The change I'm proposing allows this to accept a None and treat it as an empty string "". This makes it 1) consistent with the behavior of the SecretStr type from pydantic, 2) more compatible with the api_key types, which are usually typed as Optional[str], and defaulting to None.

Ah I think this actually bypasses an important part of type checking, where some classes may want to require that the passed in string is not None.
If you want to fix the case where it wasn't actually storing a masked SecretStr separately though, that would be great!

Ah I think this actually bypasses an important part of type checking, where some classes may want to require that the passed in string is not None.
If you want to fix the case where it wasn't actually storing a masked SecretStr separately though, that would be great!

I think there's confusion here. This PR:

Still allows for the API-keys to be None
Changes the way the SecretStr is extracted: Instead of casting None to SecretStr and then extracting the secret, the secret is extracted for Union[SecretStr, str, None] type all together through a single function.
I made sure that all the classes use the convert_to_secretstr function (for standardization).

What I can also change is that the API-key type hint is changed to Union[SecretStr, str, None] instead of Optional[str] or Optional[SecretStr].
What I can do is allow for the API-keys to be passed as SecretStr and not just str.


Avoid conversion of Arrays to streams when looping

@Sanne are these changes going to be helpful?

We can wait about merging this one and do proper performance testing.
There are other things that I want to try.
I'm going to close the pr for now