[TF 2.0] optimizer_v2.get_updates() eager mode problem

TF Version: 2.0.0-dev20190214
Windows 10
Anaconda Python 3.6.5
GPU: GeForce GTX 1070 Max-Q Design
Tensorflow 2.0 (gpu) nightly installed via pip.
Describe the current behavior
Calling <AnyOptimizerV2>.get_updates(params=my_model.trainable_weights, loss=my_loss) fails with any my_loss (due to eager mode being on):
    actor_updates = self.optimizer_actor.get_updates(params=self.actor.trainable_weights, loss=None)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\keras\optimizer_v2\optimizer_v2.py", line 448, in get_updates
    grads = self.get_gradients(loss, params)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\keras\optimizer_v2\optimizer_v2.py", line 361, in get_gradients
    grads = gradients.gradients(loss, params)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\gradients_impl.py", line 158, in gradients
    unconnected_gradients)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\gradients_util.py", line 547, in _GradientsHelper
    raise RuntimeError("tf.gradients is not supported when eager execution "
RuntimeError: tf.gradients is not supported when eager execution is enabled. Use tf.GradientTape instead.

Globally disabling eager execution via tf.compat.v1.disable_eager_execution() fixes this particular issue but I don't want to globally disable eager mode! I'd like to know how the 2.0 API is intended to be used in this case.
Describe the expected behavior
Since the gradient computation is happening internally I expected behavior similar to TF1 i.e. computation of gradients in graph mode in this case. Also I don't want to use tf.GradientTape every time I want to compute the gradient instances - instead I want to obtain the update ops so they can be passed to a tf.keras.backend.function which can then be executed on demand to compute and apply the gradients. For more context please see here.
Code to reproduce the issue
import tensorflow as tf
from tensorflow.keras.models import Sequential
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.layers import Dense

my_model = Sequential([Dense(1, activation='relu', input_shape=(5,))])
my_loss = -tf.reduce_mean(my_model.output)
my_optim = Adam()
updates = my_optim.get_updates(params=my_model.trainable_weights, loss=my_loss)

Edit: this has also been noticed here: https://github.com/tensorflow/tensorflow/issues/25472

@alextp I removed the check for eager mode as you suggested but then it fails shortly after:
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\gradients_util.py", line 600, in <listcomp>
    from_ops = [t.op for t in xs]
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\framework\ops.py", line 934, in op
    "Tensor.op is meaningless when eager execution is enabled.")

Any ideas?

Ah, so it's a little more complex than that. I think a better fix is done inside keras proper by entering the keras graph before keras calls tf.gradients, in get_updates. @robieta do you know what the best place to do this is?

I made a pull request that seems to fix this issue but then the next line in my code fails - it attempts to use the computed updates inside a tf.keras.backend.function. Both lines are shown below (the first one now works with the PR).
actor_updates = self.optimizer_actor.get_updates(params=self.actor.trainable_weights, loss=vv)
self.actor_train_on_batch = tf.keras.backend.function(inputs=[state_input], outputs=[self.actor(state_input)], updates=actor_updates)

The stack trace:
  self.actor_train_on_batch = tf.keras.backend.function(inputs=[state_input], outputs=[self.actor(state_input)], updates=actor_updates)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\keras\backend.py", line 3235, in function
  return EagerExecutionFunction(inputs, outputs, updates=updates, name=name)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\keras\backend.py", line 3156, in __init__
  add_sources=True, handle_captures=True, base_graph=source_graph)
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\eager\lift_to_graph.py", line 222, in lift_to_graph
  add_sources=add_sources))
File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\eager\lift_to_graph.py", line 87, in _map_subgraph
  elif op.type == "Placeholder":

Can you post the full stack trace? Something fishy seems to be going on here.
@robieta I think you wrote the exception-raising code, so reassigning this issue to you.

Traceback (most recent call last):
  File "C:/projects/huskarl/examples/ddpg-pendulum.py", line 37, in <module>
    agent = hk.agent.DDPG(actor=actor, critic=critic, nsteps=2)
  File "C:\projects\huskarl\huskarl\agent\ddpg.py", line 56, in __init__
    self.actor_train_on_batch = tf.keras.backend.function(inputs=[state_input], outputs=[self.actor(state_input)], updates=actor_updates)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\keras\backend.py", line 3235, in function
    return EagerExecutionFunction(inputs, outputs, updates=updates, name=name)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\keras\backend.py", line 3156, in __init__
    add_sources=True, handle_captures=True, base_graph=source_graph)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\eager\lift_to_graph.py", line 222, in lift_to_graph
    add_sources=add_sources))
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\eager\lift_to_graph.py", line 87, in _map_subgraph
    elif op.type == "Placeholder":
AttributeError: 'NoneType' object has no attribute 'type'

In general I would say the code block at the top is something of an anti-pattern, because it's sort of splitting the difference between keras / non-keras and graph / non-graph. I would offer the following two approaches as alternatives. (Depending on your preference.)
Boilerplate:
import numpy as np
import tensorflow as tf
tf.enable_v2_behavior()

from tensorflow.keras.models import Sequential
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.layers import Dense

def pretty_print_weights(model):
  """Ugly comprehension to make pretty strings."""
  print(", ".join([" ".join(["{:.3f}" for _ in w]).format(
        *w.flatten().tolist()) for w in model.get_weights()]))

The "I want Keras to handle it for me" way:
my_model = Sequential([Dense(1, activation='relu', input_shape=(5,))])
class ReduceMeanLoss(tf.keras.losses.Loss):
  def call(self, y_true, y_pred):
    return -tf.reduce_mean(y_pred)
my_model.compile(loss=ReduceMeanLoss(), optimizer=Adam())

And an example train loop:
pretty_print_weights(my_model)

# I've chosen `.train_on_batch` just because it's closer to manually applying
# gradients, but `.fit` works too.
for _ in range(100):
  my_model.train_on_batch(
      tf.random.uniform((16, 5)),
      tf.zeros((16,))  # unused since the loss ignored y_true
  )
pretty_print_weights(my_model)

The "I want to handle my own updates" way:
my_model = Sequential([Dense(1, activation='relu', input_shape=(5,))])
my_optim = Adam()

@tf.function  # Decorating with tf.function will kick the function body into a
              # Graph context.
def my_train_fn(inputs):
  outputs = my_model(inputs)
  print(outputs, "   <=== This is a symbolic Tensor, and this print only runs during tracing.")
  my_loss = -tf.reduce_mean(outputs)
  updates = my_optim.get_updates(params=my_model.trainable_weights, loss=my_loss)

  # We take advantage of the automatic control dependencies of tf.function here,
  # so updates still gets executed when we run the function.

And an analogous training loop looks like:
pretty_print_weights(my_model)
for _ in range(100):
  my_train_fn(tf.random.uniform((16, 5)))
pretty_print_weights(my_model)

Finally, I haven't covered it but it's possible to call the entire thing under a tf.Graph scope of your own in which case Keras will treat that as the default graph. (This, for instance, is how Estimator works.) So if you really want to manage your own graph that is an option as well. But it can be rather irksome to get back to eager land because the function that we use in keras is a private symbol. (ConcreteFunction: https://github.com/tensorflow/tensorflow/blob/master/tensorflow/python/eager/function.py#L463) If there wind up being lots of people who want to make eager compatible functions out of their graphs it might make sense to reassess whether there should be a public way to do that.
I realize that was something of a brain dump; let me know if you have any questions!

@robieta thanks for the brain dump 😄. I've used that first method many times. But in this particular case I don't think either method you provided works without significant modifications, if at all. To provide more context - I'm working on a reinforcement learning library and am implementing several algorithms - this latest one being DDPG. The idea is fairly simple - there are two networks - the actor (which takes in a state and outputs an action) and the critic (which takes a state and an action and outputs the value of that action). Training the critic is straightforward and I do it using model.train_on_batch.

Training the actor, however, is more complicated. I need to connect the actor's action output to the critic's action input, then given a state (which is fed to both critic and actor) backpropagate -mean(critic_output) through the critic and then through the actor, and then only apply the updates to the actor network. See diagram ➡.
I was able to implement that quite concisely in TF 1.* - full snippet below:
# To train the actor we want to change its weights such that it picks the action that has the highest possible value
state_input = self.critic.input[1]
critic_output = self.critic([self.actor(state_input), state_input])
actor_updates = self.optimizer_actor.get_updates(params=self.actor.trainable_weights, loss=-tf.keras.backend.mean(critic_output))
self.actor_train_on_batch = tf.keras.backend.function(inputs=[state_input], outputs=[self.actor(state_input)], updates=actor_updates)

Then the training routine becomes beautifully simple:
self.critic.train_on_batch([np.array(action_batch), np.array(state_batch)], target_qvals)
self.actor_train_on_batch([np.array(state_batch)])

I think this usage of the tf.keras API is extremely useful.
Why doesn't this work anymore in TF 2.0? Is that intended (@fchollet)?

Ahh. Thanks for the explanation. So it looks like what is happening is that with https://github.com/tensorflow/tensorflow/pull/26142 the gradients are now being computed symbolically, but somewhere in the apply process we're applying them to the variables in an eager fashion.
The issue that you're seeing is that when you call keras.backend.function, it tries to lift the relevant subgraph from the keras global graph into an execution graph, but fails because the update is eager rather than graph. So a temporary fix would be:
my_model = Sequential([Dense(1, activation='relu', input_shape=(5,))])
my_loss = -tf.reduce_mean(my_model.output)
my_optim = Adam()

# This is a hack to force the entire update calculation to be computed
# with the keras global graph to unblock in the short term.
with my_loss.graph.as_default():
  updates = my_optim.get_updates(params=my_model.trainable_weights, loss=my_loss)

my_fn = tf.keras.backend.function(inputs=my_model.inputs, outputs=my_model.outputs, updates=updates)
pretty_print_weights(my_model)

for _ in range(100):
  my_fn(tf.random.uniform((16,5)))
pretty_print_weights(my_model)

More broadly, two improvement to TensorFlow spring to mind:

The variable updates on symbolic inputs should probably also be symbolic. @alextp @tanzhenyu Does this make more sense to do in the optimizer or variable class?

The graph lifting code should check if there are invalid inputs and should provide an appropriate error message. (I can handle that.)

Thanks for pointing out this issue!

https://github.com/tensorflow/tensorflow/commit/46924b2f7bc4262b2c4b36841d393741113594ca should resolve this issue. (The optimizer classes will now check if any updates are symbolic and return a symbolic apply op if so.) That change should already have been picked up in the latest tf-nightly build. Feel free to reopen this issue if you encounter any issues.
(2) is going to be covered as part of a broader effort to improve error messaging.
Happy RL-ing!

I finally tried removing the workaround using version 2.0.0-alpha0 but the problem is still there!
With workaround (works):
my_loss = -tf.keras.backend.mean(critic_output)
with my_loss.graph.as_default():
    actor_updates = self.optimizer_actor.get_updates(params=self.actor.trainable_weights, loss=my_loss)
self.actor_train_on_batch = tf.keras.backend.function(inputs=[state_input], outputs=[self.actor(state_input)], updates=actor_updates)

Without workaround (fails, but used to work in TF1):
my_loss = -tf.keras.backend.mean(critic_output)
actor_updates = self.optimizer_actor.get_updates(params=self.actor.trainable_weights, loss=my_loss)
self.actor_train_on_batch = tf.keras.backend.function(inputs=[state_input], outputs=[self.actor(state_input)], updates=actor_updates)

Full stack trace:
C:\projects\huskarl\examples>python ddpg-pendulum.py
2019-05-03 14:16:18.351214: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2
Traceback (most recent call last):
  File "ddpg-pendulum.py", line 37, in <module>
    agent = hk.agent.DDPG(actor=actor, critic=critic, nsteps=2)
  File "c:\projects\huskarl\huskarl\agent\ddpg.py", line 48, in __init__
    actor_updates = self.optimizer_actor.get_updates(params=self.actor.trainable_weights, loss=-tf.keras.backend.mean(critic_output))
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\keras\optimizer_v2\optimizer_v2.py", line 448, in get_updates
    grads = self.get_gradients(loss, params)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\keras\optimizer_v2\optimizer_v2.py", line 361, in get_gradients
    grads = gradients.gradients(loss, params)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\gradients_impl.py", line 158, in gradients
    unconnected_gradients)
  File "C:\ProgramData\Anaconda3\lib\site-packages\tensorflow\python\ops\gradients_util.py", line 558, in _GradientsHelper
    raise RuntimeError("tf.gradients is not supported when eager execution "
RuntimeError: tf.gradients is not supported when eager execution is enabled. Use tf.GradientTape instead.

It's the same original problem - seems like it was never fixed. Can you guys reopen and take a look?

I just upgraded to 2.0.0-beta0 and was able to remove the workaround! Thanks!


Replay issues in demos

I recorded a demo and typed "playdemo " when it loads you're stuck at looking at the wrong position, wondering if you could change this? not a huge issue as there is a way around it but it's slightly annoying.
and you can't check the "tab" menu.

Seems to be fixed now.


Part 2 in the move to IOCing the world.

Breaking change

Appears to load the 2 hello world apps...
Proposed change

Type of change

[ ] Dependency upgrade
[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New feature (which adds functionality to an existing integration)
[ ] Breaking change (fix/feature causing existing functionality to break)
[X] Code quality improvements to existing code or addition of tests

Additional information
The goal is to move away from Activator.CreateInstance and to pull these from IOC.
Checklist

[X] The code change is tested and works locally.
[X] Local tests pass. Your PR cannot be merged unless tests pass
[X] There is no commented out code in this PR.
[ ] I have followed the [development checklist][dev-checklist]
[ ] The code compiles without warnings (code quality check)
[ ] Tests have been added to verify that the new code works.

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

[ ] Documentation added/updated for www.home-assistant.io

Great changes!

Agree nice

@asherw is your plan to update the PR? Or do you want to merge it as is?


How to get it running?

I'm trying to run a FTDI or CP21xx on my Android device.
I added:
serial.requestPermission(
  function success() {
    window.alert("Success msg!!!");
  },
  function error() {
    window.alert("error msg");
  }
);

to my JS. But nothing happens. Shouldn't there at least the error message pop up?
Then there is also a link to https://github.com/mik3y/usb-serial-for-android - do i need to add this?
Also the vid and pid is something that is confusing. I checked it with the "USB Device Info" app and get every time another pid for the same device.
If i try lsusb i have every time the same vid/pid no matter if i connect the FTDI or CP21xx.
Please somebody tell me the steps how to get this running.
I need to say I'm new to Cordova and maybe i miss something that everybody knows but me.

Hello,
Here is a sample project: https://github.com/xseignard/demoCordovarduino
Could you try it and see if it work for you?

I will check it.
But why do i not get a fixed vid/pid.
Why does lsusb only show one vid/pid no matter what is connected?
To me it seems like the FTDI or CP21xx are not recognized...

I didn't realize android studio had wifi debugging sounds scary and super neat at the same time.

There is another thing that i find complicated:
Do you upload Cordova through USB and always switch the cable between PC and the USB/TTL?
Thats not practical for testing if you need to do it after every bit of code change.

Yes that what I've been doing, whether it's practical or not is up to you. For me Android studio is super bloated and chatty, takes forever just to load up. Might not be faster in my case. Sans wifi I would have to plug and unplug my robot anyhow, it's not much of a loss. That's just me though, I have more problems with MPT getting in the way of USB debugging, and cordova continuously trying to run my code on the useless emulator. (good luck emulating the arduino cordova... haha)
I don't think I can really help with your connection issue because I'm not sure what you are trying to do, but just out of curiosity what Arduino are you trying to use? You said FTDI and CP21XX which are basically usb to serial bridges at the end of the day right? Your probably going to have to look lower level in the code to see if they are compatible. I haven't had any issues with the Uno and the default options, but I do have other arduinos I could test no FTDI chips though

@MrGlasspoole changing VID/PID is not normal. Try to plug your device on your computer and run lsusb to check VID/PID.
You can run adb over wifi, please chec http://stackoverflow.com/questions/2604727/how-can-i-connect-to-android-with-adb-over-tcp
FTDI and CP21XX should be supported. Please give more info about your setup, devices and so on.

Any updates?

No updates, I close the issue.
Feel free to reopen it if needed.


Remove duplicate meta tags for viously

🏷 Type of documentation

[x] bugfix (code examples)

@geoffray-viously I noticed that you claim in your adapter to support gdpr, but haven't provided a gvl_id. Please add your gvl_id that you use to validate consent. If you don have one, then we switch gdpr_support to false.

Hello @muuki88 here is the PR for the GVL ID : https://github.com/prebid/prebid.github.io/pull/4632


Latest commit on cudarc seems to have broken running the examples codes

$ cargo run --example quantized --release --features cuda -- --which 7b-open-chat-3.5 --prompt interactive
Updating crates.io index
Finished release profile [optimized] target(s) in 1.83s
Running target/release/examples/quantized --which 7b-open-chat-3.5 --prompt interactive
avx: true, neon: false, simd128: false, f16c: true
temp: 0.80 repeat-penalty: 1.10 repeat-last-n: 64
thread 'main' panicked at /home/hikari/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cudarc-0.11.1/src/driver/sys/mod.rs:38:71:
called Result::unwrap() on an Err value: DlOpen { desc: "libcuda.so: cannot open shared object file: No such file or directory" }
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
If you checkout the branch at "01794dc1 - 2024-05-05 - Laurent Mazare - Use write rather than try-write on the metal rw-locks. (#2162)", then you can run the example fine.

We recentrly updated the cudarc crate to a version that includes changes on how cuda is discovered, I guess that it's what is causing the issue. Maybe you can adjust your LD_LIBRARY_PATH to include the directory in which your libcuda.so is located? Fwiw this works well on my setup.

Ok I have added /usr/local/cuda/targets/x86_64-linux/lib/stubs to my LD_LIBRARY_PATH, and confirmed the libcuda.so exists under that dir.
However I am still getting into error, like this:
$ RUST_BACKTRACE=full cargo run --example quantized --release --features cuda -- --which 7b-open-chat-3.5 --prompt interactive
Finished release profile [optimized] target(s) in 0.10s
Running target/release/examples/quantized --which 7b-open-chat-3.5 --prompt interactive
avx: true, neon: false, simd128: false, f16c: true
temp: 0.80 repeat-penalty: 1.10 repeat-last-n: 64
Error: thread panicked while processing panic. aborting.
Aborted

Ok, I've actually tweaked candle to be back at using dynamic linking rather than dynamic loading for cudarc in #2176 as I was able to reproduce the issue in some setups. Could you try it again with this?
Cudarc recently changed its default to dynamic loading as detailed in this issue https://github.com/coreylowman/cudarc/pull/197 , candle might have to do the same at some point but that seems a bit early to do so.

I just tested it, and it still fails to load cuda.dll on my windows machine.

@Cifko do you know where cuda.dll is located on your machine? And also is it called cuda.dll, or is there something called nvcuda.dll on your machine?
@hololite are the cuda shared libraries located anywhere else on your machine (e.g. maybe there are some sym links that the stubs directory you shared links to)?

@Cifko @LaurentMazare
Thanks to cifko's suggestions, it appears that there are 2 locations in my WSL ubuntu that have the libcuda.so:
$ find /usr -name libcuda.so
/usr/local/cuda-12.4/targets/x86_64-linux/lib/stubs/libcuda.so
/usr/lib/wsl/lib/libcuda.so
The first dir which I tried (and failed running the examples codes) is for the Cuda toolkit.
The second dir is for the Cuda drivers which is installed as part of Windows.
Both are running the same cuda version: 12.4
After add /usr/lib/wsl/lib to my LD_LIBRARY_PATH now the examples code runs fine!
I did try both the 84328e2b and d9bc5ec1, and both worked after I set the LD_LIBRARY_PATH to the correct dir.

I had to take couple files and rename them (they are in path)
c:\Windows\System32\nvcuda.dll -> cuda.dll
c:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin\cublas64_12.dll -> cublas.dll
c:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.4\bin\curand64_10.dll -> curand.dll
Now I can run the example.

I got same error i try to run the mnist sample code with CUDA enabled:
called Result::unwrap()on anErrvalue: LoadLibraryExW { source: Os { code: 126, kind: Uncategorized, message: "找不到指定的模块。" } }

I also have issue running this on ec2 instance with A10.
The error is different though, it's related to building cudarc:
$ RUST_BACKTRACE=1 cargo run --example quantized --release --features cuda -- --which 7b-open-chat-3.5 --prompt chat
Compiling cudarc v0.11.1
error: failed to run custom build command for cudarc v0.11.1
note: To improve backtraces for build dependencies, set the CARGO_PROFILE_RELEASE_BUILD_OVERRIDE_DEBUG=true environment variable to enable debug information generation.
Caused by:
process didn't exit successfully: /home/ubuntu/candle/target/release/build/cudarc-12c4a369cb2cb021/build-script-build (exit status: 101)
--- stdout
cargo:rerun-if-changed=build.rs
cargo:rerun-if-env-changed=CUDA_ROOT
cargo:rerun-if-env-changed=CUDA_PATH
cargo:rerun-if-env-changed=CUDA_TOOLKIT_ROOT_DIR
--- stderr
thread 'main' panicked at /home/ubuntu/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cudarc-0.11.1/build.rs:54:14:
Unsupported cuda toolkit version: 11050. Please raise a github issue.
stack backtrace:
0: rust_begin_unwind
1: core::panicking::panic_fmt
2: build_script_build::cuda_version_from_build_system
3: build_script_build::main
4: core::ops::function::FnOnce::call_once
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Thu_Mar_28_02:18:24_PDT_2024
Cuda compilation tools, release 12.4, V12.4.131
Build cuda_12.4.r12.4/compiler.34097967_0

@hololite Huh looks like the header file (cuda.h) on that system has a CUDA_VERSION of 11.5 (11050) even though nvcc supports 12.4? The issue here is that cudarc only includes headers of 11.7 onwards atm ( we could generate bindings for pretty much any version though).
Seems like the fix might be to query nvcc instead of checking the version in the header file? I'm not sure the difference between these two numbers.

I was able to build a sample with CUDA support, but it looks like there is an issue on Windows with using the CUDA libraries. The system is unable to find cuda.dll, which is not available on my machine. It performed lookup operations, but all lookups failed for this cuda.dll file.

On Windows, CUDA libraries have names following this pattern:

Has anyone been able to run Candle on Windows with CUDA support?

@stalek71 yes, I explained above. And I also added it to FAQ in candle. You basically need to rename the libraries. What I did I copied to the project folder so I don't pollute my windows or program files directory. They will eventually fix it.
The cuda.dll is the nvcuda.dll in your c:\windows\system32.

Thanks! I just did it the same way :)
There is some issue yet. I ran a very simple code a few times building it for Gpu and Cpu.
When I run it for cpu I receive every time proper random values.
When I run it for Gpu it looks numbers are the same all the time.
Both tensors are allocated on proper device (or at least I expect they are allocated there)...
This is my simple code:
fn main() -> Result<(), Box<dyn std::error::Error>> {
    //let device = Device::new_cuda(0)?;
    let device = Device::Cpu;

    let a = Tensor::randn(0f32, 1., (2, 3), &device)?;
    let b = Tensor::randn(0f32, 1., (3, 4), &device)?;

    let c = a.matmul(&b)?;

    println!("{c}");

    Ok(())
}

This is the result for cpu:

This is the result for Gpu:

@stalek71 this question shouldn't be in this ticket. But if you look at the source code, there is a fixed seed set.
https://github.com/huggingface/candle/blob/main/candle-core/src/cuda_backend/device.rs#L153
Just set some random seed by yourself.

@Cifko, thanks for the quick response.
Now everything is clear.

I was able to build a sample with CUDA support, but it looks like there is an issue on Windows with using the CUDA libraries. The system is unable to find cuda.dll, which is not available on my machine. It performed lookup operations, but all lookups failed for this cuda.dll file.

On Windows, CUDA libraries have names following this pattern:

Has anyone been able to run Candle on Windows with CUDA support?

We have a tracking issue in cudarc for this (https://github.com/coreylowman/cudarc/issues/219). Its not fully clear to me all the patterns that are possible on windows. The original issue reporting this mentioned nvrtc64_120_0, which is different than the names you report. It seems like we could fallbacks to <lib name><32 or 64>_<11 or 12>.dll and then maybe <lib name><32 or 64>_<110_0 or 120_0>.dll. I'll work on getting this added for the 11.2 release of cudarc

On Windows's WSL Ubuntu/linux, this problem still persists.
I have 2 different laptops with WSL/Ubuntu having similar problems.
Also on AWS EC2 instance with A10G, the problem also exists although with different error messages.
The example codes used to work fine on all of these 3 machines prior to the recent cudarc changes.

Same issue on a native Ubuntu install.
Cargo finds the oldest version installed on the system.
--- stderr
thread 'main' panicked at /nfs-share/pa511/.cargo/registry/src/index.crates.io-6f17d22bba15001f/cudarc-0.11.1/build.rs:54:14:
Unsupported cuda toolkit version: 10010. Please raise a github issue.
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace
this is with
RUSTFLAGS='-L /usr/local/cuda-12.1/targets/x86_64-linux/lib/stubs, and
/usr/local/cuda-12.1/targets/x86_64-linux/lib/stubs added to LD_LIBRARY_PATH
I have tried both independently as well

I think coreylowman/cudarc#240 may fix this?

I think coreylowman/cudarc#240 may fix this?

Yes, I just tested the most recent changes. It worked now!

This is finally fixed in recent commit.

Thanks for confirming, #2229 will update to include the latest changes.

I just tested and I still get the same issue.
I have noticed that I have libcuda.so only in the stubs folder of my cuda-12.3 install. In the main lib64 I only have libcudart.so

Which OS are you on?
Sent from Outlook for Androidhttps://aka.ms/AAb9ysg

From: Preslav Aleksandrov @.>
Sent: Friday, May 31, 2024 6:10:23 AM
To: huggingface/candle @.>
Cc: Hololite @.>; Mention @.>
Subject: Re: [huggingface/candle] Latest commit on cudarc seems to have broken running the examples codes (Issue #2175)
I just tested and I still get the same issue.
I have noticed that I have libcuda.so only in the stubs folder of my cuda-12.3 install. In the main lib64 I only have libcudart.so
—
Reply to this email directly, view it on GitHubhttps://github.com/huggingface/candle/issues/2175#issuecomment-2142120990, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIDWJVIMMN54YMNE37N7YEDZFBZD7AVCNFSM6AAAAABHNVU3Y2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBSGEZDAOJZGA.
You are receiving this because you were mentioned.Message ID: @.***>

I still get this issue after trying to update today:
Error: Candle(Cuda(Cuda(thread panicked while processing panic. aborting.
Aborted

Last working commit for me is 01794dc16ef8d896933d61e9bd9b8a981cd51930. I'm on WSL with cuda:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Thu_Mar_28_02:18:24_PDT_2024
Cuda compilation tools, release 12.4, V12.4.131
Build cuda_12.4.r12.4/compiler.34097967_0

Actually I was incorrect in saying this was fixed. Yes it still is there.
What I found are the following: (all running ubuntu 22)

On the A100 gpu, this problem does not reproduce (works fine)
On the RTX 4090 and A10, this problem exists.

Sent from Outlook for Androidhttps://aka.ms/AAb9ysg

From: tgmichel @.>
Sent: Friday, June 7, 2024 10:01:14 AM
To: huggingface/candle @.>
Cc: Hololite @.>; Mention @.>
Subject: Re: [huggingface/candle] Latest commit on cudarc seems to have broken running the examples codes (Issue #2175)
I still get this issue after trying to update today:
Error: Candle(Cuda(Cuda(thread panicked while processing panic. aborting.
Aborted
Last working commit for me is 01794dchttps://github.com/huggingface/candle/commit/01794dc16ef8d896933d61e9bd9b8a981cd51930. I'm on WSL with cuda:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2024 NVIDIA Corporation
Built on Thu_Mar_28_02:18:24_PDT_2024
Cuda compilation tools, release 12.4, V12.4.131
Build cuda_12.4.r12.4/compiler.34097967_0
—
Reply to this email directly, view it on GitHubhttps://github.com/huggingface/candle/issues/2175#issuecomment-2154511134, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AIDWJVKZO3NHSAXVTVNUF23ZGGAGVAVCNFSM6AAAAABHNVU3Y2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJUGUYTCMJTGQ.
You are receiving this because you were mentioned.Message ID: @.***>

Any updates on this?
Tried to catch up again today (https://github.com/huggingface/candle/commit/3c815b1dcaf4b7ef6a2e29678c296eb64431ee69) and I still get the same issue over RTX4090 wsl setup.

Same here


Fix Typo

I know you're moving to @grafana/plugin-ui,
But I made a PR here because it comes up at the top of Google search. :)

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Do not merge: docs: bump pdf stable version to release-8.5

Update the stable PDF version of TiDB and TiDB Cloud:
TiDB: the stable PDF version is updated from release-8.1 to release-8.5.
TiDB Cloud: the stable PDF version will remain at release-8.1 to ensure consistency with the current TiDB Cloud documentation.

/hold

/ok-to-test

/unhold

/retest


Cleanup code

Coverage decreased (-0.1%) to 59.412% when pulling b8ee5557914dec77d6de568c3f0be0ce22a72bbc on cleanup into 61fc739bd746a395671eab4102ee9c1c3d34b9a5 on development.


Sync with GitHub issues with roadmap label, upvotes are 👍

It would be great if this could instead pull from GitHub issues that had a roadmap label, or any user-specified label.
Upvotes would translate into 👍 on GitHub. The user would need to authenticate with GitHub when attempting to interact. We may provide a link to the issue on GitHub as well.

Although I’m all for having integrations setup for this, I think the critical aspect here is “the user would need to authenticate with Github”
If you’re referring to the developer implementing this
This could be an optional addition in the future, for now we want to keep things as simple as possible
If you’re referring to the user of the roadmap
This would increase the bar to actually vote on items by a lot and this bar needs to be as low as possible for this feature to work


MGMT-17911:  implement new status

Note: This is still very much WIP please do not bother reviewing yet.

@hexfusion I think this PR is outdated now, can it be closed?

closing for now will breakout logic I need in another PR


Document how to install a CockroachDB with spatial capabilities

Right now, we are punting to Docker for the 20.2 alphas.
For the 20.2 GA release, we will need to get clear on exactly what
this new install process entails. Since we are losing the "download
one binary and go" experience, we must document the necessary steps
while trying to keep it as simple as possible.
We also need to be clear in the docs about what exactly CockroachDB
will do if you run a cockroach binary that cannot find the C
libraries necessary for geospatial support.  E.g. will everything run
"fine" as long as you don't try any spatial stuff?  Will it return an
error if you try to load spatial data, or call a spatial function? Are
there situations where it will crash? Will monkeys fly out of your
nose? Etc.

@otan what is the best way to get started on this? Is there a doc written up anywhere?  Is there something in the CockroachDB Makefile I should look at?
I am in that strange but not unfamiliar state of being unable to build CockroachDB from the main branch on my machine right now, for $MYSTERIOUS_REASON

the RFC should have mention the new way (see update on https://github.com/cockroachdb/cockroach/compare/master...otan-cockroach:rfc_update)
it is available on docker by default.


How to reveal baffle animation when element is in view?

Hi,
The baffle animation starts whether the element to be animated is in viewport or not.
Is it possible to reveal animation when element is in view?

Try using the Intersection Observer API. There is a polyfill for older browsers.


Add sync to NodeTransition and BlendSpace1D/2D and refactor sync in AnimationTree

Added AnimationSyncNode with the sync option as a base class and made any AnimationNode that may branch in the AnimationTree inherit from it.
Thus, AnimationTransitionNode is now has sync.

However, if the animation is played from the beginning after switching state, sync will be broken. To prevent this, the option from_start is added in AnimationTransitionNode.
Also, BlendSpace1D/2D now has sync. This allows animations in multiple directions to be blended without breaking sync.

In order to blend animations of different lengths neatly, the TimeScale must be changed depending on the actual animation blend value.
If the AnimationTree is not too complex, the actual blend value can be pre-computed from user input, etc., and this can be solved by adding a few lines of code in GDScript like below:
# Blend Walk and Run
_animtree["parameters/TimeScaleRun/scale"] = lerp(ANIMATION_LENGTH_RUN / ANIMATION_LENGTH_WALK, 1, _dash)
_animtree["parameters/TimeScaleWalk/scale"] = lerp(1, ANIMATION_LENGTH_WALK / ANIMATION_LENGTH_RUN, _dash)
_animtree["parameters/BlendDash/blend_amount"] = _dash

This process could be automated in some way, but it is quite complex. It requires recognizing chains between NodeAnimations and recognizing the actual blend values from the blends that exist in between.
In the past, #34179 has tried to solve this, but it still had the strong limitation that auto-adjustment would only occur between NodeAnimations that were directly chained in BlendSpace1D/2D.
More recently, there is an approach of #62424, but so far this completely corrupts the blending process and makes it inconsistent.
In my opinion, if #62424 is to be implemented correctly, an iterating process that only calculates the blend values for adjusting time scale needs to be added before the iterating process that calculates the actual track values without changing blend process. However, even if this were done, there would still be inconsistencies due to TimeScale and Seek.

In summary, now all we need to do for AnimationTree is to add sync correctly in some nodes which lacks it.
After all, when we create a game, we need a process to calculate the blend values depending on inputs and other factors. If we want to synchronize animations of different lengths, we should calculate the TimeScale properly in there. It can be solved with a few lines of code in GDScript and it is not difficult.
With this PR, the synchronization methods mentioned by @David-Ochoa in #23414 should now work perfectly correctly. No longer needed the hack for sync.
Fixed #23414.
#34179 and #62424 may be possible to keep it as a proposal, but perhaps it should be transferred to a godot-proposals for discussion so that we can reach a consensus. At least this PR reduce what is needed to implement them.

https://user-images.githubusercontent.com/61938263/176985177-d2d8b51d-62bc-4d85-87d4-1d33f50ca969.mp4
There is a sample project for TPS-Lock-on movement.
character_controller_3d_sample.zip
When rotating the hips in that TPS-Lock-on movement, the minimum number of animations required is high and blending can be complex, but the fixed AnimationTree uses sync to solve this problem with a tree of a certain size.

What I don't understand is why we just don't get rid of p_sync completely. In other words: When would I ever want to set Sync to false?

That makes sense, thanks. Although I don't think compatibility with Godot 3 should be that high on the list of priorities in that regard.

Well sure, 4.0 allows for some level of breaking compatibility.
The only real use case I can explain is to use the freeze to prevent speed hacks that use only the acceleration portion of the nonlinear root motion.
For example, if only the first few frames of the running motion are slightly faster, repeatedly switching between walking and running animations may be faster than continuing to run. By resuming the animation from the frozen portion, the speed can be averaged out. However, this can also be handled by properly setting TimeScale to 0.

What issues are blocking this?

I think there is no issue to block this.

Thanks!


Deployment of Container Apps Managed Environment fails when the 'appLogsConfiguration' property uses conditions

Bicep version
Bicep CLI version 0.14.85 (f4a4d485ba)
Describe the bug
Trying to develop a module that deploys an Azure Container Apps Managed Environment. One of the properties of this service is to specify the appLogsConfiguration.
In this property, we can specify the 'destination' type. Although the documentation does not call out the supported types, using the Azure Portal, we determined there are three options that can be supported: ['', 'log-analytics', 'azure-monitor'].

Based on that we wanted to apply these options in the module. The below shows the bicep code:

@description('Required. Name of the Container Apps Managed Environment.')
param name string

@description('Optional. Location for all Resources.')
param location string = resourceGroup().location

@description('Conditional. Existing Log Analytics Workspace resource ID. Required if "logDestination" is set to "log-analytics".')
param logAnalyticsWorkspaceResourceId string = ''

@allowed([
  'azure-monitor'
  'log-analytics'
  ''
])
@description('Optional. Logs destination. Default value streams logs without storing them.')
param logsDestination string = ''

resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' existing = if (!empty(logAnalyticsWorkspaceResourceId)) {
  name: last(split(logAnalyticsWorkspaceResourceId, '/'))!
  scope: resourceGroup(split(logAnalyticsWorkspaceResourceId, '/')[2], split(logAnalyticsWorkspaceResourceId, '/')[4])
}

resource managedEnvironment 'Microsoft.App/managedEnvironments@2022-10-01' = {
  name: name
  location: location
  properties: {
    appLogsConfiguration: !empty(logsDestination) ? {
      destination: logsDestination
      logAnalyticsConfiguration: logsDestination == 'log-analytics' ? {
        customerId: logAnalyticsWorkspace.properties.customerId
        sharedKey: logAnalyticsWorkspace.listKeys().primarySharedKey
      } : null
    } : {}
  }
}

In this template, we wrote a condition for the logAnalyticsConfiguration so that it is only used when the logAnalyticsWorkspaceResourceId is provided, but set to null if not.
When deploying this template with the following spec:

logsDestination = '' --> Success
logsDestination = 'azure-monitor' --> Success
logsDestination = 'log-analytics'  --> Fail and we get the below error:

Deployed failed with provisioning state [Failed]. Error Message: [The template deployment 'cinjzsv67eycm-test-amecom' is not valid according to the validation procedure. The tracking id is '352dfe6d-77bd-4248-9b96-fe5553ba4700'. See inner errors for details. (Code: InvalidTemplateDeployment) - Validation failed for a resource. Check 'Error.Details[0]' for more information. (Code: ValidationForResourceFailed)
   - Invalid request body for environment. Path: $.appLogsConfiguration. Does not conform to Managed Environment schema, please visit for more information https://docs.microsoft.com/azure/container-apps/azure-resource-manager-api-spec?tabs=arm-template#container-apps-environment (Code:ManagedEnvironmentInvalidSchema)

]. Please review the Azure logs of deployment [a-me-common-t1-20230303T1503488392Z] in scope [subscription] for further details.

What we noticed, is that conditions just don't work when they are near this property, so the only way we got this template to work is by only supporting one logDestination and that is log-analytics, like the below:

resource managedEnvironment 'Microsoft.App/managedEnvironments@2022-10-01' = {
  name: name
  location: location
  properties: {
    appLogsConfiguration: {
      destination: 'log-analytics'
      logAnalyticsConfiguration: {
        customerId: logAnalyticsWorkspace.properties.customerId
        sharedKey: logAnalyticsWorkspace.listKeys().primarySharedKey
      }
    }
  }
}

To Reproduce
Deploy the first template referenced in this issue, and set the logDestination to log-analytics and provide the logAnalyticsWorkspaceResourceId.
Additional context
We realize this may not be an issue related to bicep, but we thought of raising it here as a start and get guidance on the error related to the schema
" Invalid request body for environment. Path: $.appLogsConfiguration. Does not conform to Managed Environment schema"

Agreed that this is not a bicep specific issue. I would recommend opening a support case for this one, so it can be triaged by the container apps team.
It may also be helpful to open an issue here: https://github.com/microsoft/azure-container-apps


Allow for mTLS connections configured from environment

Created an example PR for issue: https://github.com/spacelift-io/spacectl/issues/236 in which you can configure Client TLS settings through environment variables. Let me know if this is contribution you would be willing to accept or if I should request this feature through other channels.
Additionally, there might be improved UX if the client certs could be linked to a particular profile as well although I didn't explore that in this PR.

thanks for the contribution! can you fix the warning please? otherwise lgtm.

thanks for the contribution! can you fix the warning please? otherwise lgtm.

Fixed!


Readme: Fix Twitter Handles

@mpociot really isn't that much of an evil rabbit, I'm sure ;)

Whoops 🐰


Send survey to new admins that add their first IP address [NOT TO BE MERGED YET]

When a newly created admin adds a new IP address to an
organisations, send a survey to the admin
Why
We wish to know what new admins think of the process of creating a new site
Link to JIRA / Trello card (if applicable):
https://technologyprogramme.atlassian.net/jira/software/projects/GW/boards/251?selectedIssue=GW-944

lgtm


Desktop: Long pop cut off at the bottom

Hi!
I really love the bubble-card. It is the first time that I am happy with my dashboard - it really looks so clean! Thank you!
With beta5, there seems to be a new issues.
1st for every popup on mobile or desktop, if have to enter a top margin of 20px, otherwise it is cut off at the top. That was not the case with earlier versions.
But a real problem is that on Desktop the bottom of a long popup is cut off, no matter of I have a margin of 20px or not.
See Screenshot, where the last Mushroom-Entity is cut off.

This one is missing:

Same issue here! Just installed it for the first time so I'm not sure if it was working before, but a vertical scroll in the popup card would fix the issue.

Hi, this is weird because the pop-ups should be scrollable when the content is longer than the screen (this is working on my setup), is this possible that you have installed an other custom component that involve scrolling up or down?

So I just tried again with a different browser (Edge) and can confirm that it works as expected in Edge but is not scrolling in Firefox. Attempting to scroll the popup in Firefox scrolls the dashboard in the background instead.

Can you tell me if you still have this issue in the new beta 6?
https://github.com/Clooos/Bubble-Card/releases/tag/v0.0.1-beta.6

First attempt, still no scroll in the popup card. Going to clear cache and try again.

Nope, still scrolling the background and not the popup

Thanks, I will install Firefox to try.

Hi! I forgot to mention, that I am using Firefox, too.
Beta 6 didn't solve it. And on Mobile there is sometimes the behaviour that the background is scrolling, but the popup not.
And the swipe down to close is really sensitive. It often closes just by scrolling down.

Thanks again for the detailed feedbacks, I will fix this in the next release. I can't wait to finish this first beta!

I can’t remember that it was there before beta 5. But let me rollback and check again later today

Edit: Just to be sure, this scrolling issue was not here before beta 5 right?

Provided that the rollback really worked, I could reproduce it with every beta and main. Thus, it seems that it has been present ever since the beginning..

Thanks for the details, I tried Bubble Card on almost every browser except Firefox indeed, but I'm sure that this is fixable.

This is now fixed in the new beta!
https://github.com/Clooos/Bubble-Card/releases/tag/v0.0.1-beta.7

I can confirm that it is really working great on Firefox now! THANKS! :-D


Whatever this is, can it truly beat out the refined hypebeast stack?

https://twitter.com/benawad/status/1366076523795652610

I realize that the refined hypebeast stack uses node and apologize for everything

Any sort of JS outside of a browser => 🤢

you should be required to say sorry for using js outside the browser


Custom display formatting

I have a use-case where I need to set a custom label (e.g. “Now”) if the selected date is set to Today. This is very similar to #52 except displayFormat is expecting a string, so you don’t get a lot of flexibility.
This PR gives you a bit more control over display label formatting.
I think the ultimate solution would be merging displayLabel and displayFormat (from #52) into a single prop, which would expect either a string or a function. Something in the lines of:
...

getDateString(date) {
  const { displayFormat } = this.props;

  if (typeof displayFormat === 'function') {
    return displayFormat(date);
  } else if (typeof displayFormat === ‘string’) {
    return date && date.format(displayFormat);
  }

  return toLocalizedDateString(date);
}

...

Thoughts?
Example:

So I've thought about this a bit and while I def understand the need, I am also somewhat loath to overload the displayFormat method or add another method. Given that this is a controlled component, I can think of a way to fill your use case with just the string. For the SDP, it'd be something like this:

Hi, Just tried the displayFormat feature, it works very well, Exactly what I wanted. However, somehow, the allowPastDates feature doesn't work anymore after I updated to V2.2.0.

@xuexiang0304 the place to post this isn't on this issue, but in a new one; however, the changelog tells you that in v2.0, that prop was removed.


S3 bucket name char length exceeds 63 chars

CloudWatchMetrics-Firehose-Resources/cwMetricsToSplunk.yml
Each S3 resource bucket name exceeds the 63 char limit.
Cloudformation returns: 'Resource handler returned message: "Bucket name should be between 3 and 63 characters long" (RequestToken: ... '
For example:
firehoseBacksplashBucket:
Type: AWS::S3::Bucket
Properties:
BucketName: !Sub "${AWS::AccountId}-${AWS::Region}-cwmetrics-${splunkEventType}-firehose-backsplash"
Sample BucketName:<PHONE_NUMBER>12-ap-southeast-2-cwmetrics-metric-firehose-backsplash
This is 64 char long.  Max char length is 63.

Hey @mathewwallebos, thanks for reporting this!  I just pushed this commit: https://github.com/splunk/splunk-aws-gdi-toolkit/commit/e366d0f2d0c274981e02b6289fb87068cef681e8 .
Would you be able to try deploying the CloudFormation Template again just to make sure it resolves this issue?

nice work.  its fixed. thank you.


Add arithmetical operations

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (66b0c23) 100.00% compared to head (01c38e5) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #580   +/-   ##
=========================================
  Coverage   100.00%   100.00%
=========================================
  Files           28        28
  Lines         2245      2276   +31
  Branches       290       291    +1
=========================================
+ Hits          2245      2276   +31

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


Add support for the new v4 API

Please add support for the new v4 API of Google Safe Browsing (https://developers.google.com/safe-browsing/v4/).

I'll have a look at it


Class-generated form HTML IDs

Agree on new approach
Implement

In the security namespace rewrite I've opted to use the base name of the FQN to maintain backwards compatibilitity.
https://github.com/open-sausages/silverstripe-framework/blob/f6ea54632bdb0e3805f0e337548ffbaa67d383d8/forms/FormTemplateHelper.php#L46
Whatever we decide can replace this.

Closing as I don't think this is a major problem now that @tractorcow has a solution in place.


Rviz invalid frame id 'map'

Describe the bug
Rviz simulation does not show the map. Only shows a white car in the middle.
To Reproduce
Steps to reproduce the behavior:
Follow instructions given in readme.
source /opt/ros/foxy/setup.bash
source install/local_setup.bash
ros2 launch f1tenth_gym_ros gym_bridge_launch.py

Expected behavior
A car with surroundings should be visible.
Screenshots
If applicable, add screenshots to help explain your problem.'

root@ccac2fd79f64:/sim_ws# ros2 launch f1tenth_gym_ros gym_bridge_launch.py
[INFO] [launch]: All log files can be found below /root/.ros/log/2022-10-24-15-36-16-659486-ccac2fd79f64-583
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [rviz2-1]: process started with pid [586]
[INFO] [gym_bridge-2]: process started with pid [588]
[INFO] [lifecycle_manager-3]: process started with pid [590]
[INFO] [map_server-4]: process started with pid [592]
[INFO] [robot_state_publisher-5]: process started with pid [594]
[lifecycle_manager-3] [INFO] [1666605976.751587789] [lifecycle_manager_localization]: Creating
[robot_state_publisher-5] Parsing robot urdf xml string.
[robot_state_publisher-5] Link ego_racecar/back_left_wheel had 0 children
[robot_state_publisher-5] Link ego_racecar/back_right_wheel had 0 children
[robot_state_publisher-5] Link ego_racecar/front_left_hinge had 1 children
[robot_state_publisher-5] Link ego_racecar/front_left_wheel had 0 children
[robot_state_publisher-5] Link ego_racecar/front_right_hinge had 1 children
[robot_state_publisher-5] Link ego_racecar/front_right_wheel had 0 children
[robot_state_publisher-5] Link ego_racecar/laser_model had 0 children
[robot_state_publisher-5] [INFO] [1666605976.755687609] [ego_robot_state_publisher]: got segment ego_racecar/back_left_wheel
[robot_state_publisher-5] [INFO] [1666605976.755870726] [ego_robot_state_publisher]: got segment ego_racecar/back_right_wheel
[robot_state_publisher-5] [INFO] [1666605976.755891398] [ego_robot_state_publisher]: got segment ego_racecar/base_link
[robot_state_publisher-5] [INFO] [1666605976.755907391] [ego_robot_state_publisher]: got segment ego_racecar/front_left_hinge
[robot_state_publisher-5] [INFO] [1666605976.755921708] [ego_robot_state_publisher]: got segment ego_racecar/front_left_wheel
[robot_state_publisher-5] [INFO] [1666605976.755936724] [ego_robot_state_publisher]: got segment ego_racecar/front_right_hinge
[robot_state_publisher-5] [INFO] [1666605976.755953904] [ego_robot_state_publisher]: got segment ego_racecar/front_right_wheel
[robot_state_publisher-5] [INFO] [1666605976.755971504] [ego_robot_state_publisher]: got segment ego_racecar/laser_model
[lifecycle_manager-3] [INFO] [1666605976.757300886] [lifecycle_manager_localization]: Creating and initializing lifecycle service clients
[lifecycle_manager-3] [INFO] [1666605976.758294553] [lifecycle_manager_localization]: Starting managed nodes bringup...
[lifecycle_manager-3] [INFO] [1666605976.758334012] [lifecycle_manager_localization]: Configuring map_server
[map_server-4] [INFO] [1666605976.760646446] [map_server]:
[map_server-4] 	map_server lifecycle node launched.
[map_server-4] 	Waiting on external lifecycle transitions to activate
[map_server-4] 	See https://design.ros2.org/articles/node_lifecycle.html for more information.
[map_server-4] [INFO] [1666605976.760741985] [map_server]: Creating
[map_server-4] [INFO] [1666605976.760967425] [map_server]: Configuring
[map_server-4] [ERROR] [map_io]: Failed processing YAML file /sim_ws/src/f1tenth_gym_ros/maps/levine.yaml at position (-1:-1) for reason: bad file
[map_server-4] [ERROR] [1666605976.761120512] []: Caught exception in callback for transition 10
[map_server-4] [ERROR] [1666605976.761130569] []: Original error: Failed to load map yaml file: /sim_ws/src/f1tenth_gym_ros/maps/levine.yaml
[map_server-4] [WARN] [1666605976.761151451] []: Error occurred while doing error handling.
[map_server-4] [FATAL] [1666605976.761164441] [map_server]: Lifecycle node map_server does not have error state implemented
[lifecycle_manager-3] [ERROR] [1666605976.761600445] [lifecycle_manager_localization]: Failed to change state for node: map_server
[lifecycle_manager-3] [ERROR] [1666605976.761628659] [lifecycle_manager_localization]: Failed to bring up all requested nodes. Aborting bringup.
[rviz2-1] QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root'
[rviz2-1] libGL error: MESA-LOADER: failed to retrieve device information
[rviz2-1] libGL error: MESA-LOADER: failed to open amdgpu: /usr/lib/dri/amdgpu_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
[rviz2-1] libGL error: failed to load driver: amdgpu
[rviz2-1] libGL error: failed to open /dev/dri/card0: No such file or directory
[rviz2-1] libGL error: failed to load driver: radeonsi
[rviz2-1] libGL error: MESA-LOADER: failed to retrieve device information
[rviz2-1] libGL error: MESA-LOADER: failed to open amdgpu: /usr/lib/dri/amdgpu_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:\$${ORIGIN}/dri:/usr/lib/dri, suffix _dri)
[rviz2-1] libGL error: failed to load driver: amdgpu
[rviz2-1] libGL error: failed to open /dev/dri/card0: No such file or directory
[rviz2-1] libGL error: failed to load driver: radeonsi
[rviz2-1] [INFO] [1666605976.961126532] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-1] [INFO] [1666605976.961219976] [rviz2]: OpenGl version: 3.1 (GLSL 1.4)
[rviz2-1] [INFO] [1666605977.008845320] [rviz2]: Stereo is NOT SUPPORTED
[rviz2-1] Parsing robot urdf xml string.
[rviz2-1] Warning: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[rviz2-1]          at line 133 in /tmp/binarydeb/ros-foxy-tf2-0.13.13/src/buffer_core.cpp
[rviz2-1] Warning: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist
[rviz2-1]          at line 133 in /tmp/binarydeb/ros-foxy-tf2-0.13.13/src/buffer_core.cpp
[rviz2-1] Warning: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist

**Desktop (please complete the following information):**
 - OS: 6.0.2-arch1-1
 - Browser Firefox

**Additional context**
Add any other context about the problem here.

How do you solve this problem?

If you use Docker, you don't need to modify that path @Toefinder

If you use Docker, you don't need to modify that path @Toefinder

Correct while running rocker the . : represents location mapping so just gotta make sure that one inserts right path.


Tasks Created from different Action Plan

Describe the bug
Occasionally I have users tell me they have been assigned tasks from another user on the team and before their controlling tasks have been completed. This occurs when the first user is working with their own tasks and closing tasks. I have a feeling this is related to the action plan templates feature and the task dependencies. It seems like it is selecting controlling tasks that are not related to the action plan the user is working on. I have attached some screenshots below.
Screenshots
As you can see below, the action plan has 0 completed tasks. However, the 3 tasks with controlling tasks have been created, all by the 1st user that was working on their own task lists.

Here is the task the first user marked completed which triggers the next task "Check-in call". It was closed on 11/2/2023 at 10:21AM.

This task is the one that was created by the prior user and was created at the exact same time as their prior task was closed:

Action Plans Version (e.g. 4.0.1) (See Setup > Installed Packages)

We are on Version 4.2.1

Salesforce UI

[X] Lightning Experience

Org Edition

[X] Enterprise

Additional context
I haven't been able to run any advanced debugging logs yet to try and pinpoint the issue exactly, but this is defintely happening for multiple users and action plans. It seems to be an issue with the code that creates an action plan task when dependent tasks are marked completed.

Apologies for the delay, I was out on paternity leave. I think I may have found the reason why some closed tasks are creating tasks for other Accounts.
If I query the LabsActionPlans__APTask__c object I am seeing some inconsistencies. In the LabsActionPlans__Action_Plan__c field I see the correct Id for the Action Plan. However, in the LabsActionPlans__Controller__c field I see Ids that are related to other Action Plans that are not for the current Action Plan. It seems this field is used for dependent tasks that need to be created so that aligns with what I am seeing. See below:


Parametrizing application name for more flexibility

resolves #
docs dbt-labs/docs.getdbt.com/#

Problem

Solution

Checklist

[x] I have read the contributing guide and understand what's expected of me
[x] I have run this code in development and it appears to resolve the stated issue
[x] This PR includes tests, or tests are not required/relevant for this PR
[x] This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX

Closing this PR due to identity mismatch


Is it possible to create an AppInventor extension from this library?

Hi everyone! As the title of my question says, is it possible to create an AIX extension for AppInventor using this library?
From what I saw in other Issues this library has been used before on Android, so I assume there is a possibility
I leave a little reference:
http://kio4.com/appinventor/125B_extensiones_crear_i.htm

Yes, it should be possible.

https://community.appinventor.mit.edu/t/error-from-companion-java-lang-noclassdeffounderror/451?u=alexander
I share another link
There is a user who tried to perform the extension: He did it but he gets Runtime errors

Since there are no dependencies manager then all jar files must be added to the project somehow. Another option, which was suggested in that thread is to create a "fat jar" with everything included.

In that case, what would be the other missing dependencies / libraries? 🤔

This is a maven-project. You can find all direct dependencies in the POM-file.

Ok i will try and post the results here

Ok, I modified "pom.xml" to download each dependency separately, since the "fat jar" did not work correctly for me
I no longer have compilation errors, but I am stuck on "the main thing"
I have not been able to find a method similar to "GetDevices" in the java files here in the repository, should scanning be stopped manually?
What I want to do is something similar to this (but in code):

Looking for chromecast devices works through discovery. You can find code example in the project Readme file.

In that case I suppose that I will use a Clock to verify every X seconds the detected Cast devices

From what I see "Chromecasts.get()" returns a list of devices in List, so I must convert to YailList to be able to use it in Appinventor

I don't know if issue #125 will be related, but the method which in my case should return a list of Devices returns an empty list
Should any additional steps be taken?
This is the used code:
`@SimpleFunction(description = "Show list of devices detected")
public List ListaDispositivos() {
List listachromecasts = new ArrayList();
for (Object dispositivos : ChromeCasts.get()) {
        ServiceEvent serviceEvent = (ServiceEvent) dispositivos;
        String deviceName = serviceEvent.getInfo().getName();
        listachromecasts.add(deviceName);
      }
    return listachromecasts;
}`

This means that no devices have been discovered on your network (yet?). You can try turning on the DEBUG level.

Also I don't see where you have started the discovery. It needs to be started before looking for the devices.

This means that no devices have been discovered on your network (yet?). You can try turning on the DEBUG level.

How do I do this?

Also I don't see where you have started the discovery. It needs to be started before looking for the devices.

Device discovery I set it in another block, basically like this (I use a Clock to stop Discovery):

The project uses slf4j. You need to figure out how to configure logging in your project.

Could Logcat be a good option?

I don't know. This is not the right place to ask such questions.


Fix tensorflow MNIST dataset download bug in multiple trials

Fix for #621

Could you please update trialConcurrency to 2 and maxTrialNum to 4 in test/config_test/examples/mnist.test.yml and mnist-annotation.yml, so that this fix can be verified by IT?

@chicm-ms  OK,  I will do it later.


Python: memory dependencies not installed

Describe the bug
The connectors.memory dependency libraries in python are managed using the group feature of poetry. However, when the library is installed with python -m pip install --upgrade semantic-kernel, these dependencies are not installed and you have to install the dependent libraries yourself to use them.
To Reproduce

install semantic-kernel with `python -m pip install --upgrade semantic-kernel
start python interpreter and import the library semantic_kernel.connectors.memory

for example from semantic_kernel.connectors.memory.azure_cognitive_search import AzureCognitiveSearchMemoryStore or from semantic_kernel. connectors.memory.postgres import PostgresMemoryStore to reproduce.

Expected behavior
When installing the semantic-kernel library, we would like to be able to install the dependencies needed for memory together and use them as is.
If you manage dependencies by extras instead of groups, you should be able to explicitly install only the dependencies you need, like python -m pip install --upgrade semantic-kernel[postgres].
Screenshots
Installation
$ python -m pip install --upgrade semantic-kernel
Collecting semantic-kernel
  Downloading semantic_kernel-0.3.4.dev0-py3-none-any.whl (122 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 122.5/122.5 kB 8.1 MB/s eta 0:00:00
Collecting openai<0.28.0,>=0.27.0
  Downloading openai-0.27.8-py3-none-any.whl (73 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 73.6/73.6 kB 6.3 MB/s eta 0:00:00
Collecting python-dotenv==1.0.0
  Using cached python_dotenv-1.0.0-py3-none-any.whl (19 kB)
Collecting aiofiles<24.0.0,>=23.1.0
  Downloading aiofiles-23.1.0-py3-none-any.whl (14 kB)
Collecting numpy<2.0.0,>=1.24.2
  Downloading numpy-1.25.1-cp310-cp310-macosx_11_0_arm64.whl (14.0 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 14.0/14.0 MB 19.0 MB/s eta 0:00:00
Collecting regex<2024.0.0,>=2023.6.3
  Downloading regex-2023.6.3-cp310-cp310-macosx_11_0_arm64.whl (288 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 289.0/289.0 kB 15.6 MB/s eta 0:00:00
Collecting tqdm
  Using cached tqdm-4.65.0-py3-none-any.whl (77 kB)
Collecting requests>=2.20
  Downloading requests-2.31.0-py3-none-any.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB 5.0 MB/s eta 0:00:00
Collecting aiohttp
  Downloading aiohttp-3.8.5-cp310-cp310-macosx_11_0_arm64.whl (343 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 343.9/343.9 kB 14.5 MB/s eta 0:00:00
Collecting urllib3<3,>=1.21.1
  Downloading urllib3-2.0.4-py3-none-any.whl (123 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 123.9/123.9 kB 9.5 MB/s eta 0:00:00
Collecting certifi>=2017.4.17
  Downloading certifi-2023.7.22-py3-none-any.whl (158 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 158.3/158.3 kB 10.9 MB/s eta 0:00:00
Collecting charset-normalizer<4,>=2
  Downloading charset_normalizer-3.2.0-cp310-cp310-macosx_11_0_arm64.whl (124 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 124.2/124.2 kB 10.6 MB/s eta 0:00:00
Collecting idna<4,>=2.5
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting async-timeout<5.0,>=4.0.0a3
  Using cached async_timeout-4.0.2-py3-none-any.whl (5.8 kB)
Collecting multidict<7.0,>=4.5
  Downloading multidict-6.0.4-cp310-cp310-macosx_11_0_arm64.whl (29 kB)
Collecting attrs>=17.3.0
  Using cached attrs-23.1.0-py3-none-any.whl (61 kB)
Collecting frozenlist>=1.1.1
  Downloading frozenlist-1.4.0-cp310-cp310-macosx_11_0_arm64.whl (46 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 46.0/46.0 kB 3.5 MB/s eta 0:00:00
Collecting aiosignal>=1.1.2
  Using cached aiosignal-1.3.1-py3-none-any.whl (7.6 kB)
Collecting yarl<2.0,>=1.0
  Downloading yarl-1.9.2-cp310-cp310-macosx_11_0_arm64.whl (62 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.6/62.6 kB 5.6 MB/s eta 0:00:00
Installing collected packages: urllib3, tqdm, regex, python-dotenv, numpy, multidict, idna, frozenlist, charset-normalizer, certifi, attrs, async-timeout, aiofiles, yarl, requests, aiosignal, aiohttp, openai, semantic-kernel
Successfully installed aiofiles-23.1.0 aiohttp-3.8.5 aiosignal-1.3.1 async-timeout-4.0.2 attrs-23.1.0 certifi-2023.7.22 charset-normalizer-3.2.0 frozenlist-1.4.0 idna-3.4 multidict-6.0.4 numpy-1.25.1 openai-0.27.8 python-dotenv-1.0.0 regex-2023.6.3 requests-2.31.0 semantic-kernel-0.3.4.dev0 tqdm-4.65.0 urllib3-2.0.4 yarl-1.9.2

Import AzureCognitiveSearchMemoryStore
Python 3.10.6 (main, Apr 18 2023, 22:47:05) [Clang 14.0.0 (clang-14<IP_ADDRESS>)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from semantic_kernel.connectors.memory.azure_cognitive_search import AzureCognitiveSearchMemoryStore
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/wisteria30/.pyenv/versions/3.10.6/lib/python3.10/site-packages/semantic_kernel/connectors/memory/azure_cognitive_search/__init__.py", line 3, in <module>
    from semantic_kernel.connectors.memory.azure_cognitive_search.azure_cognitive_search_memory_store import (
  File "/Users/wisteria30/.pyenv/versions/3.10.6/lib/python3.10/site-packages/semantic_kernel/connectors/memory/azure_cognitive_search/azure_cognitive_search_memory_store.py", line 7, in <module>
    from azure.core.credentials import AzureKeyCredential, TokenCredential
ModuleNotFoundError: No module named 'azure'

Import PostgresMemoryStore
Python 3.10.6 (main, Apr 18 2023, 22:47:05) [Clang 14.0.0 (clang-14<IP_ADDRESS>)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from semantic_kernel.connectors.memory.postgres import PostgresMemoryStore
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/wisteria30/.pyenv/versions/3.10.6/lib/python3.10/site-packages/semantic_kernel/connectors/memory/postgres/__init__.py", line 3, in <module>
    from semantic_kernel.connectors.memory.postgres.postgres_memory_store import (
  File "/Users/wisteria30/.pyenv/versions/3.10.6/lib/python3.10/site-packages/semantic_kernel/connectors/memory/postgres/postgres_memory_store.py", line 10, in <module>
    from psycopg import Cursor
ModuleNotFoundError: No module named 'psycopg'

Platform

OS: Mac
IDE: python interpreter
Language: Python
Source: pip package version 0.3.4.dev0

Additional context
This is a comparison, but it seems that Langchain is set up to use extras.
https://github.com/langchain-ai/langchain/blob/7a00f17033daa25912409f84bc44af32d7f095be/libs/langchain/pyproject.toml#L221-L240
Translated using DeepL.

I encountered the same problem with missing dependencies while trying to register AzureCognitiveSearchMemoryStore
For me, the dependencies to install to make this work at the moment

azure-core
azure-search
azure-search-documents (the latest prerelease version)

@Wisteria30  and @shehabelhariry  - this is currently as designed as the ACS packages are currently in preview.  Once they because GA we will make the update.


fix: fixed MessageOrigin types

Fixed missing date in forward_origin mentioned in https://github.com/telegraf/telegraf/issues/1968

Fixes https://github.com/telegraf/telegraf/issues/1968

Will publish a release soon.


Ocp cloud infrastructure tooltips

Added "Ocp cloud infrastructure" tooltips and popover to show total cost breakdown. This appears similar to the Ocp tooltips and popover.
Fixes https://github.com/project-koku/koku-ui/issues/1207
Ocp cloud infrastructure overview:

Ocp cloud infrastructure details:

Codecov Report

Merging #1210 into master will decrease coverage by 0.01%.
The diff coverage is 68.75%.

@@            Coverage Diff             @@
##           master    #1210      +/-   ##
==========================================
- Coverage    75.4%   75.39%   -0.02%
==========================================
  Files         227      227
  Lines        4448     4450       +2
  Branches      867      864       -3
==========================================
+ Hits         3354     3355       +1
+ Misses        968      965       -3
- Partials      126      130       +4

Impacted Files
Coverage Δ

...s/reports/ocpReportSummary/ocpReportSummaryAlt.tsx
62.5% <ø> (+3.67%)
:arrow_up:

...s/reports/awsReportSummary/awsReportSummaryAlt.tsx
62.5% <ø> (+3.67%)
:arrow_up:

src/api/ocpCloudReports.ts
85% <ø> (ø)
:arrow_up:

...ports/azureReportSummary/azureReportSummaryAlt.tsx
62.5% <ø> (+3.67%)
:arrow_up:

src/utils/getComputedOcpCloudReportItems.ts
22.8% <0%> (-0.41%)
:arrow_down:

...ocpCloudReportSummary/ocpCloudReportSummaryAlt.tsx
62.5% <100%> (+3.67%)
:arrow_up:

...ts/ocpCloudReportSummary/ocpCloudReportSummary.tsx
92.85% <100%> (-0.48%)
:arrow_down:

.../reports/azureReportSummary/azureReportSummary.tsx
92.85% <100%> (-0.48%)
:arrow_down:

...ents/reports/awsReportSummary/awsReportSummary.tsx
92.85% <100%> (-0.48%)
:arrow_down:

...ents/reports/ocpReportSummary/ocpReportSummary.tsx
92.85% <100%> (-0.48%)
:arrow_down:

... and 2 more

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 cd0abf1...3e92db0. Read the comment docs.


Question about the FPS of RITnet

Hello, I have some questions about the speed of RITnet. The paper reported a speed of 301HZ on a 1080ti, but when I tested it on a 3090, the highest speed I achieved was only 191FPS.

I am very curious about this huge difference. Is the speed of 301FPS the result of further model compression? Here is the code I used to calculate the FPS.
import numpy as np
import time
import torch
from model import model_dict
import os

model = model_dict["densenet"]

model = model.to(device="cuda:1")
# random input
dummy_input = torch.randn(1, 1, 640, 400, dtype=torch.float).to(device="cuda:1")
_ = model(dummy_input)

model.eval()
# torch.cuda.synchronize()

# Run model, calculate FPS
num_iterations = 100
total_time = 0
for i in range(num_iterations):
    start_time = time.time()
    output_tensor = model(dummy_input)
    end_time = time.time()
    total_time += end_time - start_time

fps = num_iterations / total_time
print("FPS: {:.2f}".format(fps))

Actually, there is a third-party speed test for RITnet. In "Semantic Segmentation of the Eye With a Lightweight Deep Network and Shape Correction," it was mentioned that they tested RITnet on a 1080ti with 1440 images, which took 22.75 seconds, roughly equivalent to around 63.3 FPS. Therefore, I'm very curious about how the segmentation speed of 301 Hz mentioned in the paper was achieved. Was the model compressed or quantized? Or, perhaps, was the batch size mistakenly included when calculating FPS?

Hello, qjiewang!
I’m not really able to answer your question myself, but I have forwarded it to the corresponding authors of that manuscript.
I don’t think it was a typo, because we did have it running in real time on a Pupil Labs mobile unit at one point. I believe they Are 120 Hz per eye, that we had it running at 240 Hz at that time. I could be wrong, because the temporal frame rate can be adjusted a bit in the pupil labs system.
Anyhow, both of the original corresponding authors have since moved on from the lab, and so it may be a little bit before they get back to us. In any case, thanks for reaching out.

From: QJieWang @.>
Sent: Saturday, April 15, 2023 6:19 AM
To: AayushKrChaudhary/RITnet @.>
Cc: Subscribed @.***>
Subject: Re: [AayushKrChaudhary/RITnet] Question about the FPS of RITnet (Issue #11)
Actually, there is a third-party speed test for RITnet. In "Semantic Segmentation of the Eye With a Lightweight Deep Network and Shape Correction," it was mentioned that they tested RITnet on a 1080ti with 1440 images, which took 22.75 seconds, roughly equivalent to around 63.3 FPS. Therefore, I'm very curious about how the segmentation speed of 301 Hz mentioned in the paper was achieved. Was the model compressed or quantized? Or, perhaps, was the batch size mistakenly included when calculating FPS?
[image]https://user-images.githubusercontent.com/41409166/232207975-64de0372-8f9d-4758-900e-15c4d2fcaf9f.png
—
Reply to this email directly, view it on GitHubhttps://github.com/AayushKrChaudhary/RITnet/issues/11#issuecomment-1509718971, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACEL7W4YTH7LBGZFZ4L3LMLXBJYZDANCNFSM6AAAAAAW7GUN64.
You are receiving this because you are subscribed to this thread.Message ID: @.***>

Hello @gabrielDiaz-performlab , @QJieWang , I did respond to @QJieWang  via email but it seems you weren't CC'ed in his original email. Please see my response as below.

I reviewed your code sample and have a suggestion. Please consider changing your dummy data to torch.float32. As far as I recall, the model was designed to work with 32-bit eye images (or possibly 16-bit images—I'm not certain, but Aayush can confirm this). Your approach to computing FPS is also correct.
After casting your data to either 32-bit or 16-bit, please get back to us with the results.
As a follow-up to my previous email, I also recommend running approximately 10k iterations and recording the time intervals in a list. Once you've collected the delta time intervals, you can calculate the median duration and use it to report the FPS based on the median value. The median value is a more accurate measure to assess real time capabilities.

The RITnet is designed to work with 32-bit eye images. In Torch, torch.float32 and Torch.float are equivalent. For clarification, I modified the experimental code and output the data type of dummy_input during the experiment. However, the speed still did not change during the experiment.

I also added some additional metrics, such as the maximum, minimum, first, last, and median values of FPS to evaluate the model's FPS. However, unfortunately, I still cannot achieve a speed surpassing 191 FPS on 3090.

Here is my test code :
import numpy as np
import time
import torch
from model import model_dict
import os
from tqdm import tqdm

model = model_dict["densenet"]

model = model.to(device="cuda:2")
# random input
dummy_input = torch.randn(1, 1, 640, 400, dtype=torch.float).to(device="cuda:2")
# dummy_input = torch.randn(1, 1, 640, 400, dtype=torch.float32).to(device="cuda:2")
print(F"the Type of dummy_input is {dummy_input.dtype} ")
_ = model(dummy_input)

model.eval()
# torch.cuda.synchronize()

# Run model, calculate FPS
FPS_list = []
for test in tqdm(range(100)):
    torch.cuda.synchronize()
    num_iterations = 100
    total_time = 0
    for i in range(num_iterations):
        start_time = time.time()
        output_tensor = model(dummy_input)
        end_time = time.time()
        total_time += end_time - start_time

    fps = num_iterations / total_time
    FPS_list.append(fps)
FPS = np.array(FPS_list)
print("The First Test FPS: {:.2f}".format(FPS[0]))
print("The MAX FPS: {:.2f}".format(max(FPS)))
print("The MIN FPS: {:.2f}".format(min(FPS)))
print("The Last Test FPS: {:.2f}".format(FPS[-1]))
print("The Median FPS: {:.2f}".format(np.median(FPS)))
# if set dummy_input torch.float16 it will raise error
# Input type (torch.cuda.HalfTensor) and weight type (torch.cuda.FloatTensor) should be the same
# random input
# dummy_input = torch.randn(1, 1, 640, 400, dtype=torch.float16).to(device="cuda:2")
# print(F"the Type of dummy_input is {dummy_input.dtype} ")
# _ = model(dummy_input)

# model.eval()
# # torch.cuda.synchronize()

# # Run model, calculate FPS
# num_iterations = 100
# total_time = 0
# for i in range(num_iterations):
#     start_time = time.time()
#     output_tensor = model(dummy_input)
#     end_time = time.time()
#     total_time += end_time - start_time

# fps = num_iterations / total_time
# print("FPS: {:.2f}".format(fps))

The code looks good. The forward pass is 300 fps and it was tested multiple times. I have couple of suggestions.

Compute for around 10000 iterations instead of 100.
Ignore first few iterations time. I have seen the time to be different to initially start. If possible just check the end_time-start_time of the last completed iteration to have an understanding of what is last per frame computation.

Regardless, the time was computed in similar fashion as you did except the number of iterations were large.
Regarding comparison in the other papers, the test were mostly complete image reading, image preprocessing and the forward pass which drops the speed to around 30 fps. The code is in python and the speed can be improved using C++ and using half the resolution.

Regarding the 10,000 iterations, although I do not believe that increasing the iterations from 100 to 10,000 can achieve a segmentation speed of over 300FPS from the maximum segmentation speed of 190FPS, if you think it needs to be proven, I have increased the number of iterations. In order to avoid interference from lower speeds, I selected the top 10 data for analysis from the 10,000 iterations. The fact is that even on the 3090, a speed of 300FPS cannot be achieved.

Regarding the experiments in other papers, which also achieved a speed of only about 63FPS on the same device (1080ti), They increased the image preprocessing and postprocessing. However, in fact, RITnet does not have any relevant operations for image postprocessing. "Semantic Segmentation of the Eye With a Lightweight Deep Network and Shape Correction" pursued a small number of model parameters, resulting in very poor segmentation results, so postprocessing was added to improve the segmentation result, which is different from RITnet. RITnet's segmentation result is very good and does not require postprocessing. Therefore, the measurement of RITnet's FPS only adds the operation of loading the image. I believe that this operation alone cannot reduce 300FPS to 63FPS, which is simply unrealistic.

Finally, since the RITnet paper does not describe specific experimental operations, it only gives the conclusion that a segmentation speed of 301HZ was achieved on the 1080ti, which is very different from my experimental results. Although RITnet's segmentation result is very good and achieves top 1, personally, I tend to believe that when the author measured the FPS, the batch size was included in the calculation, resulting in an expansion of FPS. For example, sending 5 images to the 1080ti at a time and returning the result in real-time will result in FPS data being expanded by a factor of 5. Although this operation is reasonable and correct for related eye equipment, it does not conform to the definition of FPS in CV.

RITnet is a great work and has given me a lot of inspiration, but my doubts about the amazing 300FPS segmentation speed of RITnet have not been resolved.
Here is my test code :
import numpy as np
import time
import torch
from model import model_dict
import os
from tqdm import tqdm
import pickle
model = model_dict["densenet"]

model = model.to(device="cuda:2")
# random input
dummy_input = torch.randn(1, 1, 640, 400, dtype=torch.float).to(device="cuda:2")
# dummy_input = torch.randn(1, 1, 640, 400, dtype=torch.float32).to(device="cuda:2")
print(F"the Type of dummy_input is {dummy_input.dtype} ")
_ = model(dummy_input)

model.eval()
# torch.cuda.synchronize()

# Run model, calculate FPS
FPS_list = []
for test in tqdm(range(10000)):
    torch.cuda.synchronize()
    num_iterations = 100
    total_time = 0
    for i in range(num_iterations):
        start_time = time.time()
        output_tensor = model(dummy_input)
        end_time = time.time()
        total_time += end_time - start_time

    fps = num_iterations / total_time
    FPS_list.append(fps)
# sort all the FPS,and take the top 10
FPS_list = sorted(FPS_list, reverse=True)[:10]
FPS = np.array(FPS_list)
print("The First Test FPS: {:.2f}".format(FPS[0]))
print("The MAX FPS: {:.2f}".format(max(FPS)))
print("The MIN FPS: {:.2f}".format(min(FPS)))
print("The Last Test FPS: {:.2f}".format(FPS[-1]))
print("The Median FPS: {:.2f}".format(np.median(FPS)))
# if set dummy_input torch.float16 it will raise error
# Input type (torch.cuda.HalfTensor) and weight type (torch.cuda.FloatTensor) should be the same
# random input
# dummy_input = torch.randn(1, 1, 640, 400, dtype=torch.float16).to(device="cuda:2")
# print(F"the Type of dummy_input is {dummy_input.dtype} ")
# _ = model(dummy_input)

# model.eval()
# # torch.cuda.synchronize()

# # Run model, calculate FPS
# num_iterations = 100
# total_time = 0
# for i in range(num_iterations):
#     start_time = time.time()
#     output_tensor = model(dummy_input)
#     end_time = time.time()
#     total_time += end_time - start_time

# fps = num_iterations / total_time
# print("FPS: {:.2f}".format(fps))

@QJieWang Your approach towards computing FPS seems correct. I personally wouldn't be opposed if you reported RITnet FPS performance using the above mentioned approach. We will conduct another round of verification on our end at a later date and provide an updated RITnet FPS update on GIThub (especially regarding the batchsize). Since the FPS does not change our message, academic contributions or core concept, we still stand by RITnet's evaluation. We hope this unblocks you / your analysis.

Thank you very much, RITnet is an excellent piece of work. I apologize for bothering you.


Remove spaces in path

Can we please remove any spaces in the path name? This is causing issues when users try to install directly to SmartThings rather than copying pasting. Replacing the spaces with underscores should solve the issue.
For example:
https://api.github.com/repos/codersaur/SmartThings/contents/smartapps/InfluxDB_Logger
instead of
https://api.github.com/repos/codersaur/SmartThings/contents/smartapps/InfluxDB Logger

I had the same issue, I couldn't access my SmartApps on IDE and ST determined it was this repo causing the issues due to the space.

Fixed


test

test

!verified

!cherry-pick test

Cherry-pick requested for unmerged PR: test is not supported


Add readme in spanish

I think that would be nice to have a translation for Spanish people to know about AI Lab.

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: wolframtheta sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.


rafthttp: always init streamReader before return from newPeer

Or etcd will panic if someone calls setTerm(), which uses streamReader
internally, before streamReader is inited.
fixes #2966

LGTM. We should enable --race in rafthttp test though.


[LogsAgent] Config - update configuration passed to the logs agent

We previously relied on conf.d being in the same directory as
datadog.yaml. This is the default setup but can be overriden.
Let's instead pass this information as two distinct parameters.
see https://github.com/DataDog/datadog-sheepdog-agent/pull/53

@truthbk tested and confirmed behavior

Not sure what the appveyor failure is about - it appears to be breaking on the actual tool we call to invoke the tests dealing with some unicode output. I think @derekwbrown encountered this in the past.


[Meta] Update Branch Protection Rules - Disable dismissing stale review

Today we have the following branch protection rules in place for main:

[x] Require a pull request before merging

[x] Require approvals: 2
[x] Dismiss stale pull request approvals when new commits are pushed
[ ] Require review from Code Owners
[ ] Restrict who can dismiss pull request reviews

[x] Require status checks to pass before merging

[x] Require branches to be up to date before merging

[ ] Require conversation resolution before merging
[ ] Require signed commits
[x] Require linear history
[ ] Include administrators
[ ] Restrict who can push to matching branches

I propose we make the following changes:

[x] Unchanged Require a pull request before merging

[ ] No longer required Dismiss stale pull request approvals when new commits are pushed

Unless intentionally dismissed, approval/request changes entrusts the author of the PR to rebase/fix checks as needed to merge a PR to reduce the number of back/forth conversations.

Lets vote, 👍 👎 on this issue and look to close after we get a 4 votes either way or Friday the 8th.  If there are other items to address lets duplicate this issue with the specific changes in mind.
If there is a counter proposal lets discuss those in this issue as well.

Why not "require signed commits?"


Fix compatibility mode

Fix the RT renderer's compatibility mode.
The shaders were updated to work in an older GLSL version. This meant giving values explicit high-precision and removing instances of implicit float/int conversion.

The client at least runs but clicking doesn't work because GL.GetTextureImage() is not supported in compatibility mode.


fix nav divider style issue

fix nav divider style issue #2137 #2138

Coverage increased (+0.05%) to 55.224% when pulling bed7b584ab9f5cd4ec9f94d85067f58b921c4136 on steven-zou:master into 91f75f6395d2d53a28ceb7cac1f4a3f2fbd0253d on vmware:master.


Non-UK citizen update

Non-UK citizen update
Trello card
Context
Changes proposed in this pull request
Guidance to review

Hi @MaxineCl this was relatively painless as Gemma decided we didn't need to change the url. I've also checked for other instances of non-UK teachers and they are all right for the context :)


Please

Whould u please give a test to show how to use ？

may this weekend.

upload a test demo.


logging to elastic search uses TLSv1

Rancher versions:
rancher/server or rancher/rancher: v2.0.8
Steps to Reproduce:

install the latest elastic search
Configure rancher to send logs to es
elastic Search only accepts logs sent via tls 1.2, rancher seems to try to connect only using TLSv1

Logs:
[2018-09-26T17:39:25,340][WARN ][o.e.x.s.t.n.SecurityNetty4HttpServerTransport] [els.domain.com] caught exception while handling client http traffic, closing connection [id: 0x36c634ff, L:<IP_ADDRESS>/<IP_ADDRESS>:9200 ! R:/masked_ip:34180]
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: Client requested protocol TLSv1 not enabled or not supported
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:459) ~[netty-codec-4.1.13.Final.jar:4.1.13.Final]

not sure if this is related: https://github.com/rancher/rancher/issues/15558

Version -2.2 master 10/29
Verified fixed


Request for collaboration

Hi! I wrote this PPM viewer for vscode earlier this year, https://github.com/BenWeisz/TinyViewer, I was wondering if you would be interested in collaborating. I could add the character formats P3, P2 for your PPM viewer. Let me know, thanks!

Hello, weiszben!
I'm very happy to hear your offer and I would like to collaborate with you too!
Also, I saw your extension and thought that the code for displaying an image is better than mine ( you used a custom editor but I didn't ), so I would like you to share the code and improve the user experience.
I would like to add you as a collaborator for this repository if you like or please open PR for adding a new feature.
I'm looking forward to hearing from you.
Thanks!

Awesome!  Ill let you know when the PR is ready. Also, you can call me Ben 🙂

Hey @nagata-yoshiteru I was wondering if you could upload some sample images into a folder like /images for example, thanks!

Sorry, one more thing, I was hoping you could add this account <-- as a collaborator so I could push code to the repo. The first message I sent you was with my workplace account. Thank you!

Hello, Ben!
I think your suggestion looks good! I'm wondering images from the site below are suitable for sample images.
https://homepages.cae.wisc.edu/~ece533/images/
I also would like you to suggest other images if you have another idea.
In addition, I sent an invitation to @BenWeisz. Please check your mailbox.
Thanks!

Hey, thanks! Yes those look good, I think boy.ppm should be good for the P6 format I can upload some for P2 and P3

I just merged the code for the custom editor set up. I think once we have the fixes for P5, P6 we can try to modify the code to separate out the code that parses the file headers.
That way we should be able to extend the code more easily to add the P2, P3 formats

Thanks, Ben.
I agree with your suggestion!
I'm counting on you for this.

Also, I would like to publish a new version (v0.0.4) at this time to release your contribution (user editor).
I'll create new version if you don't mind.
Thanks!

Sounds good to me! 🙂

@nagata-yoshiteru
Hey I think there's just a few more things that we need to do:

[ ] Separate our the header parsing code so it can be reused for P2/P3
[ ] Implement parsing for P2/P3
[ ] Update documentation for users and add extension icon

I can handle the last 2 but if you dont mind doing the first one, that would be awesome! Thank you 🙂

Hello, @BenWeisz!
I checked the website I mentioned in #3, and added tiny code to support P2/P3 header in src/parsing.ts.
The above site describes that the header for P2/P3 is the same as P5/P6, so I simply use the same parser for P2/P3.
If we have another problem, let me know, and I'll fix it!
Thanks!


Handle polyphony in MelodyConverter by keeping the highest note at any start step.

This mimics the behavior of the Magenta Python library.

fyi @tamblien


Data analysis (for each test)

turbidity - k-means classification? perceptron?

Difficulty: Medium
Skills Req: Data science/backend - Python implementation of statistical learning algorithms


update schema and sample

Docs Build status updates of commit 7261dcd:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

msteams-platform/resources/schema/manifest-schema.md
:white_check_mark:Succeeded
View

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


Add PROFILE.md

Why:
Closes [issue link]
What's being changed:

Check off the following:

[ ] For workflow changes, I have verified the Actions workflows function as expected.
[ ] For content changes, I have reviewed the style guide.

Unsubscribe
Pada tanggal Sab, 19 Nov 2022 23.14, CathyTomson @.***>
menulis:

Why:
Closes [issue link]
What's being changed: Check off the following:

For workflow changes, I have verified the Actions workflows function
as expected.
For content changes, I have reviewed the style guide
https://github.com/github/docs/blob/main/contributing/content-style-guide.md
.

You can view, comment on, or merge this pull request online at:
https://github.com/skills/introduction-to-github/pull/171
Commit Summary

f980a51
https://github.com/skills/introduction-to-github/pull/171/commits/f980a51f5f00951befc8fbff5de620c84ca288f8
Add PROFILE.md

File Changes
(1 file https://github.com/skills/introduction-to-github/pull/171/files)

A PROFILE.md
https://github.com/skills/introduction-to-github/pull/171/files#diff-474adae50fddd8134a968b8e9f5f101cb860268b397baab28966501f8390a8ed
(1)

Patch Links:

https://github.com/skills/introduction-to-github/pull/171.patch
https://github.com/skills/introduction-to-github/pull/171.diff

—
Reply to this email directly, view it on GitHub
https://github.com/skills/introduction-to-github/pull/171, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AZRBEW4T5RYWYDSUUZ3ASWTWJDVFRANCNFSM6AAAAAASFLSDYM
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

closing pull request

Unsubscribe
Pada tanggal Sab, 19 Nov 2022 23.21, CathyTomson @.***>
menulis:

Closed #171 https://github.com/skills/introduction-to-github/pull/171.
—
Reply to this email directly, view it on GitHub
https://github.com/skills/introduction-to-github/pull/171#event-7849811156,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AZRBEW7Y5JBXVEQREWB56JLWJDV55ANCNFSM6AAAAAASFLSDYM
.
You are receiving this because you commented.Message ID:
@.***>


Fix update-licenses make target

The make target now removes all the LICENSES files before generating them, ensuring us they are all regenerated
Pull Request Motivation
In https://github.com/cert-manager/cert-manager/pull/5880, we made some major changes to our go.mod setup. We also changed the LICENSES generation logic. The update-licenses is causing problems now however, because it does not always update all the LICENSES files. The verify-licenses returns an error in CI, but the update-licenses target does not fix the issue as would be expected.
see https://github.com/cert-manager/cert-manager/pull/5931 and https://github.com/cert-manager/cert-manager/pull/5828 as examples of the target not working.
Kind
/kind bug
Release Note
NONE

I am unsure about the consequences of this change (I never touched this part of the Makefile), but it would be easy to revert if we find a problem with it.
/lgtm


Training gets killed on 2nd epoch

I've tried training with this command: python train.py --PARAMETERS ./parameters --BATCH_SIZE 2 --TIMESTEPS 25 --TESTING
but the training gets killed at the second epoch.

@sandeshshrestha45  for testing it is set for default 2 . If you want to give your own epochs and train as you like you can remove --TESTING argument from  python train.py --PARAMETERS ./parameters --BATCH_SIZE 2 --TIMESTEPS 25 --TESTING
to python train.py --PARAMETERS ./parameters --BATCH_SIZE 2 --TIMESTEPS 25 --EPOCHS 100


Data view tab in table editor

I have a change request to dev team. This request is pointed to behaviour of data viewer tab in the table editor. When I choose this feature, app use to send a sql select query compatible with example below to daba base.
SELECT x. FROM SOME_TABLE x*
This query is acceptable for most database systems but not for one I used to work with - FIS Profile DB. My question is: can you change this template to something like SELECT * FROM SOME_TABLE?
Eventually can you add a feature to edit this template?

Agreed.
But I don't think that configurable template makes sense. I'll just use simple query version by default.