fix(curriculum): build a survey form - update instructions

Checklist:

[x] I have read and followed the contribution guidelines.
[x] I have read and followed the how to open a pull request guide.
[x] My pull request targets the main branch of freeCodeCamp.
[x] I have tested these changes either locally on my machine, or GitPod.

Closes #54796

Thanks for the PR - I guess this doesn't really hurt anything, but this is not the solution discussed in the issue. I am going to close this for now, because I think the issue needs some more discussion. If you think I'm wrong, feel free to leave a message and we can revisit it.

Actually, I am going to open this back up. We can use this as a temporary solution while we figure out something better. We would need to add this note to all of the projects though. You should be able to do a search for challengeType: 14 to find them all @nayelimdejesus. If you do that, I think we would be able to merge this.

Hi @nayelimdejesus do you think you'll have time to address Tom's concerns?

Closing this as inactive. If you want to add the suggestions @nayelimdejesus - feel free to make a new PR with those additions. Thanks and happy coding 🎉


Robot not properly claimed when robot with keeper id is not in field

When a keeper ID is chosen of a robot that is not currently visible (but BTFactore::useKeeper is true) sometimes a robot is not properly claimed by robotdealer and is indicated as free).
The problem is probably this:
If BTFactore::useKeeper() == true in default tactic, the amount of robots to claim is the total amount of robots - 1 (the keeper). When the keeper is not there this 1 still gets subtracted and thus a robot is not claimed. Thus as a solution robotdealer would then try to claim each robot except if the ID is the keeper id.

fixed in #449


Delete config template

Description
Changes proposed in this pull request:

replace script piece to not use the --templates arg

/retest

/test all

/test all


Testing mocks for CLI examples command

Pre-requisites
Please ensure you have done the following:

[x] I have read the CONTRIBUTING.md document.
[x] If my change requires a change to the documentation, I have updated the documentation accordingly.
[x] I have added tests to cover my changes.

Types of changes

[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Describe changes

Refactored the entire zenml example functionality of the CLI (with much help from @htahir1)
Added in a clean command to delete the zenml examples from your working directory.
Added the beginnings of a new / refactored test suite handling mocking of the example cloning.

@htahir1 starting a draft PR here so that you can look over the finished CLI refactor for the moment.
The testing mocks are obviously not completed. I'll switch over to finishing them after lunch once I have the podcast out + published.


fix issues with network_mode

Description
Fix broken issues with existing network_mode implementation which will allow it to be functional.
Should not break any existing functionality as this is not even called with the existing schema/api version of the docker api gem.
This only gets called when API is 1.21 or greater.  Unless you are overriding the api schema version or using a pre-release version of the docker-api gem this should have no impact.
(There is a blurb about this in the issue.)
It will be good to fix this now as they are preparing version 2.X of the docker api gem.
See - https://github.com/swipely/docker-api/tree/release-2.x
Once this 2.X gem is released and used, this cookbook may break without this change.
Issues Resolved
https://github.com/chef-cookbooks/docker/issues/998
Check List

[ X] All tests pass. See https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/TESTING.MD
[ ] New functionality includes testing.
[ ] New functionality has been documented in the README if applicable
[ X] All commits have been signed for the Developer Certificate of Origin. See https://github.com/chef-cookbooks/community_cookbook_documentation/blob/master/CONTRIBUTING.MD

@tas50 - here's the revised PR
This code is run during load_current_value
It looks like the intention is to only get the ip_address if it's set in NetworkSettings => Networks
I don't know why it's not required to capture the ip_address if that's not found.  I did not change that functionality but it could easily be added.
You can see the issue if you run the below commands against any container -

Manually run docker inspect - you will see NetworkSettings => Networks in the output

Current docker API schema 1.16 - container.info['NetworkSettings']['Networks'] will be nil.
This is also why this code is almost never used today
Note that the IPAddress can be found in container.info['NetworkSettings']["IPAddress"] if we really want it.

container_name = 'rabbitmq'
require 'docker'
connection = Docker::Connection.new('unix:///var/run/docker.sock', {})
container = Docker::Container.get(container_name, {}, connection)
irb(main):009:0> container.info['NetworkSettings']['Networks']
=> nil

Docker API schema 1.21 - container.info['NetworkSettings']['Networks'] will be used!
Per https://docs.docker.com/engine/api/version-history/#v121-api-changes
This field deprecates the.... NetworkSettings.IPAddress....which are still returned for backward-compatibility, but will be removed in a future version.

So those of us who are overriding the docker API version WILL actually run this code.  And we'll want to get the IPAddress from the correct field.
Docker.send(:remove_const, 'API_VERSION')
Docker.const_set('API_VERSION', '1.21')
container_name = 'rabbitmq'
require 'docker'
connection = Docker::Connection.new('unix:///var/run/docker.sock', {})
container = Docker::Container.get(container_name, {}, connection)
container.info['NetworkSettings']['Networks']

Hopefully this summarizes the what/why/how for anyone reading this.
Also hoping this long winded explanation makes sense.

👍


related to Car360

Thank you for your contribution.
I am writing to inquire when you will release the Car360.
Best regards,
Daniel

We will release the Car360 after our paper is accepted.


chore: add cloudshell URL to linkinator config

This will suppress linkinator false positives.

Closing in favor of some upstream modifications that will hopefully make docs tests less flaky, I believe this outstanding PR:
https://github.com/JustinBeckwith/linkinator/pull/355
Will help even more, as it will now back off for up to 30s by default.


include hvm hpc information

hvm column   This seems very important!  You can not resize instances arbitrarily.   hvm only runs on hvm, paravirtual on paravirtual.      there is some overlap, yes, but not entirely.    I am hitting this problem a lot lately, in that I can not re-size instances.   a cc2.8xlarge can not become a small, and vice versa.

Info is available here:
http://aws.amazon.com/amazon-linux-ami/instance-type-matrix/
would be nice to integrate that...

Was just working on this one. :) Hang tight.


Split solutions onto separate pages and create ToC on first page.

The list is getting quite long. It would be great to split the solutions up with a page for each challenge.
Each page can then be moved to the format suggested in https://github.com/CodingChallegesFYI/SharedSolutions/issues/45 with a header that includes a link to the main site, the discord and the challenge the solutions relate to.
The main README.md can then become a Table of Contents.

@JohnCrickett I'm interested in taking on this issue. Do you prefer having #45 completed separately to having the solutions moved to their own pages, or are you comfortable with having it combined into one pull request?

I'm happy for anyone who is kind enough to help to work in whatever way best suits them! :)

Can we also have the solutions categorised based on the programming language?

Can we also have the solutions categorised based on the programming language?

I think that would be good, a table like https://github.com/CodingChallegesFYI/SharedSolutions/issues/45 grouped by language.

@aaron-lee-hebert thanks for the awesome work on this! Really appreciate it!

Is this still an issue? If not, then please close this, thanks


Moving michaelis menten function to transformers module

Description

As requested on issue #532
Related Issue

[ ] Closes #
[x] Related to #532

Checklist

[x] Checked that the pre-commit linting/style checks pass
[x] Included tests that prove the fix is effective or that the new feature works
[ ] Added necessary documentation (docstrings and/or example notebooks)
[ ] If you are a pro: each commit corresponds to a relevant logical change

Modules affected

[x] MMM
[ ] CLV

Type of change

[ ] New feature / enhancement
[ ] Bug fix
[ ] Documentation
[x] Maintenance
[ ] Other (please specify):

📚 Documentation preview 📚: https://pymc-marketing--541.org.readthedocs.build/en/541/

The test test_tanh_saturation_parameterization_transformation is not working, but I'll try to solve check it during the day!

Thinking again, I don't think this solution should be applied to the model, it's just a version of logistical saturation reparametrize to work better with the scipy optimizer. For some reason didn't like the logistic saturation in the transformers module.
I'm moving the function to utils again, and leaving Michaelis only in the transformers module, so can be used at some point in the future by the model.

Hey @ricardoV94 @juanitorduz
I think we are ready to merge? The Menten function was move to the transformers module, and the other is not needed.

@cetagostini besides adding the plot as suggested by @wd60622 there are come small conflicts with the base branch because of https://github.com/pymc-labs/pymc-marketing/pull/456 You can try to fix this manually in GitHub or try to rebase locally. If you need some help just ping me :)

@wd60622 @juanitorduz Done!

@wd60622 @juanitorduz Done!

@cetagostini-wise The doctrings have a syntax error 😢

Looks okay now!

I think the codecov is just because change in names (by inspecting the report)

I think the codecov is just because change in names (by inspecting the report)

@ricardoV94 can we merge or are we missing something with the codecov? 🤔 ?

I think the codecov is just because change in names (by inspecting the report)

@ricardoV94 can we merge or are we missing something with the codecov? 🤔 ?

codecov is usually pretty flaky, if you don't see a reason for cov to go down ignore it

ok! Thanks @ricardoV94 ! I will merge this one as we have it open for a while now and it is a relatively small change 🙏


Unable to open one new ADLS Gen2 blob container at the first time

Storage Explorer Version: 1.9.0
Branch: master
Build: 20190808.2
Platform/OS: Linux Ubuntu 19.04/Windows 10/macOS High Sierra
Architecture: ia32/x64
Regression From: Previous release 1.9.0
Steps to reproduce:

Expand one ADLS Gen2 account -> Blob Containers.
Create one new blob container.
Check whether it can be opened automatically or not.

Expect Experience:
The created blob container can be opened successfully.
Actual Experience:
Unable to open the created blob container.

More info:
This issue doesn't reproduce after reopening the same blob container.

Fix merged into master.

This issue has been fixed on the latest master build 20190809.2. So closed it.


A Javascript error occurred in the main process

Hi there, I'll try to be as clearest as possible.
Goal
Launch the app and process now-cli in iTerm2.
Context
Launching my computer this morning. Now app is launching on start up.
Issue
This morning it is impossible to me to launch / use the now-cli. A Javascript error occurred in the main process according to this screenshot.
I can not delete the app nor kill it.
It says
pkg.includes is not a function

I'm currently using mac Mojave v10.14.2 and did not had this issue last week. I have nvm installed and v10.0.0 lts as default.
Thanks for reading !

I have the same issue on the same OS (macOS Mojave 10.14.2). Although, the CLI seems to work just fine in the terminal.


Support UnoCSS shortcuts

Clear and concise description of the problem
I use shortcut's to alias and centralize app icons => { 'i-check' : 'i-ms-check' } but preview doesn't work for unocss shortcuts.
Suggested solution
I see that there is #64 which will solve the actual alias (i-ms-check) preview but it will be very nice if 'i-check' works too using same logic. Thank You!
Alternative
No response
Additional context
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guide.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

On further examination, I'm abandoning this method because uno shortcuts are actually creating two separate classes one with i-check and one with i-ms-check with exactly same content. I guess this is just how uno works but I was trying to go 'CSS FIRST' and avoid a centralized icon object in JS and importing every time I need an icon. But even if it did ( I found this transformer unocss-transformer-alias which works) It is only build time aliasing so I can't store the alias in database as my app needs user selected icons at runtime and then I would need that object anyway. Basically, I keep confusing dynamic (runtime) and static (build time) when working with unocss 😅 and using a JS object with string names (and // @unocss-include) is the right way to go in this context so #64 is all I need. Thank you!


Multiple players tidyup is triggering iOS watchdog crash

Firstly, thank you for all your hard work on Xamarin and MAUI including the toolkits and plugins.
I've upgraded/migrated to MAUI but I'm having a problem with having multiple audioplayers.
I use them so that I can load a single audio file into each and then play them when certain elements are interacted with.
With a single player my app is fine. On iOS for pages with multiple players, when the page disappears, the app crashes.
It looks to be the watchdog terminating the app. Please help!
Many thanks

Are you able to provide some more context please?

What version of the plugin are you using?
what does the code look like?
what exception/error gets logged?

Hi there, thanks for your reply.
I should have specified that this is when the app is slept/dismissed either while the page is still open or recently closed (within a few seconds).
Another page which only has a single audio player does not fail in this way.
I’m using version 3.0.0.
This is the kind of exception I’ve seen:
watchdog transgression: app:3377 exhausted real (wall clock) time allowance of 600.00 seconds
Code snippets:
Xaml
<ContentPage
xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
...
Unloaded="Game_OnUnloaded">
Xaml.cs
private void Game_OnUnloaded(object sender, EventArgs e)
{
((GameViewModel)BindingContext).TidyUp();
}
ViewModel.cs
public class GameViewModel : ViewModelBase
{
private readonly IAudioPlayer[] _audioPlayer = new IAudioPlayer[6];
public GameViewModel(INavigationWrapper navigationWrapper) : base(navigationWrapper)
{
    Task.Run(async () => await CreateAudioPlayers());
}

private async Task CreateAudioPlayers()
{
    _audioPlayer[0] = AudioManager.Current.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(AudioFile1));
    _audioPlayer[1] = AudioManager.Current.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(AudioFile2));
    _audioPlayer[2] = AudioManager.Current.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(AudioFile3));
    _audioPlayer[3] = AudioManager.Current.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(AudioFile4));
    _audioPlayer[4] = AudioManager.Current.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(AudioFile5));
    _audioPlayer[5] = AudioManager.Current.CreatePlayer(await FileSystem.OpenAppPackageFileAsync(AudioFile6));
}

public override void TidyUp()
{
    for (int i = 0; i < 6; i++)
    {
        _audioPlayer[i]?.Dispose();
        _audioPlayer[i] = null;
    }
}

}
ViewModelBase.cs
public abstract class ViewModelBase : INotifyPropertyChanged, IDisposable
{
protected INavigationWrapper NavigationWrapper;
bool isDisposed;
protected ViewModelBase(INavigationWrapper navigationWrapper)
{
    NavigationWrapper = navigationWrapper;
}

public event PropertyChangedEventHandler PropertyChanged;
protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
    PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}

public virtual void OnAppearing(double container)
{
}

public abstract void TidyUp();

~ViewModelBase()
{
    Dispose(false);
}

public void Dispose()
{
    Dispose(true);

    GC.SuppressFinalize(this);
}

protected virtual void Dispose(bool disposing)
{
    if (isDisposed)
    {
        return;
    }

    if (disposing)
    {
        TidyUp();
    }

    isDisposed = true;
}

}

On 21 Jun 2024, at 06:13, Shaun Lawrence @.***> wrote:
Are you able to provide some more context please?
What version of the plugin are you using?
what does the code look like?
what exception/error gets logged?
—
Reply to this email directly, view it on GitHub https://github.com/jfversluis/Plugin.Maui.Audio/issues/117#issuecomment-2182013631, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJCCEDD335FIVERZV6DHWNTZIOY7HAVCNFSM6AAAAABJUY7RLOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBSGAYTGNRTGE.
You are receiving this because you authored the thread.

Sorry I forgot to ask what platform you are seeing this on?

This is only happening on iOS in release mode, not in debug!
On Fri, 21 Jun 2024, 13:35 Shaun Lawrence, @.***> wrote:

Sorry I forgot to ask what platform you are seeing this on?
—
Reply to this email directly, view it on GitHub
https://github.com/jfversluis/Plugin.Maui.Audio/issues/117#issuecomment-2182669661,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJCCEDFJJ2DQOML23JC53L3ZIQMYDAVCNFSM6AAAAABJUY7RLOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBSGY3DSNRWGE
.
You are receiving this because you authored the thread.Message ID:
@.***>

Thanks. Have you tried searching for the error message on Apple forums or apple related questions on something like Stackoverflow? I wonder if there is something happening on iOS that we aren't handling
Also I'm keen on building games too. Any chance you can share details on what you're working on?

I have looked at the Apple documentation and it advises ensuring all non-UI
work is not not on the main thread. I'm not sure if the tidy-up work needs
to be explicitly backgrounded somehow.
This game is a simple one for helping test children's eyesight. It's a
bespoke app that I made with Xamarin but the MAUI migration hasn't been as
smooth as hoped!
On Fri, 21 Jun 2024, 15:18 Shaun Lawrence, @.***> wrote:

Thanks. Have you tried searching for the error message on Apple forums or
apple related questions on something like Stackoverflow? I wonder if there
is something happening on iOS that we aren't handling
Also I'm keen on building games too. Any chance you can share details on
what you're working on?
—
Reply to this email directly, view it on GitHub
https://github.com/jfversluis/Plugin.Maui.Audio/issues/117#issuecomment-2182846094,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AJCCEDGNELJHZJPLCESNJODZIQY4VAVCNFSM6AAAAABJUY7RLOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOBSHA2DMMBZGQ
.
You are receiving this because you authored the thread.Message ID:
@.***>


definition changes - removing unused signal

open another PR to correspond with the definition changes in this PR https://github.com/commaai/opendbc/pull/729 , specifically removing CRUISE_INFO | NEW_SIGNAL_4 in carstate.py.

Thanks, but already done in #26277


Reduce test execution time

Make sure all tests run in a reasonable amount of time (<< 1s per test) if possible.
This might be accomplished by

Adjusting the parameters of the algorithms
Reducing/Eliminating the use of external graph files (except for read/write tests)

I would not discourage the use of external graph files per se. If they are too big, however, they should be replaced by smaller ones.

Good point.
Thoughts on "tests" like these?
Would either like to remove those or clearly express the intent (through asserts) of a test. Just executing a method without even asserting for an exception (which I presume was the intention here) doesn't make sense to me.

You are right in that this is not a proper test without assertions. I discourage complete removal, though. If it is too difficult to find meaningful assertions (e.g. because you did not write the code), then change from test* to try* to indicate that this part needs more work.

@ebergamini Could you take a look at these tests?
There are no asserts/expects in there. Also do you think it is fine to replace the graph with a smaller one like jazz to reduce the runtime?

Maybe the assertions are in the called code itself (using assert)? And maybe they are only triggered with large enough or special instances?
Note that currently, assertions are off in the builds on travis. I would suggest to turn them on for tests.

Clarification: When I said assertions, I meant "assert" and "EXPECT".

We can probably still differentiate between asserts in the code itself and the tests on top of that. I feel like the former is basically designed to be a coded comment describing the intended states the author is expecting. In contrast the tests can be used to ensure the correctness of one specific functionality at a time.
So I would argue to only have tests that contain the minimal number of assertions needed to ensure a specific functionality/feature is working as intended.
Just by quickly glancing at the code I found a couple of asserts but as far as I can see those are not directly related to the size of the instance. Would still be nice to get the confirmation from Elisabetta.

Sometimes it is really difficult to write a test that really tests the functionality/feature because the tested algorithm is heuristic, randomized and parallel. Note that heuristic and randomized wouldn't be that much of a problem as we can fix the seed of the random number generator (a feature definitely not used enough yet in the tests), but parallelism sometimes really means you have no possibility to get reproducible results. Therefore, testing the result of such an algorithm will always lead to random test failures (as we can already see them, see e.g. #6). However, internal assertions may at least verify that certain internal invariants are fulfilled and therefore provide at least some level of testing. I have no idea if this is indeed the case with the tests you mentioned, I just wanted to give an explanation why it might be okay that some tests just execute an algorithm without testing the result (though maybe a comment mentioning this could be added to these test cases).

Okay. But even a parallel algorithm should produce a result that has some testable properties.

I definitely agree with you on the issue of having a lot of tests that currently fail randomly because of missing seeds.
Apart from that I am not sure about whether it is really hard to test parallel algorithms. In the end we don't care about how an algorithm is implemented but to which results it leads.
In case parallelism in the implementation leads to a higher variance in the result space then we should consciously decide whether that is okay with us and which boundaries we regard as acceptable for the result.
Then we specify those boundaries in the test and if the test fails it actually means that this is a real problem and needs to be addressed.
So either our boundaries are too strict and we would accept looser boundaries (in which case we need to adjust the tests) or the boundaries are what we want and the implementation cannot guarantee those boundaries in which case the implementation needs to change.
Not sure whether this is your main concern when testing parallel implementations.

Hi Kolja,
yes, in the case you mentioned the asserts are only in the code itself. It’s hard to write expects in the test because it’s an approximation algorithm and the only thing we know is that with some probability the approximation will be within a certain interval.
It shouldn't be a problem to replace PGP with a smaller graph, though.
Best,
Elisabetta
On Mar 10, 2017, at 10:56, Kolja Esders<EMAIL_ADDRESS>wrote:

@ebergamini Could you take a look at these tests?
There are no asserts/expects in there. Also do you think it is fine to replace the graph with a smaller one like jazz to reduce the runtime?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.


Determine how to assign weights

All CDF comparisons we've looked at so far conflate two factors:

How well individual records match raw records
How well the weight is calibrated

So far we've been synthesizing weight as any other feature; @donboyd5 has been making it one of the first in the synthpuf sequence, while I've been making it the last in sequential random forests. As the most important feature, it may deserve special treatment.
Per the PUF handbook:

Weights were obtained by dividing the population count of returns in a stratum by the number
of sample returns for that stratum. The weights were adjusted to correct for misclassified returns.
...
The sample design is a stratified probability sample, in which the population of tax returns is
classified into subpopulations, called strata, and a sample is selected independently from each
stratum. Strata are defined by:

High combined business and farm total receipts of $50,000,000 or more.
Presence or absence of special Forms or Schedules (Form 2555, Form 1116, Form
1040 Schedule C, and Form 1040 Schedule F).
Total gross positive or negative income. Sixty variables are used to derive
positive and negative incomes. These positive and negative classes are deflated
using the Gross Domestic Product Implicit Price Deflator to represent a base year
of 1991.
Potential usefulness of the return for tax policy modeling. Thirty-two variables
are used to determine how useful the return is for tax modeling purposes.

We have a few options:

Continue synthesizing like any other feature.
Emulate SOI strata. I haven't checked whether these fields are in the PUF.
Apply linear programming to hit targets. This differs from current targeting in that it would not minimize deviations from an original weight. Instead it would set an objective function which minimizes some aggregate deviation measure from many targets. This could also be useful for state-level weighting in the future.

There may be others. IMO we should consider separating this problem from the problem of record synthesis, which should be evaluated on record-level similarity.

The third of these approaches is quite interesting but I'm not sure how to operationalize it unless we can define what makes for a good set of weights, beyond satisfying targets, because there will be a huge number of sets of weights that can satisfy targets.
If we can operationalize it, we can start to examine it empirically early on, using data files @MaxGhenis has already created - a problem that is large enough to be interesting, and small enough to keep us from worrying about computer resources. If we work out an analytic approach, we can easily apply it to more-sophisticated synthesized files, and compare to other approaches.
But let's see if we can operationalize it.
Let's assume we have 2 data files:

"actual," which is the true, nonreleasable file (we could use @MaxGhenis's 5% holdout dataset, test.csv, for this)
"syn," which is the synthesized releasable file (we could use the synthpop-synthesized file, synth_synthpop.csv, for this)

In round numbers, both files have 22k observations and 60 variables (including a weight).
We want to compare file-quality measures such as weighted wages or AGI against the values in actual (presumed to be correct), by income range, for 3 approaches to the weights:

use the synthesized weights in syn, which we know have some problems

use the synthesized weights in syn, adjusted as @donboyd5 suggested, obtained by hitting a set of targets while minimizing how far the new weights move from the synthesized weights (implicitly, this assumes that there is something good about the synthesized weights, and moving too far from them is bad)

throw out the synthesized weights in syn, and choose weights that minimize an objective function based on deviations from the targeted values, as @MaxGhenis suggests. I think this is based on the idea that approach 2 might be artificially and unnecessarily anchoring us to weights that simply may not be very good. Maybe we are better off constructing weights from scratch that will achieve all targets and not be anchored to original or synthesized weights.

We know from experience that version 2 virtually always will be easily solvable even with equality constraints for hundreds of targets. That is, there are many - perhaps thousands - of sets of weights that will satisfy the constraints exactly. (We're finding 22k unknown variables that satisfy a few hundred constraints - many different sets of variables can do this.) Approach 2 chooses the set of weights that are closest to the synthesized weights.
Now on to approach 3: any set of weights that hits all of the constraints exactly will minimize an objective function based solely on distance between targets and weighted values on the file, so how do we know which one to choose?
To make it more concrete, suppose we want to satisfy 9 targets constructed from the actual file:

number of weighted returns in AGI range $0 - $50k
number of weighted returns in AGI range >$50k - $100k
number of weighted returns in AGI range > $100k
4-6. total weighted wages in each of those ranges
7-9. total weighted itemized deductions in each of those ranges

In approach 2, we would choose 22k new weights that satisfy these 9 constraints and also minimize an objective function that penalizes change from synthesized weights. One simple objective function we could use to decide which constraint-satisfying set of weights is best is minimizing the sum over 22k records of the squared difference from 1 of the ratio of new weights to synthesized weights. Formally, this is:
objective = sum(x[i] - 1)^2
where each x[i] is the ratio of the new weight to the synthesized weight on a record.
There would be 9 constraints, as defined above.
This is a nonlinear program rather than an LP but the idea is essentially the same as what @MaxGhenis discussed. In practice we might use something slightly more complex.
In approach 3, what would we do? We might set the objective function up as the sum of squared differences between each constraint's calculated value and its target value -- something like:
minimize the sum of the following 9 squared differences, where each i indexes into the 22k records:
objective =
{sum(w[i] * (AGI[i] in 0-$25k)) - target1}^2 +
{sum(w[i] * (AGI[i] in >$50k - $100k)) - target2}^2 +
{sum(w[i] * (AGI[i] in >$100k)) - target3}^2 +
{sum(w[i] * wages[i] * (AGI[i] in 0-$25k)) - target4}^2 +
{sum(w[i] * wages[i] * (AGI[i] in >$50k - $100k)) - target5}^2 +
{sum(w[i] * wages[i] * (AGI[i] in >$100k)) - target6}^2 +
{sum(w[i] * itemded[i] * (AGI[i] in 0-$25k)) - target7}^2 +
{sum(w[i] * itemded[i] * (AGI[i] in >$50k - $100k)) - target8}^2 +
{sum(w[i] * itemded[i] * (AGI[i] in >$100k)) - target9}^2
(There are obviously scale issues in defining this objective function. We might scale the calculations so that each constraint is in [0, 1], or in some other way, but that's a next step after we figure out how to set up the problem.)
As I understand how @MaxGhenis put this forward, there wouldn't be any constraints - in approach 3, we would just minimize this objective function.
Obviously the objective function is minimized when all constraints are exactly satisfied, and so the optimal solution to approach 2 (based on its definition of optimality) would also minimize the objective function in approach 3. If the goal is to select weights that are better than those in approach 2 in some way, then either we need to add some sorts of constraints (I am not sure what) or somehow add a measure of "good" weights to the objective function. Is there some better definition of a good weight, other than one that is close to the synthesized weight? Would we rather have equal weights for all records, or something else? Even if we were to have hundreds of targets rather than 9 (and we probably would), we would almost certainly end up in this situation.
@MaxGhenis, can you elaborate on how we would implement this approach? I think we would need to somehow define what good weights would be, and incorporate them in the objective function. (And after doing that, it is not clear to me why it would be better to have the constraints incorporated into the objective than set out separately as constraints - the former requires us to deal with scale issues and possibly assign relative importance to constraints, and the latter does not.)

Thanks for formalizing this @donboyd5, your example objective function is exactly what I had in mind. As you say, we should also rescale, and probably weight the targets subjectively if we care about something like AGI more than something like # people under age 13. There could also be loose constraints like ensuring positive weights for all records, and that each individual target doesn't deviate too far (though squared deviations should get us far here).
It'd be great to get to the point where we have to choose among multiple sets of weights which each satisfy targets perfectly. I don't think we'll be able to get there unless we either synthesize many more records than the original PUF, and/or we haven't included as many targets as we should. I'd expect the objective function to include hundreds if not thousands of targets, including counts within crosstabs, averages, quantiles, etc., so it'll be hard to hit all of them well (just as the original PUF misses on some targets).

BTW ideally the targets in approach 3 are the same as those defined for other parts of the problem, like those from approach 2. We're really just reshaping the problem from constraints to an objective function.
This ties to @feenberg's concern raised yesterday that by weighting records to hit an objective function and then evaluating the records on the same objective function is unfair. This could justify a couple modifications:

Using a third holdout set for comparing methods. This is common in prediction problems, for example Kaggle's data science competitions often provide a training and test set, and then choose the ultimate winner based on a holdout set. So if we have two competing weighting schemes we could choose based on that third holdout.
Adding a regularization penalty to avoid overfitting. For example in https://github.com/open-source-economics/taxdata/issues/138#issuecomment-352869297 regarding state-level weights, I suggested an L1 penalty as used in LASSO regressions. The L1 penalty equals the sum of absolute value of the magnitude of coefficients to the objective function. This turns out to shrink coefficients on the least useful features to zero, and has been shown to avoid overfitting. I'd have to give more thought to how this would analogize to our case, but ideally we'd do something to both avoid overfitting and discard least-useful records, e.g. those that are very similar to other records. For example, rather than synthesize 100k records, we could synthesize 200k and throw out the 100k least valuable ones, and end up with a better fit.

Here are some findings from @donboyd5 with respect to the initial test synthesis file, which synthesized s006 as a non-seed variable:

The first table below looks at the 3 10% sample files. The columns are # of records, sum of s006 (didn't bother to divide by 100), and sum of wages (unweighted). Obviously the sum of the weight comes in well below either the training or test amount. I checked in Excel to make sure I didn't have some odd error reading the file. The unweighted sum of wages also is quite far from test and train but of course it's very early in the process. The second table repeats this for the full puf and synthesized version, to make sure it is not an artifact of the sample.
The 3rd and 4th tables show quantiles of s006 in the 10% sample and full files, respectively. The extremes are not far off, but the middles are.
I am going to guess this is related to the sequence of fitting and synthesis. In a future run, it might be worth forcing s006 to be an X variable (carried over to the synthesized file as is) or making it one of your randomly sampled seed variables.

@feenberg also found that "the mean e00200 was $186,979."
I'll create another file with s006 as a seed variable as a first step, though this could also be due to other model design issues like too few seed columns, too few trees, etc.

On Tue, 11 Dec 2018, Max Ghenis wrote:

Here are some findings from @donboyd5 with respect to the initial test synthesis file, which
synthesized s006 as a non-seed variable:

I have a program that scores 35 or so plausible tax reforms with the PUF
and another file. If the alternate file is just the PUF rounded to 2
digits, the scores are very close. I'd like to try the synth file again,
but the first draft gave scores that were not good. I'll try again with
the next version.
Dan

That's great, Dan. It will be great to see it after you've got it to your
satisfaction.
Don
On Wed, Dec 12, 2018 at 7:12 AM Daniel Feenberg<EMAIL_ADDRESS>wrote:

On Tue, 11 Dec 2018, Max Ghenis wrote:

Here are some findings from @donboyd5 with respect to the initial test
synthesis file, which
synthesized s006 as a non-seed variable:

I have a program that scores 35 or so plausible tax reforms with the PUF
and another file. If the alternate file is just the PUF rounded to 2
digits, the scores are very close. I'd like to try the synth file again,
but the first draft gave scores that were not good. I'll try again with
the next version.
Dan
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/donboyd5/synpuf/issues/9#issuecomment-446566837, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AGPEmFY-PIaXXmvNiWi5PVEdE75ndiFDks5u4PLDgaJpZM4Yqi5k
.


xcaddy doesn't build specified version

I noticed xcaddy isn't building the specified version. If I specify, for instance, xcaddy build v2.3.0 --with github.com/caddy-dns/cloudflare, I will get v2.4.0-beta.1 instead.

Warning: Permanently added the RSA host key for IP address '<IP_ADDRESS>' to the list of known hosts.
Reset branch 'master'
Your branch is up-to-date with 'origin/master'.
Pulling cache layers for index.docker.io/xnaas/caddy:latest...
Done!
KernelVersion: 4.4.0-1060-aws
Components: [{u'Version': u'19.03.8', u'Name': u'Engine', u'Details': {u'KernelVersion': u'4.4.0-1060-aws', u'Os': u'linux', u'BuildTime': u'2020-03-11T01:24:30.000000000+00:00', u'ApiVersion': u'1.40', u'MinAPIVersion': u'1.12', u'GitCommit': u'afacb8b7f0', u'Arch': u'amd64', u'Experimental': u'false', u'GoVersion': u'go1.12.17'}}, {u'Version': u'1.2.13', u'Name': u'containerd', u'Details': {u'GitCommit': u'7ad184331fa3e55e52b890ea95e65ba581ae3429'}}, {u'Version': u'1.0.0-rc10', u'Name': u'runc', u'Details': {u'GitCommit': u'dc9208a3303feef5b3839f4323d9beb36df0a9dd'}}, {u'Version': u'0.18.0', u'Name': u'docker-init', u'Details': {u'GitCommit': u'fec3683'}}]
Arch: amd64
BuildTime: 2020-03-11T01:24:30.000000000+00:00
ApiVersion: 1.40
Platform: {u'Name': u'Docker Engine - Community'}
Version: 19.03.8
MinAPIVersion: 1.12
GitCommit: afacb8b7f0
Os: linux
GoVersion: go1.12.17
Starting build of index.docker.io/xnaas/caddy:latest...

Done!
Build finished

Same problem. I'm getting a beta build, not v2.3.0.

Hmm. Just a quick hunch, didn't dig, I think this is because the latest version of the caddy-dns/cloudflare plugin specifies v2.4.0-beta.1 as its minimum version.
Try building from this commit instead https://github.com/caddy-dns/cloudflare/commit/eda8e5aa22232e9c279b0df7531f20c331b331c6
./xcaddy build v2.3.0 --with github.com/caddy-dns/cloudflare@eda8e5aa22232e9c279b0df7531f20c331b331c6

ah, that would do it — didn't expect a plugin to force an upgrade to a beta version... 🙃

Yeah I didn't think that would happen either, but alas. Is there anything we can do about this @mholt?

More evidence of the problem @mholt https://caddy.community/t/cloudflare-wildcard-subdomain-issue-docker/11751

@mholt my current theory is that because this repo isn't using tagged versions, the go mod resolver is causing the main Caddy module to get bumped up. I think we should tag caddy-dns/cloudflare@eda8e5a as v0.1.0, and caddy-dns/cloudflare@728f5b6 as v0.2.0. That might give it a hint of which version is appropriate to use.

Okay. An idea - maybe we run go get on the main Caddy module again after all the other plugins, this should cause the dependencies to downgrade back to the correct versions. I don't see any way in the go get API to not upgrade other modules, so I think the only way is to make it do a downgrade after. Confirmed that this should work by doing it manually on the output with XCADDY_SKIP_CLEANUP:
$ XCADDY_SKIP_CLEANUP=1 xcaddy build v2.3.0 --with github.com/caddy-dns/duckdns
2021/03/08 08:13:19 [INFO] Temporary folder: /tmp/buildenv_2021-03-08-0813.549012191
2021/03/08 08:13:19 [INFO] Writing main module: /tmp/buildenv_2021-03-08-0813.549012191/main.go
2021/03/08 08:13:19 [INFO] Initializing Go module
2021/03/08 08:13:19 [INFO] exec (timeout=10s): /usr/local/go/bin/go mod init caddy
go: creating new go.mod: module caddy
go: to add module requirements and sums:
        go mod tidy
2021/03/08 08:13:19 [INFO] Pinning versions
2021/03/08 08:13:19 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v<EMAIL_ADDRESS>go get: added github.com/caddyserver/caddy/v2 v2.3.0
2021/03/08 08:13:22 [INFO] exec (timeout=0s): /usr/local/go/bin/go get -d -v github.com/caddy-dns/duckdns
go get: added github.com/caddy-dns/duckdns v0.3.0
go get: upgraded github.com/caddyserver/caddy/v2 v2.3.0 => v2.4.0-beta.1
2021/03/08 08:13:23 [INFO] Build environment ready
2021/03/08 08:13:23 [INFO] Building Caddy
2021/03/08 08:13:23 [INFO] exec (timeout=0s): /usr/local/go/bin/go mod tidy
2021/03/08 08:13:25 [INFO] exec (timeout=0s): /usr/local/go/bin/go build -o /root/caddy -ldflags -w -s -trimpath
2021/03/08 08:13:27 [INFO] Build complete: ./caddy
2021/03/08 08:13:27 [INFO] Skipping cleanup as requested; leaving folder intact: /tmp/buildenv_2021-03-08-0813.549012191

$ cd /tmp/buildenv_2021-03-08-0813.549012191

$ /usr/local/go/bin/go get -d -v<EMAIL_ADDRESS>go get: downgraded github.com/caddy-dns/duckdns v0.3.0 => v0.2.2
go get: downgraded github.com/caddyserver/caddy/v2 v2.4.0-beta.1 => v2.3.0

Just tried with cloudflare -- if the command was:
xcaddy build --with github.com/caddy-dns/cloudflare

i.e. no version of Caddy specified, then go get -d -v github.com/caddyserver/caddy/v2 gets run, so if we do another go get after like in that PR, no downgrade will happen. But if we add @latest if the version was empty then it will do the downgrade. Do we want to do that?

Specifically regarding compatibility for the cloudflare plugin, this should now be resolved with the release of v2.4.0-beta.2, because it now properly has the libdns changes. If you still want to keep v2.3.0 though, you'll still need to use the older commit from the cloudflare repo, but xcaddy should now yield a build with v2.4.0-beta.2 because of https://github.com/caddy-dns/cloudflare/commit/964e47d3890e63d20c44642bc4090a1705261928

@mholt after speaking with Bryan C. Mills in the gopher slack, he pointed out a potential fix for this one. We could put the Caddy module/version in every go get we run, which would likely make the build error out because the version specified in the command would take precedence instead of triggering an upgrade.
For example (as per OP), we could run this:
# Pull in Caddy
$ go get -d -v<EMAIL_ADDRESS>
# Pull in plugin modules
$ go get -d -v<EMAIL_ADDRESS>github.com/caddy-dns/cloudflare

Erroring out would probably be better than allowing Caddy to upgrade, less surprising. The user could then have a chance to look into specifying an exact version of the plugin which is compatible with the older version of Caddy they're trying to target, i.e:
$ go get -d -v<EMAIL_ADDRESS>github.com/caddy-dns/cloudflare@eda8e5aa22232e9c279b0df7531f20c331b331c6


Renaming a node loses nodepath references from that node to children (and vice versa), and references within the branch.

Godot version:
3.2 beta5 or any earlier I've tried.
Issue description:
When renaming a node that has node path references to children nodes (any nested inside), those references are kept after first rename, but renaming it again loses the references - they are left pointing at the situation after the first renaming. In addition to the renamed node losing its references, it also happens for the kids: any nested child node referring to the renamed node (by nodepath) loses the tie - exactly in the same way as above (after 1st works, after 2nd broken).
Edit: #30534 seems very related. Note also that the situation "breaks" (internally?) already after the first renaming. Before that it works, after that, no more renaming support.
Steps to reproduce:

Create a node with a script that has an export variable of NodePath type (or use an internal node that uses those): export(NodePath) var my_path
Duplicate that node and move it inside the original node - now we have two nodes nested.
Assign the parent node's my_path to the kid, and the kid's my_path to the parent.
Rename the parent node (eg. to name_after_1st) and check the situation: Seems refs are correct (by inspector UI look as well as hovering to see the path, as well as trying by script).
Rename again (eg. to name_after_2nd) and check the situation: Now the parent refers to ../name_after_1st/kid where as the kid refers to ../../name_after_1st. So both refs are broken.

Workarounds:

I currently have a system that tracks those special nodes (using node path refs) using mostly _enter_tree and _exit_tree functionality (+ some idle_frame waits and switching scene tabs special hacks). The core of the solution is to split the path into two: path to the common parent and then the sub path from it to the target node. Although this is hacky and annoying and adds boilerplate to each script using node path refs in editor (there are hundreds of them), it works for all cases except renaming the root node - which I haven't found a solution for. A tiny bit related is #35222 (problems on changing type of the root node).

Notes on the above workaround for renaming and moving (copied from the script):
Background:

When a node is moved, Godot will automatically update its new location to any node in the scene that refers to it (by NodePath).
Problem is that, if the updated node is moving as well, the new location will be wrong (it should not be updated at all).

Solution:

We can use the ancestor part of the updated node path to get the common parent. Eg. in "../../../something/new_location", the "../../../" gives us the common parent.
We split the path at the common ancestor. Upon exiting we store the common ancestor as a node + then the sub path down from it.
Upon entering, we get the stored common parent and sub path, get the node at the sub path, and update the NodePath ref by getting path to that sub node.

Update:
The scope of the issue seems to be larger: Renaming a node, will break all node path references that point from within the node to within the node. So in the scenario below, NodeWithNodePath has a export(NodePath) variable reference to TargetNode, and renaming the container NodeToRename will break this path - in the way described above.
> NodeToRename
> NodeToRename > NodeWithNodePath
> NodeToRename > TargetNode

Potential solution:
If Godot really stores the paths as relative, then the solution would be to simply skip the renaming procedure for nodes that are within the renamed node (children or grand-children) - as they were correct, no smart-renaming needed.

Hello, I got bit by this one yesterday (v3.2.1.stable.official). If it's ok, I'd like to add a simple example that people could test against.
NodepathRenameBugTest.zip

Open the project, Main.tscn should be open with four instances of Character.tscn. Run the game, all instances animate.
Select an instance node. Use the Instance a Scene File button and add a new instance of Character.tscn. It will be added under the selected node and be called “Character”.
Drag and drop it onto the Main node in the tree. It renames itself to “Character5”.
Open Character.tscn. Run the game again. Now only the “Character” instance animates. Look in the Character.tscn AnimationPlayer; if you double click the track name (“position”) you’ll see its full path is “../Character/Sprite:position”, when it should be “Sprite:position”.
Go back into Main.tscn and delete the “Character” node. Look again in Character.tscn and the animation is now empty.
Close Godot and edit Character.tscn to remove the “../Character/” prefix on line 11 to solve the problem. Or, undo to before deleting the node in step 5, double click the track name and edit out the prefix there.

To help searchers: this bug might show up in your game as all characters of a type no longer animating, except for one instance that's freaking out because it's receiving all of their animation play instructions.

I just reproduced this together with my every one of my 30 pupils 🤦♂ so I can confirm it's still happening on 3.2.3
Thanks @tom-jk for the repro steps.
Is this marked as a known-issue? It's pretty critical since it's really hard to debug if you don't know what's going on or that it is breaking other scenes.

Looks like there are two PRs open: https://github.com/godotengine/godot/pull/35319 and https://github.com/godotengine/godot/pull/42314

This seems to have resurfaced in 3.3.4

Repro steps:

instance a Character.tscn as a child of the instance named "Character"
rename the newly instance node: "Character" -> "Character4"
drag the renamed node on top of the root node ("Main")
the node will rename itself "Character5"
Open Character.tscn and check the AnimationPlayer. The track is now ../Character4/Sprite:position

@noidexe can you reproduce this in 3.3 (first version which included my fix)? I did some basic testing without the AnimationPlayer in 3.3.4 (just renaming and moving plain old nodes with exported NodePaths) and that still works. This might be an issue in AnimationPlayer.
I also remember that @pouleyKetchoupp did some more fixes to NodePaths for the 3.4 release. Maybe it's fixed in that version.

Thanks for testing! Closing as fixed in 3.4 then, which will soon be released.


ImportError: cannot import name 'OxmlElement' from 'docx.oxml'

将PPT导成PNG一直报错

请问报错信息是什么？
---Original---
From: @.>
Date: Thu, Oct 12, 2023 15:50 PM
To: @.>;
Cc: @.***>;
Subject: [CoderWanFeng/python-office] ImportError: cannot import name'OxmlElement' from 'docx.oxml' (Issue #107)
将PPT导成PNG一直报错
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: @.***>


实验复现结果不一致

作者您好，我们通过下载您的代码并对您提出的VAC进行了重跑了50个epoch（没有使用BN），结果最好只有35.1%的词错率。此外，我们调整代码中的权重，对baseline算法进行实验（不使用BN），发现结果也与论文中结果相差甚多，请问是否代码版本不一致，又或我们训练时间过短？

第一份是使用VAC算法的log文件
log.txt
第二份是使用baseline的log文件
log.txt

@wljcode
Thanks for your attention to our work. It seems like you used batch size=1, which may affect the robustness of the model. Besides, the learning rate does not decay during training?  Perhaps because there may exist some bugs in checkpoint loading, I will check this later.
Relevant logs are uploaded for comparson.
baseline.txt
baseline_bn.txt
baseline_VAC.txt

@wljcode
Have you successfully reimplemented the experimental results? I checked the relevant logs and found that you adopt the load_weights to continue training rather than load_checkpoints, the former only load the model weights and the latter will load all training relevant parameters. It is expected to adopt load_checkpoints to continue training.

Thank you for your reply. Due to the limitation of GPU memory, we did not continue the experiment reproduction work recently. We will complete your work later when the equipment is ready ！

Thank you for your reply. Due to the limitation of GPU memory, we did not continue the experiment reproduction work recently. We will complete your work later when the equipment is ready ！

Hi, @ycmin95 , thanks for your great work.
I try to reproduce the work recently. The final result is 0.4% worse than yours.
Here is my training log.
log.txt
After 70th epoch, the performance cannot be improved as yours.
Besides, I find "label_smoothing = 0.1" in your log, but not in the released code.
Could you provide some advice?

Hi, @sunke123, thanks for your attention to our work.
We will explain this performance gap in our next update, perhaps in two weeks,
which can achieve better performance (about 20% WER) with fewer training epochs.
You can conduct further experiments on this codebase, the update won't change the network structure and the training process.
The parameter label_smoothing is adopted in our early experiment about iterative training and I forget to delete this parameter, I will correct it in the next update.

@ycmin95
Cooooool!
Thanks for your reply.
Looking forward to that~

Hi, @sunke123,
the code has been updated~

你好,请问我下载了代码重新训练了一下,但几轮下来DEV wer依旧是100%.我把batchsize调成1,lr调成0.000010.可以给点意见吗,谢谢.

@herochen7372
You can first check whether the evaluation script runs as expected with the proposed pretrained model, and than check whether the loss decreases as the iteration progresses.

@ycmin95
Thanks for your reply.

@wljcode Have you successfully reimplemented the experimental results? I checked the relevant logs and found that you adopt the load_weights to continue training rather than load_checkpoints, the former only load the model weights and the latter will load all training relevant parameters. It is expected to adopt load_checkpoints to continue training.

Hello author, I have encountered the same problem. Can you provide more detailed information on how to solve this problem? Sorry, I didn't understand the method here. Thank you very much. I only have a 3060 GPU, so my batchsize = 1.
I noticed in your log that there are Dev WER and Test WER for each epoch of training, but mine is only Dev WER.
Looking forward to your help.
log.txt
dev.txt

@wljcode Have you successfully reimplemented the experimental results? I checked the relevant logs and found that you adopt the load_weights to continue training rather than load_checkpoints, the former only load the model weights and the latter will load all training relevant parameters. It is expected to adopt load_checkpoints to continue training.
@ycmin95
Hello author, I have encountered the same problem. Can you provide more detailed information on how to solve this problem? Sorry, I didn't understand the method here. Thank you very much. I only have a 3060 GPU, so my batchsize = 1.

I noticed in your log that there are Dev WER and Test WER for each epoch of training, but mine is only Dev WER.
Looking forward to your help.
dev.txt
log.txt

It seems that you only train the baseline without the proposed VAC or SMKD, please follow the Readme.md to set the configuration file. We remove the evaluation on the test set during training for efficiency, you can modify this process in the main.py.

Hello,  @ycmin95.
After configuring the settings according to the readme, I ran 40 epoch, but the best result achieved was only 32.3%. Could you please let me know if I might have missed any settings?
log_SMKD_no_ConvCTC.txt
dev_SMKD_no_ConvCTC.txt
I've noticed that I commented out "# ConvCTC: 1.0" in the baseline.yaml file. I added ConvCTC: 1.0 and retrained 80 epoch, but the results were even worse.
log_SMKD_ConvCTC.txt
dev_SMKD_ConvCTC.txt

Hi, @kido1412y2y
Can you report the evaluation results with a batch size larger than 1? I never run experiments with batch size of 1, and not sure the influence of it.

home/pickleball/公共的/oldli/VAC_CSLR-main
preprocess.sh ./work_dir/baseline_res18/output-hypothesis-test-conv.ctm ./work_dir/baseline_res18/tmp.ctm ./work_dir/baseline_res18/tmp2.ctm
2024年 10月 04日 星期五 17:27:11 CST
Preprocess Finished.
/home/pickleball/公共的/oldli/VAC_CSLR-main
preprocess.sh ./work_dir/baseline_res18/output-hypothesis-test.ctm ./work_dir/baseline_res18/tmp.ctm ./work_dir/baseline_res18/tmp2.ctm
2024年 10月 04日 星期五 17:27:13 CST
Preprocess Finished.
[ Fri Oct  4 17:27:14 2024 ] Epoch 6667, test  73.10%
[ Fri Oct  4 17:27:14 2024 ] Evaluation Done.
After testing with the resnet18_slr_pretrained_distill25.pt file, why are the test results so high?


Change serialization syntax of Fluent::Config::Element

Configuration dump should be done as default (v1) syntax on v0.14.

Could you close this issue? @tagomoris

@okkez Thank you for your work!


Import rollup/json

I think we should ditch rollup and use tsc instead to make our life easier (like we're doing in other libraries).

yes make much more sense for this kind of small libs

I think we should ditch rollup and use tsc instead to make our life easier (like we're doing in other libraries).

yes make much more sense for this kind of small libs

You live you learn 😄


Improved Layout

This adds a much better navigation bar and a fully responsive layout.

This has been sitting for a while with no comment, so I am going to assume it is uncontroversial.  Merging.


Add index selection pass for KQIR planning

We add a simple index selection algorithm upon KQIR planning part based on a simple cost model.
Also, we introduce range-v3 since it's essential for modern C++ and is a part of C++20.
TODO:

[x] more tests

Ready for review now : )


Better message/event handling

Currently when one wants to handle messages or events they add something like the following
return {
  onmessage: function(name, data) {
     switch(name) {
        case 'test-message': test(data);
        break;
        // ...
     }
  }
}

Something like that, right? Well, maybe instead of a switch an if else statements is used. Regardless, that breakdown is up to the individual who implements the module/behavior/service in question.
I pulled this straight from the docs:

Don't include application logic in the event handler. Everything the module is capable of doing should be represented as a method on the object and the event handler should call out to those methods.

This interface doesn't naturally support that. On the contrary, I feel like it encourages the bad practice of handling all cases directly inside that method.
I'm proposing an improvement to message/event handling where an object can be passed to on* as an alternative to passing a function.
Example
return {
  onmessage: {
    'test-message': function(name, data) {
     }
  }
}

This interface ensures that there's a function that handles every message instead of a single function that handles all messages. There's no noisy if or switch statements to deal with. The other thing this setup makes me think is, now that it's known what messages are being handled by the T3 construct, it's not necessary to specify messages at all because that'd just be redundant. T3 can just scrape the messages off the onmessage object.
My current proposal isn't to get rid of messages or the fact that onmessage or onclick can be a function. It's really just the addition for something like onmessage to be an object. Though, I will say that given the next "major" release, which might be a while from now, it would be good to consider the former points.
Thoughts?

Agree.
More readable and cleaner, also no logic inside event messaging. :thumbsup:

This is pretty nice idea. It would make the messages array defunct since you could just pull the keys off the onmessage property. I don't think it'll solve the problem of having a bloated onmessage property with application logic, but it would definitely reduce if/else statements.
I'll revisit this proposal when we're thinking of doing another major release. Thanks!

I'd encourage you to think about it in as a minor enhancement in the interm. You could support both objects and functions going forward and deprecate the use of direct functions at a later date.

@zephraph Would you be willing to put together a pull request for this enhancement?
We'd like to make sure its compatible with IE8 (no ES5) and we can forgo removing the messages array for now.

Sure thing.

I was going back through this in prep for the PR and noticed I left off an example of event handling. Delegation of events is a bit trickier because there's not some set string to key off of. You could key off of data-type, but my assumption is that not all events will have a corresponding data-type.
One way to achieve this would be to have a special method on the object that would determine which event handler should be called.
return {
  onclick: {
    delegate: function(event, element, dataType) {
      return dataType || event.target;
    },
    btn: function(event, element, dataType) {} // Where btn is a dataType
  }
}

I'm not sure if I like this.
After thinking about it, I'd almost prefer just keying off of data-type. That would force you to either have data-type set on any events that you needed to handle, or to just use a function as per usual.
Ultimately though, I feel like there should between some semblance of consistent behavior between modules and event handlers.

onmessage handling and on[event] handling are fairly different. In onmessage, you are only listening to specific messages defined in the messages array. In the onclick case, you might want to do something more generic like logging every click or doing an event.preventDefault(). Let's constrain the PR to the onmessage method for now.

There might also be a need to add multiple message handlers.  Using the on[message] syntax would tie on message to one handler.
An alternative might be to allow objects in the messages array.  If the value in an index of the array is a string invoke onmessage as usual.  If the value of an index is an object then the key would be the message name and the value would be a string literal or list of string literals defining associated callbacks.
For example:
messages = [
    'normalmessage',  // Invoke 'onmessage'
   { 'anothermessage': [ 'callbackone', 'callbacktwo' ] }  // Invoke all callbacks for message 'anothermessage'.
]

Currently I've written a service with a 'dispatchMessage' method.  However, it'd be nice if I could just explicitly map callbacks in the messages array.


update list for required eeg sidecar json

Also some single letter fixes that we applied over the last weeks. E.g., Manufacturer vs ManufacturerS.
And I added "DeviceSoftwareVersion", "HardwareFilters", which you maybe forgot the first time you made the list?

I already started with that, you can merge PR 97


Update with withdrawl section

updated the withdrawl section of code, this feature works if the withdrawl is larger than the balance, this would imporve the code and prompts user to enter the correct value.
What type of PR is this? (check all applicable)

[ ] 🚀 Added Name
[x] ✨ Feature
[ ] 🌟 stared the repo
[ ] 🐛 Grammatical Error
[ ] 📝 Documentation Update
[ ] 🚩 Other

Description
Add Link of GitHub Profile

Hi @kaivalya98 kindly review the Pull request, added some extra features to the code.


improve speed with fused matrix multiplications

There are a couple of sets of matrix multiplications where the A matrix can be shared.  Some loops and reads are removed by this fusing fusing them.
On M1 Pro Macbook the tokens / sec improvement I saw was roughly:

stories15M - 750 -> 830
stories110M - 144 -> 155
tinyllama-1b - 22.5 -> 23.5

I use -j 6 which is 6 out of 10 cores which seems optimal on all the models.
This change is inspired by one of the Zig implementations.  Single worker of stories15M improved from 470 -> 530 tokens / sec so It closes some of the performance gap with Zig in that comparison.
It is slightly ugly to strip the types by passing A.data(), B.data(), and C.data() directly into the new batch_matmul function in transformer.  StaticTuple requires homogeneous types though and the fusing sometimes uses both Tensor and TensorSlice.

Hi @mikowals , cool!  As always you're ahead of everyone. unroll is a great finding!
I think we're beating llama.cpp now 😄
comparison report: https://engiware.com/benchmark/hypertune-report-cf7a.html

We're really close to 1000 tok/s

Thanks for the update.  Good Stuff!
Not for the PR but try running with 4 * simdwidthof[DType.float32]().  On my M1 machine that improves performance a bit more.  I had a stories15M run that hit 902 toks / sec.
But setting that requires autotune I think because it is a compile time value and it will be very OS / architecture dependent.

Indeed, threads = 6 -- is fastest, it shows 1024 tok/s (!) at max

Multiplier 4 for simdwidth works slightly better on Mac:

btw, @mikowals do you have an idea why vectorized_unroll didn't work from the other PR? #56

BTW, haven't you tried vectorize_unroll ?

I think unrolling needs a lot of iterations to make a difference and our matrices aren't very big.  My understanding is that it just skips incrementing the counter and checking if the end reached.  Those aren't very expensive ops.
If you get the matmul example from the modular repo and set the number of workers correctly (6 or 8 on M1) you can also see that the tiling and unrolling impact looks negative.  Not sure why those optimizations show mild improvement when many workers are used but setting workers correctly seems better.

Thank you!

The readability is just "brr.." now, though 😃

If I could ask @mikowals, I also tried fusing the matmul operations, but I was doing it manually, like instead of putting the unroll for a batch of size, I was writing the 3 operations manually, while also not doing the memory reads for A, but the speeds where the same as the original version, I thought that it was the same speed, because it was basically the same amount of operations, minus the reads for the A matrix. So I wanted to ask how is it that doing it this way we get a speedup, is it because of the static tuple being done at compile time?

@andresnowak , I expect manually writing out the loops to work exactly the same, since that is what I think 'unroll' with iterations set at compile time does.
StaticTuple probably allows some optimizations over a DynamicVector or other generic array types.  But any implementation with size and type known at compile time should get the same benefits.  So passing known types as arguments should be as good or better.
So I would be curious to see your implementation and try to learn why it might be slower.

This is the code
@always_inline
fn matmul_parallelized(
    C_1: BufferPtrFloat32,
    C_2: BufferPtrFloat32,
    A_1: BufferPtrFloat32,
    B_1: BufferPtrFloat32,
    B_2: BufferPtrFloat32,
    rows: Int,
    cols: Int,
):
    @parameter
    fn compute_row(i: Int):
        var tmp_1 = SIMD[DType.float32, nelts](0)
        var tmp_2 = SIMD[DType.float32, nelts](0)

        @parameter
        fn dot[_nelts: Int](j: Int):
            if _nelts < nelts:  # take care of tail array elements with length <  nelts
                let A = A_1.simd_load[_nelts](j)
                tmp_1[0] += (
                    A * B_1.simd_load[_nelts](i * cols + j)
                ).reduce_add()
                tmp_2[0] += (
                    A * B_2.simd_load[_nelts](i * cols + j)
                ).reduce_add()
            else:
                let A = A_1.simd_load[nelts](j)
                tmp_1 += A * B_1.simd_load[nelts](i * cols + j)
                tmp_2 += A * B_2.simd_load[nelts](i * cols + j)

        vectorize[nelts, dot](cols)
        C_1.store(i, tmp_1.reduce_add())
        C_2.store(i, tmp_2.reduce_add())

    parallelize[compute_row](rows, workers)```

@andresnowak , I ran some quick benchmarks and your version seems to perform identically to my version.  And both outperform unfused matmul substantially.  It may be that if you only tried by fusing 2 mammals the impact got hidden in the performance noise of running the whole network.
These are the results. I label your version 'hardcoded' and my version 'unrolled'.  I timed the 3 varieties (fused hardcoded, fused unrolled, and separate matmuls) when doing 2 matmuls.  And then did additional runs of  unrolled and and separate matmuls when fusing 3 matmuls.  Fusing more ops and loops together is a bigger win.  The tests are on M1 Pro with rows=288, cols=288 cols, workers = 6, and nelts=16.  So 'stories15M' size.
fused 2 - hard coded:  13135 nanoseconds
fused 2 - unrolled:  13071 nanoseconds
2 separate matmuls:  20838 nanoseconds
fused 3 - unrolled:  15506 nanoseconds
3 separate matmuls:  32092 nanoseconds

The file to reproduce is attached as .txt
fused_matmul.txt

Hmm, yeah it's true, I'm seeing the same results in my computer. When i was testing i was using just time.now() with lets say the last two matmuls separated and then together, and then running the stories15M size and seeing the time output of this matmuls, and there i wasn't seeing a difference, but here with the benchmark way i am seeing a difference, or maybe i was reading the numbers incorrectly when i was doing it my way and i wasn't seeing the difference.
Thank you for your help @mikowals , at least i learned that fusing matmuls that have the same size and at least one of the tensors is being shared (so as to reduce the amount of reads to memory or reads and write), does have an impact in performance. But, just one last question, if you would let's say join maybe 10 or 20 matmuls, then now the amount of performance improvement would be reduced, because now you would start to see cache misses?, like if you do a tile optimized matmul


org.eclipse.emf.ecore Metamodel Mappings needed

We should also provide all the mappings in EMF Ecore.

Mappings for Airflow, Argo, CWL, Nextflow and StackStorm added


Make new release with latest code updates

Jeremeamia\SuperClosure namespace compatibility was fixes here https://github.com/InterNations/http-mock/commit/203f6ef1277ed61571e4026134261ea5db5c619e, but the latest release doesn't contain that changes, thus master branch has to be used which is not super cool. It would be really great to have some latest stable version released. Thanks!

:+1: This would be great

Fixed and released!

Great! :+1:


Integrate the toolbox as a conda package

Make the toolbox a conda package.

recent new ideas:

make SCT a conda package.
for nibabel and dipy, use conda-forge
data will be installed under the /bin of conda
if users already have conda, do a clone of their conda, and install the requirements specific for SCT (it prevent from re-downloading everything again)
if users don't have conda, we can have them launch an installer that installs conda and do a conda install sct
for having SCT work from the Terminal, we need a source activate (already done during conda installation) --> we need to figure out how to select the right conda in case we do a clone.
do a setup.py
good example to follow here: https://github.com/uwescience/shablona

Conda is vendor-specific, pip is vendor neutral, see #1526


Not browserify compatible

Not sure we should mark it has an issue, but it is not possible to browserify the module (http://browserify.org/).  Using variables in "require(...)" and reading the routes from a file is not browserify safe.  Just raising the point ...

Any update on this? I'm also interested on access GitHub API from browser...

+1

I have browser support working. See #261
Until @mikedeboer merges, you can install my patch via:
npm install --save jamestalmage/node-github#browserify-compatibility

+1 would be great if the patch was merged to master

@jamestalmage note that browserify-compatibility branch no longer exist. Is it maybe browserify-and-promises now?
npm install --save jamestalmage/node-github#browserify-and-promises

I tried to browsery using your fork, but got Error: Cannot find module './api/vundefined'. Do you have a built somewhere you can share?

update: browser compatibility is the next big milestone. I recommend to subscribe to this issue to stay up-to-date: #620

The latest release of @octokit/rest is compatible with browserify. See more news regarding browser support in my latest update: https://github.com/octokit/rest.js/issues/620#issuecomment-362715478
I recommend to subscribe to issue #620 to stay up-to-date with all things JavaScript Octokit :)


clean types

i finally found a way to introduce own data types for index range checking. will implement now

jonathan said its not techically possible, my previous solution was partial and dependet on typo anyway


"User Delete" endpoint expects DRF token despite rest_framework_simplejwt auth backend being set

As in the title, I've got simple Django app where I use rest_framework_simplejwt. Other flows like i.e. user's creation work flawlessly, although I've encountered an issue with DELETE /users/me/ one, which responds with:
AttributeError at /auth/users/me/
type object 'Token' has no attribute 'objects'
(...)

Which seems to be a token from DRF Token Based Authentication I think?

Please show drf and djoser settings.

Sure, here are all settings related to drf / djoser / simplejwt:
settings.py
INSTALLED_APPS = [
    (...)
    "rest_framework",
    "rest_framework_simplejwt",
    "djoser",
]

REST_FRAMEWORK = {
    "DEFAULT_AUTHENTICATION_CLASSES": (
        "rest_framework_simplejwt.authentication.JWTAuthentication",
    )
}

SIMPLE_JWT = {
    "AUTH_HEADER_TYPES": ("JWT",),
}

DOMAIN = "www.myapp.com"
SITE_NAME = "MY APP"
DJOSER = {
    "PASSWORD_RESET_CONFIRM_URL": "#/password/reset/confirm/{uid}/{token}",
    "ACTIVATION_URL": "/activate/{uid}/{token}",
    "SEND_ACTIVATION_EMAIL": True,
    "PASSWORD_RESET_CONFIRM_RETYPE": True,
    "SERIALIZERS": {},
}

urls.py
urlpatterns = [
    (...)
    path("auth/", include("djoser.urls")),
    path("auth/", include("djoser.urls.jwt")),
]

Experiencing the same issue here :(

Thanks for the opening the ticket. Contributions welcome.


can't use vault service tokens with spring-cloud-config

I use such example to set-up cloud-config service, with another spring application which is used vault to get some secrets.
If I using root token everything is working correctly.
But once I create service token with policy:
path "secret/data/test*" {
  capabilities = ["create", "read", "update", "delete", "list"]
}

path "secret/test*" {
  capabilities = ["create", "read", "update", "delete", "list"]
}

I can validate it with
$vault token capabilities secret/test
create, delete, list, read, update

and with curl
$ curl \
--header "X-Vault-Token: $VAULT_TOKEN" \
http://<dns-name>:8200/v1/secret/data/test | jq .
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   302  100   302    0     0   2796      0 --:--:-- --:--:-- --:--:--  2796
{
  "request_id": "44b5fdcf-a13c-8e12-83f3-a5064f25257d",
  "lease_id": "",
  "renewable": false,
  "lease_duration": 0,
  "data": {
    "data": {
      "test-key": "test-value"
    },
    "metadata": {
      "created_time": "2020-04-09T21:11:28.899688798Z",
      "deletion_time": "",
      "destroyed": false,
      "version": 1
    }
  },
  "wrap_info": null,
  "warnings": null,
  "auth": null
}

but once I start using this token with the application it returns
2020-04-10 13:38:43.186 DEBUG 43843 --- [nio-8888-exec-1] org.apache.http.wire: http-outgoing-0 >> “GET /v1/secret/data/test HTTP/1.1[\r][\n]”
http-outgoing-0 >> “X-Vault-Token: <TOKEN>[\r][\n]”
Response 403 FORBIDDEN

Are you saying that the token is being sent correctly to vault but still results in 403?

yes, once we replace service token with root token, everything starts working correctly.
for the service token I just create policy and assigned it during creation.

I don't understand how this is an issue with spring cloud config if it's sending the correct token to vault.

in the logs of the spring-cloud-config, I see that token, which was sent by the application.
but how spring-cloud-config server is sent to the vault I have no idea.
Maybe some params missed.
i open issue under samples repo but @ryanjbaxter is closed it and told me to open it here.

What is this log from?
2020-04-10 13:38:43.186 DEBUG 43843 --- [nio-8888-exec-1] org.apache.http.wire: http-outgoing-0 >> “GET /v1/secret/data/test HTTP/1.1[\r][\n]”
http-outgoing-0 >> “X-Vault-Token: <TOKEN>[\r][\n]”
Response 403 FORBIDDEN

from the cloud-config-server which was run with debug mode.

What versions are you using?

2.1.0.RELEASE

I need a spring boot version and spring cloud release train version. 2.1.0 is ambiguous.

spring-boot - 2.1.4.RELEASE
spring-cloud - 2.1.0.RELEASE

there's no spring-cloud 2.1.0.RELEASE so I assume you mean spring-cloud-config.
Things have changed over almost a year and half (we need to update the sample). Can you update to spring-boot 2.2.6 and spring-cloud Hoxton.SR3 (spring-cloud-config 2.2.2.RELEASE) and try again.

@spencergibb, unfortunately, it doesn't start.
I think maybe vault should have some additional configuration, but I don't know which.
2020-04-15 20:12:03.037  WARN 26715 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: {“timestamp”:“2020-04-15T18:12:03.028+0000",“status”:500,“error”:“Internal Server Error”,“message”:“403 Forbidden: [{\“errors\“:[\“1 error occurred:\\n\\t* permission denied\\n\\n\“]}\n]“,”path”:“<PATH>”}

Can you provide a complete, minimal, verifiable sample that reproduces the problem?  It should be available as a GitHub (or similar) project or attached to this issue as a zip file.

@spencergibb we find out one thing, that if I add empty secret/application/<Environment> it starts getting data from the vault with my newly created policy.
maybe you have some ideas, what is missed under configuration?

I find out one thing, that if I add empty secret/application/<Environment> it starts getting data from the vault with my newly created policy.
and policy for this fake application look like this
policy name - application
path "secret/application*" {
  capabilities = ["read","list"]
}

path "secret/data/application*" {
  capabilities = ["read", "list"]
}

and for the right application
policy name - <APP-name>
path "secret/<APP-NAME>*" {
  capabilities = ["read", "list"]
}

path "secret/data/<APP-NAME>*" {
  capabilities = ["read", "list"]
}

and token creation would look like this
vault token create -policy=<APP-NAME> -policy=application
and how you can use your spring-cloud-config service.

closing as solved


Event stream responses are missing the X-Accel-Buffering header

Bug description
I've been testing the Live Queries feature and it works well locally. But when I put Wundergraph behind the nginx in my cluster, the nginx seems to buffer the response from the server and the client's request is stuck in a loading state for a long time.
From my research, (e.g., see here), there are a bunch of settings I need to change in my nginx config - I can do these myself. But in addition, ideally, the Wundergraph server should also add a header X-Accel-Buffering: no; in its response.
I'm not too familiar with your code base, but I suppose you probably just need to add the header somewhere here, here, or here.
How to reproduce
I didn't have time to come up with a minimum reproducible example, as my entire server setup is fairly complex. But I think from the discussion in Serverfault thread, it should make sense to add the X-Accel-Buffering header in the server response for streaming events.
Expected behavior
No response
WunderGraph information

Environment & setup

OS: Ubuntu

WunderCtl Version
Version: 0.97.0
Commit:<PHONE_NUMBER>b83d337906fa6c2346863fa1748b71
Date: 2022-08-09T11:30:39Z
BuiltBy: ci

Seems legit. We'll have a look and will probably need your help with verifying the fix. @StarpTech thoughts?

Hi, looks good to me. I'll try to reproduce it and prepare the first draft.

Fixed By


Why all values are not Dynamically Passed in Html using Vue JS?

Here, Original Question
I can't pass the initial value from one component to another.
Value only changed on click only, event i can pass the value of "t_id" (here) directly,
but i cant send 't_showList' value.
HTML (Template):
 <template v-if="showTemplate" id="segment_body">

      Grid

      Grid |
      List

    ID : @{{ t_id }}

    LIST : @{{ t_showList }}
</template>

HTML (Data Source):

    <campaign_segment :t_id=1 :t_showList="a.list"></campaign_segment>

VueJS :
Vue.component('campaign_segment', {
      template: '#segment_body',
      props: ['t_showList','t_id']
 });

OUPUT :
 ID : 1
 LIST :

If i click Option "Grid",
OUTPUT :
 ID: 1
 LIST : False

What's wrong with this ?
Is i did anything wrong ?

You should have received a warning that directly mutating a prop value is forbidden. Please use Custom Events to change the value instead.

OK, but here ID is successfully binded.
"LIST" only not able to bind on load.
Why this difference is there ?

You didn't define a on the parent component, instead you wrongly defined it as a global variable.
For further questions, please use our dedicated gitter or forum. Thanks!


How does advanced spmv support $y = \alpha A x + \beta y$

Does the current interface support advanced spmv like ($y = \alpha A x + \beta y$)?
AFAIK, it supported scaled like multiply(A, scaled(alpha, x), y) for $y = \alpha A x$ from https://github.com/SparseBLAS/spblas-example-project/blob/8ba01d8364171f3c888df31f4e95874c433a43db/src/simple_spmv.cpp#L18-L19
How does it apply to advanced spmv? something like multiply(A, scaled(alpha, x), scaled(beta, y)) or another function?
scaled(beta, y) reads the $beta * y$ not $y$. When putting the value back to the $scaled(beta, y)$, does y store value/beta?
If the scaled version also works on output, it also makes the original multiply(A, scaled(alpha, x), y) like $y = \alpha A x + y$
Another function for this advance spmv make more sense to me currently.

Sorry for being late getting back to you.  I think the way we want to support this is with the four-parameter version of multiply.
// C = AB + E
multiply(A, B, E, C);

// three-parameter version is then essentially an alias to multiply(A, B, C, C)
// C = AB + C
multiply(A, B, C);

To set beta = 0, you'd then pass in scaled(0, C) for E.
// C = AB + 0*C
multiply(A, B, scaled(0, C), C);

Let me know if this is a priority for the examples and I can work on implementing the bits you need here.  You can currently get a similar effect with
scale(0, C);
multiply(A, B, C);

Yes, I currently use something similar to the last part to ensure C = AB
I feel that multiply(A, B, C) giving C=AB+C a bit weird from multiply meaning.

Fair point, let's discuss the desired behavior of multiply(A, B, C).  (I'm now seeing that std::linalg's matrix_product does C = AB, so I think you're probably right.)


[Typography] Cannot customize primary/error color

Duplicates

[X] I have searched the existing issues

Latest version

[X] I have tested the latest version

Current behavior 😯
<Typography color="primary"> doesn't allow customizing the color:

color="primary" doesn't add any classes that we could use for styling.

styleOverrides doesn't support the primary or colorPrimary key:
styleOverrides: {
  primary: {
    color: palette.primary[palette.mode === "dark" ? "light" : "main"]
  },
}

New component variant has no effect:
variants: [
  {
    props: { color: "primary" },
    style: {
      color: palette.primary[palette.mode === "dark" ? "light" : "main"]
    },
  },
],

Same applies for color="error".
Expected behavior 🤔
Typography provides some way to change the color of color="primary" into palette.primary[palette.mode === "dark" ? "light" : "main"], and same for color="error".
Steps to reproduce 🕹
No response
Context 🔦
We're maintaining a UI library based on MUI, so we can't fix this at the <Typography> call site. So we can't do for example <Typography color={palette.primary[palette.mode === "dark" ? "light" : "main"]}>.
Your environment 🌎
No response

@emlai The Typography component does not have it's own color prop. If you specify a color prop, it is considered as a system prop since Typography directly supports all system props because it is a CSS utility component. See docs.
So for your use case you can do:
<Typography color={`primary${[palette.mode === 'dark' ? 'light' : 'main']}]`}>
  Hello world
</Typography>;

See color system property docs: https://mui.com/system/palette/#color

@ZeeshanTamboli Unfortunately, as per the "context" section in the issue description, that wouldn't work for our use case, since it would require users of our library to specify that condition every time they want to use primary or error colors on Typography. The user should be able to simply specify color="primary" and have the correct color be used. Would it be possible to add classes like MuiTypography-colorPrimary based on the used system color prop?

Would it be possible to fix this in a way that requires no changes from our users, such as adding classes like MuiTypography-colorPrimary based on the used system color prop, which would allow us to override it with the correct color?

In that case, you can override the default palette, like:
const theme = createTheme({
  palette: {
    primary: {
      main: '#085982', // your custom color
    },
    error: {
      main: '#d40808', // your custom color
    },
  },
});

function App() {
  return (
    <ThemeProvider theme={theme}>
      <Typography color="primary">Hello World</Typography>
      <Typography color="error">Hello World</Typography>
    </ThemeProvider>
  );
}

@ZeeshanTamboli Our users are relying on palette.primary.main being what it is now, so we can't really change it in a backwards-compatible manner.
We have successfully customized the color of color="primary" for many MUI components such as SvgIcon, IconButton, Button, Link, FormHelperText, and FormLabel (either via styleOverrides, variants, or colorPrimary classes).
Ideally Typography would support the same level of customization.

@emlai

Our users are relying on palette.primary.main being what it is now, so we can't really change it in a backwards-compatible manner.

Ok I think I understand what you mean. Do you mean that you cannot override the default global palette colors since your users are relying on them? You would like to change the color on component level?

We have successfully customized the color of color="primary" for many MUI components such as SvgIcon, IconButton, Button, Link, FormHelperText, and FormLabel (either via styleOverrides, variants, or colorPrimary classes).
Ideally Typography would support a similar level of customization.

The system property is actually more powerful. styleOverrides, variants, or colorPrimary classes is on the theme level, while the system property can be applied directly with more advantages.
I came up with a solution for your use case where you can apply the hex value directly on the Typography component color prop. See CodeSandbox.
I hope it helps you to customize on Typography component level. Let me know if anything else.

@ZeeshanTamboli

Do you mean that you cannot override the default global palette colors since your users are relying on them? You would like to change the color on component level?

Yes.

I came up with a solution for your use case where you can apply the hex value directly on the Typography component color prop. See CodeSandbox.

We don't re-export MUI components from our library, so our users are importing Typography directly from MUI. So adding our own Typography component wouldn't work. (Users would have to migrate to it manually.)

The system property is actually more powerful.

It doesn't seem that way to me. Or at least, it's not helping solve this problem. All of styleOverrides, variants, and CSS classes would solve this problem, so they seem more powerful to me.

I just remembered a fourth way to customize the style: accessing the ownerState from a functional style override:
  styleOverrides: {
    root: ({ ownerState }) => {
      switch (ownerState.color) {
        case "primary.main":
          return {
            color: palette.primary[palette.mode === "dark" ? "light" : "main"],
          };
        case "error.main":
          return {
            color: palette.error[palette.mode === "dark" ? "light" : "main"],
          };
      }
    },

We use this for some other components, but unfortunately it doesn't seem to work for Typography. MUI still overrides the correct color (returned from the style override) with the old one:

I have researched about this issue and found some related discussions about this in #32574 and #32653 (related to Link which inherits Typography). Also looked at #31857.
This indeed is a bug. styleOverrides for Typography should override system properties directly used on the Typography component as pointed out in https://github.com/mui/material-ui/pull/32653#pullrequestreview-964453118.
@emlai Thanks for the detailed discussion. I'm re-opening this issue.


Why no getVersion method for OperatingSystem?

The operatingSystem's constructor actually have the version? Why not just keep the information and expose an api? any concern?

This is a good question as I was just looking to see if I could get that information and I was surprised when it was not there.

Is there any alternate solution to get the version using user-agent-utils jar by parsing any other existing fields ?


Our web app frontend code on Firebase encountered CORS issue when ajax calling Dialogflow V2 APIs: Need urgent help!

Hi All,
The issue details are here:
https://github.com/googleapis/nodejs-dialogflow/issues/397
Based on our researches, we changed some info in our Firebase.json based Firebase guide:
https://firebase.google.com/docs/hosting/full-config#headers
Here are the content of our Firebase.json

{
"hosting":
{
"public": "./",
"ignore":
[

  "**/.*",
  "**/node_modules/**"
],

"headers":
[ {
  "source": "https://dialogflow.googleapis.com/v2/projects/my-chatbot-ID",
  "headers": [ {
    "key": "Access-Control-Allow-Origin",
    "value": "*"
  } ]

},
{
"source": "**/*.@(jpg|jpeg|gif|png)",
"headers": [ {
"key": "Cache-Control",
"value": "max-age=7200"
} ]
},
{
  "source": "404.html",
  "headers": [ {
    "key": "Cache-Control",
    "value": "max-age=300"
  } ]
} ]

}
}

After the above is deployed, I tested the web app through private browser without caches within 1 day, the above issue is not changed. That means this: The new content in Firebase.json does not solve the problem.
I wish to find out from you: Any content in the above Firebase.js needs to be fixed? I posted this issue here as II thought the viewers on this page may have some good suggestions that is useful to solve this issue.
Any suggestions will be highly appreciated.

We're going to be deprecating the friendlypix-web repo so we're closing all open PRs and Issues.  We apologize for not addressing your issue, we should have done more to maintain this repository and we will aim to do better in the future.
For developers who want to learn about Firebase on the web, we recommend the Get to know Firebase for Web codelab.


Screens for ManagementUris (CRUD)

[x] Read
[ ] Create
[ ] Update
[x] Delete

Exception when updating incuding a ManagementCredentialId.

@ChrEggenberger could you please add some details including (Fiddler) request/response?

Problem is solved.


Boxplot overlaps with other chart types (ie. bar) by default - how to change that so the different types are side by side?

Hi there,
By default, chartjs behaves so that if you have multiple datasets with the same chart types (such as bar and bar, or boxplot and boxplot), they divide the category space between them and appear side by side. Boxplot + boxplot also behaves that way, however I'm building something that allows the addition of various datasets with different chart types and am having an issue where the boxplot overlaps bar charts instead of them being side by side.
I saw in the docs an example of the same behaviour, so it seems that it is perhaps intended, however I'd like to figure out how to make for example a bar and a boxplot appear side by side instead of overlapping. Could you point me in the right direction?
Example of how two datasets with type "bar" automatically appear side by side (desired behavior with boxplot and bar):

Current behavior with boxplot and bar

I'm not sure whether this is possible. The grouped bar chart is handled by a single BarController, while here there are two controllers in place. You might be able to play with barPercentage to make the bar and boxplot smaller and then find a way to shift one to the left and the other to the right.


Add ability to immediately delete packages from server that ...

ported from https://nuget.codeplex.com/workitem/3738
Add ability to immediately delete packages from server that ...
■has less than 50 downloads
■and no dependent packages
■and not older than 7 days

We will be implementing a delete package feature soon.