Object-docs

I'm not sure I did what you wanted but I merged all the object doc strings I did into this PR. It was a hassle getting them all merged. So I think if you accept this then all the others can be closed.

Could you explain why they are unsafe? The getters will fail if given null and undefined. Anything else? When will setters fail?

Hmm. Actually I don't think you can call this with a null or undefined object. So I don't know when the getters fail.

Could you explain why they are unsafe?

Sure, sorry. If it was that obvious these probably wouldn't exist in this form anyway.
Here are examples where get and set should fail, but don't. Compared to properly typed access:
let obj = {"foo": 42}

let x: int = obj["foo"]
// let x: string = obj["foo"] // Error: This has type: int, Somewhere wanted: string
let x: option<string> = get(obj, "foo") // Should error, as above, because it's actually an int

// obj["foo"] = "bar" // Error: This has type: string, Somewhere wanted: int
set(obj, "foo", "bar") // Should error, as above, because it's actually an int
// let x: string = obj["foo"] // Error: This has type: int, Somewhere wanted: string
let x: int = obj["foo"]

I attempted to write the docs for Object.createWithProperties but don't understand it. It seems the second parameter must be a "property descriptor" like this. I can't get this to work when the first parameter is anything but Object.empty(). So I can't do something like start with an {"a":1} and add properties to it. Can someone write some sample code to show me how, or explain it? The Object.create seems to clone the first parameter. I Googled for a bit and gave up.
Object.createWithProperties(Object.empty(), {"b": {"value": 42, "writable": true}}),

In several places I have suggested the getter return type unknown but have gotten zero thoughtful responses to that suggestion. I think that solves some of the issues because you can't unsafely cast to whatever you want.

It also removes the convenience and reason for these existing. These functions should probably just be removed.

I agree the setter is a problem when setting a property on an object ReScript thinks it knows the type of. Hadn't thought of that. Do you really think this warrants the Unsafe suffix? Or maybe just a usage warning/note in the docs?

As I've said elsewhere, I think everything unsound should be marked as Unsafe, because they break the type system guarantees that we rely on so much. And if doing so breaks someone's code because they were unaware of it being unsafe, then good! Now they're at least aware and can do something about it!

In several places I have suggested the getter return type unknown but have gotten zero thoughtful responses to that suggestion. I think that solves some of the issues because you can't unsafely cast to whatever you want.

It also removes the convenience and reason for these existing. These functions should probably just be removed.

If the functions are removed then I wasted a lot of time on this. I just started documenting the ArrayBuffer stuff and that is dangerous too. If it is a waste of time I want to know now. I think we should provide safe alternatives wherever we can and there are none in the Object module. I thought it was safe when I saw the option<'a> but I was wrong. And then we can provide any number of shoot-self-in-foot alternatives so convenience doesn't suffer. This is all nearly zero lines of code and the docs are simple.
obj->get("code")->Unknown.toString->Option.getWithDefault("nope!") // most safe, least convenient
obj->get("code")->Unknown.toString->Option.getExn // a little scary
obj->get("code")->Unknown.toStringUnsafe // very scary

obj->getString("code")->Option.getWithDefault("nope!")
obj->getStringUnsafe("code") // least safe, most convenient

The other place where I care about this is Error.t. I still can't get the "code" property out of a custom exception. I'd like to see a safe getter there.
Need some decisions here. At a minimum I like the idea of beefing up the Type/Unknown module and sprinkling safe getters around. Then one short trip to the Unknown module and you can get your data out. And then if unsafe getters are really critical we can put them directly on Object or Error.t.
I'm going to wait for @zth before marking everything as Unsafe.

You're forgetting that the language has built-in syntax for object access too:
let x: string = obj["code"]

And this is entirely safe for well-defined object types.

The other place where I care about this is Error.t. I still can't get the "code" property out of a custom exception. I'd like to see a safe getter there.

This isn't going to help you with that though. But I like the idea of having these kinds of accessors in the Type/Unknown module instead, so that they're available for all types, not just objects.

Reviewing and looking to merge this soon. Could this be rebased perhaps?

@jmagaram closing this since it's merged (after a rebase) in https://github.com/rescript-association/rescript-core/commit/f5ae1be7d8c8195f26d41ad3f95354d8867cea70 (although I messed up the commit text some). Thanks for doing this one, large effort! Sorry for leaving it hanging for so long.


There is no clear statement data would be lost on NVMe disk after VM deallocation.

There is no clear statement data would be lost on NVMe disk after VM deallocation/redeployement to another node. The information in the Lsv2-series table is misleading as there is no reference that NVMe disks are not regular data disks and act as high-performant temporary storage.

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

ID: af858f46-d98b-9240-47d8-74f98f1d9047
Version Independent ID: e9d83d42-4a73-ab63-5742-bd34210c4626
Content: Azure Linux VM sizes - Storage
Content Source: articles/virtual-machines/linux/sizes-storage.md
Service: virtual-machines-linux
GitHub Login: @jonbeck7
Microsoft Alias: jonbeck

Thank you for taking the time to share your product and documentation feedback with us. Your input is valued because it helps us create the right documentation for our customers. Due to the volume of issues in our queue, we are closing open issues older than 90 days. We hope to continue hearing from you. Thank you.

Please note that the information exists in the article as a subscript. Thank you!


alerting on rails rest methods

Curious about this SO post: http://stackoverflow.com/questions/41604826/why-is-rubocop-alerting-on-rails-5-rest-methods
Does rubocop 0.46.0 alert on controller methods that do not have specs? This seems odd.

@chrishough that isn't a rubocop error. Looks like it is a rails best practices error: https://github.com/railsbp/rails_best_practices/blob/71dd596500782fd76d5a4a2b2cf2fcc705a3d9a2/lib/rails_best_practices/reviews/remove_unused_methods_in_helpers_review.rb#L29

Thank you for connecting me to the other project.  Curious though.  Since this is a dependency here do rubocop users have issues with this too?

Since this is a dependency here

What is "this" and "here"?
Rubocop doesn't depend on rails_best_practices, if that's what you mean.

Correct, but users will use this inside of rails projects.  That is what I was referring to 👍


Bug in react-router when used in Chrome Extension

In Chrome Extension application, when using nested routes, routing will not be working.
I solve this issue by using single routes.  That's what I say.
Not working:
  <Router history={browserHistory}>
    <Route path="/" component={App}>
      <Route path="/description-view" component={DescriptionView}/>
    </ Route>
    <Route path="/popup.html" component={App} />
    <Route path="/window.html" component={App} />
  </Router>

Working:
  <Router history={browserHistory}>
    <Route path="/" component={App}/>
    <Route path="/description-view" component={DescriptionView}/>
    <Route path="/popup.html" component={App} />
    <Route path="/window.html" component={App} />
  </Router>

Also, when developing Chrome Extension, we need to set up routes for basic Extension view. It was not obvious for me.

For a Chrome Extension, you should be using a hash or memory history. You'll run into problems otherwise.

@timdorr I tried to use hash and memory history. Result was the same

@timdorr


Consider moving from Redis Lists to Streams

We currently use a Redis List for jobs and results.  See the arch diagram.
It seems that Redis Streams may be a better fit for the use case.
For the Job Queue, we would create a consumer group for our workers so that each job goes to a single worker in the group.
This implementation would be a bit more complicated, but it comes with some benefits:

With Redis Streams, a message in the Job Queue is marked as pending after delivered to a worker. It will remain in this state until the worker acks it (XACK). This will allow for cleaner recovery in the case that the worker dies for some reason in the middle of job execution. It can pick up where it left off with whatever is still marked as pending.
This same benefit applies for the Results Queue. Once the bot receives results, it can remain in a pending state until we know we have successfully posted it back to GitHub as a comment.

This would change the semantics a bit from "at most once" delivery to "at least once." Technically we could execute a job or post a result more than once if the failure occurred at just the right time. This seems better than having a window to lose something completely.
Another benefit is that any monitoring we do or dashboard we provide has an easy way to see which job(s) are currently being executed by a worker. This would be represented by pending messages associated with a consumer.
A final detail, these streams will need to be explicitly trimmed occasionally so they don't grow unbounded.
An implementation of this should fix #49.

i started looking at this at one point, but didn't end up spending very long on it -- https://github.com/russellb/instruct-lab-bot/commits/redis-streams/


fix(ngc): remove skipTemplateCodegen as this was suppressing template…

… errors
Errors and warnings within the html template are not emitted when this flag is set to false.
Such as using template instead of ng-template or referencing a non existing variable

@alan-agius4 — skipTemplateCodegen should be set to false because it prevents ngfactories from being generated.
You can set it to true during development if you wish to catch more errors, but the default has to be false to make sure only *.metadata.json files are generated.
I will close the PR but feel free to re-open if you feel it is needed. Thank you for your contribution, much appreciated! 👍


DBG: 0.13.0 linux source self built

Checklist

[ ] Used a personal fork of the feedstock to propose changes
[ ] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[ ] Ensured the license file is being packaged.

@xhochy Would you happen to know how to work around this:
error: /Users/runner/miniforge3/conda-bld/zig_1718289512403/_build_env/bin/x86_64-apple-darwin13.4.0-install_name_tool: changing install names or rpaths can't be redone for: /Users/runner/miniforge3/conda-bld/zig_1718289512403/_h_env_placehold_.../bin/zig (for architecture x86_64) because larger updated load commands do not fit (the program must be relinked, and you may need to use -headerpad or -headerpad_max_install_names)

Strangely when enabling LLVM, the issue went away on OSX. However, for ppc64le, I don't seem to either be able to use static LLVM nor shared. When disabling LLVM altogether it build, but ZIG is not full-featured and fails the behavioral tests
I'll keep gnawing at it, but I lost any sense of organized work and just practice drunken kung-fu at this point


How does one implemented a parametrized meta-learner (like meta-lstm optimizer) in higher?

I wanted to implement the meta-lstm meta-learner in this paper OPTIMIZATION AS A MODEL FOR FEW-SHOT LEARNING using higher but I found problems. I found that I cannot make it work without removing (what seems to be this crucial line):
https://github.com/facebookresearch/higher/blob/8f0716fb1663218324c02dabdba26b639959cfb6/higher/optim.py#L101
to:
        #self.param_groups = _copy.deepcopy(other.param_groups)
        self.param_groups = other.param_groups

I provide an extremely simplified self-contained implementation of something similar here:
https://gist.github.com/renesax14/8499e0314351ea4199a17e494bff5c4d
but I will copy paste here to keep the discussion in one place:
# base on the paper "OPTIMIZATION AS A MODEL FOR FEW-SHOT LEARNING": https://openreview.net/pdf?id=rJY0-Kcll

class EmptySimpleMetaLstm(Optimizer):

    def __init__(self, params, trainable_opt_model, trainable_opt_state, *args, **kwargs):
        defaults = {
            'trainable_opt_model':trainable_opt_model,
            'trainable_opt_state':trainable_opt_state,
            'args':args,
            'kwargs':kwargs
        }
        super().__init__(params, defaults)

class SimpleMetaLstm(DifferentiableOptimizer):

    def _update(self, grouped_grads, **kwargs):
        prev_lr = self.param_groups[0]['trainable_opt_state']['prev_lr']
        eta = self.param_groups[0]['trainable_opt_model']['eta']
        # start differentiable & trainable update
        zipped = zip(self.param_groups, grouped_grads)
        for group_idx, (group, grads) in enumerate(zipped):
            for p_idx, (p, g) in enumerate(zip(group['params'], grads)):
                if g is None:
                    continue
                # get gradient as "data"
                g = g.detach() # gradients of gradients are not used (no hessians)
                ## very simplified version of meta-lstm meta-learner
                input_metalstm = torch.stack([p, g, prev_lr.view(1,1)]).view(1,3) # [p, g, prev_lr] note it's missing loss, normalization etc. see original paper
                lr = eta(input_metalstm).view(1)
                fg = 1 - lr # learnable forget rate
                ## update suggested by meta-lstm meta-learner
                p_new = fg*p - lr*g
                group['params'][p_idx] = p_new
        # fake returns
        self.param_groups[0]['trainable_opt_state']['prev_lr'] = lr

higher.register_optim(EmptySimpleMetaLstm, SimpleMetaLstm)

def test_parametrized_inner_optimizer():
    import torch
    import torch.nn as nn
    import torch.optim as optim
    from collections import OrderedDict

    ## training config
    #device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
    track_higher_grads = True # if True, during unrolled optimization the graph be retained, and the fast weights will bear grad funcs, so as to permit backpropagation through the optimization process. False during test time for efficiency reasons
    copy_initial_weights = False # if False then we train the base models initial weights (i.e. the base model's initialization)
    episodes = 5
    nb_inner_train_steps = 5
    ## get base model
    base_mdl = nn.Sequential(OrderedDict([
        ('fc', nn.Linear(1,1, bias=False)),
        ('relu', nn.ReLU())
        ]))
    ## parametrization/mdl for the inner optimizer
    opt_mdl = nn.Sequential(OrderedDict([
        ('fc', nn.Linear(3,1, bias=False)), # 3 inputs 1 for parameter, 1 for gradient, 1 for previous lr
        ('sigmoid', nn.Sigmoid())
        ]))
    ## get outer optimizer (not differentiable nor trainable)
    outer_opt = optim.Adam([{'params': base_mdl.parameters()},{'params': opt_mdl.parameters()}], lr=0.01)
    for episode in range(episodes):
        ## get fake support & query data (from a single task and 1 data point)
        spt_x, spt_y, qry_x, qry_y = torch.randn(1), torch.randn(1), torch.randn(1), torch.randn(1)
        ## get differentiable & trainable (parametrized) inner optimizer
        inner_opt = EmptySimpleMetaLstm(base_mdl.parameters(), trainable_opt_model={'eta': opt_mdl}, trainable_opt_state={'prev_lr': 0.9*torch.randn(1)})
        with higher.innerloop_ctx(base_mdl, inner_opt, copy_initial_weights=copy_initial_weights, track_higher_grads=track_higher_grads) as (fmodel, diffopt):
            for i_inner in range(nb_inner_train_steps): # this current version implements full gradient descent on k_shot examples (which is usually small  5)
                fmodel.train()
                # base/child model forward pass
                inner_loss = 0.5*((fmodel(spt_x) - spt_y))**2
                # inner-opt update
                diffopt.step(inner_loss)
            ## Evaluate on query set for current task
            qry_loss = 0.5*((fmodel(qry_x) - qry_y))**2
            qry_loss.backward() # for memory efficient computation
        ## outer update
        print(f'episode = {episode}')
        print(f'base_mdl.grad = {base_mdl.fc.weight.grad}')
        print(f'opt_mdl.grad = {opt_mdl.fc.weight.grad}')
        outer_opt.step()
        outer_opt.zero_grad()

if __name__ == '__main__':
    test_parametrized_inner_optimizer()
    print('Done \a')

"""
output when deep copy is uncommented (parametrized optimizer trains properly):
episode = 0
base_mdl.grad = tensor([[-0.0351]])
opt_mdl.grad = tensor([[0.0085, 0.0000, 0.0204]])
episode = 1
base_mdl.grad = tensor([[0.0311]])
opt_mdl.grad = tensor([[-0.0086, -0.0100,  0.0358]])
episode = 2
base_mdl.grad = tensor([[0.]])
opt_mdl.grad = tensor([[0., 0., 0.]])
episode = 3
base_mdl.grad = tensor([[0.0066]])
opt_mdl.grad = tensor([[-0.0016,  0.0000, -0.0032]])
episode = 4
base_mdl.grad = tensor([[-0.0311]])
opt_mdl.grad = tensor([[0.0077, 0.0000, 0.0130]])
Done
when deep copy is on (paremeters of inner optimizer are not train, sad!):
episode = 0
base_mdl.grad = tensor([[0.]])
opt_mdl.grad = None
episode = 1
base_mdl.grad = tensor([[0.]])
opt_mdl.grad = None
episode = 2
base_mdl.grad = tensor([[0.0069]])
opt_mdl.grad = None
episode = 3
base_mdl.grad = tensor([[0.]])
opt_mdl.grad = None
episode = 4
base_mdl.grad = tensor([[0.]])
opt_mdl.grad = None
Done
The deep copy line in higher I am referencing:
        self.param_groups = _copy.deepcopy(other.param_groups)
        #self.param_groups = other.param_groups
"""

crossposted: https://stackoverflow.com/questions/62459891/how-does-one-implemented-a-parametrized-meta-learner-in-pytorchs-higher-library

perhaps this can be implemented with override:
override (optional) – a dictionary mapping optimizer settings (i.e. those which would be passed to the optimizer constructor or provided within parameter groups) to either singleton lists of override values, or to a list of override values of length equal to the number of parameter groups. If a single override is provided for a keyword, it is used for all parameter groups. If a list is provided, the ith element of the list overrides the corresponding setting in the ith parameter group. This permits the passing of tensors requiring gradient to differentiable optimizers for use as optimizer settings.

Didn't work with override:
It didn't let me do it with override:

Exception has occurred: ValueError
Mismatch between the number of override tensors for optimizer parameter trainable_opt_model and the number of parameter groups.
seems like it checks that these lengths match...

def _apply_override(self, override: _OverrideType) -> None:
for k, v in override.items():
# Sanity check
if (len(v) != 1) and (len(v) != len(self.param_groups)):

Override version:
class EmptySimpleMetaLstm(Optimizer):

    def __init__(self, params, *args, **kwargs):
        defaults = { 'args':args, 'kwargs':kwargs}
        super().__init__(params, defaults)

class SimpleMetaLstm(DifferentiableOptimizer):

    def _update(self, grouped_grads, **kwargs):
        prev_lr = self.override['trainable_opt_state']['prev_lr']
        simp_meta_lstm = self.override['trainable_opt_model']
        # start differentiable & trainable update
        zipped = zip(self.param_groups, grouped_grads)
        for group_idx, (group, grads) in enumerate(zipped):
            for p_idx, (p, g) in enumerate(zip(group['params'], grads)):
                if g is None:
                    continue
                # get gradient as "data"
                g = g.detach() # gradients of gradients are not used (no hessians)
                ## very simplified version of meta-lstm meta-learner
                input_metalstm = torch.stack([p, g, prev_lr.view(1,1)]).view(1,3) # [p, g, prev_lr] note it's missing loss, normalization etc. see original paper
                lr = simp_meta_lstm(input_metalstm).view(1)
                fg = 1 - lr # learnable forget rate
                ## update suggested by meta-lstm meta-learner
                p_new = fg*p - lr*g
                group['params'][p_idx] = p_new
        # fake returns
        self.param_groups[0]['trainable_opt_state']['prev_lr'] = lr

higher.register_optim(EmptySimpleMetaLstm, SimpleMetaLstm)

####
####

def test_parametrized_inner_optimizer():
    import torch
    import torch.nn as nn
    import torch.optim as optim
    from collections import OrderedDict

    ## training config
    #device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
    track_higher_grads = True # if True, during unrolled optimization the graph be retained, and the fast weights will bear grad funcs, so as to permit backpropagation through the optimization process. False during test time for efficiency reasons
    copy_initial_weights = False # if False then we train the base models initial weights (i.e. the base model's initialization)
    episodes = 5
    nb_inner_train_steps = 5
    ## get base model
    base_mdl = nn.Sequential(OrderedDict([
        ('fc', nn.Linear(1,1, bias=False)),
        ('relu', nn.ReLU())
        ]))
    ## parametrization/mdl for the inner optimizer
    opt_mdl = nn.Sequential(OrderedDict([
        ('fc', nn.Linear(3,1, bias=False)), # 3 inputs [p, g, prev_lr] 1 for parameter, 1 for gradient, 1 for previous lr
        ('sigmoid', nn.Sigmoid())
        ]))
    ## get outer optimizer (not differentiable nor trainable)
    outer_opt = optim.Adam([{'params': base_mdl.parameters()},{'params': opt_mdl.parameters()}], lr=0.01)
    for episode in range(episodes):
        ## get fake support & query data (from a single task and 1 data point)
        spt_x, spt_y, qry_x, qry_y = torch.randn(1), torch.randn(1), torch.randn(1), torch.randn(1)
        ## get differentiable & trainable (parametrized) inner optimizer
        override = {'trainable_opt_model': opt_mdl, 'trainable_opt_state': {'prev_lr': 0.9*torch.randn(1)} }
        inner_opt = EmptySimpleMetaLstm(base_mdl.parameters())
        with higher.innerloop_ctx(base_mdl, inner_opt, copy_initial_weights=copy_initial_weights, track_higher_grads=track_higher_grads, override=override) as (fmodel, diffopt):
            for i_inner in range(nb_inner_train_steps): # this current version implements full gradient descent on k_shot examples (which is usually small  5)
                fmodel.train()
                # base/child model forward pass
                inner_loss = 0.5*((fmodel(spt_x) - spt_y))**2
                # inner-opt update
                diffopt.step(inner_loss)
            ## Evaluate on query set for current task
            qry_loss = 0.5*((fmodel(qry_x) - qry_y))**2
            qry_loss.backward() # for memory efficient computation
        ## outer update
        print(f'episode = {episode}')
        print(f'base_mdl.grad = {base_mdl.fc.weight.grad}')
        print(f'opt_mdl.grad = {opt_mdl.fc.weight.grad}')
        outer_opt.step()
        outer_opt.zero_grad()

the real solution is if I could pass an arbitrary dictionary to a differentiable optimizer and if I could do whatever I wanted with it.

Perhaps just creating my own field once the diffopt is created is all I need?
so this line:
            diffopt.override = {'trainable_opt_model': opt_mdl, 'trainable_opt_state': {'prev_lr': 0.9*torch.randn(1)} }

whole:
def test_parametrized_inner_optimizer():
    import torch
    import torch.nn as nn
    import torch.optim as optim
    from collections import OrderedDict

    ## training config
    #device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
    track_higher_grads = True # if True, during unrolled optimization the graph be retained, and the fast weights will bear grad funcs, so as to permit backpropagation through the optimization process. False during test time for efficiency reasons
    copy_initial_weights = False # if False then we train the base models initial weights (i.e. the base model's initialization)
    episodes = 5
    nb_inner_train_steps = 5
    ## get base model
    base_mdl = nn.Sequential(OrderedDict([
        ('fc', nn.Linear(1,1, bias=False)),
        ('act', nn.ReLU())
        ]))
    ## parametrization/mdl for the inner optimizer
    opt_mdl = nn.Sequential(OrderedDict([
        ('fc', nn.Linear(3,1, bias=False)), # 3 inputs [p, g, prev_lr] 1 for parameter, 1 for gradient, 1 for previous lr
        ('act', nn.LeakyReLU())
        ]))
    ## get outer optimizer (not differentiable nor trainable)
    outer_opt = optim.Adam([{'params': base_mdl.parameters()},{'params': opt_mdl.parameters()}], lr=0.01)
    for episode in range(episodes):
        ## get fake support & query data (from a single task and 1 data point)
        spt_x, spt_y, qry_x, qry_y = torch.randn(1), torch.randn(1), torch.randn(1), torch.randn(1)
        ## get differentiable & trainable (parametrized) inner optimizer
        inner_opt = EmptySimpleMetaLstm( base_mdl.parameters() )
        with higher.innerloop_ctx(base_mdl, inner_opt, copy_initial_weights=copy_initial_weights, track_higher_grads=track_higher_grads) as (fmodel, diffopt):
            diffopt.override = {'trainable_opt_model': opt_mdl, 'trainable_opt_state': {'prev_lr': 0.9*torch.randn(1)} }
            for i_inner in range(nb_inner_train_steps): # this current version implements full gradient descent on k_shot examples (which is usually small  5)
                fmodel.train()
                # base/child model forward pass
                inner_loss = 0.5*((fmodel(spt_x) - spt_y))**2
                # inner-opt update
                diffopt.step(inner_loss)
            ## Evaluate on query set for current task
            qry_loss = 0.5*((fmodel(qry_x) - qry_y))**2
            qry_loss.backward() # for memory efficient computation
        ## outer update
        print(f'episode = {episode}')
        print(f'base_mdl.grad = {base_mdl.fc.weight.grad}')
        print(f'opt_mdl.grad = {opt_mdl.fc.weight.grad}')
        outer_opt.step()
        outer_opt.zero_grad()

but grads are zero...?
episode = 0
base_mdl.grad = tensor([[-0.4019]])
opt_mdl.grad = tensor([[0.0165, 0.7733, 0.2050]])
episode = 1
base_mdl.grad = tensor([[0.]])
opt_mdl.grad = tensor([[0., 0., 0.]])
episode = 2
base_mdl.grad = tensor([[0.]])
opt_mdl.grad = tensor([[0., 0., 0.]])
episode = 3
base_mdl.grad = tensor([[0.]])
opt_mdl.grad = tensor([[0., 0., 0.]])
episode = 4
base_mdl.grad = tensor([[-0.1466]])
opt_mdl.grad = tensor([[ 0.0300,  0.0081, -0.0763]])
Done

I think this is all I need:
        inner_opt = EmptySimpleMetaLstm( base_mdl.parameters() )
        with higher.innerloop_ctx(base_mdl, inner_opt, copy_initial_weights=copy_initial_weights, track_higher_grads=track_higher_grads) as (fmodel, diffopt):
            diffopt.override = {'trainable_opt_model': opt_mdl, 'trainable_opt_state': {'prev_lr': 0.9*torch.randn(1)} }

Okay I've read through what you've done, and skimmed the paper, and I think you're getting a little off track. I am confident that higher supports meta-LSTMs as is without needing to change stuff in higher.optim. If it turns out we need to change something there, we will, but let's try and collaboratively solve the problem first.
Let's pretend for a second that higher doesn't exist, and not worry about how to deal with training a meta-lstm for now. Let's just implement a class which implements eq (2) of section 3.1 of the paper.
import torch
import torch.nn.functional as F
from torch import nn, optim

class MetaLSTM(optim.Optimizer):
    r"""Implements a meta-LSTM optimizer."""

    def __init__(self, params):
        # continue implementation here

I could do this myself, but I'll confess I'm a little tight on time. If you can give it a shot and revert the assignment to me. Again, don't worry about anything other than defining the meta-parameters of the meta-LSTM, and implementing the "forward pass" in the step method. As a general hint, you'll need to turn the parameters of each group into a single vector, compute f_t and i_t, and then reshape/split the updated parameters from that group into their original form and do the in-place assignment. This should be fairly easy, but ping me if you get stuck.

Hello @renesax14. Just checking if you have any interest in providing a non-higher implementation of what the MetaLSTM does at test time (without second order gradients, see comment above). If you provide that, I can help you write the DiffOpt version with higher. If not, I will close this issue in one month.


Failed eth_sendTransaction on forked mainnet

please see https://github.com/zkSync-Community-Hub/zksync-developers/discussions/390
using 0xE999bb14881e48934A489cC9B35A4f9449EE87fb as the from address, and adding a call to hardhat_impersonateAccount with 0xE999bb14881e48934A489cC9B35A4f9449EE87fb as the input parameter, the error I am receiving is:
Error: processing response error (body="{"jsonrpc":"2.0","error":{"code":3,"message":"Execution error: Transaction HALT: virtual machine entered unexpected state. Please contact developers and provide transaction details that caused this error. Error description: Assertion error: Overhead higher than gasLimit","data":"0x3fafbf289f1134f1a0d3e6efc05d2e33475d4453edc435a587b3525ecb15977f"},"id":51}\n", error={"code":3,"data":"0x3fafbf289f1134f1a0d3e6efc05d2e33475d4453edc435a587b3525ecb15977f"}, requestBody="{"method":"eth_sendTransaction","params":[{"to":"0x3355df6d4c9c3035724fd0e3914de96a5a83aaf4","value":"0x0","data":"0xa9059cbb00000000000000000000000042310121982db7fa65552ae797016ab63b4302920000000000000000000000000000000000000000000000000000000000989680","from":"0xE999bb14881e48934A489cC9B35A4f9449EE87fb","maxFeePerGas":"0x5c631f80","maxPriorityFeePerGas":"0x59682f00","gasLimit":"100000000000000"}],"id":51,"jsonrpc":"2.0"}", requestMethod="POST", url="", code=SERVER_ERROR, version=web/5.7.1)

Hi @teamspice ! This is now fixed in the latest 0.1.0-alpha.24 release. Thank you for reporting!


Add links to Microcosm in docs website / readme

Microcosm is an awesome library that shares a lot of the same ideas as Nuclear, it's simplified API make it more suitable for smaller applications or for specific components that need to keep track of state.

[x] Add section to readme

This is done now.


add ability to use PullConsumers with NATS jetstream with a specified callback

In many cases, the reciever of a message might want some ability to exercise control over the fetching.  Also, with NATS, there are options inside the NATS server that might be beneficial to use a pull-based consumer.

I'm not a NATS expert, but IMHO this PR is using a legacy API:

// NOTE: JetStream is part of legacy API.
// Users are encouraged to switch to the new JetStream API for enhanced capabilities and
// simplified API. Please refer to the jetstream package.
// See: https://github.com/nats-io/nats.go/blob/main/jetstream/README.md

I like the idea of pull-based subscriptions to give more control, but IMHO we should switch to the newer API and clean up the whole code base of this implementation to avoid setting up both, push and pull-based consumers. This can also simplify the current proposal, removing having two similar for select implementations as proposed in this PR.

@embano1  Using the new api is a good idea.  The old api was already in use and it seemed I would have to version the library because many of the exposed options are different.  Or I would have to do some hacky translation of the old option to the new option.  There are several slight issues I have with the current implementation that I believe using the new api might benefit.
If I was to write a new version, I assume it would be at:
protocol/nats_jetstream/v3 ?

If I was to write a new version, I assume it would be at:
protocol/nats_jetstream/v3 ?

Do you think it would be possible to use the new NATS API/library without breaking CloudEvents users? We're currently doing a similar migration in AMQP and while we're still discussing how to avoid small breaking changes (there might be some, but minor), I think we could do the same with NATS incrementally and not break users?

@stephen-totty-hpe ping

@stephen-totty-hpe ping

I will close this PR if https://github.com/cloudevents/sdk-go/pull/1095 gets merged.


Popup does not work with div as trigger

Bug Report
Steps
Popup does not behave correctly when trigger component is div
Expected Result
Popup to appear
Actual Result
Popup is flashing and not appearing correctly
Version
0.88.1
Testcase
Please see the code sandbox for reproduction.
https://codesandbox.io/s/semantic-ui-react-9vx6p?fontsize=14

Hi @euvs!
The issue is not due to a popup being attached to a div. There are lots of places in SUIR that a popup works attached to a div.
The problem in your example is you are trying to attach a popup that is being forced to appear outside of the viewport. Your div that contains the text runs the full width of your container. That means the popup is trying to render itself on the far right side of your container... which places it out of the viewport.
This is also why your div that has display: inline-block is working correctly since you are forcing the div to only take up the space of the content inside of it.
To see this in action, I took these divs and reduced the size of the parent container to limit it from taking the full viewport and you will see the div works now because it is attaching on the far right side of the div as you have configured.
If you want the popup to specifically target the size of some content inside of a div, and not the full width of the div, you would want to wrap your specific content inside of a span (default display: inline), or a div with display: inline-block
https://codesandbox.io/s/semantic-ui-react-kxrvo


Circular indeterminate progress bar not working on Android 4.x

When showing a default indeterminate progress dialog (with the circular indeterminate progress bar), the progress bar is not shown.
Steps to reproduce:

Checkout commit 5d6179b from your project
Compile & run the sample app on one of the devices listed below (e.g., a Samsung Galaxy S4 Mini with Android 4.4.2)
Click on the button labeled "Progress dialog (indeterminate)"

See below for a list of devices on which the bug occurs and on which it doesn't occur. The screenshot below is taken on the Galaxy S4 Mini.

[x] I have verified there are no duplicate active or recent bugs, questions, or requests
[x] I have verified that I am using the latest version of Material Dialogs.
[x] I have given my issue a non-generic title.
[x] I have read over the documentation (before asking questions on how to do something).

Include the following:

Material Dialogs version: <IP_ADDRESS>

Bug present on the following devices:

Samsung Galaxy Nexus (Android 4.3)
Samsung Galaxy S3 (Android 4.3)
Samsung Galaxy S4 Mini (Android 4.4.2)
Samsung Galaxy Express (Android 4.1.2)
Samsung Galaxy Tab 2 7.0 (CyanogenMod 11, Android 4.4.4)
Samsung Galaxy Tab 2 10.1 (Android 4.2.2)
Sony Xperia Z (Android 4.2.2)

Bug not present on the following devices:

Samsung Galaxy SII Plus (Android 4.2.2)
Samsung Galaxy S4 (Android 4.4.2)
Samsung Galaxy Tab 3 10.1 (Android 4.4.2)
Samsung Galaxy Note (CyanogenMod 11, Android 4.4.4)
Samsung Galaxy Note 10.1 (Android 4.1.2)
LG Optimus L7 (Android 4.0.3)
LG Optimus 4X HD (Android 4.0.3)
HTC One (Android 4.3)
Asus MeMO Pad FHD10 (Android 4.3)

I am facing the same issue , using version "<IP_ADDRESS>"
It was working few days ago but not anymore

The progressBar use the AccentColor in your theme. Try to change this attribute, or you can redifined color for this dialog using:
.widgetColorRes(R.color.your_progress_color)

I did that , but its still the same , no progress animation whatsoever

I tested the sample app on several more devices and added the result to the list in the issue description. I can't find any clear pattern, so it's a bit of a mystery to me.

@rushilMethsof: on which device and with what android version did you see the bug?

API : 4.1.2
device: samsung , Model number : Gt-l18730
i havent verified the sample app yet , but I will do it soon let you know

Thanks for following up! I'll add the device to the list of affected devices. It's the Samsung Galaxy Express, right? http://www.gsmarena.com/samsung_galaxy_express_i8730-5271.php

yes it is samsung galaxy express

I ran another test this morning that puzzles me a bit. I happen to have access to two different Galaxy Tab 2 10.1's, running the same android version, having the same build number and the same kernel version. The only differences are the date they were bought (by about one or two years) and the language that is set (Dutch vs English).
I built the sample project on the commit described above, sent the same apk to both devices and guess what... The indeterminate progress bar shows on the tablet that is set to Dutch, but not on the tablet that is set to English.

https://github.com/afollestad/material-dialogs/releases/tag/<IP_ADDRESS>

My colleague has finally found the issue, and it is both embarrassing and understandable at the same time. The culprit is the developer option 'Animation duration scale' which was set to 'Animation off'. Setting this to 'Animation scale 1x' magically made the animation appear again on the S3 and the 'affected' Tab 2 10.1. Visa versa, setting it to 'Animation off' on some 'non-affected' devices, or even devices with a different Android version (e.g., Android 6.0.1), produced the same 'bug' on those devices.
I suggest to add a Known Issue or something similar to the readme and make everyone aware of the fact that this option causes several material widgets to 'vanish' (actually: stop the animation in the first completely transparent frame).

@jfresen :+1:
yep Animation Scale 1x did the trick , salute for digging deeper to find a solution

Yes, I confirm that we see no progress bar on devices with Android 5 and Android 6. (Samsung S5 with Android 5 and Nexus 5 with Android 6.0.1)
So, is there a way how to show progress bar in progress dialog on Android >= 4.x? Thanks.

@jfresen
Exactly this issue and resolution myself, I had Animation duration scale: Animation scale off set in Developer options and this "broke" the progressBar Horizonal indeterminate true option on my Sony Xperia, displaying only the background tint with not foreground or progress bar itself being displayed.
Once I had set it back to 1x everything worked as expect.
I honestly thought it was an Xperia Android build issue, it was instead a developer bored of animation transitions issue.

I had disabled that option due to JUnit Testing code execution and felt this progress spinner is broken in my app. Did lot of analysis and hit this page. Thanks for reminding.


Added more tests and fixed issues for the game ending

Pull Request Test Coverage Report for Build 72

48 of 48 (100.0%)  changed or added relevant lines in 9 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 100.0%

Totals

Change from base Build 70:
0.0%

Covered Lines:
399

Relevant Lines:
399

💛  - Coveralls


Windows Support

Hello,
I started reading the Book and am now at the point where I try to install the sample project. Unfortunarly I am hung at point 2, where is written cd fabric && make docker. The first problem I face is, that there is no fabric dir, but I guess its just the hyperledger directory, which contains the build file. When trying to make (tried several options including in WSL, with mingw64, with chocolately make), everything fails.
However, HyperLedger fabric IS working in Windows, since I could sucessfully spin it up using VS Code with the IBM Blockchain Extension.
Is there a way to make this work?
Also note, that the given hint at the beginning using Virtual Box is not actually working for everyone, since Docker/WSL 2 and Virtual Box cannot be run simultaneously on a windows machine, which complicates the usage.
Edit: Tried also to install VMWare now instead of Virtual Box. But it is the same issue as with VBox: Hyper-V is not compatible with the virtualization. But it is required for docker. That makes it just not possible to run.

When you say "point 2", what instruction are you referring to? It is in one of the READMEs or is it in the book? The fabric folder is a clone of the Hyperledger Fabric github project, which you can clone to your machine according to the instructions. Is that cloning step not mentioned in the instructions?

When you say "point 2", what instruction are you referring to? It is in one of the READMEs or is it in the book? The fabric folder is a clone of the Hyperledger Fabric github project, which you can clone to your machine according to the instructions. Is that cloning step not mentioned in the instructions?

I mean the book (Position Preparing the network). I think I cloned it as written?
That's where I am right now:
C:\Go\src\github.com\hyperledger>git remote show origin
* remote origin
  Fetch URL: https://github.com/hyperledger/fabric.git
  Push  URL: https://github.com/hyperledger/fabric.git

C:\Go\src\github.com\hyperledger>mingw32-make.exe docker
Der Befehl "cut" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
"Building Docker image hyperledger/fabric-baseos"
"build/images/baseos - docker build --force-rm "
Syntaxfehler.
mingw32-make.exe: *** [Makefile:226: build/images/baseos/.dummy-amd64-2.2.2-snapshot-1de0825e7] Error 1

Yes, I also tried to install Linux Essentials (e.g., the missing `cut´) but it will just fire the next errors.

I mean the book (Position Preparing the network). I think I cloned it as written?
That's where I am right now:
C:\Go\src\github.com\hyperledger>git remote show origin
* remote origin
  Fetch URL: https://github.com/hyperledger/fabric.git
  Push  URL: https://github.com/hyperledger/fabric.git

C:\Go\src\github.com\hyperledger>mingw32-make.exe docker
Der Befehl "cut" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
"Building Docker image hyperledger/fabric-baseos"
"build/images/baseos - docker build --force-rm "
Syntaxfehler.
mingw32-make.exe: *** [Makefile:226: build/images/baseos/.dummy-amd64-2.2.2-snapshot-1de0825e7] Error 1

Yes, I also tried to install Linux Essentials (e.g., the missing `cut´) but it will just fire the next errors.

Page 128 of the book begins with: (These shell scripts were tested on Ubuntu Linux and macOS Catalina and small
modifications may be required for other distributions, a task that is left to the users.)
We haven't run the steps natively on Windows, though as long as you have the right tools (git, make, docker, etc.) installed, it should all work. I did test out everything on a Ubuntu Vagrant VM (VirtualBox on Windows) though, so if you are in a position to do that, the instructions should work off the bat.
That said, it looks like your cloning was messed up in some way. Even in Windows, when you run the command git clone https://github.com/hyperledger/fabric.git -b release-2.2, it ought to create a folder named fabricin your current working directory and when youcdinto it, you should see the source code and be able to build images usingmake docker. Did you instead try to clone straight to the hyperledgerfolder, which is what it looks like from yourgit remote....` command above? I'd recommend re-running the clone command exactly as is in the book.

Page 128 of the book begins with: (These shell scripts were tested on Ubuntu Linux and macOS Catalina and small
modifications may be required for other distributions, a task that is left to the users.)
We haven't run the steps natively on Windows, though as long as you have the right tools (git, make, docker, etc.) installed, it should all work. I did test out everything on a Ubuntu Vagrant VM (VirtualBox on Windows) though, so if you are in a position to do that, the instructions should work off the bat.
That said, it looks like your cloning was messed up in some way. Even in Windows, when you run the command git clone https://github.com/hyperledger/fabric.git -b release-2.2, it ought to create a folder named fabricin your current working directory and when youcdinto it, you should see the source code and be able to build images usingmake docker. Did you instead try to clone straight to the hyperledgerfolder, which is what it looks like from yourgit remote....` command above? I'd recommend re-running the clone command exactly as is in the book.

I redid the step and made sure it's cloned exactly into the fabric directory under hyperledger. It didn't change a thing. It still throws syntax errors. All dependencies are installed (as stated I can launch Hyperledger nodes from within VS Code).
C:\Go\src\github.com\hyperledger\fabric>make docker
Der Befehl "cut" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
"Building Docker image hyperledger/fabric-baseos"
Syntaxfehler.
make: *** [Makefile:225: build/images/baseos/.dummy-amd64-2.2.2-snapshot-bebb75fd1] Error 1

C:\Go\src\github.com\hyperledger\fabric>

Also the same using mingw
C:\Go\src\github.com\hyperledger\fabric>mingw32-make.exe docker
Der Befehl "cut" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
"Building Docker image hyperledger/fabric-baseos"
Syntaxfehler.
mingw32-make.exe: *** [Makefile:225: build/images/baseos/.dummy-amd64-2.2.2-snapshot-bebb75fd1] Error 1

I also installed coreutils in order to make cut available which asked for libintl3.dll which I made available by installing gnuwin usin chocolately. After all of that I still get thrown the following:
C:\Go\src\github.com\hyperledger\fabric>make docker
cut: Trenner muss ein einzelnes Zeichen sein
"cut --help" gibt weitere Informationen.
"Building Docker image hyperledger/fabric-baseos"
Syntaxfehler.
make: *** [Makefile:225: build/images/baseos/.dummy-amd64-2.2.2-snapshot-bebb75fd1] Error 1

Complaining for a specific cut-call argument error (literally saying that the separator has to be a single character). I am just stuck here.

I did test out everything on a Ubuntu Vagrant VM (VirtualBox on Windows) though, so if you are in a position to do that, the instructions should work off the bat.

That does not work for me (and many others) since there is a problem with docker and virtualbox (or vmware for that matter): It's kinda a XOR-situation there: You cannot have Docker and VMare at the same time. This is due to HyperV which has to be either turned on (Docker) or off (virtualbox).

I redid the step and made sure it's cloned exactly into the fabric directory under hyperledger. It didn't change a thing. It still throws syntax errors. All dependencies are installed (as stated I can launch Hyperledger nodes from within VS Code).
C:\Go\src\github.com\hyperledger\fabric>make docker
Der Befehl "cut" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
"Building Docker image hyperledger/fabric-baseos"
Syntaxfehler.
make: *** [Makefile:225: build/images/baseos/.dummy-amd64-2.2.2-snapshot-bebb75fd1] Error 1

C:\Go\src\github.com\hyperledger\fabric>

Also the same using mingw
C:\Go\src\github.com\hyperledger\fabric>mingw32-make.exe docker
Der Befehl "cut" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
"Building Docker image hyperledger/fabric-baseos"
Syntaxfehler.
mingw32-make.exe: *** [Makefile:225: build/images/baseos/.dummy-amd64-2.2.2-snapshot-bebb75fd1] Error 1

I also installed coreutils in order to make cut available which asked for libintl3.dll which I made available by installing gnuwin usin chocolately. After all of that I still get thrown the following:
C:\Go\src\github.com\hyperledger\fabric>make docker
cut: Trenner muss ein einzelnes Zeichen sein
"cut --help" gibt weitere Informationen.
"Building Docker image hyperledger/fabric-baseos"
Syntaxfehler.
make: *** [Makefile:225: build/images/baseos/.dummy-amd64-2.2.2-snapshot-bebb75fd1] Error 1

Complaining for a specific cut-call argument error (literally saying that the separator has to be a single character). I am just stuck here.

I did test out everything on a Ubuntu Vagrant VM (VirtualBox on Windows) though, so if you are in a position to do that, the instructions should work off the bat.

That does not work for me (and many others) since there is a problem with docker and virtualbox (or vmware for that matter): It's kinda a XOR-situation there: You cannot have Docker and VMare at the same time. This is due to HyperV which has to be either turned on (Docker) or off (virtualbox).

I'm not sure the Makefile in fabric is equipped for installing on Windows. I'd suggest visiting the Fabric chat sites to inquire about this; you can start on this channel: https://chat.hyperledger.org/channel/fabric. If you wish, you can visit the JIRA page to find out if others have faced a similar issue, or to report a bug (but I'd first try the chat option and see if someone there can help you): https://jira.hyperledger.org/projects/FAB/issues.
I can't really help you here as I haven't tried installing and running this natively on Windows. Also, for the reason you stated above, I can't install HyperV on my PC because I'm too dependent on VirtualBox myself. And as we mentioned in the book, the instructions we provide were only tested on Ubuntu Linux and macOS Catalina; we just didn't have the bandwidth (or resources at the time) to test on other platforms.
I'm willing to try a Windows installation sometime (need to set up a computer first), but it'll be on a best effort basis, so I can't promise when I'll have anything for you. (Sorry, but I'm already busy with a full time job.)

Alternatively, and strictly speaking, you don't need to build and install Fabric from source. Those instructions were provided as a suggestion. To run the network nodes, you need docker images for the various components (peer, orderer, etc.) on your system tagged with the right labels as expected by our scripts. It's just that if you successfully build from source, you'll have those images built and ready. But you can as well download the same images from docker hub. In fact, this will happen automatically when you run the shell scripts within trade-network; if docker-compose can't find images on your system, it'll attempt to pull them from the hub.
So you can skip the fabric source building and move on to the next steps. But, you may still face some issues. The scripts in trade-network, at least in the bash folder were tested on bash in Ubuntu. We don't have Windows batch file equivalents. But I'd encourage you to at least try and report back. I'll help the best I can.

I'm not sure the Makefile in fabric is equipped for installing on Windows. I'd suggest visiting the Fabric chat sites to inquire about this; you can start on this channel: https://chat.hyperledger.org/channel/fabric. If you wish, you can visit the JIRA page to find out if others have faced a similar issue, or to report a bug (but I'd first try the chat option and see if someone there can help you): https://jira.hyperledger.org/projects/FAB/issues.
I can't really help you here as I haven't tried installing and running this natively on Windows. Also, for the reason you stated above, I can't install HyperV on my PC because I'm too dependent on VirtualBox myself. And as we mentioned in the book, the instructions we provide were only tested on Ubuntu Linux and macOS Catalina; we just didn't have the bandwidth (or resources at the time) to test on other platforms.
I'm willing to try a Windows installation sometime (need to set up a computer first), but it'll be on a best effort basis, so I can't promise when I'll have anything for you. (Sorry, but I'm already busy with a full time job.)

Alternatively, and strictly speaking, you don't need to build and install Fabric from source. Those instructions were provided as a suggestion. To run the network nodes, you need docker images for the various components (peer, orderer, etc.) on your system tagged with the right labels as expected by our scripts. It's just that if you successfully build from source, you'll have those images built and ready. But you can as well download the same images from docker hub. In fact, this will happen automatically when you run the shell scripts within trade-network; if docker-compose can't find images on your system, it'll attempt to pull them from the hub.
So you can skip the fabric source building and move on to the next steps. But, you may still face some issues. The scripts in trade-network, at least in the bash folder were tested on bash in Ubuntu. We don't have Windows batch file equivalents. But I'd encourage you to at least try and report back. I'll help the best I can.

Thanks for your time end effort and my respects for building such a project in your spare time.
Progress: I tried to dig a bit into the problem with the failing make files. Fundamentally there seems to be one concrete error which makes all commands fail under windows: You will always find patterns like "@mkdir -p $(@D)´. "-p" is not valid for Windows (this literally creates a directory named -p).  Quick fix here is using @mkdir "$(@D)" | true instead (windows always creates recursive; the | true is to have make resuming even when the dir is already there).
I will try today to make it work. If I find more I will update this post.
I also ordered a Mac for hopefully not running into the trouble when I have it. My employee wants Blockchain; fast.  Many dependent components. Until September I need sth working.

Thanks for your time end effort and my respects for building such a project in your spare time.
Progress: I tried to dig a bit into the problem with the failing make files. Fundamentally there seems to be one concrete error which makes all commands fail under windows: You will always find patterns like "@mkdir -p $(@D)´. "-p" is not valid for Windows (this literally creates a directory named -p).  Quick fix here is using @mkdir "$(@D)" | true instead (windows always creates recursive; the | true is to have make resuming even when the dir is already there).
I will try today to make it work. If I find more I will update this post.
I also ordered a Mac for hopefully not running into the trouble when I have it. My employee wants Blockchain; fast.  Many dependent components. Until September I need sth working.

@Mereep I got a Windows setup working and was able to run the full stack (from app in VSCode down to contracts in docker containers).
Catch is I'm using WSL Ubuntu rather than Cygwin (which is what you are using for your shell, right?) I have a Windows 10 Pro machine with Hyper-V enabled. I installed Docker Desktop and am running the Docker engine in Windows. I'm also running VSCode in Windows and launching apps from the IDE. In WSL Ubuntu (version is set to 1 as the Docker engine was crashing with WSL 2), I'm doing everything else: cloning and building Fabric, cloning and running scripts in trade-network.
If this setup works for you, I can provide more detailed instructions.

Hi, thanks for the response :-)
Catch is I'm using WSL Ubuntu rather than Cygwin
My setup was actually MingW  + WSL 2 + Debian + HyperV enabled (for docker).
My VS Code can installation run the example node from within the IDE properly with this setting. But at this point I don't know how applicable this would be for the trade-network, since you in the book there are commands from your custom scripts involved.
I also found  the pre-compiled binaries for the machine (e.g., configtxgen,) which I could successfully use for executing the first steps manually (i.e., creating those channel artifacts for the organisations). However, I stopped at that point, since I felt I will run into many more trouble when doing all the steps manually. The configuration seemed pretty intense at this moment to a level I only partially knew what I am doing, hence not being able to fix random errors. If all this stuff is achievable from within the IDE that would be a great win (also for non-windows users I suppose) ;-)
Since I made my university now buy me a Mac machine, so I delayed that stuff at this point until I receive it and play a bit with HL Besu meanwhile, which I could built on my machine (it's java-based).

But at this point I don't know how applicable this would be for the trade-network, since you in the book there are commands from your custom scripts involved.

As long as you run these scripts in a WSL Ubuntu bash shell, everything will work as expected (I verified this). You can download precompiled configtxgen, etc., binaries if you want but you can also follow instructions in the book to build Fabric docker images from source (also the other prerequisites like the APT packages and Golang).
So I'd replace "MingW + WSL2 + Debian" in your setup with "WSL1 + Ubuntu" and it should all work. Want to give it a try?

So I'd replace "MingW + WSL2 + Debian" in your setup with "WSL1 + Ubuntu" and it should all work. Want to give it a try?

Actually I am a bit afraid to break my other stuffs when switching to WSL 1 (have some more containers running for mobile APP development).
However, you made me try the "within-WSL"-way from where I left off last time, and found some fix which actually let me progress further with my build docker-attempt from inside WSL 2 (https://github.com/docker/compose/issues/7495#issuecomment-643120005) which - without the mentioned fix - crashed like that:
richard@DESKTOP-UV50EMR:/mnt/c/Go/src/github.com/hyperledger/fabric$ make docker
Building Docker image hyperledger/fabric-baseos
docker build --force-rm  -f images/baseos/Dockerfile \
        --build-arg GO_VER=1.14.12 \
        --build-arg ALPINE_VER=3.12 \
         \
        -t hyperledger/fabric-baseos ./images/baseos
[+] Building 0.9s (3/3) FINISHED
 => [internal] load build definition from Dockerfile                                                               0.1s
 => => transferring dockerfile: 328B                                                                               0.0s
 => [internal] load .dockerignore                                                                                0.1s
 => => transferring context: 2B                                                                                0.0s
 => ERROR [internal] load metadata for docker.io/library/alpine:3.12                                               0.7s
------
 > [internal] load metadata for docker.io/library/alpine:3.12:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials - err: exec: "docker-credential-desktop.exe": executable file not found in $PATH, out: ``
make: *** [Makefile:241: build/images/baseos/.dummy-amd64-2.2.2-snapshot-bebb75fd1] Error 1

Well, I got another error later (which was happening due to executing the make docker step from within my previously created Windows Go intallation directory). So I redid all the steps before (setting up paths, rechecking out everything in the linux home). I then could compile the fabric tools aswell as the fabric-(ca) docker images.
So it seems I can run the stuff up until the point where I left off of Windows now
:~/go/src/trade-network/bash$ ../../github.com/hyperledger/fabric/build/bin/cryptogen generate --config=./crypto-config.yaml
exporterorg.trade.com
importerorg.trade.com
carrierorg.trade.com
regulatororg.trade.com

I will try following the book from there again. I will report back if I run into the next problems (or if I succeed). Thanks so far :)

@Mereep Can we close this issue? If you face other issues or need help, you can open another one in the future.

Sure, thanks so far :)


use it to upsert into vector db and not the srt

Can u explain what u mean here exactly ?

@flyfir248 we already discussed, lets put the transcript not the srl

can u add a requirements.txt for libraries installations ??

@flyfir248 picking up the tasks, lets catchup on the call tomorrow


Search-Mailbox should output results to the shell, not to pst

Search-Mailbox sends results to a pst rather than to the shell.  This isn't very useful since the point of using the shell is to manipulate the results via the shell.
Search-Mailbox should be able to return mail items to the shell as some type of individual mail item object that can be manipulated like any other powershell object.
This would allow you to do things like export to useful formats like csv, do automated diagnostics on headers, or preview results before using -DeleteContent.

@officedocsbot assign @yogkumgit

Hello @SHAGGAR
Thanks for your feedback.
As this issue resource is to address issues currently present in documentation, I need to kindly suggest visit Office 365 User Voice  https://office365.uservoice.com/ to propose that feature request
Thank you

@SHAGGAR  Thank you very much for your kind feedback. Considering your valuable feedback, as suggested Please log this issue as a User Voice. Concerning team will evaluate and take the appropriate action, as per their schedule. Thanks again for taking out some time and sharing your feedback.

@officedocsbot close


Extract chromosome M data

Extract chromosome M data
Background
See DCL tutorial mitolinplan-v0 for an outline of the mitolin project plan. The plan outlines steps 1-4, which are referred to below.
Since the mitolin project focuses on mitochondrial DNA there are a number of places in our pipeline that we can get rid of excess data. (See slides for the difference between mitochondrial & nuclear DNA.)
The first, but more complicated place to remove excess data, is from the .vcf file that is generated after step 2. (See the google drive link at the bottom of mitolinplan-v0 to download an example .vcf file).
The second, and more straight forward place, is from the .fasta files that are generated after step 3. I suggest you first tackle this issue by starting with .fasta files.
Aim
Create a script that makes two new eg.fasta files from the two fasta example files called "chrMchr1-1.fasta.eg" & "chrMchr1-2.fasta.eg". These can be found in mitolin/data/gen/nguyen_nc_2018/20190613-fastas. Please put the new files in the same directory as the old files.
The new files should only have chrM and not chr1.
Document your work
Please fork & clone this repo. Check out a branch for your work, then push and make a PR for us to merge your note and files.
Add a note (can be .md or .ipynb) with your solution to mitolin/nb.
Your note should be named as follows:

DATE-issue#-shortdescription.ext

e.g.:

20190701-i02-extract-chrM-fa.md

Method
This data extraction from a text file can probably be done using the bash command sed or Python. Either is fine. If you want to try both or find another way that's great too. Please add notes to your documentation that give us some insight into your thinking.
See these Biostars discussion chains:
a. "Question: how to convert a long fasta-file into many separate single fasta sequences" link
b. "Question: Splitting A Fasta File" link
c. "Question: How To Split A Multiple Fasta" link
d. "Question: How To Split One Big Sequence File Into Multiple Files With Less Than 1000 Sequences In A Single File" link
e. "Question: Split Large Fasta Into Mulitple Files, Can'T Name Them With Gi Number" link
Questions?
Please put questions related to this issue in this issue thread. If you want a quick response, post a link to your comment in this thread to Slack #deepcelllineage or DM @Deena. To join Slack enter your email address here. For questions NOT specifically related to this issue, get in touch through any of the communication methods listed in DCL's overview README.

If we only care about chr M, You'd save some processing time by removing any non-mito chromosomes after alignment.
Ex: samtools view -hb sample.bam chrM > sampleM.bam
GATK does it's own realignment, though I don't think you're going to get significant changes to read:chromosomal mapping in this step.

Hi Marcello,
Thanks for writing a script to generate chrM .fasta files and sharing it with me. Please push it to the repo.
Given Jordan's note above, I don't think it is a good use of your time to attempt to generate a chrM .vcf file from the longer version.
So you can see what the longer version looks like, here's a link to a google drive folder that has vcf files in them.
The file name for cell A10 is:
"recalibrated_duplicates_marked_reordered_sorted_filtered_realigned_Basal-1-2016-A10_CGAGGCTG-GCGTAAGA_L008_R1_001.fastq.gz.raw_variants.vcf"

Deena, Thanks. PR for extracting ChrM is done and in the deepcelllinage repo.


xwayland: fix Firefox/GTK3/Wayland -> Xwayland copy-paste not working

Firefox in such a setting doesn't offer "text/plain;charset=utf-8",
but rather something that equals to "UTF8_STRING" directly in the
MIME matching logic of Xwayland part, and it shall rather be preserved
as-is for this to work towards X programs (rxvt-unicode, for instance).
That leads to prioritizing xwm_get_atom_name over a static translation.
It seems X11 atoms vs. proper MIME types is an ongoing topic,
see https://gitlab.gnome.org/GNOME/gtk/issues/1177
("Make X11 run transformation steps mime-type <> atom").

Will report back if I'll hit any regression.
Btw. I find this handy for a very basic troubleshooting:
https://www.virtualbox.org/attachment/ticket/3755/viewclipformats.cpp

OK, I'll have a stab at it.

Did you mean something like this?
This WFM, though I will keep an eye if there's indeed no regression.
In positive case, I need to add a documentation of i/o handling
in xwm_mime_map_fnc.

Ugh, this seems a lot more complicated than it needs to be. Can you try simplifying your changes? I don't think we need an abstraction with callbacks and methods for two special cases.

Agreed, it was overcomplicated, in part because I lack the wider view,
e.g. are there are other areas to receive such handling beside plain
text (the "complicated variant" would make for a nice chaining), or
is there any configurable adjustment to be hooked in eventually
(yeah, doesn't look so) etc.

One of the other possible simplifications would be to move
the remaining parts of logic in xwm_mime_type_to_atom and
xwm_mime_type_from_atom (secondary lookups) directly into
xwm_mime_map, which might make sense given the particular
mappings are only used in those contexts.
I.e., instead of two functions with scattered mapping redundancy,
there would be a single, internally overloaded (but still hopefully
not overblown) function centralized around the single mapping and
playing an extra role of one-way fallback selector.
That would be a 3rd commit that I can add for assessment whether
that would make this overall approach a viable solution.

I'd prefer to stick with a simple callback-less approach. Your first iteration with my first comment addressed would be fine.

Can you rebase this to get the FreeBSD fixes?

Done (in both cases).  Thanks for looking.

Strangest of all, the patch seems no longer needed since
Firefox works even without it?  Colour me baffled.

FTR. the externally observable difference using viewclipformat utility
from above is this:
--- f63.txt	2018-12-21 22:38:19.074189175 +0100
+++ f64.txt	2018-12-21 22:38:17.979199018 +0100
@@ -1,11 +1,13 @@
 TIMESTAMP
 TARGETS
 text/html
 text/_moz_htmlcontext
 text/_moz_htmlinfo
 UTF8_STRING
 COMPOUND_TEXT
 TEXT
 STRING
+UTF8_STRING
+TEXT
 text/x-moz-url-priv
 SAVE_TARGETS

No idea why the former xwayland code would not handle gracefully
the former and seems to be doing so with the latter.
Anyway, with this fix (in either form, see above the alternative),
the things are handled gracefully in both cases.

I am withdrawing this for the time being, it might have been just some
glitch in Firefox Wayland integration prior to v64 (and/or in the gtk
binding it used, not sure if from distro or some embedded version).
What I do suffer from now (Firefox 66, updated released versions of
sway/wlroots), though, is that incorrect new-line endings get copied
in addition to the xwayland programs (e.g. gvim, or urxvt):

expected: \n
obtained during paste: \r\n

That is just for the record.

incorrect new-line endings

As we don't modify the data in any way, this is a Firefox bug.


ES-2343: Smoke test task for corda runtime Gradle plugin

On hold while https://r3-cev.atlassian.net/browse/ES-1843 is in progress

Superseded by #6173


Portfolio site

Describe the project you want to add with tech stack
A modern looking responsive portfolio site, ready to use by anyone, that will build using html,css and javascript, and will be containing contact us form connected, through google sheets api.
Expected behavior
Will help the user to land good clients, giving headstart 🚀 to  their freelancing journey, can also help them land professional jobs.

please assign to me this project under GSSOC 2023

created all the parts please assign me this project under GSSOC23

please assign to me this project under GSSOC'23


[BUG] Failed public DNS query from the cluster - curl Process exited with status 5

General information

OS: Windows
Hypervisor: Hyper-V
Did you run crc setup before starting it? Yes
Running CRC on: Laptop

CRC version
CRC version: 2.24.1+81aeeb
OpenShift version: 4.13.6
Podman version: 4.4.4

CRC status
crc status --log-level debug
time="2023-08-05T18:58:06+02:00" level=warning msg="Failed to add proxy CA to crc http transport"
DEBU CRC version: 2.24.1+81aeeb
DEBU OpenShift version: 4.13.6
DEBU Podman version: 4.4.4
DEBU Running 'crc status'
CRC VM:          Running
OpenShift:       Unreachable (v4.13.6)
RAM Usage:       6.61GB of 15.34GB
Disk Usage:      16.39GB of 32.68GB (Inside the CRC VM)
Cache Usage:     22.7GB
Cache Directory: C:\Users\max\.crc\cache

CRC config
- consent-telemetry                     : no
- cpus                                  : 8
- http-proxy                            : http://user@domain:PASS...@<IP_ADDRESS>:8080
- https-proxy                           : http://user@domain:PASS...@<IP_ADDRESS>:8080
- ingress-http-port                     : 8080
- memory                                : 15000
- nameserver                            : <IP_ADDRESS>
- proxy-ca-file                         : c:\temp\proxy.crt

Host Operating System
Microsoft Windows 10 Enterprise
10.0.19044 Build 19044

Steps to reproduce
crc start  --log-level debug

Expected
crc start completes without warnings about public DNS.
Actual
INFO Check internal and public DNS query...
DEBU Running SSH command: curl --head quay.io --proxy http://user@domain:PASS...@<IP_ADDRESS>:8080 --noproxy <IP_ADDRESS>,localhost --insecure --proxy-insecure
DEBU SSH command results: err: Process exited with status 5, output:
WARN Failed public DNS query from the cluster: ssh command error:
command : curl --head quay.io --proxy http://user@domain:PASS...@<IP_ADDRESS>:8080 --noproxy <IP_ADDRESS>,localhost --insecure --proxy-insecure
err     : Process exited with status 5
 :

Maybe this has todo with the proxy user format?  "user@domain:Pass.." insteat of "user:Pass.."?
Logs
https://gist.github.com/maxmoser1/903373202dda41558a6b9a9eb6be11cc

@maxmoser1 we pass the proxy setting as it is without escaping any special char, it is user responsibility to escape any special char if required. https://www.cyberciti.biz/faq/unix-linux-export-variable-http_proxy-with-special-characters/ contains detail around using hex code.

Failed to update cluster proxy configuration: Failed to add proxy cert details ssh command error:
command : timeout 30s oc apply -f /tmp/user-ca-bundle.json --context admin --cluster crc --kubeconfig /opt/kubeconfig
err     : Process exited with status 1
: error: error parsing /tmp/user-ca-bundle.json: json: offset 1425: invalid character '\r' in string literal

from the debug logs, it is failing at the end because of #3785 which was fixed in #3799


Oredict doesn't clear when reloading

Intro:
When creating custom oredicts you might make mistakes. The current way CraftTweaker works forces you to restart the game if you make a mistake.
Issue Description:
When you reload a script, your custom oredicts aren't cleared. You'll have to remove each recipe individually to clear an oredict.
What happens:
Oredicts retain their added items when reloading. This is both visually with JEI and in crafting recipes.
What you expected to happen:
Oredicts should clear between reloads, since they will be cleared next time you load the game. This should only happen for custom oredicts. Alternatively, an oreDict.clear() method could be added which could be placed in the beginning of a script.

Affected Versions:

Minecraft: 1.10.2
Forge: 2202
Crafttweaker: 1.10.2-3.0.17

Are you trying to craft with the item or looking at the recipe in JEI?

Looking at the recipe in JEI. The item is still part of the oredict cycle when shown. I just tried when crafting, and it also still allowed me to use the recipe as well.

Further testing is needed to confirm this issue. If I can confirm it in a dev environment we can get this fixed.

I'd love to see this fixed, as it's causing the most issues in my pack currently.  If I can help test anything or provide a reproducable test case, please let me know.

I just wanted to clarify, this is more than a visual glitch (as implied by the JEI desync comment in #162).  Even reloading the game will not correctly remove oredict entries.
Just as a visual example:

I created a recipe for jack o' lanterns that can use any <ore:torch>.
recipes.remove(<minecraft:lit_pumpkin>); // Jack o' lantern
recipes.addShapeless(<minecraft:lit_pumpkin>, [<minecraft:pumpkin>, <ore:torch>]);

Then I added <ore:torch> to various torch sources, and removed it from the Tinkers stone torches.
<ore:torch>.remove(<tconstruct:stone_torch>);

Yet a stone torch still works.  It never had the oredict entry removed.

(not visual)
Removing oredict entries seems to fail completely in the current version.  Adding oredict entries is also inconsistent (sometimes it requires an /mt reload, even after a game restart), but that's less problematic.
This issue was mentioned in the closed #141, so I don't believe it's specific to me.  I can reproduce with only CraftTweaker installed.

Would like to vouch for this issue. Trying to remove ore dictionary values so different cobblestones (andesite cobble etc.) don't show up as valid grinder outputs, and the ore dictionary value is not being removed. I have tried with multiple mods and situations, and the ore dictionary still won't remove, though it doesn't show up with an error when scripts are loading, or reloading.
`val oreCobble = ore:cobblestone;
oreCobble.remove(nethercore:stone:1);`

As a workaround till if or when this is fixed, create a variable that includes the items you want to use in the recipe and then loop the recipe with that variable.


[ZH Dimension] Fixed extraction for cases like "12千米"、"2.3千克" (#2270).

Fixed extraction of multi digit numbers when followed by units like "千米" (kilometer) and "千克" (kilogram) (#2270).
Test cases added to DimensionModel.

@LionbridgeCSII,  I'll close the PR as @ChopperMan33 is already working on a more general fix.


LibGit2Sharp type initializer exception

When I'm creating a repository there is the error in GitService.CreateRepository:
Error, The type initializer for 'LibGit2Sharp.Core.NativeMethods' threw an exception.
It is working on my development machine.
What I'm doing wrong?

Closed via b83cbe8401d56be10b203e389448d197175722f0


Fixed example in documentation

It was rendering a semicolon inside an object.
Fixed version 👇
    register({
      validate: value => value === '1'
    })

thank you!

thank you!


Isolated Sphinx doc does not build due to missing pytools script

Describe the bug
Sphinx doc does not build due to missing pytools script make_base if pytools is not in same parent directory
To Reproduce
Steps to reproduce the behavior:

Clone the repo into a separate directory from any pytools clones
Build and activate the conda environment in environment.yml
From the sphinx directory, run python make.py html
See error

Traceback (most recent call last):
  File "make.py", line 30, in <module>
    make()
  File "make.py", line 24, in make
    from make_base import make
ModuleNotFoundError: No module named 'make_base'

Expected behavior
Docs should build.
Desktop (please complete the following information):

OS: MacOS Big Sur
Version 1.2.x and 2.0.x

Additional context
Likely this is just a note in contributing.md to make sure that the remotes are all present before trying to build the docs.

@ben-howt this is by design, so we can maintain a single make script across all 3 associated repos. Open for alternative suggestions - any ideas how to handle better? Would it be sufficient to explain the approach better in the developer guidelines?

Thanks @j-ittner for the response; this makes sense to me as a design decision. I would suggest (and can raise a PR for) the following 2 changes:

Add a note in sphinx/source/contribution_guide.rst
Add a descriptive error if pytools is not found in the sys.path.insert segment of sphinx/make.py

Addressed by #345


add support for resizing elements

Closes #17

Changed the svg circles in visbug-handles to the new visbug-handle element.
Pluralized existing variables for handle-css and HandleStyles and added new singular ones for the element
The new element takes an attribute called placement. e.g. <visbug-handle placement="top-end">.
This attribute handles both the conditional styling as well as the conditional logic for resizing.

Order of events is as follows:

pointerdown on visbug-handle triggers on_element_resize_start

this saves the initial state of the resizing
adds listeners for pointermove and pointerup on document

pointermove on document triggers on_element_resize_move

this is where the resizing is calculated and triggered via requestAnimationFrame

pointerup on document triggers on_element_resize_end

this is where we detach the pointermove listener
also restore any original styles that we modified for the resize (e.g. cursor and transition)

everyone will get the update within the hour!
thank you for this, it's raddddd!

thanks for the lovely comments and for accepting the contribution  💜
the process was mostly smooth, but i couldn't get dev:extension to work on windows (it uses cp) so i only tested in the local dev environment

i did notice some transform drift when resizing from the top? i think it's acceptable given the illusion working so well. the handles don't drift is what i mean, and i think that was a good choice and this is an ok side effect.

yeah... i noticed that this issue happens only on some elements but not others. i could not figure out why, it might have something to do with the layout?

i couldn't get dev:extension to work on windows (it uses cp) so i only tested in the local dev environment

i was wondering if you'd tried loading the extension unpacked..! i'm sad that cp prevented that, sorry about that! there's certainly some infra updates that could be done in the codebase to smooth out cross platform and cross IDE dev. need to block out some maintenance time. also need to update to manifest v3. thanks for letting me know tho! want to log a bug about it?
p.s.
looks like auto publishing github action stopped working, just manually uploaded


Python: Fixed type error while returning multiple responses in sk_context.py

Description
Fixes #1512
Fixed Type_Error while returning multiple responses in sk_context.py file
Output for code in #1512 :

Contribution Checklist

[X] The code builds clean without any errors or warnings
[X] The PR follows the SK Contribution Guidelines and the pre-submission formatting script raises no violations

@AdarshAcharya5 thank you for the fix here. Can you add a test that accounts for this? Perhaps test_hf_local_text_completions?

@awharrison-28 Sure!. Would adding a single test in test_hf_local_text_completions.py suffice?. I'm still in the process of fully understanding the internals of sk, so I wanted to be sure. :)

@awharrison-28, I have added tests for validating multiple responses.
Reference Images :

@microsoft-github-policy-service agree

@awharrison-28, I made a small change in sk_context.py. In my previous PR, I was returning variables["input"] directly. This is an error since it ignores all other parameters. I have fixed it now.

@moonbox3  can you take a look.

Hi, thanks for your contribution. The sk_context will no longer be part of the Python codebase -- it is replaced with kernel args and function results in #4845.


Error when running lift example

I am trying to build on the lift example reported here. In particular the stateful one. Yet when I run the example:
import jax
from flax import linen as nn
from jax import lax, random, numpy as jnp
import flax

class StatefulMLP(nn.Module):
  @nn.compact
  def __call__(self, x, *, train):
    h = nn.Dense(4, name='hidden')(x)
    h = nn.BatchNorm(axis_name='batch')(h, use_running_average=not train)
    h = nn.relu(h)
    return nn.Dense(1, name='out')(h)

class LinenStatefulVmapMLP(nn.Module):
  @nn.compact
  def __call__(self, xs, *, train):
    VmapMLP = nn.vmap(StatefulMLP, variable_axes={'params': 0, 'batch_stats': 0}, split_rngs={'params': True}, in_axes=0)
    return VmapMLP(name='mlp')(xs, train=train)

xs = jnp.ones((32, 4))
variables = LinenStatefulVmapMLP().init(random.PRNGKey(0), xs)

I get
Traceback (most recent call last):
File "/Users/cdalmaso/Library/Caches/pypoetry/virtualenvs/multi-task-YYPKsy_k-py3.8/lib/python3.8/site-packages/IPython/core/interactiveshell.py", line 3378, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "", line 24, in
variables = LinenStatefulVmapMLP().init(random.PRNGKey(0), xs)
File "/Users/cdalmaso/Library/Caches/pypoetry/virtualenvs/multi-task-YYPKsy_k-py3.8/lib/python3.8/site-packages/jax/_src/traceback_util.py", line 162, in reraise_with_filtered_traceback
return fun(*args, **kwargs)
File "/Users/cdalmaso/Library/Caches/pypoetry/virtualenvs/multi-task-YYPKsy_k-py3.8/lib/python3.8/site-packages/flax/linen/module.py", line 1381, in init
_, v_out = self.init_with_output(
File "/Users/cdalmaso/Library/Caches/pypoetry/virtualenvs/multi-task-YYPKsy_k-py3.8/lib/python3.8/site-packages/jax/_src/traceback_util.py", line 162, in reraise_with_filtered_traceback
return fun(*args, **kwargs)
File "/Users/cdalmaso/Library/Caches/pypoetry/virtualenvs/multi-task-YYPKsy_k-py3.8/lib/python3.8/site-packages/flax/linen/module.py", line 1335, in init_with_output
return init_with_output(
File "/Users/cdalmaso/Library/Caches/pypoetry/virtualenvs/multi-task-YYPKsy_k-py3.8/lib/python3.8/site-packages/flax/core/scope.py", line 897, in wrapper
return apply(fn, mutable=mutable, flags=init_flags)({}, *args, rngs=rngs,
File "/Users/cdalmaso/Library/Caches/pypoetry/virtualenvs/multi-task-YYPKsy_k-py3.8/lib/python3.8/site-packages/flax/core/scope.py", line 865, in wrapper
y = fn(root, *args, **kwargs)
File "/Users/cdalmaso/Library/Caches/pypoetry/virtualenvs/multi-task-YYPKsy_k-py3.8/lib/python3.8/site-packages/flax/linen/module.py", line 1798, in scope_fn
return fn(module.clone(parent=scope), *args, **kwargs)
File "/Users/cdalmaso/Library/Caches/pypoetry/virtualenvs/multi-task-YYPKsy_k-py3.8/lib/python3.8/site-packages/flax/linen/module.py", line 411, in wrapped_module_method
return self._call_wrapped_method(fun, args, kwargs)
File "/Users/cdalmaso/Library/Caches/pypoetry/virtualenvs/multi-task-YYPKsy_k-py3.8/lib/python3.8/site-packages/flax/linen/module.py", line 735, in _call_wrapped_method
y = fun(self, *args, **kwargs)
TypeError: call() missing 1 required keyword-only argument: 'train'
I am new to jax and this is an advance topic so I might be doing something stupid.
System information

Mac M1 Max OS 12.6:
jax 0.3.25
jaxlib 0.3.25
flax 0.6.2
Python version: 3.8

I am new to jax and this is an advance topic so I might be doing something stupid.

If you are new to JAX and Flax, I recommend starting with some beginner material before diving into transforms. The JAX 101 tutorial is pretty great, and for Flax we have Flax basics which is good to start with.
In your case, as the error message says, you should pass the kwarg train to the model's init function:
variables = LinenStatefulVmapMLP().init(random.PRNGKey(0), xs, train=True)


Refactor CI to use Ammonite.

Summary:
All steps are refactored to be runnable on local machines with Ammonite. The Public Marathon Phabrictor job will apply patches. This way we can test changes to the CI unless the Jenkinsfile is changed.
Test Plan: pipelines
JIRA issues: MARATHON-7347

The PR is blocked by D789.

Note: All patches on this branch have been reviewed.


⚠ Bofrost.lu has degraded performance

In d8c9c26, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1545 ms

Resolved: Bofrost.lu performance has improved in 8f6e32a after 13 minutes.


runtime list command

Codecov Report

Merging #16 (50b0826) into main (9e7eaf6) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main      #16   +/-   ##
=======================================
  Coverage   25.13%   25.13%
=======================================
  Files           1        1
  Lines         187      187
=======================================
  Hits           47       47
  Misses        134      134
  Partials        6        6

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 9e7eaf6...50b0826. Read the comment docs.


Globalization support for HTML ouput

Note: #73 had gone stale and too much stuff had changed so I was not able to cleanly rebase it. So I am resuming work here.

This is a little bigger than I first thought. Because in lunet-io/markdig#239 I was dealing with a very limited number of element types. But here in Statiq, we are dealing with full html. So I am worried about the performance impact of the module.
After some research, I have found out these things:

Browsers don't handle paragraph direction detection very well. See this talk.
dir=auto is still not sufficient for today's browsers. We still need to specify the direction of an html element whenever possible.
Most common technique for finding the direction of a block of text is finding the First strong character.
Tables need align=right for rtl text in order to render correctly.
We should prefer HTML markup over CSS for specifying
All block-level elements need to be marked with "rtl" attribute if needed.

Additional reading

https://www.w3.org/International/articles/inline-bidi-markup/uba-basics

Fixes #15

@daveaglick I have a few questions:

Where do you think is the best place to put the utility funtions like IsLeftToRight, IsRightToLeft, ToUtf32, IsBlockElement and GetTextDirection?
Part of the code is copied from MarkDig's Globalization extension (although I am the original author of that module), how do you think we should deal with the licensing?

Hi @daveaglick, are we blocked on anything here? I understand that you might be very busy in these crazy times. I just wanted to know if you are waiting on me. Please let me know if I am supposed to do something for this PR to go forward.

Nope, not blocked at all - this is all great from my first go through it. I’m on vacation this week so I’m hoping to get some time to do a final pull and get this merged in for the next release. Thanks again!

Finally getting a chance to review all this, thanks again and sorry it's taken so long!
In general I really like the design. Implementing the HTML rewriting from a module in Statiq.Html is exactly how I would have done it because that makes it opt-in for anyone that wants to add this functionality. I'll add the module to the default pipelines in Statiq.Web once this gets merged and released with a feature flag so it can be turned on there too.
I just have a few comments, mostly nits and semantics. Otherwise this looks really clean and I’m happy to merge it in.

Where do you think is the best place to put the utility funtions like IsLeftToRight, IsRightToLeft, ToUtf32, IsBlockElement and GetTextDirection?

Adding them as static helpers in the module as you've done seems like a good approach for now. We can always move them out into a separate static helper class later if it turns out we need that kind of functionality in more than one place.

Part of the code is copied from MarkDig's Globalization extension (although I am the original author of that module), how do you think we should deal with the licensing?

I appreciate you being mindful of licensing. Markdig looks like BSD 2-Clause which is really similar to MIT. One of those clauses says “Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.”, though I’m not totally certain copying individual blocks of code qualifies as a redistribution. @xoofx any thoughts on how you’d like to see this code from the Markdig module attributed? I’m happy to go with whatever you feel is appropriate.

@xoofx any thoughts on how you’d like to see this code from the Markdig module attributed?

No need to complicate, if the code copied is from what @encrypt0r did in Markdig, then no need to add a mention to Markdig license here.

Thanks @xoofx for the confirmation, though actually this makes me question if I'm properly attributing Markdig in general (separate issue, but I'll make sure to verify ASAP).

@daveaglick Thank you very much. I love the code base, it's very well maintained and organized. Let me know if there was anything else needed here

Thanks again! Hopefully I'll get a release out in the next couple days.


Documents vs Vertices

Why does there need to be a separation between documents and vertices? It's confusing for users and means that "strange" things like ALTER CLASS OUser SUPERCLASS V are necessary. Is ODocument a vestigial remnant from a time before the graph API? If so, could it be removed / merged in a future version?

OrientDB is a multi-model database with a graph engine, so documents are still relevant in OrientDB.


Filter excludes all files in XXXX when using Replace in the Folder

Bracket version: 1.2 build 1.2.0-15697
Description:
When I used "Replace in the Folder" I always got this error.
"Filter excludes all files in XXXX "
And there are only 3 files in the folder. And I had set "No Files Excluded"
What should I do?
Thank you.

@jaydenlin  Try Debug > Reload Without Extensions to make sure it's not caused by any extension.

Debug > Reload Without Extensions...
It's not cause by any extension, but is definitely related to the number of files that Brackets tries to index when activating the "Find/Replace in Files" feature
Brackets version Release 1.3 development build 1.3.0-0
Windows 10

@dancingfrog can you try again with 1.7?

Same...
Release 1.7 build 1.7.0-16898 (release b0a363b71)
build timestamp: Wed Jun 08 2016 12:27:56 GMT+0100
Windows 10 Pro - 10.0.14393 Build 14393


I cant get SuperGroup

I am receiving this error: Error { code = 400 message = "Invalid supergroup identifier" } on the code: TdApi.GetSupergroup getSupergroup = new TdApi.GetSupergroup(); getSupergroup.supergroupId = chatId; this.client.send(getSupergroup, re -> {, the used id is correct...

The id is not correct. Check your code

the id is correct i'm sure. I am using this id: -1001516291509
On Mon, 13 Jun 2022, 04:34 Andrea Cavalli, @.***> wrote:

Closed #29 https://github.com/tdlight-team/tdlight/issues/29 as
completed.
—
Reply to this email directly, view it on GitHub
https://github.com/tdlight-team/tdlight/issues/29#event-6793683327, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AKIUHURD6U5EBYWBQ4YJSU3VO3P7ZANCNFSM5YSLVUJQ
.
You are receiving this because you authored the thread.Message ID:
@.***>