Protocol mismatch

Config generation worked fine and I can connect to the servers with plain ssh, but assh connect gives the following:
__$ assh -V -D connect bm1
DEBU[0000] assh args: [bm1]
DEBU[0000] Loading config file '/home/nbr/.ssh/assh.yml'
DEBU[0000] Loaded config file '/home/nbr/.ssh/assh.yml' (0 + 6 => 6 hosts)
INFO[0000] Host bm1
INFO[0000]   ControlMaster auto
INFO[0000]   ControlPath ~/tmp/.ssh/cm/%h-%p-%r.sock
INFO[0000]   ControlPersist yes
INFO[0000]   IdentitiesOnly yes
INFO[0000]   IdentityFile ~/.ssh/id_rsa
INFO[0000]   Port 22
INFO[0000]   StrictHostKeyChecking no
INFO[0000]   User nbr
INFO[0000]   # HostName: bm1
DEBU[0000] Host: {"ControlMaster":"auto","ControlPath":"~/tmp/.ssh/cm/%h-%p-%r.sock","ControlPersist":"yes","IdentitiesOnly":"yes","IdentityFile":"~/.ssh/id_rsa","Port":"22","StrictHostKeyChecking":"no","User":"nbr","HostName":"bm1"}
DEBU[0000] Proxying
DEBU[0000] Connecting without gateway
DEBU[0000] Preparing host object
DEBU[0000] Connecting to bm1:22
DEBU[0000] Connected to bm1:22
SSH-2.0-OpenSSH_6.6.1p1 Ubuntu-2ubuntu2

Protocol mismatch.
DEBU[0002] Byte written 60

Everything I can find point towards something with netcat, but the connection is made without a gateway.
On the server, I can see this in the logs: Bad protocol version identification '' from...

Hi @zacbri, thank you for your feedback,
The role of assh connect is to open a TCP connection to the remote host, the idea is to use the assh connect as the ProxyCommand feature of the plain ssh client and let the ssh client handle all the SSH protocol
I think you get this Protocol error because you hit ENTER or something like this; You should have the same behavior by connecting using netcat to the SSH server TCP port: nc bm1 22 -> [ENTER]
What happen if you enter ssh -v bm1 ?

Hi,
you're right. I ran some more tests after posting and realised that assh acts as some sort of hook on ssh commands.
At first I was under the impression I had to use assh connect instead of plain ssh everywhere, but that's obviously not the case, ssh bm1 works fine, as do more advanced use cases with Gateways and failover.
Thanks for the quick reply.
Just to make sure I fully understand your explanation: should I explicitly set assh connect as the default ProxyCommand in assh.yml or is that done automatically?

At first I was under the impression I had to use assh connect instead of plain ssh everywhere, but that's obviously not the case, ssh bm1 works fine, as do more advanced use cases with Gateways and failover.

Absolutely :) I chose this method over manual assh binary call so every programs using libssh, not just ssh uses this, so basically, when you type ssh, rsync, scp or if you a third-party program or even a graphical application, the ssh should use your configuration, so now you can easily use multiple gateways with Rsync (which is usually very annoying)

Just to make sure I fully understand your explanation: should I explicitly set assh connect as the default ProxyCommand in assh.yml or is that done automatically?

This one is automatically added, you can see the generated configuration file by running: assh config build, it will print out the ~/.ssh/config content to your terminal, and you should see a ProxyCommand: ...assh, somewhere at the end of the file which is the catch all

That's right.
Thanks for taking time to explain all this.
Great work btw! The gw failover especially is going to make things a lot easier for us.

:) I will keep your issue as a reminder to add an explanation in the README's FAQ :)


gengo: test array ellipsis

support for arrays declared and defined via an ellipsis was
added in 9b36d3d570c08eca8592ee36e1a4b6a6dad8231f.

Codecov Report

Merging #163 into master will increase coverage by 0.05%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #163      +/-   ##
==========================================
+ Coverage    50.8%   50.85%   +0.05%
==========================================
  Files          22       22
  Lines        9737     9737
==========================================
+ Hits         4947     4952       +5
+ Misses       4307     4301       -6
- Partials      483      484       +1

Impacted Files
Coverage Δ

gengo/gengo.go
92.26% <0%> (+0.62%)
:arrow_up:

Continue to review full report at Codecov.

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


Sound mode ALL_ZONE_STEREO to sticky

Hi, thanks for all the work the denonavr module.
Using the sound modes: after ALL_ZONE_STEREO I can no longer switch to the other sound modes.
It is a special Denon feature, that ALL_ZONE_STEREO must be OFF, or you cannot set any of the other sound modes.
Just like in Harmony Hub, there needs to be a ALL_ZONE_STEREO_OFF option. Or, call ALL_ZONE_STEREO_OFF internally before setting the new sound mode.
Can help with testing, have: X1000, X2100 and X3400
Thank you again !

Hmm...  There is code to turn it off before switching to another sound mode: https://github.com/scarface-4711/denonavr/blob/master/denonavr/denonavr.py#L1453-L1455
Is it sticking in all circumstances?  I could see the mode not being reported back if the device is power-cycled and the library doesn't know it's active anymore.

Andrew,
Thank you very much for your reply!
Did get X3400H added to HA along with X1000 and X2100W. Did some testing on the X2100W and X1000:
First, I did test for the point you make about HA and Denon device getting out of sync. In most of my use cases, a mix of voice, HA and OEM IR remotes are used. I did a test of this, and yes, the Denon's sound mode is reported as "sound mode" or blank. I can set it, and it works. The volume and source is being synced/pooled, but apparently sound mode is not.
There is something else going on:
X3400H, X2100W and X1000: When ALL_ZONE_STEREO is on, the Off command to either main OR zone2, turns both off. If so, the ALL_ZONE_STEREO could/should be set to Off before the main or zone2 Off is sent; that way, basic on/off works the same for all sound modes.
Also:
On the X2100W: Once the ALL_ZONE_STEREO is ON (by either IR or HA), then HA fails to set any other sound mode. I think this is a bug. The Denon OEM IR remote can turn it off.
On the X1000: sounds modes can be set as expected (code to turn off ALL_ZONE_STEREO works!).
And:
Source selection is a bit different on the three Denons if ALL_ZONE_STEREO is on, as follows:
X1000: main zone can be set on anything, zone2 two on "Source" (same as main zone), or RCA audio inputs.
X2100W  and X3400H: main zone and zone 2 track, change source on either and the other change to same.
This could be a Denon firmware limitation/bug.
Re X3400H: It can convert digital audio to analog and send it out zone2 without all_stereo_on being on, and no delay/echo, very nice. I think this eliminates the need for all_stereo_on mode in most use cases with this feature. I'll be checking this out more the next few days...
Any Denon main zone Off/On always clears ALL_ZONE_STEREO mode.
Separately, occasionally I am getting "Not able to match sound mode: 'PLIIz Height', returning raw sound mode." in the logs; likely from the X2100W.
All Denons have current firmware, HA 89.2 on PI 3+
If you made it all the way here, thank you very much for taking a look!

Closed in error, sorry.

A bit more testing:
You may already know:
X3400H and X2100W: if main zone is on, zone2 off, then set main_zone to all_stereo_on, that turns zone2 on.
X1000: zone2 does not turn on.
Not sure you can do much about that.
After all this, I think the most important part is: being able to turn all_stereo_on mode off for X2100W and X3400H (and likely others as well).
Also, if I unplug the receiver while on. HA does not fully recovers sync (and soundmode stays blank). A HA reboot is required to resync. I suggest a full resync after a power on would clear this up.
Let me know I if can help in some way.

Please test again once this is included to home-assistant https://github.com/home-assistant/home-assistant/pull/30421

Thank you for your efforts, will test and report back.


Can't create AWS Lambda router: "The parameter origin name must be a domain name."

Hi all,
I am trying to create an authentication router to send cookies between lambdas for OAuth flow with Lucia, but I am getting an error when trying to create a router:
|  Created     AuthRouter sst:aws:Router → AuthRouterCdn sst:aws:CDN
|  Created     AuthRouter sst:aws:Router → AuthRouterCachePolicy aws:cloudfront:CachePolicy
|  Created     AuthRouter sst:aws:Router → AuthRouterCloudfrontFunction aws:cloudfront:Function (3.1s)
|  Error       AuthRouter sst:aws:Router → AuthRouterCdnDistribution aws:cloudfront:Distribution
|  Distribution: operation error CloudFront: CreateDistributionWithTags, https response error StatusCode: 400, RequestID: f94fa32f-8548-414a-b1ad-7e488cc44f6e, InvalidArgument: The parameter origin name must be a domain name.

✕  Failed
   AuthRouter sst:aws:Router → AuthRouterCdnDistribution aws:cloudfront:Distribution
   Distribution: operation error CloudFront: CreateDistributionWithTags, https response error StatusCode: 400, RequestID: f94fa32f-8548-414a-b1ad-7e488cc44f6e, InvalidArgument: The parameter origin name must be a domain name.

This is my code:
export const GoogleClientID = new sst.Secret("GoogleClientID");
export const GoogleClientSecret = new sst.Secret("GoogleClientSecret");

export const callbackFunction = new sst.aws.Function("Callback", {
  url: true,
  handler: "./packages/functions/auth/callback.handler",
});

export const loginFunction = new sst.aws.Function("Login", {
  url: true,
  link:[GoogleClientID, GoogleClientSecret],
  handler: "./packages/functions/auth/login.handler",
});

export const authRouter = new sst.aws.Router("AuthRouter", {
  routes: {
    "/google/login": loginFunction.url,
    "/google/callback": callbackFunction.url,
  },
});

I also tried this but it still gave the same error:
export const authRouter = new sst.aws.Router("AuthRouter", {
  routes: {
    "/google/*": loginFunction.url,
  },
});

I am using version 3.0.40
Thanks!

@NicoPowers think catch-all /* route is mandatory.


Missing word in beginning app disclaimer

The disclaimer dialog at the start of the Application contains a typo. The string resource containing this error is  first_launch_detail.
The exact sentence (added previous sentence for context):

All data collected is purely anonymous and helps greatly to improve Jockey. This information will kept confidential with Marverenic and is subject to the. . .

Corrected Sentence:

This information will be kept confidential with Marverenic and is subject to the. . .

Whoops – misclicked

Thank you for pushing me on this. I have been putting this off for way too long...


Animation use very high CPU usage on macOS

example 0:

import androidx.compose.animation.core.*
import androidx.compose.material.Text
import androidx.compose.runtime.getValue
import androidx.compose.ui.window.singleWindowApplication

fun main() {
    singleWindowApplication {
        val transition = rememberInfiniteTransition()
        val frameIndex by transition.animateValue(
            initialValue = 0,
            targetValue = 63,
            Int.VectorConverter,
            animationSpec = infiniteRepeatable(
                animation = keyframes {
                    durationMillis = 0
                    for (index in 0 until 64) {
                        index at durationMillis
                        durationMillis += 100
                    }
                }
            )
        )

        Text("frameIndex: $frameIndex")
    }
}

example 1:

import androidx.compose.animation.core.*
import androidx.compose.foundation.layout.Column
import androidx.compose.material.Button
import androidx.compose.material.Text
import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember
import androidx.compose.runtime.setValue
import androidx.compose.ui.window.singleWindowApplication

fun main() {
    singleWindowApplication {
        var value by remember { mutableStateOf(0) }
        val transition = updateTransition(value)
        val transitionValue by transition.animateInt( {
            TweenSpec(durationMillis = 10000)
        }, targetValueByState = {
            it
        })

        Column {
            Text("transitionValue: $transitionValue")
            Button(onClick = {
                value = 64
            }) {
                Text("to 64")
            }
            Button(onClick = {
                value = 0
            }) {
                Text("to 0")
            }
        }
    }
}

Found the reason, investigating how to fix it.
If we don't use application/singleWindowApplication, just Swing's ComposeWindow:
import androidx.compose.animation.core.*
import androidx.compose.material.Text
import androidx.compose.runtime.getValue
import androidx.compose.ui.awt.ComposeWindow
import androidx.compose.ui.window.singleWindowApplication
import java.awt.Dimension
import javax.swing.SwingUtilities

fun main() = SwingUtilities.invokeLater {
    ComposeWindow().apply {
        size = Dimension(500, 500)
        setContent {
            val transition = rememberInfiniteTransition()
            val frameIndex by transition.animateValue(
                initialValue = 0,
                targetValue = 63,
                Int.VectorConverter,
                animationSpec = infiniteRepeatable(
                    animation = keyframes {
                        durationMillis = 0
                        for (index in 0 until 64) {
                            index at durationMillis
                            durationMillis += 100
                        }
                    }
                )
            )

            Text("frameIndex: $frameIndex")
        }
        isVisible = true
    }
}

then CPU usage is 1% instead of 10% (on Windows)

Found the reason, investigating how to fix it.
If we don't use application/singleWindowApplication, just Swing's ComposeWindow:
import androidx.compose.animation.core.*
import androidx.compose.material.Text
import androidx.compose.runtime.getValue
import androidx.compose.ui.awt.ComposeWindow
import androidx.compose.ui.window.singleWindowApplication
import java.awt.Dimension
import javax.swing.SwingUtilities

fun main() = SwingUtilities.invokeLater {
    ComposeWindow().apply {
        size = Dimension(500, 500)
        setContent {
            val transition = rememberInfiniteTransition()
            val frameIndex by transition.animateValue(
                initialValue = 0,
                targetValue = 63,
                Int.VectorConverter,
                animationSpec = infiniteRepeatable(
                    animation = keyframes {
                        durationMillis = 0
                        for (index in 0 until 64) {
                            index at durationMillis
                            durationMillis += 100
                        }
                    }
                )
            )

            Text("frameIndex: $frameIndex")
        }
        isVisible = true
    }
}

then CPU usage is 1% instead of 10% (on Windows)

This also work for macOS, then CPU usage is around 9%.

The bug with singleWindowApplication is fixed in v1.0.0-alpha4-build396.
I leave this issue open, as there are more ways to improve CPU/GPU usage.
For example, when we call animateValue or withFrameNanos, we constantly redraw the whole window content with 1 frame per 16ms, even if the animation should be updated as 1 frame per 100ms (or per 500ms as TextField cursor).
To fix that, we should add a new feature in skiko, which will allow to keep the buffer intact if there is no changes.

I'm not sure if is is related to animation, but CPU usage is about 100% when TextField has focus and cursor is blinking in it.

Blinking of the cursor is an animation.
Is CPU usage low in 1.0.0-alpha4-build396?

Wow! When will this improvement be adapted to Toolbox App?

Wow! When will this improvement be adapted to Toolbox App?

Toolbox doesn't use application/singleWindowApplication, it uses ComposeWindow directly. So the issue with the high CPU usage in Toolbox probably is another issue. Don't know if it will be fixed in the next build.
In Compose/Skiko there were two more fixes regarding CPU usage:

high CPU usage during animation on Linux GPU rendering (and Windows/Linux software rendering)
high CPU usage during a hidden state of the window

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.


React peer dependency required for some web-component-only extensions to build

Describe the bug
Bubbling this issue up from the VS Code community Slack.
A toolkit dev ran into an issue where their extension failed to build because the fast-react-wrapper toolkit dep requires react as a peer dependency despite the fact that their extension only uses the vanilla web components.
This issue only seems to occur when using a build tool (like Webpack) to bundle/build extensions because using toolkit.min.js provided a stop-gap solution for the dev.
To reproduce
Forthcoming
Expected behavior
Building an extension that only uses WCs should not fail because of a required peer dep to react.
Screenshots

Desktop (please complete the following information):

OS Version: n/a
Toolkit Version: v0.9.0

Additional context

I could never reproduce the problem described above (even after discussions with the original person who reported it), so I'm closing this issue.
If someone comes across this issue and is facing a similar problem as described above, please open a new issue giving specific details about what you're seeing. Thanks!


feat: NetworkTransform Selective Sync and Interpolation

Fixes #1009
This would be step one, and is good by itself.
Step two might be making the static methods non-static (see #1442 ).
Step three might be refactoring the serialization.
uMMORPG doesn't use NetworkTransform, but uSurvival does for the trees, and they fall the same with master as with this PR.
Also tested with Additive Scenes example that uses NetworkTransform with a client-auth character controller.

closing because conflicts and because mrgadget might make his own networktransform


README.md: Add npmjs badge

I think this is too many badges. I'd prefer to just have the build badges!

Hm, I think this is too many badges. I'd prefer to just have the build badges!

The point is not the badge, but the link to the package on npmjs, i.e. https://www.npmjs.com/package/broccoli-merge-trees which the badge provides. Right now, you have to google this info yourself which I think is bad.
If you prefer a text link to the npm package, that's of course also fine. Feel free to add it yourself or let me know where you think it should go and I can amend the PR/open a new one.

Ping @joliss, did you see my followup message?

I'm not entirely convinced that the link provides much value, since the npm page still is mostly just another copy of the README.

@joliss

I'm not entirely convinced that the link provides much value, since the npm page still is mostly just another copy of the README.

You seem to miss my point.
People might find the repository here on GitHub, and see that you can npm install it - but don't know how to find the package page on npmjs.com.  I find it a reasonable courtesy to the users to provide this service.
Besides, the npmjs page shows a lot of other nice information than just the README:

The most recent version of the package.
The number of downloads (which is an important metric in singling out "serious" from "not-so-serious" packages)
The dependencies and dependents - also a significant factor to look at when determining if a package is  "good" or "bad" dependency.

In the case of this specific package, the npmjs page gives a clear message - this is a good, serious package with a serious enough reputation for hundreds of other packages to make themselves dependent on it.
Simply put, I think it adds value. You are free to disagree, but it would be nice to hear some more counter-arguments in that case.


Evaluation script used for MLPv2

MLPv2 was presented in the SI.

Codecov Report

Merging #67 (33abd36) into main (b57a774) will not change coverage.
The diff coverage is n/a.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
@@          Coverage Diff          @@
##            main     #67   +/-   ##
=====================================
  Coverage   8.66%   8.66%
=====================================
  Files          1       1
  Lines        612     612
=====================================
  Hits          53      53
  Misses       559     559

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


Status

How to get below status
Invalid whatsapp number,
Message sent
Message Failed

@selvam920 you can send message to number and get result, and use that result to decide

ok, thanks


Failed to find module "path"

Hello i installed successfully but i get this error when i try import to import the node package that i wanted. How can i fix this?

Import which node package?

Thanks for the quick reply
https://github.com/jaggedsoft/node-binance-api

I deleted the import path since it was only being imported in test.js file(node-binance-api package) but the issue persist showing that maybe the error comes from nodeify

I don't understand... does the error persist after rm -rf node_modules and npm i?

Yeah i have done that and issue persists

Try to move from hook afterPrepare to afterWatch


Add a PriorityQueue implementation

Based either on a Binomial Heap or a Skewed Binomial Heap

There are enough datastructures - closing to prevent scope creep.


max.sharpe() OptimizationError

Hey,
Trying the basic tutorial using the test prices seems to work fine, but inputting crypto prices leads to errors when calculating the max Sharpe value:
df_merged.head()

Date
BTC
ETH
LTC

2018-01-01
13657.2
772.641
229.033

2018-01-02
14982.1
884.444
255.684

2018-01-03
15201
962.72
245.368

2018-01-04
15599.2
980.922
241.37

2018-01-05
17429.5
997.72
249.271

mu = expected_returns.mean_historical_return(df_merged)
BTC   -0.654099
ETH   -1.011251
LTC   -1.016013
dtype: float64

S = risk_models.sample_cov(df_merged)

BTC
ETH
LTC

BTC
0.447307
0.467077
0.487518

ETH
0.467077
0.756588
0.623595

LTC
0.487518
0.623595
0.803425

ef = EfficientFrontier(mu, S)
raw_weights = ef.max_sharpe()

OptimizationError                         Traceback (most recent call last)
<ipython-input-96-c11009779024> in <module>()
      1 ef = EfficientFrontier(mu, S)
----> 2 raw_weights = ef.max_sharpe()

1 frames
/usr/local/lib/python3.6/dist-packages/pypfopt/base_optimizer.py in _solve_cvxpy_opt_problem(self)
    198             raise exceptions.OptimizationError
    199         if opt.status != "optimal":
--> 200             raise exceptions.OptimizationError
    201         self.weights = self._w.value.round(16) + 0.0  # +0.0 removes signed zero
    202

OptimizationError: Please check your objectives/constraints or use a different solver.

Weirdly enough, if I limit the price interval to just a couple of months, max_sharpe works fine, but then min_volatility breaks down with the same error.

Hi @alienss
Thanks for reaching out! I suspect the problem is that with the expected returns are negative (to be honest I don't quite understand how you are getting a value of more than -1... ). This is quite unusual from a portfolio optimisation perspective, so I'm not fully surprised that the optimiser is complaining. Here are some suggestions:

Use a different estimate of expected returns. In this case, I suggest you look at ema_historical_return with a lower span (maybe 100). I think you are much more likely to get better results if most of your expected returns are positive.
Use exp_cov. Again, because you are dealing with an asset that has had massive historical swings, it is worth paying more attention to recent data.

Let me know how it goes!
Best,
Robert

Hmm, interesting observation, seems that I might've been creating my dataframe a bit weird.
start = "2018-01-01"
end = "2018-12-31"

results = []
coins = ['BTC', 'ETH', 'LTC']

for coin in coins:
  result = pdr.DataReader(coin + '-USD','yahoo',start,end)
  result = result.drop(columns=['High', 'Low', 'Open', 'Close', 'Volume'])
  result.rename(columns={'Adj Close' : coin}, inplace=True)
  results.append(result)

I was then doing
df_merged = reduce(lambda  left,right: pd.merge(left,right,on=['Date'], how='outer'), results)
but I now switched to
df_merged = reduce(lambda left,right: pd.merge(left,right, left_index=True, right_index=True), results)
and it seems to give me better results for mu:
BTC   -0.632080
ETH   -0.750600
LTC   -0.932068
dtype: float64

Unfortunately, I'm still getting the same error for max.sharpe().
I'll try your suggestions and see how it works.
Thanks!

Hello,
I had a similar issue:
"Try another solver, or solve with verbose=True for more "
cvxpy.error.SolverError: Solver 'OSQP' failed. Try another solver, or solve with verbose=True for more information.
But only when I updated to pyportfolioopt 1.1.0 from pyportfolioopt 0.5.5.
It's true that there are most of the assets with negative expected return at the moment of failure. Already tried ema and exp_cov and nothing changes.
Regards,

@CescFF @alienss
The reason things broke in 1.1.0 is that I rebuilt the backend to make it do the optimisation 'properly', using an actual convex optimiser rather than a generic nonlinear optimiser. So if it is currently raising an error, it is because the optimisation problem is not convex.
max_sharpe is possible to formulate as a convex opt problem (which is what I do on the backend), but it requires a variable substitution, which is why it doesn't play so well with other constraints. I'm afraid I can't help you debug more unless you send me your actual dataset so I can investigate why it's not convex.
If you want to access the scipy optimiser from v0.5.5, here's how you can do that:
import objective_functions

ef = EfficientFrontier(mu, S)
weights = ef.nonconvex_objective(
        objective_functions.sharpe_ratio,
        objective_args=(ef.expected_returns, ef.cov_matrix),
        weights_sum_to_one=True,
    )

I should warn you that this ignores your other constraints. If you would like to include them, you must re-build them using the scipy syntax.
Hope this helps!
Best,
Robert

@robertmartin8 the scipy optimiser seems to work for my case.
Here's what I use for my dataset now:
start = "2018-01-01"
end = "2018-12-31"

stocks = ['BTC', 'ETH', 'LTC', 'XRP']
stock_dfs = []

for stock in stocks:
  stock_price = pdr.DataReader(stock + '-USD','yahoo',start,end)
  stock_price = stock_price.drop(columns=['High', 'Low', 'Open', 'Close', 'Volume'])
  stock_dfs.append(stock_price)

all_stock_prices = []
for stock_df in stock_dfs:
  all_stock_prices.append(stock_df['Adj Close'])

prices_df = pd.concat(all_stock_prices, axis=1)
prices_df.columns = stocks

I noticed one thing though, that's not really related to the optimizer. The annualized returns can sometime go below -1, since it's basically taking the mean returns and multiplying them with the number of trading days (eg. in a down market like for the above dataset, where the mean returns are negative, so multiplying those with 365 for example gets you -1.3 or something similar).
Don't know if there's a solution to this though (or if there is need for one, the scipy optimizer seems to deal fine in this case; on the other hand, I get "Expected annual return: -103.5%", which is... odd).

PS: Fixed the expected annual return issue by using compounding=True on mean_historical_return() (shouldn't that always be the correct way of calculating annualized returns?)

@alienss
I'm glad you managed to get it to work! The compounding parameter is discussed in issue #85.
One thing you should think about is whether your expected returns are a good estimate of future returns – if they aren't, then the max_sharpe portfolio will be pretty useless!
Let me know if you have any other issues :)
Best,
Robert

@robertmartin8
In terms of expected returns being a good estimate of future returns, that's a tricky one, especially with cryptocurrency :) I guess I could either choose a lower frequency, such as monthly returns instead of annualized ones, or use the EMA returns with a short span.
To note though, while negative returns are above -1 now, the cvx optimizer still has issues solving it (the scipy one works ok though). I also tried manually adding this cvxopt implementation as described here, and that seems to solve the problem with an optimal status, so I'm unsure why the max_sharpe function cannot find an optimal solution.

@alienss
The method used in the Quantopian thread is very different to ef.max_sharpe(). They are finding the efficient risk portfolios for a bunch of different risk levels, then returning the highest Sharpe ratio. If you want something like that, you might have better luck with the Critical Line Algorithm.
I am quite familiar with optimising crypto portfolios – I spent some time at a fund doing it professionally. In my experience using any simple model of expected returns leads to pretty bad performance – better to just use HRP or min_variance. Just my two cents

@robertmartin8
Thanks for the advice! Just curious, is min_variance similar to what ef.min_volatility() does?

@alienss
whoops, I meant min_volatility 😂

@robertmartin8 max.shape() optimation error can be solved by ur way, but max_quadratic_utility() also has the same issue.

@robertmartin8 How to add other objective functions in this way? For example the origin code is:
ef = EfficientFrontier(mu, S)
ef.add_objective(objective_functions.L2_reg)  # Need l2 reg
ef.max_sharpe()
weights = ef.clean_weights()

@CescFF @alienss
The reason things broke in 1.1.0 is that I rebuilt the backend to make it do the optimisation 'properly', using an actual convex optimiser rather than a generic nonlinear optimiser. So if it is currently raising an error, it is because the optimisation problem is not convex.
max_sharpe is possible to formulate as a convex opt problem (which is what I do on the backend), but it requires a variable substitution, which is why it doesn't play so well with other constraints. I'm afraid I can't help you debug more unless you send me your actual dataset so I can investigate why it's not convex.
If you want to access the scipy optimiser from v0.5.5, here's how you can do that:
import objective_functions

ef = EfficientFrontier(mu, S)
weights = ef.nonconvex_objective(
        objective_functions.sharpe_ratio,
        objective_args=(ef.expected_returns, ef.cov_matrix),
        weights_sum_to_one=True,
    )

I should warn you that this ignores your other constraints. If you would like to include them, you must re-build them using the scipy syntax. An example is below:
    min_weight, max_weight = 0.01, 0.3
    weights = ef.nonconvex_objective(
        objective_functions.sharpe_ratio,
        objective_args=(ef.expected_returns, ef.cov_matrix),
        constraints=[
            {"type": "eq", "fun": lambda w: np.sum(w) - 1},  # sum to 1
            {"type": "ineq", "fun": lambda w: w - min_weight},  # greater than min_weight
            {"type": "ineq", "fun": lambda w: max_weight - w},  # less than max_weight
        ],
    )

Hope this helps!
Best,
Robert

Hi @sailxjx,
You could define a new objective function then pass that to nonconvex_objective.
from objective_functions import sharpe_ratio, L2_reg

def new_objective(w, mu, S):
    return sharpe_ratio(w, mu, S) + L2_reg(w)

Hi @robertmartin8,
It cannot be said that my English is good. I'm sorry in advance if there is any mistake in my style. I am trying to find annualised mean (WEEKLY) return for each asset but when I change to frequency=52 from frequency=252 in mu = expected_returns.mean_historical_return(df, frequency=252), I am getting an error.
It is: pypfopt.exceptions.OptimizationError: ('Please check your objectives/constraints or use a different solver.', 'Solver status: infeasible')
Can you help me?
My data has 243 rows (243 days). My code is here:
mu = expected_returns.mean_historical_return(df,frequency=52)
S = risk_models.sample_cov(df)
ef = EfficientFrontier(mu, S)
weights = ef.max_sharpe()
cleaned_weights = ef.clean_weights()
print(cleaned_weights)
ef.portfolio_performance(verbose=True)

Thanks for the quick return. There are negative values in mu and S.
PS: My data has 243 days and hold the values of 9 currencies against the USD. Like  Euro/Usd, Gbp/Usd.

I don't want to use 252. There is no problem when I am using frequency= 252. As I said, when I set the frequency to 52, I get an error. Because I'm trying to get weekly.

@ayberkakbalik Sorry, typo – I meant that you need to use frequency=52 in both mu and S

@robertmartin8 I made S = risk_models.sample_cov(df,frequency=52) and I got the same error.

Please try re-running the code with : weights = ef.max_sharpe(risk_free_rate=0)

@robertmartin8 thanks it works this time but omg, it turned into a very bad portfolio. The output:
OrderedDict([('EUR', 0.0), ('CAD', 0.01713), ('JPY', 0.0), ('GBP', 0.00164), ('AUD', 0.0), ('RUB', 0.61837), ('CHF', 0.00272), ('CNY', 0.01309), ('INR', 0.34704)])
Expected annual return: 0.1%
Annual volatility: 0.0%
Sharpe Ratio: 1.05
Is it normal?

that looks pretty normal: all of the entries in your mu vector are small so if you're not using leverage, the portfolio can't have a higher return than the highest entry in mu.
It overweights INR because the volatility of INR is so much lower than the others, judging by the diagonals in your covariance matrix.
If you are concerned about asset concentration, you may consider putting constraints on the optimiser.

sorry but it can't be the solution to set the r_f to 0 what is if it is positive or negative


The docs for Find-In-Files are completely outdated wrt. VS 2019

The docs for Find-In-Files are completely outdated wrt. VS 2019!
You rewrote the dialog -- https://devblogs.microsoft.com/visualstudio/modernizing-find-in-files/ -- but forgot to add new documentation?

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

ID: 0e27881f-04bc-b7ba-e217-8360278a14f8
Version Independent ID: d31c8050-339a-688c-869e-ff7942fd3f74
Content: Find in Files - Visual Studio
Content Source: docs/ide/find-in-files.md
Product: visual-studio-windows
Technology: vs-ide-general
GitHub Login: @TerryGLee
Microsoft Alias: tglee

@bilbothebaggins Yes; you're right. The good news is that we're working on updating that documentation as I write this. I'll respond when it's complete and published, at which time we'll close this issue.

@bilbothebaggins We've updated the Find in Files page to reflect the new UI (user interface) and functionality for Visual Studio 2019; we'll close this now with our thanks for your inquiry and interest in helping us improve the documentation.


Add docker swarm Stack selector ala k8s namespace selector

We have to introduce the kinda hacky concept of a 'No Stack' stack
to reconcile it with the idea of a 'default' k8s namespace. This is important
because swarm services without a stack don't have the same docker labels as ones that do.
Curiously, they still have what appears to be a stack name 'prefix' on their names,
but I can't isolate that name anywhere easily so they'll just have to make do.
I basically copy-pasted updateFilters to make this work, todo go back and refactor
to not duplicate 90% of the code.

I basically copy-pasted updateFilters to make this work, todo go back and refactor
to not duplicate 90% of the code.

Please file a techdebt issue for that.
LGTM.


chore(package): update local-repository-provider to version 3.1.3

:tada: This PR is included in version 7.8.26 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[poll] Commit consume offset with specified MessageQueue

FEATURE REQUEST

Please describe the feature you are requesting.

Commit consume offset with specified MessageQueue

Provide any additional detail on your proposed use case for this feature.

when we use DefaultLitePullConsumer, we commit consume offset to broker, but there is only one commit api : commitSync, it will commit all MessageQueue you subscribe/assign. However, in streams scene, we need commit offset of specified MQ.
add commit api like:
commitSync(Map<MessageQueue, consumeOffset>)

Indicate the importance of this issue to you (blocker, must-have, should-have, nice-to-have). Are you currently using any workarounds to address this issue?

must-have

I will add a pr to solve this.

Could please provide more details about you mentioned streams scene? Actually, we need pay more cautious when adding new APIs in rocketmq-client.

Could please provide more details about you mentioned streams scene? Actually, we need pay more cautious when adding new APIs in rocketmq-client.

state data in streams is partitioned, and sometimes only one of the MessageQueue offset will be commit.
such as only commit MQ0 or MQ1.


Cannot find chained trait impl in macros

Aim
I'm running into issues with macros when dealing with relatively involved handling of traits and structs. Sorry for the bad title, I don't really know what might be going on and that's my best guess.
Expected Behavior
Ultimately what I want to do is have some types that implement Serialize, put those inside generic that also implement serialize if their fields do, and then wrap all of that in a container that can reason about the serialization lenght of whatever is inside of it. I'll try to illustrate with code (the impls are left empty as they are not relevant):
trait Serialize<let N: u32> {
    fn serialize(self) -> [Field; N];
}

trait Deserialize<let N: u32> {
    fn deserialize(value: [Field; N]) -> Self;
}

struct MyStruct {
    x: Field,
    y: Field,
}

impl Serialize<2> for MyStruct {
    fn serialize(self) -> [Field; 2] {
        std::mem::zeroed()
    }
}

impl Deserialize<2> for MyStruct {
    fn deserialize(value: [Field; 2]) -> Self {
        Self { x: 0, y: 0 }
    }
}

So far it's all quite standard. Now I'll put this inside a struct that takes a generic, and derive Serialize using arithmetic over generics:
struct MyGenericStruct<T> {
    x: T,
    y: T,
}

impl<T, let N: u32> Serialize<N + N> for MyGenericStruct<T> where T: Serialize<N> {
    fn serialize(self) -> [Field; N + N] {
        std::mem::zeroed()
    }
}

impl<T, let N: u32> Deserialize<N + N> for MyGenericStruct<T> where T: Deserialize<N> {
    fn deserialize(serialized: [Field; N + N]) -> Self {
        Self {
            x: T::deserialize(std::mem::zeroed()),
            y: T::deserialize(std::mem::zeroed()),
        }
    }
}

Lovely stuff. Now I'll define a new marker trait (because of reasons) that will be tied to the serialization length:
trait Storage<let N: u32> {}

impl<T, let N: u32> Storage<N + N> for MyGenericStruct<T> where T: Serialize<N> + Deserialize<N> { }

We expect MyGenericStruct<MyStruct> to implement Storage<4>, since T: MyStruct, which has a serialization length of 2. Note that in this example we're sort of reimplementing the notion that MyGenericStruct contains two T's by doing N+N (we'll get back to this).
I know want to find this 4 value via macros:
comptime fn storage(s: StructDefinition) -> Quoted {
    let mut result = 0;

    for field in s.fields() {
        let (_, typ) = field;
        result = get_size(typ); // ignore the loop + reassign, I'll only call this on a single field anway
    }

    quote {
        fn storage_result() -> u32 {
            $result
        }
    }
}

comptime fn get_size(typ: Type) -> u32 {
    let storage_size = std::meta::typ::fresh_type_variable();
    assert(
        typ.implements(quote { crate::Storage<$storage_size> }.as_trait_constraint()),
        f"Attempted to fetch storage size, but {typ} does not implement the Storage trait",
    );

    storage_size.as_constant().unwrap()
}

and indeed it works!
#[test]
fn test_size() {
    assert_eq(storage_result(), 4);
}

Bug
Now I want to not have to repeat the N+N bit from above, so I change the Storage impl slightly:
impl<T, let N: u32> Storage<N> for MyGenericStruct<T> where MyGenericStruct<T>: Serialize<N> + Deserialize<N> { }

but I run into errors:
error: Attempted to fetch storage size, but MyGenericStruct<MyStruct> does not implement the Storage trait
   ┌─ src/main.nr:87:9
   │
87 │         typ.implements(quote { crate::Storage<$storage_size> }.as_trait_constraint()),
   │         ----------------------------------------------------------------------------- Assertion failed
   │
   = Call stack:
     1. src/main.nr:57:1
     2. src/main.nr:74:18

This seems wrong: MyGenericStruct definitely implements Storage as it definitely implements Serialize and Deserialize as well. Maybe the issue is that this implementation is 'derived' and hinges on arithmetic with generics?
I get the same behavior if I put MyGenericStruct on a container struct and attempt to access its Serialize impl:
struct Container<T> {
    t: T,
}

impl<T, let N: u32> Storage<N> for Container<T> where T: Serialize<N> + Deserialize<N> { }

#[storage]
struct Foo {
    my_container: Container<MyGenericStruct<MyStruct>>
}

error: Attempted to fetch storage size, but Container<MyGenericStruct<MyStruct>> does not implement the Storage trait
   ┌─ src/main.nr:81:9
   │
81 │         typ.implements(quote { crate::Storage<$storage_size> }.as_trait_constraint()),
   │         ----------------------------------------------------------------------------- Assertion failed
   │
   = Call stack:
     1. src/main.nr:58:1
     2. src/main.nr:68:18

To Reproduce
Here's a file with the above, where the two failing cases are commented out (remember to uncomment the passing case):
trait Serialize<let N: u32> {
    fn serialize(self) -> [Field; N];
}

trait Deserialize<let N: u32> {
    fn deserialize(value: [Field; N]) -> Self;
}

struct MyStruct {
    x: Field,
    y: Field,
}

impl Serialize<2> for MyStruct {
    fn serialize(self) -> [Field; 2] {
        std::mem::zeroed()
    }
}

impl Deserialize<2> for MyStruct {
    fn deserialize(value: [Field; 2]) -> Self {
        Self {
            x: 0,
            y: 0,
        }
    }
}

struct MyGenericStruct<T> {
    x: T,
    y: T,
}

impl<T, let N: u32> Serialize<N + N> for MyGenericStruct<T> where T: Serialize<N> {
    fn serialize(self) -> [Field; N + N] {
        std::mem::zeroed()
    }
}

impl<T, let N: u32> Deserialize<N + N> for MyGenericStruct<T> where T: Deserialize<N> {
    fn deserialize(serialized: [Field; N + N]) -> Self {
        Self {
            x: T::deserialize(std::mem::zeroed()),
            y: T::deserialize(std::mem::zeroed()),
        }
    }
}

trait Storage<let N: u32> {}

// This works
impl<T, let N: u32> Storage<N + N> for MyGenericStruct<T> where T: Serialize<N> + Deserialize<N> { }

#[storage]
struct Foo {
    my_container: MyGenericStruct<MyStruct>
}

// // This doesn't work
// impl<T, let N: u32> Storage<N> for MyGenericStruct<T> where MyGenericStruct<T>: Serialize<N> + Deserialize<N> { }

// #[storage]
// struct Foo {
//     my_container: MyGenericStruct<MyStruct>
// }

// // This doesn't work either
// struct Container<T> {
//     t: T,
// }

// impl<T, let N: u32> Storage<N> for Container<T> where T: Serialize<N> + Deserialize<N> { }

// #[storage]
// struct Foo {
//     my_container: Container<MyGenericStruct<MyStruct>>
// }

comptime fn storage(s: StructDefinition) -> Quoted {
    let mut result = 0;

    for field in s.fields() {
        let (_, typ) = field;
        result = get_size(typ);
    }

    quote {
        fn storage_result() -> u32 {
            $result
        }
    }
}

comptime fn get_size(typ: Type) -> u32 {
    let storage_size = std::meta::typ::fresh_type_variable();
    assert(
        typ.implements(quote { crate::Storage<$storage_size> }.as_trait_constraint()),
        f"Attempted to fetch storage size, but {typ} does not implement the Storage trait",
    );

    storage_size.as_constant().unwrap()
}

#[test]
fn test_size() {
    assert_eq(storage_result(), 4);
}

Maybe there's something with N + N that doesn't work well. If you do N * 2 it seems to work fine (I think).
I'm trying to reduce the code or find simpler code to start working on fixing this. For now I found this code doesn't compiler either:
trait Serialize<let N: u32> {}

pub struct MyStruct {}

impl Serialize<1> for MyStruct {}

pub struct MyGenericStruct<T> {}

trait Storage<let N: u32> {}

impl<T, let N: u32> Storage<N + N> for MyGenericStruct<T>
where
    T: Serialize<N>,
{}

pub struct Foo {
    my_container: MyGenericStruct<MyStruct>,
}

fn foo<T>()
where
    T: Storage<2>,
{}

fn main() {
    foo::<MyGenericStruct<MyStruct>>();
}

It does compile if N + N is changed to N * 2 so I'm going to see why one works while the other doesn't.

@asterite I haven't investigated this issue yet but it is true that we don't perform the transformation of N + N to 2 * N. For one, it isn't always desired. Consider if we're matching against the serialize pair impl which requires Serialize<A + B> with nested constraints Serialize<A> and Serialize<B>. If we matched Serialize<N + N> but translated that to Serialize<2 * N> then we may no longer be able to solve 2 * N = A + B. That being said, I say "may" because we could still try to solve it to A = 2 * N - B and B = 2 * N - A which we already rely on doing during monomorphization.
If the handling of N + N is the issue though this doesn't sound like a macro issue, just a limitation of arithmetic generics. In the general case there are infinitely many representations of the same number that we don't handle (e.g. we don't apply the distributive law), so the compiler can't reason about these equalities in the general case. What I'd suggest instead as a workaround when you know you have some Foo<A> that you know should be equal to a Foo<B> is to use the checked_transmute method to convert to the desired type. During monomorphization we later verify that A = B so it should be safe to use as well.


Remote block with tempVectors fails

Transferring block with temp vectors logic does not work. And it can lead to some unexpected problems, infinite recursions or even image crash.
Simple example to reproduce is
| temp |
temp := 10.
remotePeer evaluate: [ temp := temp + 15  ].
temp.

Context should mark all tempVectors to be transferred by value.

I created test for this in branch transferBlockWithTempVector

Switching from current master to the test branch plans to remove a lot of classes. I'm wondering what to put into the Metacello load to get closer to what your test branch originated from.

I suppose it probably just needs to be rebased. I'm not familiar with doing that in the context of an image, though. Do you have to re-issue the Metacello load after doing those sorts of git activities?

It's because project was converted to Tonel. So all files were changed.
The branch only contains a test:
testEvaluatingBlockWithTempManagedByVector
	| remotePeer result |
	remotePeer := self connectToServerPeer.
	"temp variable in following example is managed by temp vector
	according to full block closure logic.
	Temp vectors should be forcibly transferred by value as integral part of context"
	self forkAndWait: [ | temp |
		temp := 10.
		result := remotePeer evaluate: [ temp := temp + 5].
	].
	result should be: 15

I was thinking of your comment "Temp vectors should be forcibly transferred by value as integral part of context".
evaluate: doesn't have an evaluate:with: cousin to do value: calls with, so I'm guessing you mean we'd re-pack the block code and move the declaration and assignment of temp into the interior of the block, somehow determining that the block contains variables that are externally defined?
Through code re-packing, ending up with something that is instead effectively:
self forkAndWait: [
            result := remotePeer evaluate: [ | temp |
                                           temp := temp + 5 ] ]

So far, I've picked up the RBAssignmentNodes that are involved in the block interior using code like this:
| theblock temp assignmentNodes |
temp := 10.
theblock := [ temp := temp + 5 ].
"Get the temp variables that are actually referenced in the inner block"

assignmentNodes := theblock method ast body statements select: [ :thenode |
	thenode isAssignment and: [ (theblock asText findString: thenode variable name startingAt: 1) > 0 ] ].
assignmentNodes.

It's still a work in progress. I plan on injecting the tempVariables and assignmentNodes into the Block's compiled AST node's RBSequenceNode before sending it to remotePeer>>evaluate:
It's a work in progress, though, and I've got a question on the Development room of Discord about the the fact that the addNode messages don't seem to make any adjustments to the surrounding Node's assignment values, which are the pointers to their original locations in the original source.

It also just occurred to me, @dionisiydk, that what you meant by "forcibly transferred by value" could've been to establish BasysRemotePeer>>evaluate:with[:with[:with[:with]]] messages instead of the "defensive style" solution I'm working on.
I'm still new to SmallTalk programming, so it's possible that I've overthought this in that defensive direction.  Probably my interpretation of "forcibly".

Through code re-packing, ending up with something that is instead effectively:
self forkAndWait: [
            result := remotePeer evaluate: [ | temp |
                                           temp := temp + 5 ] ]

Semantically yet. It would lead to such equivalent code if we would pass temp vector by value.
It is required to fix a VM crash with more complex blocks. In current situation the remote side receives a corrupted block which state does not follow the VM expectation: the temp vector must be an Array instance but it is a proxy object.
From the other side the approach proposed here (pass by value) will break normal Smalltalk semantics: modification of the temp inside the block (on remote side) should be reflected on the home context (on client side) where the temp is declared and where it can be used after the return from the block.
A general solution should rewrite a block in a way where any remote temp writes would be encoded as explicit remote message (instead of simple store bytecode). My guess is that it is much harder to implement than what I proposed here.
I am not sure if you are aware what is a tempVector here. An example to understand:
| temp internalTempVector |
temp := #start.
internalTempVector := thisContext tempAt: 2.
[ temp := #end ].
internalTempVector  "==> #(#start)"

When temps written in the block are accessed from the outside of this block they are encoded with indirect arrays (a temp vector #(#start)).
Check this example without block:
| temp internalTempVector |
temp := #start.
internalTempVector := thisContext tempAt: 1.
internalTempVector "==> #start"

If we would know exactly indexes of tempVectors in the context the fix would be very trivial:
BlockClosure>>#prepareValueTransferBy: anObjectTransporter
        .........
	outerContext tempVectors do: [:each |
             anObjectTransporter transferByValue: each]
        ..........

Also interesting that block rewrite would give us a solution for instance variables which is also broken now:
MyClass>>someDistrubutedMethod
        remotePeer evaluate: [myInstVar := #valueFromRemoteSide].

I think this task is super interesting to do but it could take a real time to implement.

I'm actually nearing completion on the block rewrite solution, but you threw me for a loop when you suggested that I may need to be able to reflect the value back into the original variable.

I guess my interpretation about this needing to be a defensive solution is correct, though.

Does the remote side have access to the local context (remote from it's perspective) ? We might be able to use communication via the context itself.

I'm actually nearing completion on the block rewrite solution, but you threw me for a loop when you suggested that I may need to be able to reflect the value back into the original variable.

For some inspiration check how it works in SeamlessRemoteWorkspaceVariable. In RPlayground remote scripts actually updates the local variables value stored on the client side.
But it can be not very suitable here because we don't have a way to substitute the normal variables (the playground case is special anyway in local playground).

I'm still trying to get my head around temp vectors, actually.
I think your first explanation block was supposed to be:
| temp internalTempVector |
temp := #start.
internalTempVector := thisContext tempAt: 2.
[ temp := #end ] value.
internalTempVector

That actually yields "#(#end)", though. And I don't exactly get how the tempAt indexing actually works or the block closure's shorthand syntax for it.

Does the remote side have access to the local context (remote from it's perspective) ? We might be able to use communication via the context itself.

On remote side outer contexts of the block are just copies of client side contexts. They are not proxies if you think about it (VM does not allow it).
Thinking about SeamlessRemoteWorkspaceVariable. Block and its home method can be rewritten (for being transferred) in the way that all variables are converted to such kind of special variable (SeamlessRemoteTemp, SeamlessRemoteInstVar). So any var access and var store would go through explicit message send to them where they will delegate an operation to the remote (client) side using one of reflective calls to get raw access to client side variable.

I'm still trying to get my head around temp vectors, actually.
I think your first explanation block was supposed to be:
| temp internalTempVector |
temp := #start.
internalTempVector := thisContext tempAt: 2.
[ temp := #end ] value.
internalTempVector

Actually not. I intentionally did not put #value. Compiler does not care if block would be really executed or not. It sees the "closure logic" for variable access and compile it with array indirection.
And your #value case should prove my word: the actual temp value is really managed inside some array (tempVector).

That actually yields "#(#end)", though. And I don't exactly get how the tempAt indexing actually works or the block closure's shorthand syntax for it.

Me either. But I think it is not really important for example.

Well, I've already got the variable scanning piece to help establish which mappings I need to make to SeamlessRemoteInstVar, so I think I can probably solve it using that. Thank you for the pointers.

There is tempNamed:, too. Which reads the var from the context, taking temp vectors into account.
This is used to access temps in the doIt.

( I need to carefully read the thread, sadly no time today)

@dionisiydk, I've been digging at this for a couple of days. I think the issue is that outerContext needs a proxy back from remote to local, but I've been unable to figure out how to establish it.

You can't have it as a proxy: the vm will crash with non local return from such block (I tried it long time ago but I am quite sure about it).
Did you check  SeamlessRemoteWorkspaceVariable?
#emitStore:/#emitValue: compiles access as a message send to variable itself. It leads to remote send from the remote side to the client because variables are transferred as a proxy in method literals.
This should work for other variables. Client should convert given block/homeMethod pair to transferred version where all kind of variables are replaced and compiled with such indirection.

I looked at the class, but I just couldn't find good examples of how to use it. The one reference shows it being added as a binding in SeamlessRemoteScriptRenderer. Do I have to somehow have to get the binding for these registered in outerContext of the Block before it gets serialized?

Or is it just an in-place replacement of the compiled assignment nodes? Iterate through them and replace them like:
node value: (SeamlessRemoteWorkspaceVariable key: node name value: node value)

Let's use an example. I am not sure that I understand correctly your thoughts.
The method:
| temp |
temp := 2 * 2.
^temp

should be converted to:
| temp |
``specialVarInLiteral write: (2 * 2).
^``specialVarInLiteral read

``specialVarInLiteral would be an instance of special kind of variable encoded as literal during transformation. Let's call it IndirectTempVariable. The implementation of write for example can be like:
IndirectTempVariable>>write: aValue
    tempDefiningContext tempAt: tempIndex put: aValue

Transformation code will create IndirectTempVariable instances with corresponding original context and tempIndex.
This example does not depend on Seamless and any remoting. It should be easy to test. And it can be even a part of Pharo AST package as interesting example of what we can do.
Then for Seamless scenario we will configure IndirectTempVariable to be transferred by reference. So on remote side #write: and #read: messages will be sent to client objects and therefore executed on original client context modifying original temp variables

And the implementation of block transfer strategy would be like:
BlockClosure>>prepareValueTransferBy: anObjectTransporter
      self hasAssignments ifTrue: [
            ^anObjectTransporter transfer: self byReplacement: self transformToHaveIndirectAssignments]
     "original code"

Where #transformToHaveIndirectAssignments will create new transformed block with transformed home method where every assignment is replaced by appropriate indirect variable.
We will need to support other variables like IndirectInstanceVariable. But maybe existing infrastructure would allow to have only IndirectVariable configured with actualVariable instance (see OCAbstractVariable subclasses)

I was missing both hooks.
I was trying to figure out how to replace the RBLiteralValueNode in the AST block with that SeamlessRemoteWorkspaceVariable, which looks like it was specifically designed for use in SeamlessRemoteSyncContext only (it has methods used for binding and mapping). The RBLiteralValueNode is literally the only Variable node that actually does have a 'value' parameter, but it can only be assigned during instantiation and it seems to actually only work with literals.
So your suggestion about doing the replacement as a message node instead solve that issue, though it'd be slick to support the write and read behaviors in a more native way. At least this makes it very clear if you encounter it in the debugger later.
Thanks for these pointers. Obviously, you have more of the experience with the system to know all these tricks and I appreciate your guidance while I dig into things beyond mine.

Now It should be slightly straightforward to implement. We unified all type of variables in Pharo 9 under single Variable hierarchy and they are directly used in AST:

there is only RBVariableNode pointing to various kinds of Variable subclasses.
we just need to implement "IndirectReflectiveVariable" to be used in transferred methods


boinc service: optionally use a FHS environment

This ensures that the BOINC project applications (immutable blobs) can
find the libraries they need to run, since many contain hardcoded paths.
Additionally, an option to install Virtualbox into the environment
and an option to install NVIDIA OpenCL/CUDA libraries into the
environment were added. Other OpenCL libraries could probably be
added similarly, but I don't have the hardware to test it on.
Motivation for this change
Things done

[x] Tested using sandboxing
(nix.useSandbox on NixOS,
or option build-use-sandbox in nix.conf
on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] Linux

[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

I've made these changes and rebased onto master. Hopefully CI should pass this time...

If I understand correctly different applications in BOINC can require any additional dependencies. Maybe instead of adding a flag for each one (which doesn't scale) you want to add extraEnvPackages or something like that? Just a suggestion, don't mind me if you think that's less convenient.

Superseded by #30908, closing.


DEMO: enhanced bootstrapping flow documentaiton

Hi,
I created the original document for internal use - but thought of contributing it back to the community.
This pull request is just to check you are interestested in this contribution, before I invest extra effort.
A concept being used is "simplified code" -> showing code, but in a simpler form that is easier to follow.
Work still needed:

Translate two code snippets from kotlin --> java (we use kotlin)
Style and grammar
Some formatting
Add links

I'll need you to:

review the content is correct and accurate / suggest fixes.
grammar review will be appreciated as well, as I'm not a native english speaker.

Just answer on the commit which way you want to go.

Coverage remained the same at 85.185% when pulling ec67939efa74ee0cc8691228224721f5db123869 on baronlior:master into 4011aee894e8145004e8285f550bd5199a3c54ad on dropwizard:master.

Yes! This would be a nice improvement on the current docs. I read it and looks good, so once you finish up (kotlin -> java, etc), I'll go over it with a fine comb.

Coverage increased (+0.01%) to 85.199% when pulling 2660b276ed424eb5da7a29b97506b8b197a97686 on baronlior:master into 4011aee894e8145004e8285f550bd5199a3c54ad on dropwizard:master.

OK. I'm good to go.

please check the link on the last commit was placed properly - I wasn't able to verify that.

Cheers, Lior

Coverage increased (+0.01%) to 85.199% when pulling 6c5fc13a559daba60db99ec20652ab46df2ae162 on baronlior:master into 4011aee894e8145004e8285f550bd5199a3c54ad on dropwizard:master.

Coverage increased (+0.01%) to 85.199% when pulling 6c5fc13a559daba60db99ec20652ab46df2ae162 on baronlior:master into 4011aee894e8145004e8285f550bd5199a3c54ad on dropwizard:master.

Thank you!


Problematic links in official website

In https://www.tensorflow.org/versions/r0.7/how_tos/tool_developers/index.html, some of the links that referred to this repository contain "%0A" in random places which make them invalid.

Okay I updated the website and pushed the fix.


Fix charge_volume

Fixes #3070.

No test?

Looks good to me.

Oops, didn't refresh for a while :P

This modifies two paydays that it almost certainly didn't mean to. In the future we should follow a script like what I did below for any production data modifications that are moderately complex.
psql gratipay -f ../backups/2015-01-07.psql
psql gratipay -c "\copy (select * from paydays order by id) to 'p1.csv' WITH (FORMAT CSV, HEADER TRUE, FORCE_QUOTE *);"
git checkout fix-charge_volume
psql gratipay -f branch.sql
psql gratipay -c "\copy (select * from paydays order by id) to 'p2.csv' WITH (FORMAT CSV, HEADER TRUE, FORCE_QUOTE *);"
git diff p1.csv p2.csv

diff --git a/p1.csv b/p2.csv
index b8abdcf..219943b 100644
--- a/p1.csv
+++ b/p2.csv
@@ -96,7 +96,7 @@ id,ts_start,ts_end,nparticipants,ntippers,ntips,ntransfers,transfer_volume,ncc_f
 "123","2014-03-20 13:29:39.564753-05","2014-03-20 16:30:07.167712-05","27548","1623","5349","5349","12664.49","379","1419","514","11183.69","479.42","102","-6012.52","0.00","124","173","293.86","2664","0"
 "124","2014-03-27 08:00:49.09408-05","2014-03-27 11:10:50.573562-05","27860","1638","5367","5367","12747.74","395","1438","525","11254.43","484.78","104","-6235.15","0.00","125","174","338.90","2696","0"
 "125","2014-04-03 09:52:58.237632-05","2014-04-03 13:17:57.194351-05","28146","1657","5327","5327","12770.27","422","1444","510","11001.22","472.91","105","-5828.38","0.00","133","177","390.53","2715","0"
-"126","2014-04-10 07:08:41.406646-05","2014-04-10 10:58:42.058049-05","28379","1665","5325","5325","12770.78","439","1453","516","11079.68","476.96","111","-6201.57","0.00","131","182","381.59","2723","0"
+"126","2014-04-10 07:08:41.406646-05","2014-04-10 10:58:42.058049-05","28379","1665","5325","5325","12770.78","439","1453","518","11358.18","476.96","111","-6201.57","0.00","131","182","381.59","2723","0"
 "127","2014-04-17 10:32:51.59449-05","2014-04-17 12:29:26.131433-05","28650","1665","5336","5336","12399.97","448","1456","502","10625.45","459.57","97","-6951.54","0.00","133","135","363.70","2718","0"
 "128","2014-04-24 09:14:59.494671-05","2014-04-24 11:19:52.779422-05","29015","1691","5446","5446","13120.14","460","1477","544","11685.49","502.99","105","-6614.89","0.00","132","135","360.59","2758","0"
 "129","2014-05-01 09:30:33.651436-05","2014-05-01 11:38:49.95375-05","29320","1718","5510","5510","13275.02","478","1481","569","12019.00","520.20","99","-6398.65","0.00","136","146","380.22","2802","0"
@@ -117,7 +117,7 @@ id,ts_start,ts_end,nparticipants,ntippers,ntips,ntransfers,transfer_volume,ncc_f
 "146","2014-08-14 11:03:33.575643-05","2014-08-14 13:51:57.458134-05","32438","1791","5066","5300","12961.75","0","1723","477","11003.42","463.04","114","-7339.02","0.00","0","234","1166.70","2898","3"
 "150","2014-08-21 13:29:53.206122-05","2014-08-21 14:26:04.999344-05","32767","1800","5133","5354","13317.50","500","1758","500","11463.34","483.29","108","-7109.88","0.00","0","220","890.25","2892","3"
 "151","2014-08-28 14:01:15.49764-05","2014-08-28 14:18:01.167168-05","33064","1839","5243","5469","13291.28","466","1769","527","11635.37","496.39","115","-6810.18","0.00","0","225","828.89","2950","3"
-"152","2014-09-04 12:00:30.935981-05","2014-09-04 15:41:24.558507-05","33307","1846","5229","5462","13342.69","399","1853","515","11587.52","491.39","114","-8197.02","0.00","0","226","846.24","2962","3"
+"152","2014-09-04 12:00:30.935981-05","2014-09-04 15:41:24.558507-05","33307","1846","5229","5462","13342.69","399","1853","514","11577.52","490.80","114","-8197.02","0.00","0","226","846.24","2962","3"
 "154","2014-09-11 09:41:25.36366-05","2014-09-11 09:54:04.954961-05","33488","1826","5194","5424","13273.81","410","1866","500","11363.02","480.36","110","-8483.10","0.00","1","230","913.41","2929","3"
 "155","2014-09-18 08:56:34.307214-05","2014-09-18 09:44:34.819309-05","33697","1823","5221","5451","12986.51","422","1865","468","10776.10","453.73","115","-6629.64","0.00","1","230","895.07","2931","3"
 "156","2014-09-25 10:52:19.512312-05","2014-09-25 11:44:05.711452-05","33925","1832","5272","5509","13434.91","422","1881","508","11596.58","489.52","114","-7021.80","0.00","0","237","880.76","2942","3"
@@ -132,6 +132,6 @@ id,ts_start,ts_end,nparticipants,ntippers,ntips,ntransfers,transfer_volume,ncc_f
 "166","2014-11-27 07:33:27.944435-06","2014-11-27 08:25:01.310933-06","36144","1819","5115","5376","10301.85","524","2027","453","8164.38","373.42","112","-5176.68","0.00","0","261","798.41","2934","3"
 "169","2014-12-04 10:39:19.683009-06","2014-12-04 10:51:37.578157-06","36371","1815","5134","5392","9932.24","531","2040","454","7876.91","365.38","102","-4887.77","0.00","0","258","766.55","2921","3"
 "170","2014-12-11 13:58:28.200612-06","2014-12-11 16:27:40.670449-06","36645","1815","5073","5334","10388.05","546","2051","489","8773.06","401.88","110","-5645.24","0.00","0","261","774.68","2916","3"
-"173","2014-12-18 09:41:45.731589-06","2014-12-18 09:53:11.200186-06","36814","1807","5106","5365","10566.31","554","2064","1007","11852.52","750.36","111","-5575.44","0.00","0","259","786.36","2921","3"
-"174","2014-12-25 10:05:10.041179-06","2014-12-25 10:17:58.834771-06","37053","1814","5102","5361","10404.11","569","2074","1038","12230.42","772.71","112","-6288.75","0.00","0","259","782.88","2931","3"
-"175","2015-01-01 11:47:07.498402-06","2015-01-01 14:37:43.514035-06","37270","1813","5003","5259","10441.84","557","2050","1008","11780.33","749.71","99","-5234.57","0.00","0","256","770.56","2924","3"
+"173","2014-12-18 09:41:45.731589-06","2014-12-18 09:53:11.200186-06","36814","1807","5106","5365","10566.31","554","2064","453","8784.92","391.39","111","-5575.44","0.00","0","259","786.36","2921","3"
+"174","2014-12-25 10:05:10.041179-06","2014-12-25 10:17:58.834771-06","37053","1814","5102","5361","10404.11","569","2074","469","8754.59","395.31","112","-6288.75","0.00","0","259","782.88","2931","3"
+"175","2015-01-01 11:47:07.498402-06","2015-01-01 14:37:43.514035-06","37270","1813","5003","5259","10441.84","557","2050","451","8685.74","387.90","99","-5234.57","0.00","0","256","770.56","2924","3"

@Changaco we should add a test that confirms that the database self-check succeeds, because I can reproduce the AssertionError locally.

@seanlinsley I don't understand.

This error should have been caught by the test suite.

The test suite doesn't have access to real data, it can't run the checks on the production DB nor a backup of it.
However we could run the checks in release.sh instead of waiting for the error to show up in Sentry.


Add rvm 2.3.4 for integration chef ~> 13

Chef ~> 13 requires Ruby version >= 2.3.0, so this PR add rvm 2.3.4.

Coverage increased (+0.02%) to 89.326% when pulling be776e684edfa883a312416eea888413ec755519 on hirose31:fix/travis-master into baa77a52a83079b17b6f4d08da927b82b2401def on matschaffer:master.

Coverage decreased (-0.04%) to 89.272% when pulling 153b7da36edb1178b58f6e466dc76bfeb5401b57 on hirose31:fix/travis-master into baa77a52a83079b17b6f4d08da927b82b2401def on matschaffer:master.

Coverage increased (+0.02%) to 89.326% when pulling c5bfba11f23e6bad7faa8c10b0f2e834695b0e8c on hirose31:fix/travis-master into baa77a52a83079b17b6f4d08da927b82b2401def on matschaffer:master.

@matschaffer
/cc @aspyatkin
Head of opscode/chef requires Ruby >= 2.3.0 https://github.com/chef/chef/blob/master/chef.gemspec#L16, so I've added rvm 2.3.4 to .travis.yml.
But still Gemfile.chef-master w/ Ruby 2.3.4 fails. https://travis-ci.org/matschaffer/knife-solo/jobs/218735418

Bundler could not find compatible versions for gem "ohai":
In Gemfile:
chef was resolved to 13.0.98, which depends on
ohai (~> 13.0)

The root cause is that Chef 13.0.98 requires ohai ~> 13.0 but ohai 13 is not released yet! https://github.com/chef/chef/blob/master/Gemfile#L14-L15
any workaround?

So long as ohai 13.0 is available in git you should be able to have the
Gemfile resolve from there.
On Wed, Apr 5, 2017 at 13:12 hirose31<EMAIL_ADDRESS>wrote:

@matschaffer https://github.com/matschaffer
/cc @aspyatkin https://github.com/aspyatkin
Head of opscode/chef requires Ruby >= 2.3.0
https://github.com/chef/chef/blob/master/chef.gemspec#L16, so I've added
rvm 2.3.4 to .travis.yml.
But still Gemfile.chef-master w/ Ruby 2.3.4 fails.
https://travis-ci.org/matschaffer/knife-solo/jobs/218735418
Bundler could not find compatible versions for gem "ohai":
In Gemfile:
chef was resolved to 13.0.98, which depends on
ohai (~> 13.0)
The root cause is that Chef 13.0.98 requires ohai ~> 13.0 but ohai 13 is
not released yet! https://github.com/chef/chef/blob/master/Gemfile#L14-L15
any workaround?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/matschaffer/knife-solo/pull/509#issuecomment-291749173,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAACsgzDpcFnnDUJUfSdOqzk-WLk9ZRQks5rsxSvgaJpZM4MztHn
.

--
-Mat
matschaffer.com

Coverage increased (+0.02%) to 89.326% when pulling b2a6b1662dc6359f375f0430f424606d1004156f on hirose31:fix/travis-master into baa77a52a83079b17b6f4d08da927b82b2401def on matschaffer:master.

Coverage increased (+0.02%) to 89.326% when pulling b2a6b1662dc6359f375f0430f424606d1004156f on hirose31:fix/travis-master into baa77a52a83079b17b6f4d08da927b82b2401def on matschaffer:master.

Coverage increased (+0.02%) to 89.326% when pulling b2a6b1662dc6359f375f0430f424606d1004156f on hirose31:fix/travis-master into baa77a52a83079b17b6f4d08da927b82b2401def on matschaffer:master.

OK, All builds passed!

:heart:


Add image and image id

What does this PR do?

Motivation

Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

/merge


Please provide more valueble info when an exceptioni raised.

I tried to use internal model. But  I keep getting 400 error. with the stacktrace, it has little help for the issue.
Traceback (most recent call last):
  File "/data/aitest/my-poc.py", line 54, in <module>
    res = my_model.generate(["hello"])
  File "/data/aitest/lib/python3.10/site-packages/genai/model.py", line 121, in generate
    return list(self.generate_as_completed(prompts))
  File "/data/aitest/lib/python3.10/site-packages/genai/model.py", line 105, in generate_as_completed
    raise me
  File "/data/aitest/lib/python3.10/site-packages/genai/model.py", line 103, in generate_as_completed
    raise GenAiException(response_gen)
genai.exceptions.genai_exception.GenAiException: <Response [400 Bad Request]>

I know 404 maybe some credentials issue. But more valubable info should be helpful.

@dongwangdw : Closing it with PR https://github.com/IBM/ibm-generative-ai/pull/57 -- you should be able to see raw response from the server after you install the new release.


Issues with links on Readme.md at computerscience/Educator Content/Complimentary Course Content

Issues is links in text post back to the old MSFTImagine Resources so users are getting 404 clicking from links on readme.
Can the Readme be updated to points at Microsoft/computerscience/Educator Content/Complimentary Course Content/...

Fixed.


Android: Remove unusable android_stl=no option

As of 3.1 and later, we have too many thirdparty C++ dependencies
and some internal uses of new and delete too for it to make
sense to build without the STL on Android.
The option has been broken since 3.0, and the "System STL" that we
relied on for basic support of new and delete is likely to be
dropped from the NDK:
https://android.googlesource.com/platform/ndk/+/ndk-release-r20/docs/BuildSystemMaintainers.md#System-STL

Cherry-picked for 3.1.2.


Gate release action to rust-analyzer owner

Should Fix https://github.com/rust-analyzer/rust-analyzer/issues/3589

bors r+

Thanks @swarnimarun and @flodiebold !

FYI this PR broke releases, https://github.com/rust-analyzer/rust-analyzer/runs/515231288?check_suite_focus=true
Noticed because the nightly is 2 days old


Include IP address in connection info

Describe the Feature
The connection info should include the IP address for all connected network interfaces (cellular, wifi, wired, vpn?)
Possible Implementations
Add a map of network interface and their IP addresses to the connection info.
Related Issues
https://github.com/react-native-community/react-native-device-info/issues/635
#51

👋 Thanks for the request. I have added some notes below to help with future implementation:

Android: Use a method like this but maybe using getHostAddress to support ipv6 addresses.
iOS: Use a method to get the IP address, like this.

react-native-device-info does like the link you mentioned - deployed code: https://github.com/react-native-community/react-native-device-info/blob/master/android/src/main/java/com/learnium/RNDeviceInfo/RNDeviceModule.java#L67

deployed / apparently-working code for iOS https://github.com/react-native-community/react-native-device-info/blob/master/ios/RNDeviceInfo/RNDeviceInfo.m#L408

react-native-device-info only returns the WiFi IP and ignores all other network interfaces. It could easily be added to react-native-device-info but it was decided that it should be added here instead. See the link under related issues.

@respectTheCode I know, I'm the react-native-device-info guy :-), I was just trying to offer a hot link to the code we have as I try to work with @matt-oakes so that netinfo is more awesome than device-info was in this area. 🤞

any update on this?

@respectTheCode If there's no post here, there is no update on it. Contributions are always welcome 🙂

Android and iOS support added in #122 🎉

This still only includes the IP address for en0

@respectTheCode That was outside the scope of the initial PR. Feel free to send one over to add support for the other network interfaces.

This ticket shouldn't be closed as it wasn't resolved

You have a point, as originally stated the ticket was to support the rest of the network interfaces. The title is misleading. I believe it still lacks a motivated person to make the PR though

Thanks @mikehardy, you are right that the title miss-lead me.
@respectTheCode You clearly need this feature. Are you able to submit a pull request to add support for it? It's not a feature I personally need so the likelihood that I'll write it myself it basically 0%. Please let me know if you need some pointers on where to start with making a pull request to add this feature 🙂 I can give you some pointers on where to make the modifications.

I would say the react-native-network-info package has a stronger implementation of this feature if it is a requirement for you, in their getIPV4Address method: https://github.com/pusherman/react-native-network-info/blob/master/ios/RNNetworkInfo.m#L168 / https://github.com/pusherman/react-native-network-info/blob/master/android/src/main/java/com/pusherman/networkinfo/RNNetworkInfo.java#L140 - this could be the basis of implementation as well
In fact @matt-oakes you might want to see if you and @pusherman want to collaborate - seems like an API surface area duplication and potential to perhaps have multiple active maintainers in one repo?


"download_progress" example can't be compiled in version 0.2.0

Hi! This is the first issue for me in this repository and thank you for making great GUI library.
I noticed when I change from iced = { path = "../..", features = ["tokio_old"] } to iced = { version="0.2.0", features = ["tokio_old"] } in Cargo.toml the below error is happened.
$ cargo build
   Compiling download_progress v0.1.0 (/Hobby/iced/examples/download_progress)
error[E0277]: the trait bound `Download: iced_futures::subscription::Recipe<iced_native::hasher::Hasher, (iced_native::event::Event, iced_native::event::Status)>` is not satisfied
 --> examples/download_progress/src/download.rs:5:37
  |
5 |       iced::Subscription::from_recipe(Download {
  |  _____________________________________^
6 | |         url: url.to_string(),
7 | |     })
  | |_____^ the trait `iced_futures::subscription::Recipe<iced_native::hasher::Hasher, (iced_native::event::Event, iced_native::event::Status)>` is not implemented for `Download`
  |
  = note: required by `iced_futures::subscription::Subscription::<H, E, O>::from_recipe`

error: aborting due to previous error

For more information about this error, try `rustc --explain E0277`.
error: could not compile `download_progress`

To learn more, run the command again with --verbose.

When I use master branch which is same with 0.2.0 and using path = "../.."., the problem doesn't happen and it runs.
I also encountered this problem in my app.
Crates io requests version numbers in Cargo.toml, so I would like to change to iced = { version="0.2.0", features = ["tokio_old"] } .
Maybe changes for Recipe makes this issue, but I can't understand why this happen because I'm just a beginner.
What makes this problem?
How should I do to use subscription and from_recipe function in "0.2.0"?

You need to change the iced_native and iced_futures dependencies in the Cargo.toml to the latest crates.io version too.

Thanks!
I confirmed it.


Feature Request: DBeaver plugin

I'm spending a lot of time in DBeaver, which is a great database GUI tool. I'd love to have WakaTime integration for it and I'm willing to implement it once I got some free time. In the meantime, it would be interesting to know how many WakaTime users would want this feature as well. Maybe @alanhamlett can add the DBeaver logo to the wishlist on the WakaTime website?

Just found https://wakatime.com/dbeaver.


(None, None, None, None)-shaped variable returned by tfa.image.dense_image_warp

System information

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Linux 20.04
TensorFlow version and how it was installed (source or binary): 2.1.0, source
TensorFlow-Addons version and how it was installed (source or binary): latest, source
Python version: 3.7
Is GPU used? (yes/no): Yes

Describe the bug
When passing a "None"-batch size image with flow, such as a (None, 7, 7, 192) image with a valid flow, the returned value will have shape (None, None, None, None)
Code to reproduce the issue
import tensorflow as tf
import tensorflow_addons as tfa

tf.config.experimental_run_functions_eagerly(True)

image = tf.keras.layers.Input(shape=(7, 7, 192))
flow = tf.ones((1, 7, 7, 2))
warped = tfa.image.dense_image_warp(image, flow)

Other info / logs
>>> warped.shape
TensorShape([None, None, None, None])

Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.

It's because you are using functional API of keras. In this case, image is a symbolic tensor, and thus, the reshape in this line based on tf.shape won't provide more info.
One possible fix is that you can use .set_shape(image.shape) after the tfa.image_dense_image_warp(image, flow).

Thank you very much for the suggestion. The possible fix solves the issue, although I feel like it could be beneficial to modify the function to adapt to this usage. It is normal to use placeholder input with None batch size when compiling a model, and it would be cleaner if we don't have to manually set the output shape.

Thank you very much for the suggestion. The possible fix solves the issue, although I feel like it could be beneficial to modify the function to adapt to this usage. It is normal to use placeholder input with None batch size when compiling a model, and it would be cleaner if we don't have to manually set the output shape.

Sure, we are more than welcome to have a PR for this. Thanks for the suggesion!


checkpoint: explicitly load checkpoint manifests

@aaronlevy
Now we load the existing manifests, and only try to install the manifest if checkpoint exists. The previously logic try to create static pod blindly.
Last change for the preparation of the final code logic restructure. With the disk manifest preloading, the checkpointer knows exactly what it expects to recreate if not exists.

test checkpoint code please

Just fyi the above is to trigger the jenkins job. Code-wise this lgtm

@aaronlevy I can see the bootkube-dev turns green. Does this mean the test get passed? cc @pbx0

test checkpoint code please

@aaronlevy :( It is not.

test checkpoint code please

test checkpoint code please

test checkpoint code please

coreosbot test checkpoint code please

coreosbot test checkpoint code


angular-meteor and autoform (update case)

Hi there,
I'm not new to angular but to angular and meteor. I have a simple app running and I've defined a model that I successfully generated a form for using aldeed:meteor-autoform. I can use this form to insert items into my collection. This all works perfectly fine.
BUT, I have no clue how I can show values that already exist in my collection inside an autoform. Here's an example that works if you only have meteor.
In my simple application I've generated list and details page for books using the angular-meteor package. Therefore the object that I want to show inside of the autoform is available in my details controller like this:
$scope.book = $meteor.object(Books, $stateParams.dockerhostId);

How can I get $scope.book inside an autoform template that looks like this:
  {{#autoForm collection="Books" type="update" id="booksUpdateForm"}}
      {{> afFormGroup name="name" template="bootstrap3-horizontal" label-class="col-sm-3" input-col-class="col-sm-9"}}
  {{/autoForm}}

Thank you in advance!
-Konrad

Together with the guys from angular-meteor I've solved the problem for me. Read about it here.


Bit Country community token traits

Similar to multiple currencies traits but limited functionality to bit country scope and extendable to EVM and Pallet Contract.

working on this one

Hey @justinphamnz, after putting some thought into this, wondering if you could elaborate a bit more on what we're looking to do here to make sure I'm on the right track. How do you see these traits being used and what requirements do they need to meet to work w/ EVM & Pallet Contract?
Are we looking to replace current orml dependencies relating to tokens with something more tailored to bc needs?


feat: add query parameter for allowing datasets

Closes #427

Nitpick: we have exclude_dataset and now we're adding allow_datasets (plural). What if we tried to make these matching, e.g. include_dataset for the new one?

Nitpick: we have exclude_dataset and now we're adding allow_datasets (plural). What if we tried to make these matching, e.g. include_dataset for the new one?

That was my first choice actually, but I changed it since the path parameter already is called dataset and I thought it made it clearer that we were further refining that first dataset / collection. I'm good with either though. As for plural it's for making it clear that it's a list and not a single string.

Both of them are lists - only the dataset is part of the path, right?

Both of them are lists - only the dataset is part of the path, right?
True, that was part of my confusion at first. From the signature of /match it sounded as though I should specify a single dataset as the path parameter dataset and then I could pass a single dataset as exclude_dataset.

It becomes clear once you read through the code of course, but I think something like {collection}/match?exclude_datasets=[]&include_datasets=[] would have been easier to understand at first glance.
I'll switch back to include_dataset for now though and then we can always see whether we want to change this later :)

Just saw that we want to add this to /search as well, so I'll include that here.


First draft of blog section and first blog post

Fixes https://github.com/open-sdg/open-sdg/issues/1047
@AnnCorp @LucyGwilliamAdmin This includes the basic setup for a blog section, and also includes a draft of a blog post about the history of Open SDG. I'm happy to move the history post into a separate PR, and/or to apply any changes or suggestions.
As usual the easiest way to read/review might be rendered in Github on the branch: https://github.com/open-sdg/open-sdg.github.io/blob/blog-section/_blog/2021-01-09-open-sdg-origins.md
Here are screenshots of the blog section:
Menu item:

Blog listing page:

Blog page:

@brockfanning happy with how menu looks etc. Skim read blog and have some suggestions for additions/tweaks. Would you rather publish and amend afterwards (it'll be Wednesday before I get time to properly review blog) - I could do pull request with my suggested amendments for you to review?

@brockfanning happy with how menu looks etc. Skim read blog and have some suggestions for additions/tweaks. Would you rather publish and amend afterwards (it'll be Wednesday before I get time to properly review blog) - I could do pull request with my suggested amendments for you to review?

@AnnCorp I'm fine either way - alternatively would you like me to put it into a Google Doc for review?

@AnnCorp I'm fine either way - alternatively would you like me to put it into a Google Doc for review?

@brockfanning great - reviewing in separate doc sounds like a plan, thank you. Pls could you send as attachment as 'belt and braces' incase we have issues accessing the google doc.

@brockfanning great - reviewing in separate doc sounds like a plan, thank you. Pls could you send as attachment as 'belt and braces' incase we have issues accessing the google doc.


Credentials failure

This looks ideal for me, but I cannot get it working.  Most likely, the provided credentials are invalid. Terminating...
##[debug]Docker Action run completed with exit code 1
##[debug]Finishing: Push

I had not signed into my Atlassian account, which had 2FA enabled. I first tried using an API key for ${{ secrets.BITBUCKET_PASSWORD }} because of the 2FA, but it failed. I then used my password, which failed. I then tried to disable 2FA, but strangely it seems that 2FA is already disabled. I definitely had to use it to sign in originally and I always enable 2FA whenever it is available.
Does it need BitBucket credentials instead of Atlassian?
(I am familiar with using GitHub Actions with repository secrets)

I realised that I did have 2FA on my BitBucket account (not Atlassian), which doesn't even have a password, as you sign in through Atlassian now. Confusing. I disabled that too, but it still doesn't work. I also tried adding the username and repository variables, but that didn't help.

Hi @eggbean,
thanks for raising an issue.
AFAIK not too much time ago, BitBucket stopped supporting username and passwords of main accounts for use cases like this. Instead, App Passwords should be used. Try to create a new one with repository-write-permissions and use the generated password for BITBUCKET_PASSWORD.
Sorry, the documentation of the action should have been updated.

Hi, apologies for not getting back sooner, but I have been trying everything to get it to work. I have tried everything. I have looked at your workflow files to see where I could have made a mistake, but there is still this problem with authentication that doesn't make any sense. I have tried putting a new line after the App Password in GitHub, tried different permissions, including everything ticked, etc. Stange.

Hi @eggbean, I'm sorry to hear that.
I was able to reproduce your issue with a new repo and a new app password here:
https://github.com/heussd/eggbeans-bug
Turns out the REST call to https://api.bitbucket.org/2.0/user plus the potential initial creation of repositories require additional permissions.
Here's the app password permissions that got my mirroring to work:

Please let me know if this fixes the issue for you. I'll update the readme. Thanks for taking the time to improve this GitHub Action with your Feedback.


Code formatting doesn't work on Windows

When trying to auto-format a schema.prisma file from a prisma2 starter project, VS Code 1.40.0 emits the following:

I have the extension installed, as seen below. Am I doing something wrong?

Edit: It turns out that Windows is not yet supported.

After further investigation, it turns out that a binary for Windows is available at https://s3-eu-west-1.amazonaws.com/prisma-native/alpha/latest/windows/prisma-fmt.exe.gz

Hi @kripod thanks for your help on this issue. We tested 0.0.18 and it works 😃


Some components can't have animation on exit

Description
When I use a dialog component for example, and add animation classes for enter and exit, only enter animation works. It's like the exit animation is being terminated by the attribute that Ark adds on multiple elements.

Link to Reproduction (or Detailed Explanation)
https://stackblitz.com/edit/vitejs-vite-xmvqqu
Steps to Reproduce

Click the button
Dialog shows up with animation on enter
Close the dialog and there's no exit animation

Tailwind classes are in place and animations are inside of tailwind config.
Ark UI Version
3.7.2
Framework

[ ] React
[ ] Solid
[X] Vue

Browser
All
Additional Information
No response

It must have something to do with the Vue presence + dialog implementation.
If anyone is interested, here's the place to look
Vue: https://github.com/chakra-ui/ark/blob/75f45583974efa9280c13bf8b9c19919d044de81/packages/vue/src/components/dialog/dialog-content.vue#L1
React: https://github.com/chakra-ui/ark/blob/75f45583974efa9280c13bf8b9c19919d044de81/packages/react/src/components/dialog/dialog-content.tsx#L1
There's an obvious different in the implementation.

I also encountered this problem while trying to animate my DialogContent in my Nuxt3 project.
It seems that the problem is that in Vue implementation the Presence component is only used for DialogPositioner.
Presense component does not observe animations of the child elements and thats the reason why it does not wait for DialogContent animations.
In React implementation, however, presence is used for DialogContent.
So, current the workaround is to move your animations to DialogPositioner instead of DialogContent

@YaredFall I will try it out. Can I assume it's same incorrect implementation for all Vue components?
Been testing some main components like Tooltips, Dialogs, Popovers, Datepicker - none of them can be animated on exit. So I wonder if moving animations to Positioner will make it work in all cases (until someone fixes it)?

@dvlden I gave a glance to these components and they all built the same. So yes, moving animations to Positoner should make it work

I think I managed to find a fix, I have rewritten DialogPositioner and DialogContent to be closer to React implementation source code comparison.
Tested it in dialog stories, DailogContent animations now working.
I must mention that similar fixes should be applied to any component with a Positoner.
I do not have time for a PR with fixes for all of the components right now, but maybe later. Or maybe some of the maintainers will look into it.

@YaredFall fantastic. That's quite a chunk of changes for a single component.
I hope you or someone else finds time for this, to implement into all components.
Thanks for the help! I will simply move animations to Positioner at this time.

@dvlden I'm sorry, forgot to mention that you also need to set display property on the Content to override hidden attribute.

For me, moving the animation to Positioner did not have any effect. Only animation-in works, still. :/

Anyway, I made a PR, hope for a review :pray:

Just saw the PR, waiting for its merge and release.
Thank you @YaredFall !

It's merged 🎉

Hey, @segunadebayo ! ✌  I am sadly encountering the same issue in React on 4.5.0 (also tried on 4.3.0) :/
While Dialog seems to be working fine, Tooltip has no unmounting animation. The implementation of animations is identical. What's odd, is that in the docs example, everything seems to be the same as well, yet there it works fine. I've also tried making it controlled – same result.
// this is then passed to `<Tooltip.Content />`

export const tooltipRecipe = defineRecipe({
  className: "tooltipRecipe",
  description: "Tooltip",
  base: {
    // ...some styles...

    _open: {
      animation: "scaleAndFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1)",
    },
    _closed: {
      animation: "scaleAndFadeOut 0.2s cubic-bezier(0.16, 1, 0.3, 1)",
    },
  },
});


A better error message describing general class of auth problems

Related to https://github.com/dotnet/sdk-container-builds/issues/314 and https://github.com/dotnet/sdk-container-builds/issues/418
Current error message is as following:
/opt/azure_repos/home_dir_tgw_user/.nuget/packages/microsoft.net.build.containers/0.4.0/build/Microsoft.NET.Build.Containers.targets(195,5): error CONTAINER1013: Failed to push to the output registry: System.ApplicationException: CONTAINER1001: Failed to upload blob to POST****
Consider improving it and providing possible generic CTA.
A message like the following should be emitted instead:

No credentials found for registry:

Unable to authenticate to registry <REGISTRYNAME>. No credentials were found locally - you may need to login to the registry using `docker login <REGISTRYNAME> -u <USERNAME> -p <PASSWORD>.`

Credentials present, but incorrect when a Token was used:

Unable to authenticate to registry <REGISTRYNAME>. Credentials were found locally but were not accepted by the registry. Check the permissions for the Bearer token associated with the registry.

Credentials present, but incorrect when a Basic (username/password) was used:

Unable to authenticate to registry <REGISTRYNAME>. Credentials were found locally but were not accepted by the registry. Check the permissions for the user <USERNAME> associated with the registry.

Potential questions:

Is it ok to expose <USERNAME> in the message?
Is it ok to try to find the sub claim in the Bearer token and emit it, since tokens are often tracked/inventoried by the 'subject' (user id) that they were created for?

We have better auth messages now.