Uncaught Error: Argument 2 passed to SalesChannelContextService::get() must be of the type string, null given

Unfortunately I was not able to set up Shopware 6 with this template after following the exact steps described in the readme and documentation.
Error
[2020-04-07 10:03:42] php.CRITICAL: Uncaught Error: Argument 2 passed to Shopware\Core\System\SalesChannel\Context\SalesChannelContextService::get() must be of the type string, null given, called in /var/www/sw-test/vendor/shopware/storefront/Framework/Routing/StorefrontSubscriber.php on line 269 {"exception":"[object] (TypeError(code: 0): Argument 2 passed to Shopware\\Core\\System\\SalesChannel\\Context\\SalesChannelContextService::get() must be of the type string, null given, called in /var/www/sw-test/vendor/shopware/storefront/Framework/Routing/StorefrontSubscriber.php on line 269 at /var/www/sw-test/vendor/shopware/core/System/SalesChannel/Context/SalesChannelContextService.php:63)"} []

Steps to reproduce

Setup a blank Ubuntu 18.04 server

install PHP 7.4 with all required extensions
install MariaDB 10.4 and setup a database

git clone --branch=6.1 https://github.com/shopware/production shopware
composer install
bin/console system:setup and use the correct credentials for the database setup earlier. Setup finishes successfully.
bin/console system:install --create-database --basic-setup which finishes successfully.
Create an Apache config file based on the installation guide and use the correct domain and paths.

Now open the used domain in the browser. A bold "The server returned a 500 Internal Server Error." is presented. The above error can be found in the production error logs.
used .env file
Sensible values are redacted.
SHOPWARE_ES_HOSTS="elasticsearch:9200"
SHOPWARE_ES_ENABLED="0"
SHOPWARE_ES_INDEXING_ENABLED="0"
SHOPWARE_ES_INDEX_PREFIX="sw"
SHOPWARE_HTTP_CACHE_ENABLED="1"
SHOPWARE_HTTP_DEFAULT_TTL="7200"
SHOPWARE_CDN_STRATEGY_DEFAULT="id"
APP_ENV="prod"
APP_URL="http://test.example.com"
APP_SECRET="def0xxxxxxxxxxxxd31"
INSTANCE_ID="nRCxxxxxxxxxxxxSja"
DATABASE_URL="mysql://staging:xxxxxxxxx@<IP_ADDRESS>:3306/staging"

I don't know and can't try it now. We made it working based on a custom setup from another agency, because your customer support refused to help us. Pretty bad developer experience.


Azure Functions

This PR

updates the Azure Functions code to use the updates from the main branch, thus allowing it to (in theory) work with multiple areas*
adds a GitHub Action (.github/workflows/deploy_azure_functions.yaml) to automatically update the Functions instance whenever the main branch is pushed to. This means we don't have to manually deploy it whenever the file hashes change

What I'd also like:
The scenario_calc function in function_app.py is shared between the Azure Functions and FastAPI bits:
https://github.com/Urban-Analytics-Technology-Platform/demoland-engine/blob/e266d55777eccdd4df694791daff570b4aa3f5f3/function_app.py#L19-L61
Could we put this inside demoland_engine itself and then import it to avoid code duplication?
I'm happy to do it, just tell me whether it should go into one of the existing Python modules or whether I should make a new one (let's say demoland_engine/api.py).

* It doesn't really work in production because the Functions App runs out of memory when calculating tyne_and_wear_hex, but if the memory problem is solved (e.g. by increasing the allocated RAM) then it will work. It works when tested locally, at least.

whether I should make a new one (let's say demoland_engine/api.py).

yes please

Ok, done 🙂 Feel free to review / merge as desired


Missing builds for alpha.35?

You can search them in the CI artifacts on AppVeyor
I have no clue about Travis though so for Mac OSX builds you are on your own.
I don't know what happen that they couldn't upload all the builds, hope they do soon!

@Positive07 thanks!
Windows build is what I wanted. Thank you. :)

No prob! 👍

Whoops, now fixed!


feat: support plugin system

closing this PR, we don't need such a complex plugin system. the current hook functions works nicely.


Error when running npm run hot

When I run npm run hot everything looks normal in terminal, but whenever I change something the view doesn't reload. It doesn't even display the change after a manual refresh.
This is what I get in my browsers console:
React-Hot-Loader: misconfiguration detected, using production version in non-production environment.

But I can see that in npm run hot there is explicitly said to use the DEV environment. Any help is appreciated :)
Update:
When i run npm run dev it will display the latest changes after a manual refresh, but the error message in the console is still there.

I'll have a look tonight on this one

Very strange, could you pull my latest updates and see if the issue persists? Can you check that you have set your environment variables correctly too? I was not able to reproduce this one.

I have not been able to replicate - closing this. Feel free to comment and I'll re-open.


Inconsistency between the reported loss and the actual loss used for gradient computation

The loss we backprop is normalized by the number of supervisions:
https://github.com/k2-fsa/snowfall/blob/5d1b00dd2ab4c809714f588fa6d2487cde5ea46c/egs/librispeech/asr/simple_v1/mmi_att_transformer_train.py#L114-L117
But the loss we report is normalized by the number of frames:
https://github.com/k2-fsa/snowfall/blob/5d1b00dd2ab4c809714f588fa6d2487cde5ea46c/egs/librispeech/asr/simple_v1/mmi_att_transformer_train.py#L267-L278
It looks like it wasn't intended. I think the latter makes more sense to me to use in backprop (but we'd probably need to re-tune learning rates etc.) - WDYT?

Yes, I think normalizing by number of frames would be OK.  With Adam optimizers this shouldn't make a difference to the results.
My preference in the abstract would be to simply not normalize at all, which would mean we wouldn't have to take into account accum_grad.  But I think it's traditional in machine learning to normalize somehow, so IDK whether people feel this might be confusing to readers.

Could also be surprising if we want to try out a different optimizer that doesn't have Adam-like gradient scaling.


Feat/2 agent service

Configures the ElCollectooorr service with 2 agents.

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

Coverage data is based on head (9c01f8a) compared to base (4a21443).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #149      +/-   ##
==========================================
- Coverage   89.46%   89.45%   -0.01%
==========================================
  Files          67       67
  Lines        5447     5453       +6
==========================================
+ Hits         4873     4878       +5
- Misses        574      575       +1

Flag
Coverage Δ

unittests
89.45% <100.00%> (-0.01%)
:arrow_down:

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

Impacted Files
Coverage Δ

...lectooorr/skills/elcollectooorr_abci/behaviours.py
99.82% <100.00%> (+<0.01%)
:arrow_up:

...lcollectooorr/skills/elcollectooorr_abci/models.py
90.74% <100.00%> (ø)

...lcollectooorr/skills/elcollectooorr_abci/rounds.py
92.32% <100.00%> (+0.06%)
:arrow_up:

...lectooorr/tests/test_agents/base_elcollectooorr.py
57.83% <0.00%> (-0.71%)
:arrow_down:

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

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


[BEAM-3249] Disable all Jenkins jobs that rely on Maven.

This is for the Maven -> Gradle migration fixit day. This change disables all maven based Jenkins jobs and leaves them around so that people working on the migration can update them to be Gradle based. This also ensures that there is plenty of Jenkins capacity for testing migration to Gradle.

Follow this checklist to help us incorporate your contribution quickly and easily:

[ ] Make sure there is a JIRA issue filed for the change (usually before you start working on it).  Trivial changes like typos do not require a JIRA issue.  Your pull request should address just this issue, without pulling in other changes.
[ ] Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue.
[ ] Write a pull request description that is detailed enough to understand:

[ ] What the pull request does
[ ] Why it does it
[ ] How it does it
[ ] Why this approach

[ ] Each commit in the pull request should have a meaningful subject line and body.
[ ] Run mvn clean verify to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
[ ] If this contribution is large, please file an Apache Individual Contributor License Agreement.


Tell where the source is

Prevent that contributors need to search
which of several git repositories of the Leptos project contains the source of what they are feeling to need changing.

For What it is Worth:
This patch should avoid that others have to make same effort has I had to make for #1497.


Feature/396 expand contribution types

Closes #396

Just commenting on Ross suggestion that "ideally" we should drop types that
are not widely supported.
I'm not sure I agree with that - we certainly need to note when a
contributor type is not widely recognised - and explain how we handle that
when submitting data to the relevant platforms - so it is explicit how the
data is used.  But if we only allow the widely used types then we sort of
reduce things metadata to the present requirements of the platforms - and
if those platforms allow more contributor types in the future - we don't
have the data to respond. This is the problem DOAB/OAPEN face - they
accepted only a limited range of types early on - because that was all they
needed - but now have problems responding to broader opportunities/uses.
So - there is a line to manage here somewhere!
On Mon, Oct 31, 2022 at 4:17 PM Javier Arias @.***>
wrote:

Merged #450 https://github.com/thoth-pub/thoth/pull/450 into develop.
—
Reply to this email directly, view it on GitHub
https://github.com/thoth-pub/thoth/pull/450#event-7705890052, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABFECW2766SNLXLJL2MBBLLWF7WKRANCNFSM6AAAAAARQ7LKVM
.
You are receiving this because you are subscribed to this thread.Message
ID: @.***>

--
Dr Rupert Gatti
Director
Open Book Publishers
tel: +44 1223 331484
skype: jrupertjg
www.openbookpublishers.com

@rupertgatti Just to be clear, I didn't mean that Thoth itself shouldn't support certain contributor types. I meant that on a per-output format basis, we shouldn't be including types that are not accepted by that format (at least, certainly not when including the type would break the ingest altogether).

OK - yes, for sure, I agree!


Sorting Icon is not coming and sorting direction is always descending.

When a user clicks sorting on specific column, It is always showing descending because of re-render of dataTable.

Expected Behavior
The sorting Icon should display and it shouldn't set always as descending.

Current Behavior
After API call is made the dataTable fetch data and the direction of sorting is always descending.

Steps to Reproduce (for bugs)

In render Make server-side = true.
call onColumnSortChange().
Make API call to fetch sorted column data there.
After receiving data populate in dataTable and click on column to sort, it re-renders and erases sortDirection as well as icon

Your Environment

Tech
Version

Material-UI
4.2.1

MUI-datatables
2.10.2

React
16.8.6

browser
chrome

etc

I have encountered the same problem too before. But here's my workaround:
1.) You need to have state management, either using Redux or useContext with useReducer.
2.) On MUIDataTable's component, provide you own columns (which is an array of column objects, exported from a certain file (e.g. columns.js) ) for the columns prop.
3.) On each column object, provide your custom column header component on  customHeadRender value of each columns' options property
4.) On your custom column header component, import TableSortLabel from material-ui and define a div with an onClick event that:
a.) calls the dispatch method responsible for updating your state that holds the records / data
b.) updates the direction of TableSortLabel to either "asc" or "desc", set "asc" by default
If you're having difficulty getting it, I'll follow up this comment with a CodeSandbox example.

See my comment here https://github.com/gregnb/mui-datatables/issues/244#issuecomment-533260448. You don't have to provide your own customHeadRender, but if you are managing things yourself, serverside, then you need to keep the table up to date with all of the state you wish to be retained, including the sort direction. Otherwise the table doesn't know what your intention was, as it will read its state from the props passed in, and anything not passed in will be empty.

Thanks @gabrielliwerant . Can you send the codeSandBox example which will be more helpful to proceed further?

It would be really useful if it was the datatable managing this internal state for us. In a server-side context, the goal is almost always to preserve the state across remote refreshes.
Having to do the whole state management by ourselves like @rhaicode suggested is a burden that the user should avoid. In my particular case, it wears off the purpose of using the table in a server-side situation. This is my suggestion.

State management now done internally in table as of version 2.15.0. Table will no longer reset internal state on rerender.


Wrap ScriptFunctions in modules to compile

Add a section to _compiler.py that wraps ScriptFunctions in Modules to compile the graph.

I would like to work on this.
https://github.com/NVIDIA/TRTorch/blob/2fbbbc1c2cbe672a77aba7a0291059485f6ecc84/py/trtorch/_compiler.py#L135
In my understanding, TRTorch should be able to automatically wrap the function in a module and proceed with compiling the module. Do you have any other note for me @narendasan

yeah, I am not entirely sure about the relationship between ScriptFunctions and ScriptModules. Heres how we wrap modules for Python coming from C++ for embedding engines https://github.com/NVIDIA/TRTorch/blob/2fbbbc1c2cbe672a77aba7a0291059485f6ecc84/py/trtorch/_compiler.py#L140


Add navigation history to browser

Proposal: to enable browsing back and forth through flow events, etc., update the browser navigation stack when view state changes significantly. This would include changing the query filter (omnibox text, time/selected tracks/view, selected categories), and selected slice. Maybe include view presentation state as well, like zoom/scroll, or track expand/collapse.
To deal with rapid movement through selections, should debounce to prevent clutter in the history.

I don't know if this is the same, but I often wish I could go peek at something else in the trace then come back to exactly what I was looking at before (same zoom level, same position, etc.)


Datagrid: Error when loading active

Select one ...  (check one with "x")
[ x ] bug
[ ] feature request
[ ] enhancement

Expected behavior

Datagrid error when loading active.

Actual behavior

https://plnkr.co/edit/QuDQM0suEiiy9h8I7BvF?p=preview
Reproduction of behavior

Include a link to the reproduction scenario you created by forking one of the Clarity Plunker Templates:

Environment details

Angular version: 4.0.1

Clarity version: 0.9.3

OS and version:

Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Hello @siteslave,
This seems to be an initialization timing issue, which you can workaround if you change the "loading" var assignment in your constructor to this:
setTimeout(() => {
this.loading = true;
});
As it is without a timeout period parameter, the only effect it will have will be to yield the thread, so other code that waits on the line will have chance to finish its initialization.
Best regards

@Jinnie ,
In version 0.9.2, no errors were found.

This is a bug introduced by the latest spinner refactor (needed to avoid clipping popovers). Assigning to @jeeyun for preliminary investigation since it's hopefully still fresh for her. We can then assign the actual fix for someone else.


Recommended Number of Features

Looking for some best practise in how many buildings we could realistically serve up to a browser with this template and it still perform ok.  Notice in your screenshot you have a fairly large scene, but the demo is just a few buildings.

Just saw the youtube video which answers my question - a fair amount of buildings renders ok!
https://www.youtube.com/watch?v=KGClZF3Gcss


Enable Cosmos tests for internal PRs.

Because the macOS job is set to succeed even when the tests fail.

The tests are timing out without any log messages. I am going to try using the emulator instead.


High resolution images

The default inference.py resizes images to 384. What's the correct way to use higher resolution images?

The image will be processed by different image processors for different vision towers. For ConvNext, the image is resized to 1024.

@Shade5 Sorry to bother you. I would like to ask how to enable ConvNext vision tower during the inference stage, if only using the pre-trained model. I have simply tried replacing mm_vision_tower_aux_list in config.json, but it doesn't seem to work.


Null target read/write memory and register support

This is useful when we have a crash dump of registers and stack memory, fill them to stub so we can use GDB to inspect why it's crashed.
Test:

start the stub
python3 -m gdb.stub -t null-ppc64le -p 1234
start GDB and connect to it

(gdb) set architecture powerpc:common64
(gdb) tar rem:1234
(gdb) x/x 0
0x0:    Cannot access memory at address 0x0
(gdb) set *(int*)0 = 0x1234
(gdb) x/x 0
0x0:    0x00001234
(gdb)
(gdb) p/x $r0
$2 = 0x0
(gdb) set $r0=0x12348765
(gdb) p/x $r0
$3 = 0x12348765
(gdb)

Thanks a lot  for working on this!
Glancing at memory_write(self, address, data, length=None), I feel there are some edge cases not covered. Like you already have 2 memories: 0x100 - 0x200 and then 0x300-0x400 and now you memory_write data at 0x150-0x350?
I think it is time to introduce tests to this package. I'll try to scrap some time tomorrow to kick them off.

I feel there are some edge cases not covered. Like you already have 2 memories: 0x100 - 0x200 and then 0x300-0x400 and now you memory_write data at 0x150-0x350?

Shoot. I will try to fix them later.

I think it is time to introduce tests to this package. I'll try to scrap some time tomorrow to kick them off.

Thank you very much!

So it turned out that there were (some) tests already! I just merged a PR (#11) that makes them working without URJTAG installed (since I guess you do not need it at the moment) and updated pre-commit config to run tests on each commit.
I'll try to hack some GH actions to run tests a part of PR testing, maybe later today, got todo other stuff now.

So it turned out that there were (some) tests already!

Great! I'll try to put some test too (need some time to learn though).

I guess you do not need it at the moment

That's true. I also did a modification in this https://github.com/janvrany/pygdbstub/pull/8  to only import them when needed.

I have added the test case. It should work now.
I also included a CI setup to run the test and lint automatically in PR https://github.com/janvrany/pygdbstub/pull/6
No rush to check it. Enjoy you holiday!


[bc-breaking] rename config.enable_fsdp_fp8_all_gather to use float8

Stack from ghstack (oldest at bottom):

#338
#336
#337
#335
#334
#333
-> #332

Summary:
old: enable_fsdp_fp8_all_gather
new: enable_fsdp_float8_all_gather
this is to match the float8 naming elsewhere
Test Plan:
./test/test_everything.sh

Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: D60252072

@vkuzo has imported this pull request.  If you are a Meta employee, you can view this diff on Phabricator.


Add contributing resources to template and core project

it would be awesome to have a good, CONTRIBUTING.MD
go is awkward to fork and branch due to mod file management this would be nice documented (see https://gist.github.com/abuxton/e337d3c8fba5693f7b65c926f5442a80)
move core of README.MD to CONTRIBUTING.MD alongside that guidance
how do you run the core service to see the source work guidance
what is nats? is it needed if so getting started link for guidance
add a .vscode folder with relevant extensions, such that a workspace will self-configure as .vscode methodology (all project repos)

add a snippet for source api-onbject documentation (what is it, fins, get )

what is srcman, is it required, provide getting started link for contributors
update current README.md so it is actually as an example of the desired readme or add link to entry file in /docs folder
add .github/* community health files to template https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/creating-a-default-community-health-file allowing structure for pull request etc (this should be added to all repos)
if there is a fast/helper way to generate docs, add to contributor file

Nice thanks for this, I'll populate this stuff into the backlog


pin-project does not interoperate well with #[cfg()]

Take this struct for instance:
#[pin_project]
#[derive(Debug)]
pub struct Socket {
    #[cfg_attr(unix, pin)]
    #[cfg(unix)]
    inner: tokio::net::unix::UnixStream,
    #[cfg_attr(windows, pin)]
    #[cfg(windows)]
    inner: tokio_named_pipes::NamedPipe,
}

I get the error
error[E0124]: field `inner` is already declared
  --> src/io/socket.rs:29:5
   |
26 |     inner: tokio::net::unix::UnixStream,
   |     ----------------------------------- `inner` first declared here
...
29 |     inner: tokio_named_pipes::NamedPipe,
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field already declared

Even though, as far as I can tell, this should work. My guess here is that pin-project is run before the #[cfg()]s are evaluated, and ends up not propagating them, but I'm not sure?

For now, I'm working around this by placing the #[cfg()] on the whole struct, but that won't easily work for structs with more fields that are shared.

@jonhoo Thanks for the reporting!
I will investigate.

This is because I missed that the timing when the cfg attributes are applied differs between proc-macro-derive and proc-macro-attribute (https://github.com/rust-lang/rust/pull/44528), but, I'm not sure if this issue can be fixed immediately.

pin-project collects the type of field annotated with #[pin] attributes from the structure field and generates an Unpin implementation.
Since cfg is not applied at that time, pin-project collects all #[pin] fields and adds them to where-clause of the Unpin implementation.
For example, in the example you wrote, the generated Unpin implementation would be:

impl Unpin for Socket
where
    tokio::net::unix::UnixStream: Unpin,
    tokio_named_pipes::NamedPipe: Unpin,
{}

To fix this, we probably need to delegate the Unpin implementation to proc-macro-derive.
(Other issues are just extracting cfg from the field and applying it, so it shouldn't be too difficult to fix: abf3700d2dbf7d8452629562d4b3b487c72b4eea)
So, for now, it is preferable to create a type alias / new type or create structs for each cfg.
#[cfg(unix)]
struct Inner(tokio::net::unix::UnixStream);
// or `type Inner = tokio::net::unix::UnixStream;`

#[cfg(windows)]
struct Inner(tokio_named_pipes::NamedPipe);
// or `type Inner = tokio_named_pipes::NamedPipe;`

#[pin_project]
#[derive(Debug)]
pub struct Socket {
    #[pin]
    inner: Inner,
}

However, I would like to fix this by the release of 0.4 (the other remaining blocker at this time is #26).

Filed #77

Published 0.4.0-alpha.10 which fixes this issue.
By the way, if you use cfg on fields, it works for other attributes used on that field, so you can use #[pin] directly instead of #[cfg_attr(..., pin)].
#[pin_project]
#[derive(Debug)]
pub struct Socket {
    #[pin]
    #[cfg(unix)]
    inner: tokio::net::unix::UnixStream,
    #[pin]
    #[cfg(windows)]
    inner: tokio_named_pipes::NamedPipe,
}


keyboard modules not working / looping forever

Hi, I've tried to use react-quill with redux form and I would like to disable tab & shift+tab using keyboard modules.
But when I tried, the keyboard modules made the browser freezes (loop forever) and it seems not working.
Here is my code :
const modules = {
      toolbar: {
        container: [
          ['bold', 'italic', 'underline'],
          [
            { list: 'ordered' },
            { list: 'bullet' },
          ],
          ['clean'],
        ],
      },
      keyboard:{
          bindings:{
              tab: {
                key: 9,
                handler: function() {
                  // Handle tab
                }
              },
          }
      }
    };

return (
            <ReactQuill
                {...props.input}
                name={props.name}
                placeholder={props.placeholder}
                theme="snow"
                modules={modules}
                onChange={(newValue, delta, source) => {
                    if (source === 'user') {
                        props.input.onChange(newValue);
                    };
                    console.log(delta);
                }}
                onBlur={(range, source, quill) => {
                    props.input.onBlur(quill.getHTML());
                }}
            />
);

Did I miss something?
Thanks!

 Thank you.

Consider my life saved as well.

[ ] NADA

Its not working for the enter key.

Hey, how can I disable shortcuts for bold and italics?
I tried using the above approach and it works for tab but not for bold, etc.
I also tried using empty handlers but the editor just disappears when I do that.

Hey, how can I disable shortcuts for bold and italics? I tried using the above approach and it works for tab but not for bold, etc. I also tried using empty handlers but the editor just disappears when I do that.
Edit: this happened only when using React Quill inside a functional Component.

@abhishekti7 you can set keyboard:{ bindings:{ bold: false } } and pass in the modules of the React Quill component. After this you need to create a binding for the same in your component
useEffect(() => {     const quill = quillRef.current?.getEditor();     if (quill) {       quill.keyboard.addBinding(         {           key: 'B',           shortKey: true,         },         function (range, context) {           quill.format('bold', !context.format['bold'], 'user');          //Custom Logic         }       );     }   }, []);
This worked for me and I was able to add my custom logic in the callback function


Add dark mode and add message on focus change.

On focus change, add the message - "Don't give up champ !"

Can I do this ?

Yeah, you can. You can also add an emoji in the message if you wish too !

Okay Sure!!

@SmrutiRanjan-L Improve the css file too.
If possible add gradient colors.

Yaa sure..

Well done... It is as expected.


C++ compilation uses precompiled headers to compile source files more quickly

Allow precompiled headers to be used when compiling C++, to make the build faster.

Need sample and possible code modifications to support precompiled headers using current model. A sample has been done with the deprecated software model included in the all distro.  However, in order to port functionality to current model,  I suspect the class PreCompiledHeader may need to the provider api ported in to allow support for wiring in the inputs from the DSL. Namely: pchObjects, prefixHeaderFile, and includeString, similar to how we had to port the provider API to wire compilerArgs in for the WindowsResourceCompile task. Is this a fair assessment on a path to move forward on this issue?

@lacasseio @big-guy Requesting assistance on this issue.  I've spent some time looking into this and not sure if the matter is more complicated than I presume.  I have made some preliminary changes to my local branch to convert PCH tasks (PrefixHeaderFileGenerateTask, CppPreCompiledHeaderCompile, & PreCompiledHeader) to use the provider API in order so that we could reuse these tasks from within the cpp-application plugin like we did for the WindowsResourceCompile task.  However, the PCH implementation appears to be much more complicated.  I am trying to mimic the usage of the PCH tasks from within a build.gradle script like how the PCHCompileTaskConfig sets up tasks for execution.  This PCHCompileTaskConfig gets invoked by the NativeComponentModelPlugin among other task configs called within when the deprecated software model is used.  There are prerequisite tasks/actions that occur in order for it to work.  The NativeComponentModelPlugin  instantiates nested SourceSets and nested Actions overriding specific methods and it is really confusing to follow the execution.  It becomes slightly more clear when tracing the execution with a debugger.  At any rate, before continuing any further down this path, I would like to get your guidance on this and to see if I'm on the right track.
Here is a preliminary build.gradle file.  Details are slightly off, but you get the idea.
plugins {
    id 'cpp-application'
}

application {
   //source tree for CppCompile
    source.from project.fileTree(dir: 'src', include: '**/*.cpp')
    privateHeaders.from project.file('src/hello/headers')

    binaries.whenElementFinalized { binary ->
        if (binary.targetPlatform.operatingSystemFamily.isWindows()) {

            def preGenTaskName = "prefixHeaderGen" + binary.name.capitalize()
            def prefixHeaderGen = project.tasks.register(resourceTaskName, PrefixHeaderFileGenerateTask) {
                targetPlatform = binary.targetPlatform
                toolChain = binary.toolChain

                header = ??
                prefixHeaderFile = ??
            }

            //Register CppPreCompiledHeaderCompile
            def pchTaskName = "preCompileHeader" + binary.name.capitalize()

            def pch = project.tasks.register(pchTaskName, CppPreCompiledHeaderCompile) {

                targetPlatform = binary.targetPlatform
                toolChain = binary.toolChain
                includes.from project.file('src/hello/headers')
                source.from project.fileTree(dir: 'src/hello/cpp', include: '**/*.cpp' )

                pchObjects.from = ??
                prefixHeaderFile = ??
                includeString = "pch.h"

                compilerArgs.addAll toolChain.map { NativeToolChain toolChain ->
                    List<String> compilerSpecificArgs = []
                    if (toolChain instanceof VisualCpp) {
                        compilerSpecificArgs << '/c'
                    }
                    return compilerSpecificArgs
                }
                objectFileDir = new File(binary.getNamingScheme().getOutputDirectory(project.getBuildDir(), "objs"), languageSourceSet.getProjectScopedName() + "PCH")
            }

            FileTree pchOutput = pch.get().getOutputs().getFiles().getAsFileTree().matching(new PatternSet().include("**/*.pch", "**/*.gch"));
            def linkerTask = binary.linkTask.get()
            linkerTask.source(pchOutput)
        }
    }
}

Description
The PCH sample below originated from the 'all' distro.  The goal to is to convert it from the software model to the current model.  build-deprecated.gradle is based on the software model, and build.gradle is my current attempt at making the build based on the current model.  There are a few gaps I need assistance with on it.
Context
In the build-deprecated.gradle, hidden tasks in the s/w model create a prefix-header.h.   I replicate the same file using a custom task PrefixHeaderGen below.  Not sure why this file is necessary, but it is heavily baked in the s/w model.
Gaps
The following gaps are based on assumptions that may be false, but so far I've been on my own here with no documentation other than the native-samples and reading the code, be here we go:

CppPreCompiledHeaderCompile depends on PrefixHeaderGen.  Is the prefix-header.h necessary? It was modeled in the s/w model version, so I ported it over to the current model.   If it is, then I can produce it given the build.gradle below using the prefixGen custom task below using PCHUtils.  It is currently required for CppPreCompiledHeaderCompile

When firing CppPreCompiledHeaderCompile, (the producer of the PCH file) I am assuming it be created from within the 'cpp-library' using STATIC & SHARED linkage.  Wiring the includes/source are for this task appear correct, but do not work, and do not resolve the include headers, and as a result, the PCH file is never produced.

the application block {} is the consumer side of the PCH and as such requires additional inputs be set for the task, namely pchObjects, prefixHeaderFile, & includeString.  However, this additional DSL requires the provider API which I have added to my custom local version  Again, not sure if this assumption is correct.  But since in 2), I'm still unable to produce the PCH, it cannot be consumed in 3), I haven't been able to get to that point yet to try my provider api changes out yet.

All of these items above I am trying to understand their role in the build lifecycle for the application {} and library {} DSL, but with no documentation and armed with my experience with the WindowsResourceCompile task, I may be off base in more than one area.  It would be nice if there were some cleaner way to express native builds, because I find it pretty confusing nesting the CppPreCompiledHeaderCompile or task creating within an application or library block when I would much prefer the task be cleanly defined on its own block.  Maybe it should be in its own plugin.  Not sure..  It would be nice to have an interactive screen sharing session from developer to developer to discuss the architecture,  and any associated diagrams, etc.

At any rate, here is my sample, and any pointers/suggestions/corrections/comments/criticisms are welcome.
Project Structure (below)
Also here -> git clone https://github.com/fletcher-sumglobal/pre-compiled-headers.git
.
├── build.gradle
├── build-deprecated.gradle
├── README.md
├── settings.gradle
└── src
    ├── hello
    │   ├── cpp
    │   │   └── hello.cpp
    │   └── headers
    │       ├── hello.h
    │       └── pch.h
    └── main
        └── cpp
            └── main.cpp

6 directories, 8 files

main.cpp
#include "hello.h"

int main () {
    Greeter greeter;
    greeter.hello();
    return 0;
}

pch.h
#ifndef PCH_H
#define PCH_H
#include <iostream>
#include "hello.h"
#endif

hello.h
#ifndef HELLO_H
#define HELLO_H
#if defined(_WIN32) && defined(DLL_EXPORT)
#define LIB_FUNC __declspec(dllexport)
#else
#define LIB_FUNC
#endif

class Greeter {
    public:
    void LIB_FUNC hello();
};
#endif

hello.cpp
#include "pch.h"

void LIB_FUNC Greeter::hello () {
    std::cout << "Hello world!" << std::endl;
}

settings.gradle
rootProject.name = 'pre-compiled-headers'

build.gradle
import org.gradle.nativeplatform.toolchain.internal.PCHUtils
import com.google.common.collect.Lists

buildscript {
    dependencies {
        classpath 'com.google.guava:guava:23.0'
    }
}

plugins {
    id 'cpp-library'
    id 'cpp-application'
}

task prefixGen(type: PrefixHeaderGen) {
    header = 'pch.h'
    prefixHeaderFile = project.file('build/tmp/hello/cpp/prefixHeaders/prefix-headers.h')
}

library {
    linkage =  [
        Linkage.STATIC,
        Linkage.SHARED
    ]
    source.from project.fileTree(dir: 'src/hello/cpp', include: '**/*.cpp')
    publicHeaders.from project.fileTree(dir: 'src/hello/headers', include: '**/*.h')

    binaries.whenElementFinalized { binary ->
        if (binary.targetPlatform.operatingSystemFamily.isWindows()) {

            def pchTaskName = "preCompileHeader" + binary.name.capitalize()
            def pchTask = project.tasks.register(pchTaskName, CppPreCompiledHeaderCompile) {
                targetPlatform = binary.targetPlatform
                toolChain = binary.toolChain

                objectFileDir = new File(project.buildDir, "pch/${binary.name}")
                macros.put('DLL_EXPORT', null)
                includes.from project.fileTree(dir: 'src/hello')
                source.from prefixGen.prefixHeaderFile
                dependsOn prefixGen
            }
            FileTree resourceOutputs = pchTask.get().getOutputs().getFiles().getAsFileTree().matching(new PatternSet().include("**/*.pch"));
            binary.linkTask.get().source(resourceOutputs)
        }
    }
}

/*
 *
 */
application {
    source.from project.fileTree(dir: 'src/hello/cpp', include: '**/*.cpp')
    publicHeaders.from project.fileTree(dir: 'src/hello/headers', include: '**/*.h')
    pchObjects = pchTask.objectFileDir
    prefixHeaderFile = 'build/tmp/hello/cpp/prefixHeaders/prefix-headers.h'
    includeString = 'pch.h'
}

/*
 * It would be nice to declare the CppPreCompiledHeaderCompile task this way
 * but there is no visibility to targetPlatform & toolchain
 */
task pchGen(type: CppPreCompiledHeaderCompile) {
    source.from project.file('src/hello/headers')
    includes.from prefixGen.prefixHeaderFile
    objectFileDir = new File(project.buildDir, "pchOut")
    dependsOn prefixGen
}

tasks.withType(LinkExecutable) {
    linkerArgs.addAll toolChain.map { NativeToolChain toolChain ->
        List<String> linkerSpecificArgs = []
        if (toolChain instanceof VisualCpp) {
            linkerSpecificArgs << 'user32.lib'
        }
        return linkerSpecificArgs
    }
}

class PrefixHeaderGen extends DefaultTask {

    @OutputFile
    final RegularFileProperty prefixHeaderFile = project.objects.fileProperty()

    @Input
    final Property<String> header = project.objects.property(String)

    @TaskAction
    void generatePrefixHeaderFile() {
        PCHUtils.generatePrefixHeaderFile(Lists.newArrayList(header.get()), prefixHeaderFile.getAsFile().get());
    }
}

Output... whats weird is 'pch.h' is shown explicitly in the output.txt.. Not sure what the problem is.
> Task preCompileHeaderMainDebugShared FAILED
prefix-headers.cpp
e:\pre-compiled-headers2\hello\build\tmp\precompileheadermaindebugshared\pchgenerated\prefix-headers.h(1): fatal error C1083: Cannot open include file: 'pch.h': No such file or directory

> Task preCompileHeaderMainDebugStatic FAILED
prefix-headers.cpp
e:\pre-compiled-headers2\hello\build\tmp\precompileheadermaindebugstatic\pchgenerated\prefix-headers.h(1): fatal error C1083: Cannot open include file: 'pch.h': No such file or directory

FAILURE: Build completed with 2 failures.

build-deprecated.gradle (works)
// tag::apply-plugin[]
apply plugin: 'cpp'
// end::apply-plugin[]

// tag::libraries[]
model {
    components {
        hello(NativeLibrarySpec) {
            sources {
                cpp {
                    preCompiledHeader "pch.h"
                }
            }
        }
    }
}
// end::libraries[]

// tag::executables[]
model {
    components {
        main(NativeExecutableSpec) {
// tag::source-library[]
            sources {
                cpp {
                    lib library: "hello"
                }
            }
// end::source-library[]
        }
    }
}

// end::executables[]

// For any shared library binaries built with Visual C++, define the DLL_EXPORT macro
model {
    binaries {
        withType(SharedLibraryBinarySpec) {
            if (toolChain in VisualCpp) {
                cppCompiler.define "DLL_EXPORT"
            }
        }
    }
}


API description and examples

Purpose and description can be found in #24

@denproc @zakajd the PR is ready for review. Any feedback is highly appreciated.

@zakajd please merge if no other changes are required.


Update powered-by.md

Guazi.com and Maodou.com are using Apache SkyWalking for research and production,
and providing commercial products including Apache SkyWalking.
Please answer these questions before submitting pull request

Why submit this pull request?

[ ] Bug fix

[ ] New feature provided

[ ] Improve performance

Related issues

Bug fix

Bug description.

How to fix?

New feature or improvement

Describe the details and related test reports.

Coverage remained the same at 13.035% when pulling 30cdc956b7cb9ee67fe164df6d033c49d99333a4 on yanmingbi:patch-1 into 983f7613b6f88c01ef730cad26bd78efb3a40d92 on apache:master.

Ref #443


Read and used in page objects

Branch where I added markAsRead() to relevant methods of multiple page objects
#74 is required for this pull request

This change is

needs to be rebased because of conflict after merging #74

Review status: 0 of 6 files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

Reviewed 3 of 6 files at r1, 3 of 3 files at r2.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


Increase duration to 10 minutes

Based on internal Google experiments, one minute is not sufficient to capture steady-state performance for many datacenter ML accelerators. A ten minute run is more reflective of long-term performance. This proposed change only affects the Offline and Server scenarios. Single-stream and Multi-stream retain a one minute minimum duration.

@DilipSequeira

Guenther points out that for server throughput calibration we want short run time (e.g., stay at 1 minute for calibration)
DK points out that any power measurement will want >5 minutes, and suggests all scenarios require 10 minutes minimum
Are there any edge submitters that would object to 10 minute run time?

Guenther points out that for server throughput calibration we want short run time (e.g., stay at 1 minute for calibration)
DK points out that any power measurement will want >5 minutes, and suggests all scenarios require 10 minutes minimum
Are there any edge submitters that would object to 10 minute run time?

Different system may have different time window for the peak performance, it's better to allow different runtime for different submitter, as long as meet the minimum requirement, which is 60 seconds.
This 60 seconds runtime is set from the beginning v0.5, thus v0.5 and v0.7 results are comparable. Changing the runtime invalidates all the results for previous rounds.
Moreover, cooling system becomes a big factor for long runtime since heat throttling may happen, especially on edge/mobile devices, this increases the bar for smaller submitters.

Different system may have different time window for the peak performance, it's better to allow different runtime for different submitter, as long as meet the minimum requirement, which is 60 seconds.
This 60 seconds runtime is set from the beginning v0.5, thus v0.5 and v0.7 results are comparable. Changing the runtime invalidates all the results for previous rounds.
Moreover, cooling system becomes a big factor for long runtime since heat throttling may happen, especially on edge/mobile devices, this increases the bar for smaller submitters.

Changing the runtime invalidates all the results for previous rounds.

The MLPerf Results Guidelines forbid comparisons between results derived from different MLPerf iterations. We've changed the rules with each iteration, so none of the versions are comparable.

Changing the runtime invalidates all the results for previous rounds.

The MLPerf Results Guidelines forbid comparisons between results derived from different MLPerf iterations. We've changed the rules with each iteration, so none of the versions are comparable.

Moreover, cooling system becomes a big factor for long runtime since heat throttling may happen, especially on edge/mobile devices, this increases the bar for smaller submitters.

Cooling systems and heat throttling affect performance in the datacenter. In datacenter, automotive, and edge, servers will work continuously for many days at a time. I am more sympathetic to the idea that ten minutes of load is unrealistic for mobile devices that are expected to have burstier activity patterns and long periods of idleness.

Moreover, cooling system becomes a big factor for long runtime since heat throttling may happen, especially on edge/mobile devices, this increases the bar for smaller submitters.

Cooling systems and heat throttling affect performance in the datacenter. In datacenter, automotive, and edge, servers will work continuously for many days at a time. I am more sympathetic to the idea that ten minutes of load is unrealistic for mobile devices that are expected to have burstier activity patterns and long periods of idleness.

Changing the runtime invalidates all the results for previous rounds.

The MLPerf Results Guidelines forbid comparisons between results derived from different MLPerf iterations. We've changed the rules with each iteration, so none of the versions are comparable.

Thank you for point out the results guidelines, which clearly states two version are comparable given certain conditions:

Whether comparing official results or unverified results, comparisons must be made between results of the same benchmark and scenario from compatible versions of an MLPerf benchmark. Compatible versions are determined by the MLPerf organization.
A given system’s v0.5 and v0.6 submissions may be compared with each other provided the base hardware is the same and the comparisons are done with sufficient analysis to remove influence of benchmark changes such as overheads and quality targets.

So MLCommons actually encourages the comparison between different versions, just need to be fair comparison.
Our proposal for this issue is, we could allow different warmup time, like someone need 540 seconds, others may need 1 seconds. But the runtime for testing still be 60 seconds. We could add a column to indicate how much warmup time it needs to reach the peak performance.

Changing the runtime invalidates all the results for previous rounds.

The MLPerf Results Guidelines forbid comparisons between results derived from different MLPerf iterations. We've changed the rules with each iteration, so none of the versions are comparable.

Thank you for point out the results guidelines, which clearly states two version are comparable given certain conditions:

Whether comparing official results or unverified results, comparisons must be made between results of the same benchmark and scenario from compatible versions of an MLPerf benchmark. Compatible versions are determined by the MLPerf organization.
A given system’s v0.5 and v0.6 submissions may be compared with each other provided the base hardware is the same and the comparisons are done with sufficient analysis to remove influence of benchmark changes such as overheads and quality targets.

So MLCommons actually encourages the comparison between different versions, just need to be fair comparison.
Our proposal for this issue is, we could allow different warmup time, like someone need 540 seconds, others may need 1 seconds. But the runtime for testing still be 60 seconds. We could add a column to indicate how much warmup time it needs to reach the peak performance.

We could add a column to indicate how much warmup time it needs to reach the peak performance.
MLPerf's goal for most scenarios should be to measure sustainable performance - that is, performance at thermal equilibrium under benchmark load - which in most cases is lower than peak performance.

We could add a column to indicate how much warmup time it needs to reach the peak performance.
MLPerf's goal for most scenarios should be to measure sustainable performance - that is, performance at thermal equilibrium under benchmark load - which in most cases is lower than peak performance.

I have concerns about having non-comparable performance in edge (short run time) and data center (10 minute).

I have concerns about having non-comparable performance in edge (short run time) and data center (10 minute).

It occurs to me that we are mandating "ECC on" for the first time in MLPerf Inference 1.0, which already makes 0.7 and 0.5 incomparable on some hardware.

It occurs to me that we are mandating "ECC on" for the first time in MLPerf Inference 1.0, which already makes 0.7 and 0.5 incomparable on some hardware.

A Datacenter submission must use ECC in their DRAM and HBM memories, and ECC must be enabled for all performance and accuracy runs.

A Datacenter submission must use ECC in their DRAM and HBM memories, and ECC must be enabled for all performance and accuracy runs.

WG approved.

WG approved.


k8s plugin: Add horizontal_pod_autoscaler type

Description
This adds horizontal_pod_autoscaler as a k8s resource, using the V1 autoscaling API. (V2 is the latest version but stable only as of 1.23, so V1 is better for broader compatibility IMO.)
Current fields are max_replicas and min_replicas.
To-Dos

[ ] Add test coverage for new or updated functionality - Do you want this given the current alpha status of this plugin?
[x] Lint and test with tox
[ ] Document new or updated functionality (someengineering/resoto.com#XXXX)

Code of Conduct
By submitting this pull request, I agree to follow the code of conduct.

@tdickers thank you for your PR! Looks good to me. Please run black code formatting against the k8s source directory. That should make the syntax check pass.


resource not find 50003 error when trying to verify

Repro Steps

Clone this repo: https://github.com/tablelandnetwork/evm-tableland
Check out branch: dtb/fil-verification
Install: npm install
Build: npm run build
Try to verify contract: npx hardhat starboard-verify "TablelandTables" "0x59EF8Bf2d6c102B4c42AEf9189e1a9F0ABfD652d" --show-stack-traces

Note: the contract is assumed to be mainnet for the sake of this issue demonstration, which can be found in network.ts
Describe the Bug
The contract should verify, but it fails due to a 50003 error. Note: it's an upgradable contract, and it's large (> 24576 bytes).
Logging Information
{
  request_id: '4261e1c9-9dc4-43fc-8c56-745a4718f51c#71721167',
  code: 50003,
  message: 'resource not find.'
}
Error in plugin @starboardventures/hardhat-verify: resource not find.

NomicLabsHardhatPluginError: resource not find.
    at SimpleTaskDefinition.action (/Users/dtb/tbl/evm-tableland/node_modules/@starboardventures/hardhat-verify/src/tasks/starboard-verify.ts:80:2)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Environment._runTaskDefinition (/Users/dtb/tbl/evm-tableland/node_modules/hardhat/src/internal/core/runtime-environment.ts:330:14)
    at async Environment.run (/Users/dtb/tbl/evm-tableland/node_modules/hardhat/src/internal/core/runtime-environment.ts:163:14)
    at async main (/Users/dtb/tbl/evm-tableland/node_modules/hardhat/src/internal/cli/cli.ts:277:7)

xy@evm-tableland % npx hardhat starboard-verify "TablelandTables"
verifing...
Error in plugin @starboardventures/hardhat-verify: invalid json response body at https://fvm-calibration-api.starboard.ventures/api/v1/contract//verify?from=plugin reason: Unexpected token p in JSON at position 4

Hi dtbuchholz
https://fvm-calibration-api.starboard.ventures/api/v1/contract//verify?from=plugin -- you have take the wrong network, this is the calibration net.
https://fvm.starboard.ventures/explorer/address/0x59EF8Bf2d6c102B4c42AEf9189e1a9F0ABfD652d -- this is the main net.

@cxytz01 thanks for the quick reply! after some additional testing, i seem to get an error about bytecode mismatches. is that a common issue you see? because I haven't had this issue other block explorers, and i've even tried manually uploaded contracts in the Starboard UI without success. i've been able to verify these contracts on mainnet/testnet ethereum, optimism, arbitrum, and polygon—e.g., here.
could you recommend how i need to alter my setup to verify the contract?
--
to be clear, your example wasn't the command i ran, and i never set the URL shown in your error log; that must come from the plugin logic. namely, the npx hardhat starboard-verify doesn't let me set a network as a flag, so I'm assuming it's using the startboardConfig set in the hardhat.config.ts file. nowhere in my hardhat.config.ts do i set the testnet URL. in fact, my config explicitly maps to mainnet—and this URL is what's listed in the docs (not the one you provided):
  starboardConfig: {
    baseURL: "https://fvm-api.starboard.ventures",
    network: "Mainnet",
  }

thus, i need to be able to specify the contract address as a parameter if i want to force a mainnet (or testnet) verification, right? in your example, you simply specify the contract name, so it seems to use logic in @starboardventures/hardhat-verify to select the API URL.
--
now, to verify on testnet, i tried running your example but while explicitly passing the contractAddress for the testnet contract and this config:
  starboardConfig: {
    baseURL: "https://fvm-api-calibration.starboard.ventures",
    network: "Calibration",
  },

but, i get a bytecode error:
> npx hardhat starboard-verify "TablelandTables" "0x030BCf3D50cad04c2e57391B12740982A9308621"
Error in plugin @starboardventures/hardhat-verify: runtime bytecode not match

NomicLabsHardhatPluginError: runtime bytecode not match
    at SimpleTaskDefinition.action (/Users/dtb/tbl/evm-tableland/node_modules/@starboardventures/hardhat-verify/src/tasks/starboard-verify.ts:80:2)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Environment._runTaskDefinition (/Users/dtb/tbl/evm-tableland/node_modules/hardhat/src/internal/core/runtime-environment.ts:330:14)
    at async Environment.run (/Users/dtb/tbl/evm-tableland/node_modules/hardhat/src/internal/core/runtime-environment.ts:163:14)
    at async main (/Users/dtb/tbl/evm-tableland/node_modules/hardhat/src/internal/cli/cli.ts:277:7)

lastly, i also tried altering my scripts/verify.ts file without success, and i tried this for mainnet, too. it errors out with:
> npx hardhat run scripts/verify.ts --network filecoin-calibration
Failed to verify contract: Error: runtime bytecode not match
    at StarboardVerify.verify (/Users/dtb/tbl/evm-tableland/node_modules/@starboardventures/hardhat-verify/src/utils.ts:58:15)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async main (/Users/dtb/tbl/evm-tableland/scripts/verify.ts:27:5)

@Viyozc Please help to deal with this problem.

@dtbuchholz  Currently, the explorer can only strictly verify the contract code, so if you have an upgradeable contract, you need to verify Proxy and Implementation separately.

@Viyozc hm, okay. so, how exactly should I do that?
my contracs imports all of the upgradable contracts from OZ. the contract impl gets deployed at 0x366Be5682fa4D8d6c373a64AB378c37dBe465835 and proxy at 0x59EF8Bf2d6c102B4c42AEf9189e1a9F0ABfD652d on FIL mainnet. on testnet, it's 0x6a1FD2538773a01592EE2615C62D2c2bB6b8C962 and proxy at 0x030BCf3D50cad04c2e57391B12740982A9308621. how do i separate the verifcation process between the two?
import {ERC721AUpgradeable} from "erc721a-upgradeable/contracts/ERC721AUpgradeable.sol";
import {ERC721AQueryableUpgradeable} from "erc721a-upgradeable/contracts/extensions/ERC721AQueryableUpgradeable.sol";
import {UUPSUpgradeable} from<EMAIL_ADDRESS>import {OwnableUpgradeable} from<EMAIL_ADDRESS>import {PausableUpgradeable} from<EMAIL_ADDRESS>import {ReentrancyGuardUpgradeable} from<EMAIL_ADDRESS>import {ITablelandTables} from "./interfaces/ITablelandTables.sol";
import {ITablelandController} from "./interfaces/ITablelandController.sol";
import {TablelandPolicy} from "./TablelandPolicy.sol";

/**
 * @dev Implementation of {ITablelandTables}.
 */
contract TablelandTables is
    ITablelandTables,
    ERC721AUpgradeable,
    ERC721AQueryableUpgradeable,
    OwnableUpgradeable,
    PausableUpgradeable,
    ReentrancyGuardUpgradeable,
    UUPSUpgradeable
{ // ...}

fwiw, I don't see why this plugin wouldn't work like every other hardhat verification process on other chains. just sharing my thoughts! i know it's a small feature, but it'd be great if it worked; otherwise, I'll just try using filfox.


Enhancement for Functional Automation script: Full mode

See #261 #387
Change functionality to reduce login to only first run in full & auto mode
Blocked by defender login error

Revisit after the hackathon and decide if this needs to be in Dolphin


Differentiate multiple certificates on a token

First of all, I love you library. It helped me a lot in developing an HSM use case in python!
I see an issue when multiple certificate are on a token. When list all objects on a python-pkcs11 token the certificate objects does not return an ID or label.
In PKCS#11 this ID and label information seems to exist for certs as well, see the output of pkcs11-tool
$ pkcs11-tool --module /usr/lib/libsofthsm2.so -l --pin secret1 -O
Using slot 0 with a present token (0xd24c4d0)
Public Key Object; RSA 2048 bits
  label:      anotherkey
  ID:         010203
  Usage:      encrypt, verify, wrap
Certificate Object; type = X.509 cert
  label:      anotherkey
  subject:    DN: CN=ANOTHERTEST
  ID:         010203
Certificate Object; type = X.509 cert
  label:      test
  subject:    DN: CN=TEST
  ID:         a1b2
Private Key Object; RSA
  label:      anotherkey
  ID:         010203
  Usage:      decrypt, sign, unwrap
Private Key Object; RSA
  label:      test
  ID:         a1b2
  Usage:      decrypt, sign, unwrap
Public Key Object; RSA 2048 bits
  label:      test
  ID:         a1b2
  Usage:      encrypt, verify, wrap

Unfortunately the ObjectClass.CERTIFICATE in python-pkcs11 does not have the parameters id or label.
Best regards, Andreas

So all attributes are accessible using the form obj[Attribute.ID]/obj[Attribute.LABEL]. We could probably move the properties for label onto Object (which is actually what the spec says), but id is not defined on any type of Certificate except X.509.

Thanks a lot Danni, the ID and LABEL is exactly where you suggested.
Please close this issue.
BR, Andreas


Pod Security Standards doc updates

Addresses last two issues from https://github.com/kubernetes/website/issues/28721

[x] removes optional non-root group check we declined to include in the in-tree PodSecurity implementation
[x] switches restricted inline volumes check to require a positive match of an allowed volume type to protect against future volume types

/sig auth security
/cc @tallclair

/lgtm

@kubernetes/sig-auth-pr-reviews is this OK from your perspective?
/approve
/hold
I would like tech review on these amendments.

/hold cancel


Update Pangolin version 4.0.5

This PR updates Pangolin.
Installation sequence for tool-installers

[x] Test using @galaxybot test this
[x] Inspect CI output for expected changes
[x] Deploy using @galaxybot deploy this if test install was successful
[ ] Merge this PR

@galaxybot test this

@galaxybot deploy this


Auto make Slug with title or slug

Hello Everyone!
I want config make slug with title or slug field.
If Slug empty -> generate with Title field
Else generate with Slug field

How would you generated a slug using the slug field?
If you mean "If the slug is empty, use the title. Otherwise, leave the existing slug."  ... then just set on_update to false.

Actually, I was thinking the same thing. Not the slug field from the database but the slug field from the control panel. Say I make a really dumb title like This is great!!!!!!! and it turns my slug into this-is-great------ (I don't know if it would, but for example). It would be great to be able to allow people to just specify the slug they want to use in the control panel to change it to this-is-great.

If onUpdate is false (the default), then the package won't try and regenerate a slug and will just leave the slug field as-is.
So, provide an admin interface or whatever for your users to edit the slug field and save it to the model.  It should persist.

Ahhh - so if I try to generate a slug on update Sluggable won't do anything by default. I think that's perfect -- thank you!


Fix renamer, lcov check was not accessing the proper object

#67 contained a typo that prevents the renamer from actually working.  This PR fixes that issue to help enable #63

@elwayman02 note failing tests

Ah, the test was written for the bad syntax as well.  Fixed.

@elwayman02 thanks

Nice!  I also followed this bad code up with a matching config file in my app.  Its amazing how wrong one guy can be huh?


[BACKLOG-16769] - removing newline before any cdata.  removing compil…

…e dependency on wstx.

Build Completed
:x: This pull request has errors. They will need to be addressed before it can be accepted. See below for more details. Some links are also available below for further assistance in addressing those issues.
Build Commands
ant -Dtestreports.dir=bin/reports/unit-test -f core/build.xml clean-all resolve jacoco && ant -f core/build.xml checkstyle publish-local
ant -Dtestreports.dir=bin/reports/unit-test -f engine/build.xml clean-all resolve jacoco && ant -f engine/build.xml checkstyle publish-local

Cleanup Commands
rm -r ~/.ivy2/local || echo no publish local to remove

Changed files
  core/ivy.xml
  core/src/org/pentaho/di/core/xml/XMLFormatter.java
  core/test-src/org/pentaho/di/core/xml/XMLFormatterTest.java
  engine/ivy.xml
  engine/src/org/pentaho/di/trans/steps/webservices/WebService.java

Unit test coverage change
These statistics help you identify how your changes have affected the coverage of the following files. If a file is not in this list, then its coverage was not affected by your changes. To get some help interpreting these metrics, please refer to Jacoco's documentation.
org.pentaho.di.core.xml.XMLFormatter

Branch Change:  + 8.13%
Complexity Change:  + 5.70%
Instruction Change:  + 7.89%
Line Change:  + 7.90%

org.pentaho.di.core.xml.XMLFormatter.AttrBuffer

Instruction Change:  + 11.36%

org.pentaho.di.core.xml.XMLFormatter.StartElementBuffer

Instruction Change:  + 10.23%

org.pentaho.di.core.auth.core.impl.DefaultAuthenticationConsumerFactory

Branch Change: -7.14%:small_red_triangle_down:
Complexity Change: -7.69%:small_red_triangle_down:

org.pentaho.di.job.entries.evaluatetablecontent.JobEntryEvalTableContent

Branch Change: -1.01%:small_red_triangle_down:
Complexity Change: -1.06%:small_red_triangle_down:
Instruction Change: -.17%:small_red_triangle_down:

org.pentaho.di.job.entries.getpop.MailConnectionMeta

Branch Change: -1.00%:small_red_triangle_down:
Complexity Change: -1.41%:small_red_triangle_down:
Instruction Change: -.30%:small_red_triangle_down:

org.pentaho.di.job.entries.sql.JobEntrySQL

Instruction Change:  + 3.28%
Line Change:  + 3.87%

org.pentaho.di.job.entries.waitforsql.JobEntryWaitForSQL

Branch Change:  + .66%
Complexity Change:  + .93%
Instruction Change:  + .13%

org.pentaho.di.trans.step.StepMeta

Branch Change: -.68%:small_red_triangle_down:
Complexity Change: -.58%:small_red_triangle_down:
Instruction Change: -.19%:small_red_triangle_down:
Line Change: -.26%:small_red_triangle_down:

org.pentaho.di.trans.steps.calculator.CalculatorMetaFunction

Branch Change:  + 8.70%
Complexity Change:  + 3.03%
Instruction Change:  + .75%
Line Change:  + .89%

org.pentaho.di.trans.steps.checksum.CheckSumMeta

Branch Change: -1.35%:small_red_triangle_down:
Complexity Change: -1.45%:small_red_triangle_down:
Instruction Change: -.11%:small_red_triangle_down:

org.pentaho.di.trans.steps.constant.ConstantMeta

Instruction Change:  + .10%

org.pentaho.di.trans.steps.csvinput.CsvInputMeta

Instruction Change: -.05%:small_red_triangle_down:

org.pentaho.di.trans.steps.dbproc.DBProcMeta

Instruction Change:  + .11%

org.pentaho.di.trans.steps.ifnull.IfNullMeta

Branch Change:  + 2.00%
Complexity Change:  + 1.89%
Instruction Change:  + .17%

org.pentaho.di.trans.steps.insertupdate.InsertUpdateMeta

Instruction Change: -.05%:small_red_triangle_down:

org.pentaho.di.trans.steps.memgroupby.MemoryGroupByMeta

Branch Change:  + 2.35%
Complexity Change:  + 2.70%

org.pentaho.di.trans.steps.replacestring.ReplaceStringMeta

Instruction Change:  + .07%

org.pentaho.di.trans.steps.sort.SortRowsMeta

Instruction Change:  + .08%

org.pentaho.di.trans.steps.tableoutput.TableOutputMeta

Branch Change:  + .91%
Complexity Change:  + .82%

org.pentaho.di.trans.steps.textfileinput.TextFileInputMeta

Branch Change: -.53%:small_red_triangle_down:

org.pentaho.di.trans.steps.uniquerows.UniqueRowsMeta

Instruction Change:  + .18%

org.pentaho.di.trans.steps.webservices.WebServiceMeta

Branch Change: -1.79%:small_red_triangle_down:
Complexity Change: -1.19%:small_red_triangle_down:
Instruction Change: -.07%:small_red_triangle_down:

License header violations

:heavy_exclamation_mark: Copyright year is not the current year on core/src/org/pentaho/di/core/xml/XMLFormatter.java. Found 2016. Was expecting 2017

:heavy_exclamation_mark: Copyright year is not the current year on core/test-src/org/pentaho/di/core/xml/XMLFormatterTest.java. Found 2016. Was expecting 2017

Build Completed
:x: This pull request has errors. They will need to be addressed before it can be accepted. See below for more details. Some links are also available below for further assistance in addressing those issues.
Build Commands
ant -Dtestreports.dir=bin/reports/unit-test -f core/build.xml clean-all resolve jacoco && ant -f core/build.xml checkstyle publish-local
ant -Dtestreports.dir=bin/reports/unit-test -f engine/build.xml clean-all resolve jacoco && ant -f engine/build.xml checkstyle publish-local

Cleanup Commands
rm -r ~/.ivy2/local || echo no publish local to remove

Changed files
  core/ivy.xml
  core/src/org/pentaho/di/core/xml/XMLFormatter.java
  core/test-src/org/pentaho/di/core/xml/XMLFormatterTest.java
  engine/ivy.xml
  engine/src/org/pentaho/di/trans/steps/webservices/WebService.java

Unit test coverage change
These statistics help you identify how your changes have affected the coverage of the following files. If a file is not in this list, then its coverage was not affected by your changes. To get some help interpreting these metrics, please refer to Jacoco's documentation.
org.pentaho.di.core.xml.XMLFormatter

Branch Change:  + 8.13%
Complexity Change:  + 5.70%
Instruction Change:  + 7.89%
Line Change:  + 7.90%

org.pentaho.di.core.xml.XMLFormatter.AttrBuffer

Instruction Change:  + 11.36%

org.pentaho.di.core.xml.XMLFormatter.StartElementBuffer

Instruction Change:  + 10.23%

org.pentaho.di.core.auth.core.impl.DefaultAuthenticationConsumerFactory

Branch Change:  + 7.14%
Complexity Change:  + 7.69%

org.pentaho.di.job.entries.evalfilesmetrics.JobEntryEvalFilesMetrics

Branch Change:  + .39%
Complexity Change:  + .51%
Instruction Change:  + .08%

org.pentaho.di.job.entries.evaluatetablecontent.JobEntryEvalTableContent

Branch Change: -1.01%:small_red_triangle_down:
Complexity Change: -1.06%:small_red_triangle_down:
Instruction Change: -.17%:small_red_triangle_down:

org.pentaho.di.job.entries.sql.JobEntrySQL

Instruction Change: -3.28%:small_red_triangle_down:
Line Change: -3.87%:small_red_triangle_down:

org.pentaho.di.trans.step.StepMeta

Branch Change: -.68%:small_red_triangle_down:
Complexity Change: -.58%:small_red_triangle_down:
Instruction Change: -.19%:small_red_triangle_down:
Line Change: -.26%:small_red_triangle_down:

org.pentaho.di.trans.steps.combinationlookup.CombinationLookupMeta

Instruction Change: -.04%:small_red_triangle_down:

org.pentaho.di.trans.steps.constant.ConstantMeta

Instruction Change:  + .10%

org.pentaho.di.trans.steps.csvinput.CsvInputMeta

Instruction Change: -.05%:small_red_triangle_down:

org.pentaho.di.trans.steps.dbproc.DBProcMeta

Instruction Change: -.11%:small_red_triangle_down:

org.pentaho.di.trans.steps.dimensionlookup.DimensionLookupMeta

Branch Change: -.31%:small_red_triangle_down:
Instruction Change: -.06%:small_red_triangle_down:
Line Change:  + .23%
Method Change:  + 1.02%

org.pentaho.di.trans.steps.groupby.GroupByMeta

Branch Change:  + 1.04%
Complexity Change:  + 1.05%
Instruction Change:  + .14%
Line Change:  + .37%

org.pentaho.di.trans.steps.insertupdate.InsertUpdateMeta

Instruction Change: -.05%:small_red_triangle_down:

org.pentaho.di.trans.steps.memgroupby.MemoryGroupByMeta

Branch Change:  + 1.18%
Complexity Change:  + 1.35%

org.pentaho.di.trans.steps.setvalueconstant.SetValueConstantMeta

Instruction Change:  + .14%

org.pentaho.di.trans.steps.singlethreader.SingleThreaderMeta

Instruction Change: -.10%:small_red_triangle_down:

org.pentaho.di.trans.steps.sort.SortRowsMeta

Instruction Change:  + .08%

org.pentaho.di.trans.steps.sortedmerge.SortedMergeMeta

Instruction Change:  + .18%

org.pentaho.di.trans.steps.synchronizeaftermerge.SynchronizeAfterMergeMeta

Instruction Change: -.04%:small_red_triangle_down:

org.pentaho.di.trans.steps.tableoutput.TableOutputMeta

Branch Change: -.91%:small_red_triangle_down:
Complexity Change: -.82%:small_red_triangle_down:

org.pentaho.di.trans.steps.uniquerows.UniqueRowsMeta

Instruction Change:  + .18%

org.pentaho.di.trans.steps.webservices.WebServiceMeta

Branch Change: -1.79%:small_red_triangle_down:
Complexity Change: -1.19%:small_red_triangle_down:
Instruction Change: -.07%:small_red_triangle_down:

License header violations

:heavy_exclamation_mark: Copyright year is not the current year on core/src/org/pentaho/di/core/xml/XMLFormatter.java. Found 2016. Was expecting 2017

:heavy_exclamation_mark: Copyright year is not the current year on core/test-src/org/pentaho/di/core/xml/XMLFormatterTest.java. Found 2016. Was expecting 2017

don't know why it's complaining about copyright.  They have 2017

Build Completed
:fire: This pull request has some issues. It would be preferable to fix them in order for it to be just perfect. See below for more details. Some links are also available below for further assistance in addressing those issues.
Build Commands
ant -Dtestreports.dir=bin/reports/unit-test -f core/build.xml clean-all resolve jacoco && ant -f core/build.xml checkstyle publish-local
ant -Dtestreports.dir=bin/reports/unit-test -f engine/build.xml clean-all resolve jacoco && ant -f engine/build.xml checkstyle publish-local

Cleanup Commands
rm -r ~/.ivy2/local || echo no publish local to remove

Changed files
  core/ivy.xml
  core/src/org/pentaho/di/core/xml/XMLFormatter.java
  core/test-src/org/pentaho/di/core/xml/XMLFormatterTest.java
  engine/ivy.xml
  engine/src/org/pentaho/di/trans/steps/webservices/WebService.java

Newly Fixed Tests:
org.pentaho.di.trans.steps.textfileinput.TextFileInputMetaLoadSaveTest.testSerialization:
:large_blue_circle: java.lang.RuntimeException
java.lang.RuntimeException: Error validating dateFormatLocale
	at org.pentaho.di.trans.steps.loadsave.LoadSaveTester.validateLoadedMeta(LoadSaveTester.java:176)
	at org.pentaho.di.trans.steps.loadsave.LoadSaveTester.testMixedXmlRepoRoundTrip(LoadSaveTester.java:270)
	at org.pentaho.di.trans.steps.loadsave.LoadSaveTester.testSerialization(LoadSaveTester.java:185)
	at org.pentaho.di.trans.steps.textfileinput.TextFileInputMetaLoadSaveTest.testSerialization(TextFileInputMetaLoadSaveTest.java:167)
Ca

Unit test coverage change
These statistics help you identify how your changes have affected the coverage of the following files. If a file is not in this list, then its coverage was not affected by your changes. To get some help interpreting these metrics, please refer to Jacoco's documentation.
org.pentaho.di.core.xml.XMLFormatter

Branch Change:  + 8.13%
Complexity Change:  + 5.70%
Instruction Change:  + 7.89%
Line Change:  + 7.90%

org.pentaho.di.core.xml.XMLFormatter.AttrBuffer

Instruction Change:  + 11.36%

org.pentaho.di.core.xml.XMLFormatter.StartElementBuffer

Instruction Change:  + 10.23%

org.pentaho.di.core.auth.core.impl.DefaultAuthenticationConsumerFactory

Branch Change: -7.14%:small_red_triangle_down:
Complexity Change: -7.69%:small_red_triangle_down:

org.pentaho.di.job.entries.evalfilesmetrics.JobEntryEvalFilesMetrics

Branch Change: -.78%:small_red_triangle_down:
Complexity Change: -1.03%:small_red_triangle_down:
Instruction Change: -.16%:small_red_triangle_down:

org.pentaho.di.job.entries.waitforsql.JobEntryWaitForSQL

Branch Change: -.66%:small_red_triangle_down:
Complexity Change: -.93%:small_red_triangle_down:
Instruction Change: -.13%:small_red_triangle_down:

org.pentaho.di.trans.step.StepMeta

Branch Change: -.68%:small_red_triangle_down:
Complexity Change: -.58%:small_red_triangle_down:
Instruction Change: -.19%:small_red_triangle_down:
Line Change: -.26%:small_red_triangle_down:

org.pentaho.di.trans.steps.calculator.CalculatorMetaFunction

Branch Change: -8.70%:small_red_triangle_down:
Complexity Change: -3.03%:small_red_triangle_down:
Instruction Change: -.75%:small_red_triangle_down:
Line Change: -.89%:small_red_triangle_down:

org.pentaho.di.trans.steps.dimensionlookup.DimensionLookupMeta

Branch Change: -.31%:small_red_triangle_down:
Instruction Change: -.06%:small_red_triangle_down:
Line Change:  + .23%
Method Change:  + 1.02%

org.pentaho.di.trans.steps.insertupdate.InsertUpdateMeta

Instruction Change:  + .05%

org.pentaho.di.trans.steps.ldapoutput.LDAPOutputMeta

Instruction Change:  + .06%

org.pentaho.di.trans.steps.memgroupby.MemoryGroupByMeta

Branch Change: -1.18%:small_red_triangle_down:
Complexity Change: -1.35%:small_red_triangle_down:

org.pentaho.di.trans.steps.replacestring.ReplaceStringMeta

Instruction Change: -.07%:small_red_triangle_down:

org.pentaho.di.trans.steps.setvalueconstant.SetValueConstantMeta

Instruction Change: -.14%:small_red_triangle_down:

org.pentaho.di.trans.steps.tableoutput.TableOutputMeta

Branch Change: -.91%:small_red_triangle_down:
Complexity Change: -.82%:small_red_triangle_down:

org.pentaho.di.trans.steps.uniquerows.UniqueRowsMeta

Instruction Change:  + .18%

org.pentaho.di.trans.steps.webservices.WebServiceMeta

Branch Change: -1.79%:small_red_triangle_down:
Complexity Change: -1.19%:small_red_triangle_down:
Instruction Change: -.07%:small_red_triangle_down:

org.pentaho.di.www.TransformationMap

Branch Change: -5.68%:small_red_triangle_down:
Complexity Change: -4.62%:small_red_triangle_down:
Instruction Change: -5.64%:small_red_triangle_down:
Line Change: -5.38%:small_red_triangle_down:


Quick spelling fix in Java Plugin documentation.

Any of the checked boxes below indicate that I took action:

[X] Reviewed the Contribution Guidelines.
[X] Signed the Gradle CLA.
[ ] Ensured that basic checks pass: ./gradlew quickCheck

For all non-trivial changes that modify the behavior or public API:

[ ] Before submitting a pull request, I started a discussion on the
Gradle developer list
or can reference a JIRA issue.
[ ] I wrote a design document. A design document can be
brief but explains the use case or problem you are trying to solve,
touches on the planned implementation approach as well as the test cases
that verify the behavior. Optimally, design documents should be submitted
as a separate pull request. Samples
can be found in the Gradle GitHub repository. Please let us know if you need help with
creating the design document. We are happy to help!
[ ] The pull request contains an appropriate level of unit and integration
test coverage to verify the behavior. Before submitting the pull request
I ran a build on your local machine via the command
./gradlew quickCheck <impacted-subproject>:check.
[X] The pull request updates the Gradle documentation like user guide,
DSL reference and Javadocs where applicable.

Thank you for your PR! It has been merged.

Internal Review: https://code-review.gradle.org/cru/REVIEW-6093


Caret not shown within text

Hi,
I am working on the new GUI for arcade. To replace the current implementation we plan to migrate every text rendering to Pyglet. Also the InputText widget, which causes us a few problems.

Reproduce
Run text input example.
Expected
Caret shown at the cursor place
Actual
No caret visible on MacOS, a gigantic one on Windows.
Details
OS: Mac 10.15.7
pyglet-2.0.dev5

On windows I actually see a caret when the window opens initially. Pretty large blue line.

Can confirm on Linux that it's not working correctly either.
I'm not sure yet what the cause is.

This should be working now in the latest dev release.
Please let us know if not.

In our case it looks like we have some offset.

We will check if this comes from our code.

Hi we figure out that the caret takes the content_height, but not the height of the layout.
So setting a size for the layout making it bigger then the actual text causes the caret to be off.

https://github.com/pyglet/pyglet/blob/0e9da20b162129b5dce9235c7da06ae3b86ee7e3/pyglet/text/caret.py#L392
replaced by: y += self._layout.y + self._layout.height
fixes it for us

Thanks for looking into that. Your fix looks like what it should have been.
This should be fixed in the master branch now. If you can confirm that, I'll push out another dev release to target.

The fix works in our example. We still have an issue, that the caret disappears in front of the text. We will debug more to get what the problem is.

it is


LIveServer

I have a problem with live server, when I try to open the project that I am working on, it  gives an  error code so would you kindly assist me that.
You can contact via email, my email address is<EMAIL_ADDRESS>

I have a problem with live server, when I try to open the project that I am working on, it gives an error code so would you kindly assist me that.
You can contact via email, my email address is<EMAIL_ADDRESS>

/causedByExtension

This issue is caused by an extension, please file it with the repository (or contact) the extension has linked in its overview in VS Code or the marketplace for VS Code. See also our issue reporting guidelines.
Happy Coding!

Hi
Thanks I have fixed the problem with your assistance.
Sent from Mailhttps://go.microsoft.com/fwlink/?LinkId=550986 for Windows
From: John @.>
Sent: Monday, 25 July 2022 16:59
To: @.>
Cc: Siphe @.>; @.>
Subject: Re: [microsoft/vscode] LIveServer (Issue #156165)
/causedByExtension
—
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/vscode/issues/156165#issuecomment-1194164358, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AZHMWKVWPOFSQVUSNFQ3EZDVV2TVBANCNFSM54SPEDDA.
You are receiving this because you authored the thread.Message ID: @.***>


How to run inference for the generative model

Hello!
I'm trying to use the pre-trained weights to generate handwritten text given arbitrary strings.
I managed to do that with something similar to the following code:
from PIL import Image
import torch
import numpy as np
from options.test_options import TestOptions
from models.BigGAN_networks import Generator

def load_model():
    opt = TestOptions().parse()  # get test options
    opt.n_classes = 80
    gen = Generator(**vars(opt))

    state_dict = torch.load('./latest_net_G.pth')
    if hasattr(state_dict, '_metadata'):
        del state_dict._metadata
    gen.load_state_dict(state_dict)
    gen.eval()
    return gen

model = load_model()

char_to_int = {
    'a': 18,
    'b': 21,
    'c': 15,
    ...,
}

def get_word(word):
    encoded = [char_to_int[char] for char in word]
    words = torch.zeros((1, len(encoded), 80), dtype=torch.int32)
    for i, code in enumerate(encoded):
        words[0, i, code] = 1
    return words

def generate_image(word):
    seed = np.random.randint(0, 10e4)
    word = get_word(word)
    z, _ = prepare_z_y(1, 128, 80, device='cpu', seed=seed)
    res = model.forward(z=z, y=words)
    res = res.detach().numpy()[0, 0] * 255
    im = Image.fromarray(res).convert('RGB')
    return im

img = generate_img('testing')

I have two questions:

I do not have the exactly char_to_int encoding that maps characters to class labels. Where can I find it?
Does that solution look OK for generating images?

Thanks!

Hi,
The code looks ok (I didn't try to run it).
The encoding is according to the order of the characters in data/alphabets - the first character in the string is encoded to 1, the second to 2 etc. You can see it in the strLabelConverter class in models/OCR_network.py.

Thanks, data/alphabets is what I was looking for!

Hello!
I'm trying to use the pre-trained weights to generate handwritten text given arbitrary strings.
I managed to do that with something similar to the following code:
from PIL import Image
import torch
import numpy as np
from options.test_options import TestOptions
from models.BigGAN_networks import Generator

def load_model():
    opt = TestOptions().parse()  # get test options
    opt.n_classes = 80
    gen = Generator(**vars(opt))

    state_dict = torch.load('./latest_net_G.pth')
    if hasattr(state_dict, '_metadata'):
        del state_dict._metadata
    gen.load_state_dict(state_dict)
    gen.eval()
    return gen

model = load_model()

char_to_int = {
    'a': 18,
    'b': 21,
    'c': 15,
    ...,
}

def get_word(word):
    encoded = [char_to_int[char] for char in word]
    words = torch.zeros((1, len(encoded), 80), dtype=torch.int32)
    for i, code in enumerate(encoded):
        words[0, i, code] = 1
    return words

def generate_image(word):
    seed = np.random.randint(0, 10e4)
    word = get_word(word)
    z, _ = prepare_z_y(1, 128, 80, device='cpu', seed=seed)
    res = model.forward(z=z, y=words)
    res = res.detach().numpy()[0, 0] * 255
    im = Image.fromarray(res).convert('RGB')
    return im

img = generate_img('testing')

I have two questions:

I do not have the exactly char_to_int encoding that maps characters to class labels. Where can I find it?
Does that solution look OK for generating images?

Thanks!

Hello,
First, thank you for this very interesting work!
I reused exactly the code above with the following changes:
from data.alphabets import alphabetEnglish

...

char_to_int = {
    char:i
    for i, char in enumerate(alphabetEnglish)
}

...

def generate_image(word):

    ...

    z = torch.from_numpy(np.zeros((128, 80))).float()

    ...

However, running it leads to a matrix shape inconsistency:
Traceback (most recent call last):
  File "./generate.py", line 100, in <module>
    img = generate_image('testing')
  File "./generate.py", line 95, in generate_image
    res = model.forward(z=z, y=words)
  File "/Users/A894EM/Documents/Computer-Vision/GANs/Handwriting_Generation/convolutional-handwriting-gan/models/BigGAN_networks.py", line 385, in forward
    h = block(h, ys[index])
  File "/Users/A894EM/Documents/Computer-Vision/GANs/Handwriting_Generation/convolutional-handwriting-gan/pytorch1.2/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/Users/A894EM/Documents/Computer-Vision/GANs/Handwriting_Generation/convolutional-handwriting-gan/models/BigGAN_layers.py", line 405, in forward
    h = self.activation(self.bn1(x, y))
  File "/Users/A894EM/Documents/Computer-Vision/GANs/Handwriting_Generation/convolutional-handwriting-gan/pytorch1.2/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/Users/A894EM/Documents/Computer-Vision/GANs/Handwriting_Generation/convolutional-handwriting-gan/models/BigGAN_layers.py", line 313, in forward
    gain = (1 + self.gain(y)).view(y.size(0), -1, 1, 1)
  File "/Users/A894EM/Documents/Computer-Vision/GANs/Handwriting_Generation/convolutional-handwriting-gan/pytorch1.2/lib/python3.7/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/Users/A894EM/Documents/Computer-Vision/GANs/Handwriting_Generation/convolutional-handwriting-gan/models/BigGAN_layers.py", line 123, in forward
    return F.linear(x, self.W_(), self.bias)
  File "/Users/A894EM/Documents/Computer-Vision/GANs/Handwriting_Generation/convolutional-handwriting-gan/pytorch1.2/lib/python3.7/site-packages/torch/nn/functional.py", line 1692, in linear
    output = input.matmul(weight.t())
RuntimeError: mat1 and mat2 shapes cannot be multiplied (128x16 and 32x256)

It seems to happen at the second generator block, first batch norm layer. I did not modify the test options, apart from setting the --gpu_ids to -1  in the base options. I am using the pretrained model that you released. I feel that the issue should be in the configuration of the architecture input/output channels but I'm not too certain...
Anything I am missing here?
Thanks!

I actually missed the implementation of prepare_z_y in util/util.py, it works well. Thanks for the great work!

@fabioperez
I have modified your demo code like this:
from PIL import Image
import torch
import numpy as np
from options.test_options import TestOptions
from models.BigGAN_networks import Generator
from util.util import *

def load_model():
    opt = TestOptions().parse()  # get test options
    opt.n_classes = 80
    gen = Generator(**vars(opt))

    state_dict = torch.load('./pre-trained/latest_net_G.pth')
    if hasattr(state_dict, '_metadata'):
        del state_dict._metadata
    gen.load_state_dict(state_dict)
    gen.cuda()
    gen.eval()
    return gen

model = load_model()

alphabets_english = 'Only thewigsofrcvdampbkuq.A-210xT5\'MDL,RYHJ"ISPWENj&BC93VGFKz();#:!7U64Q8?+*ZX/%'
char_to_int = dict()
for ind, c in enumerate(alphabets_english):
    char_to_int[c] = ind

def get_word(word):
    encoded = [char_to_int[char] for char in word]
    words = torch.zeros((1, len(encoded), 80), dtype=torch.int32)
    for i, code in enumerate(encoded):
        words[0, i, code] = 1
    return words

def generate_image(word):
    seed = np.random.randint(0, 10e4)
    words = get_word(word)
    z, _ = prepare_z_y(1, 128, 80, device=torch.device('cuda'), seed=seed)
    res = model.forward(z=z, y=words.to(torch.device('cuda'))).cpu()
    res = res.detach().numpy()[0, 0] * 255
    im = Image.fromarray(res).convert('RGB')
    return im

import time
for i in range(10):
    t0 = time.time()
    img = generate_image('abcdefg12345')
    img.save('/data/{}.png'.format(i))
    t1 = time.time()
    print(t1-t0)

But my result got some problems:

The input words contain number 0-9, but synthesis image show wrong char. And some char even can not show in the image, such as ","  "." ;
Synthesis image is not clean, there are shadows near some letters;

Do you meet these problems? How can I solve these?

@fabioperez
I have modified your demo code like this:
from PIL import Image
import torch
import numpy as np
from options.test_options import TestOptions
from models.BigGAN_networks import Generator
from util.util import *

def load_model():
    opt = TestOptions().parse()  # get test options
    opt.n_classes = 80
    gen = Generator(**vars(opt))

    state_dict = torch.load('./pre-trained/latest_net_G.pth')
    if hasattr(state_dict, '_metadata'):
        del state_dict._metadata
    gen.load_state_dict(state_dict)
    gen.cuda()
    gen.eval()
    return gen

model = load_model()

alphabets_english = 'Only thewigsofrcvdampbkuq.A-210xT5\'MDL,RYHJ"ISPWENj&BC93VGFKz();#:!7U64Q8?+*ZX/%'
char_to_int = dict()
for ind, c in enumerate(alphabets_english):
    char_to_int[c] = ind

def get_word(word):
    encoded = [char_to_int[char] for char in word]
    words = torch.zeros((1, len(encoded), 80), dtype=torch.int32)
    for i, code in enumerate(encoded):
        words[0, i, code] = 1
    return words

def generate_image(word):
    seed = np.random.randint(0, 10e4)
    words = get_word(word)
    z, _ = prepare_z_y(1, 128, 80, device=torch.device('cuda'), seed=seed)
    res = model.forward(z=z, y=words.to(torch.device('cuda'))).cpu()
    res = res.detach().numpy()[0, 0] * 255
    im = Image.fromarray(res).convert('RGB')
    return im

import time
for i in range(10):
    t0 = time.time()
    img = generate_image('abcdefg12345')
    img.save('/data/{}.png'.format(i))
    t1 = time.time()
    print(t1-t0)

But my result got some problems:

The input words contain number 0-9, but synthesis image show wrong char. And some char even can not show in the image, such as ","  "." ;
Synthesis image is not clean, there are shadows near some letters;

Do you meet these problems? How can I solve these?

Our method indeed has a problem generating characters which appear only a few times in the dataset (e.g numbers in the IAM dataset), therefore the results are not surprising, maybe if you use a dataset with more numbers at least for the recognizer training the results would improve. The shadow is actually an artifact that can also be found in the original IAM dataset, so the network learns to mimic the appearance of the data and also contains this character background.

Our method indeed has a problem generating characters which appear only a few times in the dataset (e.g numbers in the IAM dataset), therefore the results are not surprising, maybe if you use a dataset with more numbers at least for the recognizer training the results would improve. The shadow is actually an artifact that can also be found in the original IAM dataset, so the network learns to mimic the appearance of the data and also contains this character background.


Run ClimaAtmos on Google Cloud

The Climate Modeling Alliance
Software Design Issue 📜
Purpose
Setup an automated build system to deploy ClimaAtmos.jl on the google cloud.
Cost/Benefits/Risks
Benefits:

The approach can be generalized to other cloud services and supercomputers.
Provides access to nodes having up to (16) GPUs for benchmarking scaling performance.

People and Personnel

Lead: @sriharshakandala , @charleskawczynski
Collaborators:
Reviewers: -->

Components

Setup an automated build system for running ClimaAtmos on Google Cloud
Benchmark scaling performance on up to (16) GPUs on a single node

Inputs

Results and Deliverables

Task Breakdown And Schedule

SDI Revision Log

CC
@tapios @simonbyrne @cmbengue
### Tasks
- [ ] Install/configure SLURM for single node and multi-node GCP configurations
- [ ] Install Spack
- [ ] Add curated documentation to ClimaDocs

Would it be possible to have more details on this SDI?
I am interested in potential sinergies to improve the resiliance of our CI infrastructure

Leaving this question for when time comes:
How are you planning on handling larger input files (as the ones in ClimaArtifacts)?


Insecure default connection to hologram server?

From here: https://github.com/AdRoll/hologram/blob/master/transport/remote/client.go#L37-L42
	tlsConf := &tls.Config{
		RootCAs: pool,
		// Hologram only uses TLS to ensure the credentials that go across the wire are kept secret, and since go uses
		// ECDHE by default, we actually don't care about leaking keys or authenticating either end of the connection.
		InsecureSkipVerify: true,
	}

Is that a reasonable assumption? Does it allow MITM-ing the hologram server connection?

Anyone?

Good catch. I don't think is a reasonable assumption. The reason being that if we aren't authenticating the connection, then we could be doing ECDHE with a MITM which would mean a MITM could acquire the credentials that are sent.

That's what I thought. Here's what would make me happy: the server optionally listens with no SSL. I already run this thing behind an AWS ELB, and could just terminate SSL at the ELB and use a managed certificate on that side. The client should check certificates by default.


[CLOUDSTACK-9337]Enhance vcenter.py to create data center in vcenter server automatically

These changes have been made to support vmware deployments in CI.
For CI to create cloudstack setup with vmware, it is required to create datacenter, cluster and hosts in vcenter server before adding in cloudstack. Added few methods in vcenter.py to perform these tasks.
Please refer to CLOUDSTACK-9337 for more details.

Did a code walk through . LGTM .
Get the CI result for this PR

I don't have the ability to test vcenter.  Is there anyone else who has the ability to test vcenter who can post the test results of a CI run?

These changes will not have any impact on cloudstack code since it is purely to orchestrate the vcenter Server to create datacenter->cluster->hosts. Can we merge this without waiting for CI to run?

@shwetaag @swill As I understand from @sanju1010 comment, the script is used to automate creation of dc, cluster and hosts in vCenter. The setup created can then be used to run Cloudstack tests for VMware. I don't see the need to run CI on this.

I am fine with not running CI on this one.  It would be nice if someone could post a screenshot or something to show that the code behaves as expected.
We are missing 1 LGTM, otherwise I think we are in pretty good shape.

@sanju1010 how can we test this
tag:vmware-pickup

anyone able to pick this up for validation and giving me a final code review???

This one is pretty much ready, but without verification that it works and without the required code reviews I can't really justify merging it.  I just don't know if works and does not break anything...  Not sure what to do with this one...  4.9 freeze is VERY close right now, so time is of the essence...

@sanju1010 I don't know what to do with this one.  I don't have any verification that this PR works, so I am not sure what information I am supposed to be going on to be confident in merging it.

ACS CI BVT Run
Sumarry:
Build Number 165
Hypervisor xenserver
NetworkType Advanced
Passed=73
Failed=0
Skipped=3
Link to logs Folder (search by build_no): https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0
Failed tests:
Skipped tests:
test_vm_nic_adapter_vmxnet3
test_static_role_account_acls
test_deploy_vgpu_enabled_vm
Passed test suits:
test_deploy_vm_with_userdata.py
test_affinity_groups_projects.py
test_portable_publicip.py
test_vpc_vpn.py
test_over_provisioning.py
test_global_settings.py
test_scale_vm.py
test_service_offerings.py
test_routers_iptables_default_policy.py
test_routers.py
test_reset_vm_on_reboot.py
test_snapshots.py
test_deploy_vms_with_varied_deploymentplanners.py
test_login.py
test_list_ids_parameter.py
test_public_ip_range.py
test_multipleips_per_nic.py
test_regions.py
test_affinity_groups.py
test_network_acl.py
test_pvlan.py
test_volumes.py
test_nic.py
test_deploy_vm_root_resize.py
test_resource_detail.py
test_secondary_storage.py
test_vm_life_cycle.py
test_disk_offerings.py

@swill , BVT results are clean. Can we push this to master? This will not have any impact on acs master stablity.

Master is frozen in prep for the 4.9 release. This will have to wait for 4.10.

👍 merging this now.


ERROR: no conn, hlsvp or url_encoded_fmt_stream_map information found in video info;

youtube-dl --verbose https://www.youtube.com/watch?v=KPRzL5--CCI
[debug] System config: []
[debug] User config: []
[debug] Command-line args: [u'--verbose', u'https://www.youtube.com/watch?v=KPRzL5--CCI']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2015.09.28
[debug] Python version 2.7.9 - Linux-3.4.104-bananian-armv7l-with-debian-8.2
[debug] exe versions: avconv 11.4-6, avprobe 11.4-6, rtmpdump 2.4
[debug] Proxy map: {'all': 'http://proxy.collective-b.org.uk:8118', 'http': 'http://proxy.collective-b.org.uk:8118', 'https': 'http://proxy.collective-b.org.uk:8118', 'no': 'localhost,collective-b.org.uk,.collective-b.org.uk'}
[youtube] KPRzL5--CCI: Downloading webpage
[youtube] KPRzL5--CCI: Downloading video info webpage
[youtube] KPRzL5--CCI: Extracting video information
ERROR: no conn, hlsvp or url_encoded_fmt_stream_map information found in video info; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Traceback (most recent call last):
File "./.youtube-dl/youtube_dl/YoutubeDL.py", line 660, in extract_info
ie_result = ie.extract(url)
File "./.youtube-dl/youtube_dl/extractor/common.py", line 288, in extract
return self._real_extract(url)
File "./.youtube-dl/youtube_dl/extractor/youtube.py", line 1352, in _real_extract
raise ExtractorError('no conn, hlsvp or url_encoded_fmt_stream_map information found in video info')
ExtractorError: no conn, hlsvp or url_encoded_fmt_stream_map information found in video info; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.
Hope that helps...

I see its a webinar from the future ?!
Closed. Sorry.


Adding regions to Colombia locations

Second part of feature focused on import of location data. This one is about Colombia regions (mosaics) ;)
I have added new model LocationMember which allows to have have_many relation between other locations (regions). Reason for this is that administrative location (state, municipality, etc.) can be at multiple geographic locations (regions). Locations importer now supports import of regions and also assigns these regions to correct municipalities.
About regions data -- I have used shapefile provided via Jira ticket to get regions and downloaded coordinates for every municipality from wikipedia. Then I have computed intersections and decided which municipalities are at which regions. Unfortunately, this approach is super inaccurate, because whole municipality is represented just by one point and even though point itself is not at region, part of the municipality still can be. Unfortunately, I don't have exact geometry for every municipality so this is as far as I can go with wikipedia data.

Testing instructions
Same as first iteration of location import feature. Run rake db:seed and check that LocationMember table contains data ;)
Tracking
https://vizzuality.atlassian.net/browse/LET-130

Okay, I have used data from https://docs.google.com/spreadsheets/d/1QKYxL7nuZXJJ9Q2MJD_MN31s0ObllK8b/edit?usp=sharing&ouid=118214021291914641487&rtpof=true&sd=true for departments and municipalities, which has some pros and cons at this point:

departments and municipalities from trusted source, no wiki data ;)
we had at least one coordinate from wiki per every municipality which is no more true --> till we got proper geometry for every municipality from that list, we cannot really import location members (intersections between regions and municipalities).

Whatever, Importer changes which are part of this MR are still valid and can be merged to dev. After we will have correct geometries, we can finish import of location_members.