[LiveComponent] Incorrect handling of nullable enum types

I created a component with 2 writeable live props, both nullable and with a BackedEnumType.
When I changed a value a sync is happen as expected, but this will result in an error when one of the fields are empty
With request payload {"data":1,"newPriority":null,"newStatus":"new","_checksum":"***"} the following error occured
The data is neither an integer nor a string, you should pass an integer or a string that can be parsed as an enumeration case of type App\Enum\Priority.
And with request payload {"data":1,"newPriority":"high","newStatus":"","_checksum":"***"} the following error occured
"" is not a valid backing value for enum "App\Enum\Priority"
It think this is caused by the fact that the hydrator always try to denormalize and that empty strings are not converted to null values.
https://github.com/symfony/ux/blob/ebe425c03d03643ab76080ee2860e019443b4d6e/src/LiveComponent/src/LiveComponentHydrator.php#L170-L175
A suggestion for the fix
            if ($method = $liveProp->hydrateMethod()) {
                // TODO: Error checking
                $value = $component->$method($dehydratedValue);
            } elseif ($property->getType() instanceof \ReflectionNamedType && !$property->getType()->isBuiltin()) {
                if ($value === '' && $property->getType()->allowsNull() === true) {
                    // value is given as empty string, the property type is not a string (isBuiltin-method)
                    // so we can assume that value is meant to be empty
                    $value = null;
                }
                if ($value !== null || $property->getType()->allowsNull() === false) {
                    // if value is null but the property does not allow null run denormalization too
                    $value = $this->normalizer->denormalize($value, $property->getType()->getName(), 'json', [self::LIVE_CONTEXT => true]);
                }
            }

Component
<?php

declare(strict_types=1);

namespace App\Twig\Component;

use App\Enum\Priority;
use App\Enum\Status;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\UX\LiveComponent\Attribute\AsLiveComponent;
use Symfony\UX\LiveComponent\Attribute\LiveAction;
use Symfony\UX\LiveComponent\Attribute\LiveProp;

#[AsLiveComponent('prio', template: 'component/status.html.twig')]
class StatusComponent extends AbstractController
{
    #[LiveProp(writable: true)]
    public ?Priority $newPriority = null;

    #[LiveProp(writable: true)]
    public ?Status $newStatus = null;

    public function __invoke(): void
    {
    }
}

Template
    <div {{ attributes }}>
        Status: <input type="text" data-model="newStatus" value="{{ this.newStatus.value|default('') }}">
        Prio: <input type="text" data-model="newPriority" value="{{ this.newPriority.value|default('') }}">
        <br>
        {{ this.newStatus.value|default('') }} / {{ this.newPriority.value|default('') }}
    </div>

Thanks for the report @maartendekeizer, #416 should fix this.

@kbond Tried #416, it works for the situation where the payload value is null, but when a empty string is submitted I still got an error Expected argument of type "?App\Enum\MyEnum", "string" given at property path "myField".
I think an empty string is submitted when the user touched the input/select but did cleared the value afterwards.

Got it, I'll adjust my PR to account for this.

it works for the situation where the payload value is null, but when a empty string is submitted I still got an error

#416 should now account for this. @maartendekeizer, can you confirm?

@kbond yes, thanks a lot!


2016-06-11 Summer of Hacks #1: NodeSchool

NodeSchool is a collection of workshops that help you learn JavaScript by writing code and solving challenges.
Who is this event for?
Everyone!

I've never programmed JavaScript. The workshops start from scratch, no programming experience required. We have some helpful volunteers to help you throughout the day.
I know some JavaScript. Excellent, you're in the right place too. There are some more advanced themes to work through.
I know all of that!. Even better! NodeSchool is an open source project, so we can build up some new materials. We've got some ideas, or come along with your own.

What does the day look like?

09:30 Arrive, drink coffee and eat pastries
10:00 We'll get started
13:00 Lunch!
17:00 Finish up and head to bar/cafe for post-event celebrations

When we get set up you'll have the chance to pair up with another attendee or embark on a workshop on your own. We'll have mentors on-hand to help if you get stuck or give you suggestions on workshops you might like.
Food
We'll be providing pastries from a local patisserie, and a burrito lunch. You'll get to build your own burrito/box. We'll also have a selection of fruits and snacks, teas and coffees.
If you have any concerns about dietary requirements (or any questions whatsoever) get in touch.
What isn't this event?
This isn't a competition, race or hackathon. There will be no prizes, other than basking in your own glory as you learn new things, meet new people, and have a good time.
I have a question
Great! You can reach out to any of the JSOxford organisers:

Ryan Brooks,<PHONE_NUMBER>4
Ben Foxall
Pete West

What will I need?
You'll need a laptop and charger (or a swanky laptop that'll last the day). If you don't have access to a laptop (or a friend you can drag along with one), let us know and we'll do our best to sort you out.
You’ll need Node.js on your computer to get started, and if you have a chance to install it before the event you'll be able to get started straight away.
Date
Saturday 11th June 2016, 10:00 to 17:00
Organisation

[x] Book venue
[ ] Invoice sponsors
[x] Add to Meetup.com
[x] Add to SummerOfHacks.io
[x] Book pastries
[x] Purchase snacks/drinks (see #204)

On the day

[x] Take a group photo
[x] Record a very short video summary of the day

This event is part of the Summer of Hacks 2016 (#204).

This totally happened. We had 12 attendees and 4 mentors.
This event was supported by Mission Burrito and Starbucks, who made a huge difference to our catering.
We've got a retro issue in #222 to collect feedback. Bring on the next one!


Submodules for service-specifc types

Moved all of the types associated with a service into a submodule with the service name (e.g. SQS.Message) & added support for map types.

Hey @aldrinleal, I'm not sure if you want to review these PR's or not.  If not, I'll keep opening them as a record and merge them immediately after.
Cheers!
Eric


Getting Error: Cannot read property 'resize' of undefined

Steps to reproduce:

Install package
Add settings.json in ./extensions/upload/config/
Restart server
Upload jpg using media component

Current behavior:
Hangs on upload and says "UnhandledPromiseRejectionWarning: TypeError: Cannot read property 'resize' of undefined" on server
Expected behavior:
Upload asset to digital ocean space
Here is my settings.json file
{
"provider": "aws-s3-sharp-resize",
"provdiderOptions": {
"accessKeyId": "${process.env.ACCESS_KEY_ID}",
"secretAccessKey": "${process.env.SECRET_ACCESS_KEY}",
"endpoint": "sfo2.digitaloceanspaces.com",
"optimize": {
"resize": true,
"width": 1000,
"height": 1000
},
"settings": {
"awsUploadFolder": "img_uploads"
},
"params": {
"Bucket": "suburbancdn"
}
}
}

Justed moved it to ./config/plugin.js and exported as function returning the object...works now. sorry!


Add resolution for jsprim to address json-schema vulnerability.

Addresses https://github.com/coda/packs-sdk/security/dependabot/yarn.lock/json-schema/open
PTAL @alan-codaio @coda/packs

@alan-codaio Friendly ping on this one, same issue, different repo.


Updated SA1015 analyzer to handle generic attributes (c# 11 preview)

Fixes #3487

On hold until the c# 11 test project is on master

@bjornhellander I believe this can be rebased now to simplify the review


Staging next

Motivation for this change
Things done

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

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nix-review --run "nix-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Assured whether relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

@GrahamcOfBorg build pkgsCross.armv7l-hf-multiplatform.linux

Please, include https://github.com/NixOS/nixpkgs/compare/staging...volth:patch-328 to fix https://github.com/NixOS/nixpkgs/pull/60169/checks?check_run_id=110135147

And https://github.com/NixOS/nixpkgs/pull/60171

@volth Cherry picked those. For future reference those usually these cross build things can go directly to master.

@matthewbauer the wasm change broke the tarball job due to a failing test https://hydra.nixos.org/build/92604062

@matthewbauer and https://github.com/NixOS/nixpkgs/pull/60238 please.
Or remove perlPackages.HTTPDaemon: 6.01 -> 6.04, there is a regression


Is it possible to debug the programes on 24G GPU?

Hello,
I want to debug the training process on 24G GPU then train it on larger GPUs, is it possible to do that?
I try to set the target_height and width to 64:
data:
  target: vwm.data.dataset.Sampler
  params:
    batch_size: 1
    num_workers: 16
    subsets:
      - NuScenes
    probs:
      - 1
    samples_per_epoch: 16000
    target_height: 64
    target_width: 64
    num_frames: *num_frames

But it still run OOM,
Thanks in advance for your help!

Hello! @JunyuanDeng Do you solved this problem?


Idea to setUp model definitions as standalone class

Thanks for good plugin, but It`s seems not good idea to add definitions for tests directly in model, my suggestion - add support for  standalone definition classes;
1.
   $fm = new FactoryMuffin();
   $fm->loadModelDefinitions([
                  Message::class=>MessageMuffinFactory::class,
                  User::class=>UserMuffinFactoryr::class
]);

in FactoryMuffin override loadModelDefinitions as

/**
     * Go into each model and add its implementation of definitions() into FactoryMuffin
     * @param  array $models ex: [
     * Model1::className()=>Factory::className(), Model2::className()=>Factory2::className() ]
     * @return void
     */
    public function loadModelDefinitions($models)
    {
        // load model definitions
        if (empty($models) || !is_array($models)) {
            throw new ModelNotFoundException(self::class, 'Models should be passed as an array of class names!');
        }
        foreach ($models as $modelClass=>$factory) {
            /** @var FactoryInterface $factory */
            if (!in_array(FactoryInterface ::class, class_implements($factory))) {
               //throw Exception
            }
            $definitions = (new $factory)->definition();
           $fmModel = $this->define($modelClass);
            if (!empty($definitions[0]) and is_array($definitions[0])) {
                $fmModel->setDefinitions($definitions[0]);
                if (!empty($definitions[1])) {
                    $fmModel->setCallback($definitions[1]);
                }
            }
        }
    }

Advantage

Models are free from redundant data for the test,
We can use different behaviors for different cases  for one model and attach it directly in needed tests

A behavior sounds like a good idea. Submit a PR and let's review it together


org.eclipse.jgit.errors.RepositoryNotFoundException: repository not found:

[main] INFO VanillaBuildMain - Checking for updates to existing SpongeVanilla repository.
org.eclipse.jgit.errors.RepositoryNotFoundException: repository not found: C:\Users\Ryan\Desktop\SpongeServer\SpongeVanilla
at org.eclipse.jgit.lib.BaseRepositoryBuilder.build(BaseRepositoryBuilder.java:579)
at org.eclipse.jgit.api.Git.open(Git.java:116)
at org.eclipse.jgit.api.Git.open(Git.java:99)
at VanillaBuildMain.updateRepo(VanillaBuildMain.java:95)
at VanillaBuildMain.main(VanillaBuildMain.java:54)
[main] ERROR VanillaBuildMain - An error occurred while updating the repository. Exiting.
After attempting to run VanillaBuild. Is there a dependency / pre-requisite? if so It would be nice if this could be documented somewhere.

Worked it out. Had a empty folder named SpongeVanilla in the same folder as VanillaBuild that I was going to launch the build from once VB built it. Didn't realize it was clashing with names.

Glad you filed an issue, I'm going to try and make it report issues to pastebin so I can easily get the logs.


ignore touch events when div is over map canvas

I have a scrollable div on top of the map. It starts at the bottom and can be dragged by the  user all the way to the top. When the div overlays the map element though all the touch events are first grabbed by the map. Is there a way to stop that?
I think that has to do with how the map is integrated in the DOM or rather underneath it.
Any suggestions?

The v1 watches only under the map div.
So your case does not work.
The v2 watches all html elements, so your case should work (but I haven't tested the case yet)

Thanks, I'll try v2 then and report back here.

@wf9a5m75  Ok, #multiple_maps branch (that is the supposed v2?) lets me scroll the list but there is no map visible anymore. I just replaced the plugin and did not touch the rest of the code. It does seem the plugin is making some things in the app transparent though. I can see the webviews background color (set in config.xml). I am using the newest crosswalk 21.

The v2 does not work with crosswalk currently.

aha. Whats the problem with it?

I haven't figured out yet.
But the crosswalk blocks the v2 plugin for some reason.

@wf9a5m75 I have tried v2 now without crosswalk and the list can be scrolled now over the map but that is only possible cause the map itself can no longer be scrolled. Same setup works for v1.

Please report with any example always.

Difficult to extract from the app code. I'll try to setup a sample.
Any known issues with z-index?

hello, i have the same problem, but I do not know how it works.
You could help me.

https://github.com/mapsplugin/cordova-plugin-googlemaps/issues/1215#issuecomment-265535049

I'm having an issue with V2 that is similar.
None of the touch/click events are working on the app. I've tried map.setClickable(true) and nothing happens. I've had weird instances when navigating to another page and back again that the map starts to respond to touch events.

I have the same issue,
Got the map working on ionic v2, with the native plugin, everything ok.
I want it to have a FAB so you can change stuff on the map. It doesn't work, the fab dost respond.
Try using a ion-select and the popup appears, but it doesn't respond to touches.
`

Distancia

1 KM
2 KM

`

I am having the same issue as @jstoup111 where on some occasions, maps with no visible DOM elements overlayed on them will not respond to any touch events. This happens intermittently. On some maps in our app, it occurs, but then on other occasions does not on the same map under the same circumstances.

Update: I seem to have fixed this issue for me, by always ensuring that I have called remove() on any other maps before attempting to display a new map.

@thyde1 Are you using v1 or v2? I'm still running into issues so any help would be appreciated. Since the map doesn't register any touch events (I have a scroll div on top).
Any chance you could share some code snippets of HTML and javascript of what you're doing? I'd really like to use the plugin, but if I can't get basic things working like touch events on the map, I have to use the javascript library instead (which I'd like not to do for performance reasons.)

@jstoup111 I'm using v2. I since found that the problem is associated with how the plugin determines the stacking order of DOM elements. In particular the getDomDepth function in Common.js, which assigns a number to each DOM element to determine the order in which they stack. You can look at the _result attributes that have been applied to your DOM elements, the higher this value, the plugin will treat them as being further forward.
Here, I changed line 297 from var result = idx * 1000 + parseInt(zIndex, 10) + depth; to var result = depth * 100000 + parseInt(zIndex, 10) * 1000 + idx;, which still does not represent how a browser determines the stacking order, but it works in my application.

Also, I am using Ionic, which dynamically updates the z-index of DOM elements. It appears that the plugin caches the 'depth' of DOM elements, and so when their z-indexes are updated, the plugin does not take this into account,

@thyde1 Thanks for the super thorough response. I'm also using Ionic (v2) so the cached z-index explains why it wasn't working on previous loads. Still doesn't really explain why it wasn't working on first initial load unless getDomDepth was calculating incorrectly.
I'm going to use the js version until this is fixed, but I'm really looking forward to using it once the plugin is released!

Why was this closed?

Noboday talked for a whIle.

Really? You cannot give any insights into this weird behaviour at all? Re-orderings seems to be really a problem. I'd like to understand why all this fiddling with z-index is even needed. Is it because of the way the plugin injects the map into a div (behind the webview)?

Issues where the map does not respond to touch (on iOS) can also be caused when maps are displayed where maps which have since been removed were. I have a fix for this in #1269

I said please provide any example. Noone provide the example. How can I help you?
If you provide any example that reproduce the issue, I reopen the this issue here.
By the way, you don't need to use the plugin mandatory if you think this plugin is buggy.

Here is a workaround that makes the map not clickable while an alert is open using
this.map.setClickable(false);
https://stackoverflow.com/questions/45500031/ionic-3-unable-to-click-on-alert-dialog-shown-above-google-maps


Firewall CSF - Firewall Profiles

Hi,
They is a small issue to the Firewall Profiles section into Firewall CSF.
The select input of Restore Backup and Compare Configurationes are to small.
Will be better to put the height to 200 or 250px.

Alright, will fix it in version 16! ;)

Ok, thank you.


Touch release event doesn't occur in _gui_event() when index >0.

Godot version:
3.1 beta4
OS/device including version:

ASUS ZenFone 4 Selfie
Android7.1.1
Issue description:
On android device, _gui_input() is not called when a
finger is released which does not touch firstly.
Related issue: https://github.com/godotengine/godot/issues/16761
Steps to reproduce:
Open the sample project and run on an android device with remote debug mode. Touch by fingers, then _gui_input() is not called by releasing fingers when touch index is greater than 0.
Minimal reproduction project:

test_touch.zip

CC @RandomShaper @lethiandev

I encountered this as well (https://github.com/godotengine/godot/issues/16761), also i tried to "fix" this issue by implementing a multitouch focus handling on _gui_input events (https://github.com/godotengine/godot/pull/23232) but it shown up that it's intended to work only with the first touch tho, imitating single point device.
It appears that you should work with _input event handler directly or TouchScreenButton node for multitouch support.

@lethiandev is right. GUI input is designed for a single pointer. Multitouch input is converted to mouse/single-pointer input by keeping track of the touch point that initiates the gesture.
Therefore, that's expected behavior.

This should be reopened. On Linux x11, touch indices are global and shared between all applications and are only ever incremented, therefore every touch index will be above zero after the very first time you touch your screen after you turn your computer on.
For reference, my touch indices are currently sitting at around 5000. They will not lower unless I reboot, and even then I'll only get the correct behavior once.

Touch-to-mouse emulation tracks which touch index started the gesture and considers the virtual mouse button has been unpressed when that touch index number is released. As long as that is true, the reported behavior is not a bug.
The touch handling code does not make assumptions about touch indices like they being reused so they are always zero-based.


Memory Leak Problem in c_api: MXAPIThreadLocalEntry *ret = MXAPIThreadLocalStore::Get()

@piiswrong @tqchen
I noticed that the memory will leak when I use c_api functions.
the reason is the MXAPIThreadLocalEntry *ret = MXAPIThreadLocalStore::Get(). It will create a static class object MXAPIThreadLocalStore for every c_api functions who call it.
obviously, static object only be released when the program is exited.
this is a big BUG!! Am I right?
I wrote a simulation to check it:
#include <vector>
#include <iostream>
using namespace std;

class Hello
{
public:
  Hello(){cout << "create!\n";}
  ~Hello(){cout << "destroyed!\n";}
public:
  static int *Get()
  {
    static Hello obj;
    int *p = new int[10];
    obj.data_.push_back(p);
    cout << "data size:" << obj.data_.size() << endl;
    return p;
  }

private:
  vector<int*> data_;
};

main()
{
  for (int i = 0; i < 100; i++)
  {
    int *p = Hello::Get();
  }
}

the out put is:
create!
data size:1
data size:2
data size:3
data size:4
data size:5
data size:6
data size:7
data size:8
data size:9
data size:10
data size:11
data size:12
data size:13
data size:14
data size:15
data size:16
data size:17
data size:18
data size:19
data size:20
data size:21
data size:22
data size:23
data size:24
data size:25
data size:26
data size:27
data size:28
data size:29
......

the upper result verifies my opinion.

static variable is initialized once, the content of static function will be executed multiple times, as you can see from your program, Hello is only created once despite so many calls. There is no code(such as new or delete as you did) in the static function

oh.... yes, I should see the static ptr.
  static T* Get() {
    static MX_TREAD_LOCAL T* ptr = nullptr;
    if (ptr == nullptr) {
      ptr = new T();
      Singleton()->RegisterDelete(ptr);
    }
    return ptr;
  }


support spaces in path names

Add support for spaces in paths.  exec output should be escaped or quoted.
exec: helm secrets dec /path/has space/helm/secrets.yaml
/path/has space/helm/secrets.yaml doesn't have secrets.yaml file.
exec: helm diff upgrade --allow-unreleased chart stable/chart --values /path/has space/helm/values.yaml --values /path/has space/helm/secrets.yaml.dec```

Could not reproduce this issue at current version of helmfile. Looks like this bug was automatically fixed with introduction of values.yaml rendering functionality (#216). Could be closed IMO


Drop pop plot

Fixes #152 #144 in the short term by removing the pop plot.
I've added an issue to track reinstating this using on-the-fly calcs at https://github.com/tskit-dev/tsbrowse/issues/239

Pull Request Test Coverage Report for Build<PHONE_NUMBER>9
Details

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+0.3%) to 89.251%

Files with Coverage Reduction
New Missed Lines
%

tsbrowse/plot_helpers.py
1
94.0%

Totals

Change from base Build<PHONE_NUMBER>4:
0.3%

Covered Lines:
739

Relevant Lines:
828

💛  - Coveralls


bug: some node test generation scripts in nodegen/node still import make_node from helpers module

Bug Report
Orion version: 0.1.7

Current behavior: test generator script throws an import error.

Expected behavior: The related scripts should be refactored. because currently there's no make_node function in the helpers module. best alternative is to use make_test to do the job.

Steps to reproduce: For example run scarb run nodegen array_feature_extractors and you'll see the import error.

Related code: orion/nodegen/node/array_feature_extractor.py

import numpy as np
from nodegen.node import RunAll
from ..helpers import make_node, make_test, to_fp, Tensor, Dtype, FixedImpl

Other information: @TsBauer since you have removed it, you have better idea how it works.

I'm working on it to fix it.

fixed it and I'll close it now.


Update core API docs: Adapter and Model

What does this PR do?
Update the inline docs for adapter and model.

Thanks looks good. Two very minor comments

Thanks, applied your suggestions


Make test passing

:tada: This issue has been resolved in version 2.0.0 :tada:
The release is available on:

npm package (@latest dist-tag)
Visual Studio Marketplace
GitHub release

Your semantic-release bot :package::rocket:


Attach to existing interactive process

Hi
I like the new option of having multiple interactives in VS-2017. However, I notice that there are orphan python processes running even after I close the interactive window (without resetting).
Specifically, if I look at task manager, here is what I see:

When I open a new interactive window, two python processes get created.
When I reset the interactive window, both processes get terminated.
If I close/hide the interactive window without resetting, the two processes remain.

Some extensions (like Layout-O-Rama) often result in my interactive window being orphaned when I reset my window layout. I like that my work isn't lost if I accidentally hide/close an interactive, but I would like to be able to reattach them or jump to them (using the Environment drop down, perhaps).
Is there currently a way to get back to a previously hidden/closed interactive process (which is still running in the background)?
Thank you

When you click close 'x' button, we stop the process.
When you hide the window (click the window position 'v' then select hide, or change the layout in some other way that hides the window), we don't stop the process.
It appears to be an oversight that we don't have the ability the show hidden interactive windows.

Hi
In that case, I seem to have stumbled in to some strange behavior - if I click the close button (X on the top right) of the interactive window, the task manager shows that the python process is still in status 'Running' (same process ID as the one returned by os.getpid() in the interactive, as well as the 'supporting' python process), even after several minutes.
I'm using VS Community 2017 (Version 15.2, 26430.4 Release), if that helps.
Thank you

Sorry, I didn't realize that the new behavior of stopping the process when you click close is new to Version 15.3


Replace the :_content-type: variable with the :_mod-docs-content-type: variable

Fixes https://github.com/redhat-documentation/vale-at-red-hat/issues/679

This looks good @rolfedh but as mentioned on Slack, we should wait until OCP moves to the new variable naming convention. I believe that will happen in the next few weeks.

@kalexand-rh would you review and approve, too?

We won't merge this PR until we get the go-ahead to do so from @kalexand-rh.

This looks good to me! I've updated the maintained OCP branches here, so this change should be good to incorporate.


Fix documentation link formatting in README_cn

This PR fixes the formatting of documentation and source code links in the README.
Current issue:
The links are enclosed in backticks, which causes them to be displayed as code instead of clickable links.
Changes made:

Removed backticks surrounding the documentation and source code links
Kept the HTML  tags to maintain the "target="_blank" functionality

Reason for change:
This formatting error affects the usability of the README, as users cannot directly click on the links. The fix improves navigation and overall user experience when viewing the project's GitHub page.
Related files:

README.md

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.


A test error in Ubuntu 18.04: ninja: build stopped: subcommand failed.

Hi, it was very excellent work. I meet some errors when I test the examples on the Ubuntu18.08 or Ubuntu 20.04. In Ubuntu18.04 the torch was 1.6 and the torch version was 1.8 in Ubunbu20.04.  Here is the information in the terminal: Thanks for your attention.
(deep3d_pytorch) heizhima@heizhima-Super-Server:~/PycharmProjects/WXL/Deep3DFaceRecon_pytorch$ python test.py --name=pretrained --epoch=20 --img_folder=./datasets/examples/
/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/kornia/augmentation/augmentation.py:1875: DeprecationWarning: GaussianBlur is no longer maintained and will be removed from the future versions. Please use RandomGaussianBlur instead.
  category=DeprecationWarning,
/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
----------------- Options ---------------
                add_image: True
               bfm_folder: BFM
                bfm_model: BFM_model_front.mat
                 camera_d: 10.0
                   center: 112.0
          checkpoints_dir: ./checkpoints
             dataset_mode: None
                 ddp_port: 12355
        display_per_batch: True
                    epoch: 20                                   [default: latest]
          eval_batch_nums: inf
                    focal: 1015.0
                  gpu_ids: 0
               img_folder: ./datasets/examples/                 [default: examples]
                init_path: checkpoints/init_model/resnet50-0676ba61.pth
                  isTrain: False                                [default: None]
                    model: facerecon
                     name: pretrained                           [default: face_recon]
                net_recon: resnet50
                    phase: test
                   suffix:
                  use_ddp: False                                [default: True]
              use_last_fc: False
                  verbose: False
           vis_batch_nums: 1
               world_size: 1
                    z_far: 15.0
                   z_near: 5.0
----------------- End -------------------
model [FaceReconModel] was created
loading the model from ./checkpoints/pretrained/epoch_20.pth
0 ./datasets/examples/000002.jpg
Traceback (most recent call last):
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1515, in _run_ninja_build
    env=env)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test.py", line 72, in <module>
    main(0, opt,opt.img_folder)
  File "test.py", line 62, in main
    model.test()           # run inference
  File "/home/heizhima/PycharmProjects/WXL/Deep3DFaceRecon_pytorch/models/base_model.py", line 162, in test
    self.forward()
  File "/home/heizhima/PycharmProjects/WXL/Deep3DFaceRecon_pytorch/models/facerecon_model.py", line 139, in forward
    self.pred_vertex, self.facemodel.face_buf, feat=self.pred_color)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/heizhima/PycharmProjects/WXL/Deep3DFaceRecon_pytorch/util/nvdiffrast.py", line 57, in forward
    self.glctx = dr.RasterizeGLContext(device=device)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/ops.py", line 151, in __init__
    self.cpp_wrapper = _get_plugin().RasterizeGLStateWrapper(output_db, mode == 'automatic', cuda_device_idx)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/ops.py", line 84, in _get_plugin
    torch.utils.cpp_extension.load(name=plugin_name, sources=source_paths, extra_cflags=opts, extra_cuda_cflags=opts, extra_ldflags=ldflags, with_cuda=True, verbose=False)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 974, in load
    keep_intermediates=keep_intermediates)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1179, in _jit_compile
    with_cuda=with_cuda)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1279, in _write_ninja_file_and_build_library
    error_prefix="Error building extension '{}'".format(name))
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1529, in _run_ninja_build
    raise RuntimeError(message)
RuntimeError: Error building extension 'nvdiffrast_plugin': [1/4] c++ -MMD -MF torch_rasterize.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/TH -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda-10.2/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DNVDR_TORCH -c /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/torch_rasterize.cpp -o torch_rasterize.o
FAILED: torch_rasterize.o
c++ -MMD -MF torch_rasterize.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/TH -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda-10.2/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DNVDR_TORCH -c /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/torch_rasterize.cpp -o torch_rasterize.o
In file included from /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/../common/rasterize.h:42:0,
                 from /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/torch_rasterize.cpp:12:
/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/../common/glutil.h:36:21: fatal error: EGL/egl.h: No such file or directory
compilation terminated.
[2/4] c++ -MMD -MF rasterize.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/TH -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda-10.2/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DNVDR_TORCH -c /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/rasterize.cpp -o rasterize.o
FAILED: rasterize.o
c++ -MMD -MF rasterize.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/TH -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda-10.2/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DNVDR_TORCH -c /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/rasterize.cpp -o rasterize.o
In file included from /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/rasterize.h:42:0,
                 from /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/rasterize.cpp:9:
/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/glutil.h:36:21: fatal error: EGL/egl.h: No such file or directory
compilation terminated.
[3/4] c++ -MMD -MF glutil.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/TH -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda-10.2/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DNVDR_TORCH -c /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/glutil.cpp -o glutil.o
FAILED: glutil.o
c++ -MMD -MF glutil.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/TH -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda-10.2/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DNVDR_TORCH -c /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/glutil.cpp -o glutil.o
In file included from /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/glutil.cpp:14:0:
/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/glutil.h:36:21: fatal error: EGL/egl.h: No such file or directory
compilation terminated.
ninja: build stopped: subcommand failed.

Hi, some dependencies related to OpenGL are missing. You may refer to #2 for some hint.

Thank. I have tried many ways to solve this problem including you mentioned dependencies and docker environment you set good question. But the problem still remains on my computer. So I am thinking about whether Nvidia 3090 or Pytorch1.8 with CUDA11.2 is not paired with your code. The details are shown below is the last error. Thanks!
(deep3d) heizima@heizima:~/PycharmProjects/WXL/Deep3DFaceRecon_pytorch$ python test.py --name=trained --epoch=20 --img_folder=./datasets/examples
Traceback (most recent call last):
  File "test.py", line 71, in <module>
    opt = TestOptions().parse()  # get test options
  File "/home/heizima/PycharmProjects/WXL/Deep3DFaceRecon_pytorch/options/base_options.py", line 124, in parse
    opt = self.gather_options()
  File "/home/heizima/PycharmProjects/WXL/Deep3DFaceRecon_pytorch/options/base_options.py", line 73, in gather_options
    model_option_setter = models.get_option_setter(model_name)
  File "/home/heizima/PycharmProjects/WXL/Deep3DFaceRecon_pytorch/models/__init__.py", line 50, in get_option_setter
    model_class = find_model_using_name(model_name)
  File "/home/heizima/PycharmProjects/WXL/Deep3DFaceRecon_pytorch/models/__init__.py", line 33, in find_model_using_name
    modellib = importlib.import_module(model_filename)
  File "/home/heizima/anaconda3/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/home/heizima/PycharmProjects/WXL/Deep3DFaceRecon_pytorch/models/facerecon_model.py", line 11, in <module>
    from util.nvdiffrast import MeshRenderer
  File "/home/heizima/PycharmProjects/WXL/Deep3DFaceRecon_pytorch/util/nvdiffrast.py", line 10, in <module>
    import nvdiffrast.torch as dr
ModuleNotFoundError: No module named 'nvdiffrast.torch'

Seems that nvdiffrast cannot find its sub-libraries. Did you correctly install nvdiffrast following the instruction?

My environment is UBUNTU20, the following is my error, excuse me, what is the reason

My environment is UBUNTU20, the following is my error, excuse me, what is the reason

Hi, please first install nvidia CUDA driver, cuda toolkit and cudnn.
Some OpenGL-related libraries are also need. See #2 or #3 for some hints.

I have not solved my issue. But your problem may be Nvidia drive is not installed successfully. So you can check it first.

Thank you for your replies. I have been troubled by the environment these days. I found that VMware cannot install the nvidia CUDA driver, and it also does not work if it is an intel integrated graphics card. Those who need to encounter the same environmental problem can refer to it.

hi, have you solved this problem? I have the same error totally as yours, could you please give me some advice:)

Hi, it was very excellent work. I meet some errors when I test the examples on the Ubuntu18.08 or Ubuntu 20.04. In Ubuntu18.04 the torch was 1.6 and the torch version was 1.8 in Ubunbu20.04. Here is the information in the terminal: Thanks for your attention.
(deep3d_pytorch) heizhima@heizhima-Super-Server:~/PycharmProjects/WXL/Deep3DFaceRecon_pytorch$ python test.py --name=pretrained --epoch=20 --img_folder=./datasets/examples/
/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/kornia/augmentation/augmentation.py:1875: DeprecationWarning: GaussianBlur is no longer maintained and will be removed from the future versions. Please use RandomGaussianBlur instead.
  category=DeprecationWarning,
/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
----------------- Options ---------------
                add_image: True
               bfm_folder: BFM
                bfm_model: BFM_model_front.mat
                 camera_d: 10.0
                   center: 112.0
          checkpoints_dir: ./checkpoints
             dataset_mode: None
                 ddp_port: 12355
        display_per_batch: True
                    epoch: 20                                   [default: latest]
          eval_batch_nums: inf
                    focal: 1015.0
                  gpu_ids: 0
               img_folder: ./datasets/examples/                 [default: examples]
                init_path: checkpoints/init_model/resnet50-0676ba61.pth
                  isTrain: False                                [default: None]
                    model: facerecon
                     name: pretrained                           [default: face_recon]
                net_recon: resnet50
                    phase: test
                   suffix:
                  use_ddp: False                                [default: True]
              use_last_fc: False
                  verbose: False
           vis_batch_nums: 1
               world_size: 1
                    z_far: 15.0
                   z_near: 5.0
----------------- End -------------------
model [FaceReconModel] was created
loading the model from ./checkpoints/pretrained/epoch_20.pth
0 ./datasets/examples/000002.jpg
Traceback (most recent call last):
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1515, in _run_ninja_build
    env=env)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test.py", line 72, in <module>
    main(0, opt,opt.img_folder)
  File "test.py", line 62, in main
    model.test()           # run inference
  File "/home/heizhima/PycharmProjects/WXL/Deep3DFaceRecon_pytorch/models/base_model.py", line 162, in test
    self.forward()
  File "/home/heizhima/PycharmProjects/WXL/Deep3DFaceRecon_pytorch/models/facerecon_model.py", line 139, in forward
    self.pred_vertex, self.facemodel.face_buf, feat=self.pred_color)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/heizhima/PycharmProjects/WXL/Deep3DFaceRecon_pytorch/util/nvdiffrast.py", line 57, in forward
    self.glctx = dr.RasterizeGLContext(device=device)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/ops.py", line 151, in __init__
    self.cpp_wrapper = _get_plugin().RasterizeGLStateWrapper(output_db, mode == 'automatic', cuda_device_idx)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/ops.py", line 84, in _get_plugin
    torch.utils.cpp_extension.load(name=plugin_name, sources=source_paths, extra_cflags=opts, extra_cuda_cflags=opts, extra_ldflags=ldflags, with_cuda=True, verbose=False)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 974, in load
    keep_intermediates=keep_intermediates)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1179, in _jit_compile
    with_cuda=with_cuda)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1279, in _write_ninja_file_and_build_library
    error_prefix="Error building extension '{}'".format(name))
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1529, in _run_ninja_build
    raise RuntimeError(message)
RuntimeError: Error building extension 'nvdiffrast_plugin': [1/4] c++ -MMD -MF torch_rasterize.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/TH -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda-10.2/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DNVDR_TORCH -c /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/torch_rasterize.cpp -o torch_rasterize.o
FAILED: torch_rasterize.o
c++ -MMD -MF torch_rasterize.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/TH -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda-10.2/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DNVDR_TORCH -c /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/torch_rasterize.cpp -o torch_rasterize.o
In file included from /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/../common/rasterize.h:42:0,
                 from /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/torch_rasterize.cpp:12:
/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/../common/glutil.h:36:21: fatal error: EGL/egl.h: No such file or directory
compilation terminated.
[2/4] c++ -MMD -MF rasterize.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/TH -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda-10.2/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DNVDR_TORCH -c /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/rasterize.cpp -o rasterize.o
FAILED: rasterize.o
c++ -MMD -MF rasterize.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/TH -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda-10.2/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DNVDR_TORCH -c /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/rasterize.cpp -o rasterize.o
In file included from /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/rasterize.h:42:0,
                 from /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/rasterize.cpp:9:
/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/glutil.h:36:21: fatal error: EGL/egl.h: No such file or directory
compilation terminated.
[3/4] c++ -MMD -MF glutil.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/TH -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda-10.2/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DNVDR_TORCH -c /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/glutil.cpp -o glutil.o
FAILED: glutil.o
c++ -MMD -MF glutil.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/TH -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda-10.2/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DNVDR_TORCH -c /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/glutil.cpp -o glutil.o
In file included from /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/glutil.cpp:14:0:
/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/glutil.h:36:21: fatal error: EGL/egl.h: No such file or directory
compilation terminated.
ninja: build stopped: subcommand failed.

hi, have you solved this problem? I have the same error totally as yours, could you please give me some help?

hi, have you solved this problem? I have the same error totally as yours, could you please give me some advice:)

hi , did you solve the problem?

Hi. I solved this problem by changing a server. And here is the setup.
+-----------------------------------------------------------------------------+ | NVIDIA-SMI 470.82.01    Driver Version: 470.82.01    CUDA Version: 11.4     | |-------------------------------+----------------------+----------------------+ | GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC | | Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. | |                               |                      |               MIG M. | |===============================+======================+======================| |   0  NVIDIA GeForce ...  Off  | 00000000:65:00.0 Off |                  N/A | | 22%   30C    P8    20W / 250W |      5MiB / 11019MiB |      0%      Default | |                               |                      |                  N/A | +-------------------------------+----------------------+----------------------+ |   1  NVIDIA GeForce ...  Off  | 00000000:B3:00.0 Off |                  N/A | | 22%   27C    P8    18W / 250W |      5MiB / 11019MiB |      0%      Default | |                               |                      |                  N/A | +-------------------------------+----------------------+----------------------+
`
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2020 NVIDIA Corporation
Built on Mon_Nov_30_19:08:53_PST_2020
Cuda compilation tools, release 11.2, V11.2.67
Build cuda_11.2.r11.2/compiler.29373293_0
`

Hi. I solved this problem by changing a server. And here is the setup. +-----------------------------------------------------------------------------+ | NVIDIA-SMI 470.82.01 Driver Version: 470.82.01 CUDA Version: 11.4 | |-------------------------------+----------------------+----------------------+ | GPU Name Persistence-M| Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap| Memory-Usage | GPU-Util Compute M. | | | | MIG M. | |===============================+======================+======================| | 0 NVIDIA GeForce ... Off | 00000000:65:00.0 Off | N/A | | 22% 30C P8 20W / 250W | 5MiB / 11019MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+ | 1 NVIDIA GeForce ... Off | 00000000:B3:00.0 Off | N/A | | 22% 27C P8 18W / 250W | 5MiB / 11019MiB | 0% Default | | | | N/A | +-------------------------------+----------------------+----------------------+  ` nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2020 NVIDIA Corporation Built on Mon_Nov_30_19:08:53_PST_2020 Cuda compilation tools, release 11.2, V11.2.67 Build cuda_11.2.r11.2/compiler.29373293_0
`

what is  the version of pytorch and torchvision?  I also tried to change the server, but there is no such high cuda version of yours

pytorch                   1.6.0           py3.6_cuda10.2.89_cudnn7.6.5_0    pytorch
Hi. I checked my version of PyTorch. It is shown in the above.

I am confused why the PyTorch version does not pair the Cuda but works well in fact as well.

Hi, it was very excellent work. I meet some errors when I test the examples on the Ubuntu18.08 or Ubuntu 20.04. In Ubuntu18.04 the torch was 1.6 and the torch version was 1.8 in Ubunbu20.04. Here is the information in the terminal: Thanks for your attention.
(deep3d_pytorch) heizhima@heizhima-Super-Server:~/PycharmProjects/WXL/Deep3DFaceRecon_pytorch$ python test.py --name=pretrained --epoch=20 --img_folder=./datasets/examples/
/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/kornia/augmentation/augmentation.py:1875: DeprecationWarning: GaussianBlur is no longer maintained and will be removed from the future versions. Please use RandomGaussianBlur instead.
  category=DeprecationWarning,
/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py:4: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses
  import imp
----------------- Options ---------------
                add_image: True
               bfm_folder: BFM
                bfm_model: BFM_model_front.mat
                 camera_d: 10.0
                   center: 112.0
          checkpoints_dir: ./checkpoints
             dataset_mode: None
                 ddp_port: 12355
        display_per_batch: True
                    epoch: 20                                   [default: latest]
          eval_batch_nums: inf
                    focal: 1015.0
                  gpu_ids: 0
               img_folder: ./datasets/examples/                 [default: examples]
                init_path: checkpoints/init_model/resnet50-0676ba61.pth
                  isTrain: False                                [default: None]
                    model: facerecon
                     name: pretrained                           [default: face_recon]
                net_recon: resnet50
                    phase: test
                   suffix:
                  use_ddp: False                                [default: True]
              use_last_fc: False
                  verbose: False
           vis_batch_nums: 1
               world_size: 1
                    z_far: 15.0
                   z_near: 5.0
----------------- End -------------------
model [FaceReconModel] was created
loading the model from ./checkpoints/pretrained/epoch_20.pth
0 ./datasets/examples/000002.jpg
Traceback (most recent call last):
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1515, in _run_ninja_build
    env=env)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/subprocess.py", line 438, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "test.py", line 72, in <module>
    main(0, opt,opt.img_folder)
  File "test.py", line 62, in main
    model.test()           # run inference
  File "/home/heizhima/PycharmProjects/WXL/Deep3DFaceRecon_pytorch/models/base_model.py", line 162, in test
    self.forward()
  File "/home/heizhima/PycharmProjects/WXL/Deep3DFaceRecon_pytorch/models/facerecon_model.py", line 139, in forward
    self.pred_vertex, self.facemodel.face_buf, feat=self.pred_color)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/nn/modules/module.py", line 722, in _call_impl
    result = self.forward(*input, **kwargs)
  File "/home/heizhima/PycharmProjects/WXL/Deep3DFaceRecon_pytorch/util/nvdiffrast.py", line 57, in forward
    self.glctx = dr.RasterizeGLContext(device=device)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/ops.py", line 151, in __init__
    self.cpp_wrapper = _get_plugin().RasterizeGLStateWrapper(output_db, mode == 'automatic', cuda_device_idx)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/ops.py", line 84, in _get_plugin
    torch.utils.cpp_extension.load(name=plugin_name, sources=source_paths, extra_cflags=opts, extra_cuda_cflags=opts, extra_ldflags=ldflags, with_cuda=True, verbose=False)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 974, in load
    keep_intermediates=keep_intermediates)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1179, in _jit_compile
    with_cuda=with_cuda)
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1279, in _write_ninja_file_and_build_library
    error_prefix="Error building extension '{}'".format(name))
  File "/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/utils/cpp_extension.py", line 1529, in _run_ninja_build
    raise RuntimeError(message)
RuntimeError: Error building extension 'nvdiffrast_plugin': [1/4] c++ -MMD -MF torch_rasterize.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/TH -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda-10.2/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DNVDR_TORCH -c /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/torch_rasterize.cpp -o torch_rasterize.o
FAILED: torch_rasterize.o
c++ -MMD -MF torch_rasterize.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/TH -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda-10.2/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DNVDR_TORCH -c /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/torch_rasterize.cpp -o torch_rasterize.o
In file included from /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/../common/rasterize.h:42:0,
                 from /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/torch_rasterize.cpp:12:
/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/torch/../common/glutil.h:36:21: fatal error: EGL/egl.h: No such file or directory
compilation terminated.
[2/4] c++ -MMD -MF rasterize.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/TH -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda-10.2/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DNVDR_TORCH -c /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/rasterize.cpp -o rasterize.o
FAILED: rasterize.o
c++ -MMD -MF rasterize.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/TH -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda-10.2/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DNVDR_TORCH -c /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/rasterize.cpp -o rasterize.o
In file included from /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/rasterize.h:42:0,
                 from /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/rasterize.cpp:9:
/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/glutil.h:36:21: fatal error: EGL/egl.h: No such file or directory
compilation terminated.
[3/4] c++ -MMD -MF glutil.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/TH -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda-10.2/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DNVDR_TORCH -c /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/glutil.cpp -o glutil.o
FAILED: glutil.o
c++ -MMD -MF glutil.o.d -DTORCH_EXTENSION_NAME=nvdiffrast_plugin -DTORCH_API_INCLUDE_EXTENSION_H -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/torch/csrc/api/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/TH -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/torch/include/THC -isystem /usr/local/cuda-10.2/include -isystem /home/heizhima/anaconda3/envs/deep3d_pytorch/include/python3.6m -D_GLIBCXX_USE_CXX11_ABI=0 -fPIC -std=c++14 -DNVDR_TORCH -c /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/glutil.cpp -o glutil.o
In file included from /home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/glutil.cpp:14:0:
/home/heizhima/anaconda3/envs/deep3d_pytorch/lib/python3.6/site-packages/nvdiffrast/common/glutil.h:36:21: fatal error: EGL/egl.h: No such file or directory
compilation terminated.
ninja: build stopped: subcommand failed.

hi, have you solved this problem? I have the same error totally as yours, could you please give me some help?

Please install egl first
apt-get install libegl1-mesa-dev

pytorch 1.6.0 py3.6_cuda10.2.89_cudnn7.6.5_0 pytorch Hi. I checked my version of PyTorch. It is shown in the above.

there is no such high cuda version of yours,  nvcc -V shows 10.2, there is also  pytorch 1.6.0 py3.6 cuda10.2 cudnn7.6.5,

hi,have you solved this problem?

这是来自QQ邮箱的自动回复邮件。你好，你的来件我已收到，谢谢。

hi,have you solved this problem?

no, please tell me if you solve the probelm.

i used the official Dockerfile of nvdiffrast to build a docker with cuda11.3 torch1.10, and the error fixed.

i used the official Dockerfile of nvdiffrast to build a docker with cuda11.3 torch1.10, and the error fixed.

Hi,May i ask for that how you build the docker?

i used the official Dockerfile of nvdiffrast to build a docker with cuda11.3 torch1.10, and the error fixed.

Hi,May i ask for that how you build the docker?

By using this Dockerfile. https://github.com/NVlabs/nvdiffrast/tree/main/docker

i used the official Dockerfile of nvdiffrast to build a docker with cuda11.3 torch1.10, and the error fixed.

Hi,May i ask for that how you build the docker?

By using this Dockerfile. https://github.com/NVlabs/nvdiffrast/tree/main/docker

Thanks for your reply. But how can i use this Dockerfile?  Just input the commands on terminal  and run them step by step?

Use docker build command to build a docker images through Dockerfile.  You can read some guidience blogs if you had never used a docker images.


update gif

@htroisi, I think your forgot to update the link in the markdown.

@zasgar - fixed & ready for review.


Adding labels from envelope fields

We also moved the dev functions into runnable go scripts (print firehose to stdout, clear SD metrics, send mock metric to SD every x seconds)

Ahh, that makes sense. I'm fine adding a TODO on this one.
On Mon, Oct 3, 2016 at 1:56 PM, nrxus<EMAIL_ADDRESS>wrote:

@nrxus commented on this pull request.
In src/stackdriver-nozzle/config/config.go
https://github.com/evandbrown/gcp-tools-release/pull/12:

@@ -0,0 +1,42 @@
+package config

I get where you're coming from. We did this to support the scripts, but I
think I'm okay having the scripts just work off environment vars anyway.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/evandbrown/gcp-tools-release/pull/12, or mute the
thread
https://github.com/notifications/unsubscribe-auth/AAoGLT1y_NTcjmSUIJ1zxwtlu4WJU1K2ks5qwWvzgaJpZM4KM3ZU
.


cli profiling

Checking the e2e tests I've realized that it takes an average of 10 seconds to get the kcp server running, that sounds excessive for a local test.
I was trying to understand why it takes so long, but despite we can expose a profile endpoint, that is not enough to trace and profile the startup process, so I've added some flags to be able to run the profiles and traces directly from the CI (based on the go test flags)
bin/kcp start --memprofile=./mem.out --cpuprofile cpu.out --trace trace.out

As a result, we can observe that there is a lot of cpu used for crypto things
 go tool pprof cpu.out
File: kcp
Type: cpu
Time: Mar 9, 2022 at 11:01am (CET)
Duration: 13.91s, Total samples = 4.76s (34.21%)
Entering interactive mode (type "help" for commands, "o" for options)
(pprof) top
Showing nodes accounting for 3160ms, 66.39% of 4760ms total
Dropped 603 nodes (cum <= 23.80ms)
Showing top 10 nodes out of 346
      flat  flat%   sum%        cum   cum%
    1200ms 25.21% 25.21%     1240ms 26.05%  crypto/elliptic/internal/fiat.p521Mul
     650ms 13.66% 38.87%      650ms 13.66%  math/big.addMulVVW
     420ms  8.82% 47.69%      450ms  9.45%  crypto/elliptic/internal/fiat.p521Square
     220ms  4.62% 52.31%      870ms 18.28%  math/big.nat.montgomery
     120ms  2.52% 54.83%      130ms  2.73%  crypto/elliptic/internal/fiat.p521Add
     120ms  2.52% 57.35%      340ms  7.14%  runtime.pcvalue
     120ms  2.52% 59.87%      160ms  3.36%  runtime.step
     110ms  2.31% 62.18%      300ms  6.30%  runtime.scanobject
     100ms  2.10% 64.29%      480ms 10.08%  runtime.gentraceback
     100ms  2.10% 66.39%      180ms  3.78%  syscall.Syscall

The trace shows that at least 1 seconds is needed for generating the certificates ( can we save some time on the e2e with custom certificates as we are doing in k/k?)

I'm not very familiar with the cli flags, the code as is is ugly, I just wanted to check that it works,  but if there is interest I will make it prettier

/assign @sttts @ncdc @marun

@aojea While I appreciate your initiative, I'm not sure we want to worry too much about the cost of server startup in the near term. Operationally, a kcp server is likely to be long-running and features and reliability would seem more important in the immediate future than an optimized startup time.
That said, I share your instinct that it should be possible to minimize the the impact of server startup on e2e execution. Rather than worry about the server, I'm working to ensure that:

e2e tests can use shared fixture if possible
shared fixture can be persistent

The PR enabling persistent shared fixture for some tests has already merged: https://github.com/kcp-dev/kcp/pull/614
A follow-on PR (still WIP) enables more e2e tests to use shared fixture: https://github.com/kcp-dev/kcp/pull/636
Running tests with --kubeconfig=/path/to/.kcp/admin.kubeconfig removes the 10s startup cost for compatible tests and makes it easier to interacting with the kcp server under test. The catch is that I'm seeing performance degradation when too many tests are hitting the same server. I'm not yet sure if this is something on the client or server side. Would you be interested in exploring this problem with me?

@aojea While I appreciate your initiative, I'm not sure we want to worry too much about the cost of server startup in the near term. Operationally, a kcp server is likely to be long-running and features and reliability would seem more important in the immediate future than an optimized startup time.

yeah, you are right, no worries, I'm starting to get familiar with the project so forgive me if some things are duplicates

That said, I share your instinct that it should be possible to minimize the the impact of server startup on e2e execution. Rather than worry about the server, I'm working to ensure that:

e2e tests can use shared fixture if possible
shared fixture can be persistent

The PR enabling persistent shared fixture for some tests has already merged: #614 A follow-on PR (still WIP) enables more e2e tests to use shared fixture: #636

awesome

Running tests with --kubeconfig=/path/to/.kcp/admin.kubeconfig removes the 10s startup cost for compatible tests and makes it easier to interacting with the kcp server under test. The catch is that I'm seeing performance degradation when too many tests are hitting the same server. I'm not yet sure if this is something on the client or server side. Would you be interested in exploring this problem with me?

glad to help,

@sttts Would what is proposed here be useful beyond e2e optimization?


Fix Transfer-Encoding field value to be case-insensitive

Description
Fix Transfer-Encoding field value to be case-insensitive, in accordance with RFC-7230.
RFC-7230, section 4 states the following:
"All transfer-coding names are case-insensitive[...]"
Fix kittinunf#743

Type of change

[x] Bug fix (a non-breaking change which fixes an issue)
[ ] New feature (a non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[ ] Refactoring (a change which changes the current internal or external interface)
[ ] This change requires a documentation update

How Has This Been Tested?
I have made a GET request to a server that responds with "Chunked" for the Transfer-Encoding field value, and saw that the response was decoded successfully. Also, made sure that old tests still pass.
Checklist:

[x] I have performed a self-review of my own code
[ ] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation, if necessary
[x] My changes generate no new compiler warnings
[ ] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[ ] Inspect the bytecode viewer, including reasoning why

Thanks for the fix! :) @Acamol


Allow Backed Enums to be used for the auth provider

[ ] Added or updated tests
[x] Documented user facing changes

Changes
If you are using a BackedEnum for the auth provider, this resolves issues with that.
Breaking changes
There are no BC

What is a valid use case for this and what does the config look like?

Could you add a test case that shows how this can be used?

Yeah, let me take a look at the test suite and see!

@canvural updated the tests. My use case is that the app has many different guards and we organize it via an enum instead of having the magic strings everywhere.

@lancepioch,
Given the following config:
return [
        // ...
        'enum' => [
            'driver' => 'session',
            'provider' => App\ProviderEnum::Users,
        ],
    ],

    'providers' => [
        'users' => [
            'driver' => 'eloquent',
            'model' => App\User::class,
        ],
       // ...

The provider value has to match the key in the providers array, therefore unless you're also using the enum as the key in the providers array you're going to have an inconsistent definition and you're still relying on "magic strings".
return [
        // ...
        'enum' => [
            'driver' => 'session',
            'provider' => App\ProviderEnum::Users,
        ],
    ],

    'providers' => [
-        'users' => [
+       App\ProviderEnum::Users->value => [
            'driver' => 'eloquent',
            'model' => App\User::class,
        ],
       // ...

Note that you can also just use the following and no code changes to Larastan would be required:
return [
        // ...
        'enum' => [
            'driver' => 'session',
-           'provider' => App\ProviderEnum::Users,
+           'provider' => App\ProviderEnum::Users->value,
        ],
    ]

The provider value has to match the key in the providers array, therefore unless you're also using the enum as the key in the providers array you're going to have an inconsistent definition and you're still relying on "magic strings".

That's correct, we are and we're also using the enum in several other parts of the code instead of using "->value" everywhere.

Where else in the code are the providers keys used? To my understanding, it is only referenced in the guard provider definition---and the guard name does not have to match the provider name (we have different guards that use the same provider).
Does the Laravel framework actually support using an enum as the provider value? To me this seems like such a niche (and quite frankly, useless) edge case given that the providers names are only referenced in the same config file as the guards.
Now I might could see using an enum for the guard name as those are used around the codebase in the ::guard() methods and auth: middleware, but this PR is solely focused on the provider and not the guard


Stacktrace during Ctrl-C

$ sudo calico_containers/calicoctl.py node
No IP provided. Using detected IP: <IP_ADDRESS>
Pulling Docker image calico/node:latest

^CKeyboardInterrupt:

Traceback (most recent call last):
  File "calico_containers/calicoctl.py", line 104, in <module>
    getattr(command_module, command)(arguments)
  File "/home/gulfstream/calico-docker/calico_containers/calico_ctl/node.py", line 209, in node
    libnetwork_image=libnetwork_image)
  File "/home/gulfstream/calico-docker/calico_containers/calico_ctl/node.py", line 313, in node_start
    _start_node_container(ip, ip6, etcd_authority, log_dir, node_image, detach)
  File "/home/gulfstream/calico-docker/calico_containers/calico_ctl/node.py", line 363, in _start_node_container
    _find_or_pull_node_image(node_image)
  File "/home/gulfstream/calico-docker/calico_containers/calico_ctl/node.py", line 595, in _find_or_pull_node_image
    docker_client.pull(image_name)
  File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 909, in pull
    headers=headers, stream=stream, timeout=None)
  File "/usr/local/lib/python2.7/dist-packages/docker/client.py", line 103, in _post
    return self.post(url, **self._set_request_timeout(kwargs))
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 504, in post
    return self.request('POST', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 461, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 610, in send
    r.content
  File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 730, in content
    self._content = bytes().join(self.iter_content(CONTENT_CHUNK_SIZE)) or bytes()
  File "/usr/local/lib/python2.7/dist-packages/requests/models.py", line 655, in generate
    for chunk in self.raw.stream(chunk_size, decode_content=True):
  File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/response.py", line 256, in stream
    data = self.read(amt=amt, decode_content=decode_content)
  File "/usr/local/lib/python2.7/dist-packages/requests/packages/urllib3/response.py", line 186, in read
    data = self._fp.read(amt)
  File "/usr/lib/python2.7/httplib.py", line 587, in read
    return self._read_chunked(amt)
  File "/usr/lib/python2.7/httplib.py", line 629, in _read_chunked
    line = self.fp.readline(_MAXLINE + 1)
  File "/usr/lib/python2.7/socket.py", line 480, in readline
    data = self._sock.recv(self._rbufsize)
KeyboardInterrupt

This isn't quite as simple as I thought.  I was unable to catch the KeyboardInterrupt exception within the calicoctl and node commands.  It may be a matter of catching a SIGINT with a signal handler.


[Documentation] add SRS for "List of Secretaries" component

SRS for "List of Secretaries" was update  https://github.com/ita-social-projects/what-front/wiki/SRS-List-of-Secretaries


fix(android): enable multi session drm

Summary
enable multisession drm on android
Motivation
fix: https://github.com/TheWidlarzGroup/react-native-video/issues/3942
Changes
just change value to true as advised in android doc: https://developer.android.google.cn/media/media3/exoplayer/drm?hl=en#case_2_license_server_responds_with_requested_key_only

will be replaced by https://github.com/TheWidlarzGroup/react-native-video/pull/3867

@KrzysztofMoch I don't really know... this is the default value, so it is useless... I put a prop in the other PR to avoid side effects on existing projects, I am not sure if it do big change internally in exoplayer. Documentation doesn't advise to put it always to true ...


Network of Transmission - Additions

Is your feature request related to a problem? Please describe.
Show Patient Info
See the patient information via a small popup on clicking/hovering on the dot.
Add details about missing information
Add a link to google doc asking people for more information about the transmission graph via regional sources.
Add more colors for distinctions
Color1 - Travelled from other state with disease
Color2 - Passed the infection to other person
Color3 - infected but did not pass the disease
Full-Screen Mode
Add a  detailed analysis window by opening the network in new tab/making this info in full screen for a network of transmission
Data is not completely available for some states [BUG]
There are only 2 dots for Jharkhand state

you can assign this to me

@shuklaayush could you tell about this point Add details about missing information
Add a link to google doc asking people for more information about the transmission graph via regional sources.( do you have any link which we can put there).
Data is not completely available for some states [BUG]
There are only 2 dots for Jharkhand state( this is checked the information is not there like transmitted from whom thats y its not coming in the graph)
so the plan is we can just plce those dots without any link as information is not that and when user clicks on it the popup will come showing user info like patent id, place and all and the link of the form where the users can fill the details so that next time it will get linked with some patient

Add more colors for distinctions
Color1 - Travelled from other state with disease
Color2 - Passed the infection to other person
Color3 - infected but did not pass the disease
if scenario 1 and 2 are there then how we will put color its difficult to assign color if the patient travleed from outside and also passed the infection.

"if scenario 1 and 2 are there then how we will put color its difficult to assign color if the patient travleed from outside and also passed the infection."
In this case, you  can assign a separate color may be a color which is a combination of 2 like orange = red  + yellow

@gyanendrapatro, I hope you are working on this issue. I want this feature to be live on website. Do ask for help from others if you need anything. or if you don't have bandwidth ask anyone else to continue working on this issue.
@shuklaayush, Can you provide the assigned person the link of google form/database entry point where you maintain the travel details of patients or contact tracing details.
With more migrants people coming from other states, we will need this data/graph help many for contact tracing.
Thanks @gyanendrapatro @shuklaayush for making this project successful.

@TheDominus I think this data is rarely being released by the state governments ever since the volume of cases has increased. Also, the transmission network is based on data taken from raw_data.json API which has since been frozen. I don't have time right now to add/replace the API and/or check if the data is being updated, but on the face of it, there seems to be a significant possibility that we might have to deprecate this feature.

@shuklaayush, Can you provide the assigned person the link of google form/database entry point where you maintain the travel details of patients or contact tracing details.

@sudevschiz might be able to help out here

Expect for very few states (only KA maybe), the information about from who the patient contracted the virus is not shared anymore. I sincerely hope that the government is still doing contact tracing actively. However, with the large number of cases that are getting added everyday,   reality could be harsher.
Anyway, this data is not sufficiently available and the network transmission graphs that are present in the website is quite outdated and as @shuklaayush mentioned, could be deprecated soon. Closing this feature request.


Any ideas?

[15:04:41]   -e Google -d chrome_headless -n 100 -j 50 -o "./download_images/as" -S  "as"
[15:04:41]  Scraping From Google Image Search ...
[15:04:41]  Keywords:  as
[15:04:41]  Number:  100
[15:04:41]  Face Only:  False
[15:04:41]  Safe Mode:  True
[15:04:41]  Query URL:  https://www.google.com/search?tbm=isch&hl=en&q=as&safe=on
[15:04:41]  Exception in thread Thread-1:
[15:04:41]  Traceback (most recent call last):
[15:04:41]    File "C:\Users\sya\Desktop\Image-Downloader-master\venv\lib\site-packages\selenium\webdriver\common\service.py", line 76, in start
[15:04:41]      stdin=PIPE)
[15:04:41]    File "C:\Users\sya\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 709, in init
[15:04:41]      restore_signals, start_new_session)
[15:04:41]    File "C:\Users\sya\AppData\Local\Programs\Python\Python36\lib\subprocess.py", line 997, in _execute_child
[15:04:41]      startupinfo)
[15:04:41]  FileNotFoundError: [WinError 2] A rendszer nem találja a megadott fájlt
[15:04:41]  During handling of the above exception, another exception occurred:
[15:04:41]  Traceback (most recent call last):
[15:04:41]    File "C:\Users\sya\AppData\Local\Programs\Python\Python36\lib\threading.py", line 916, in _bootstrap_inner
[15:04:41]      self.run()
[15:04:41]    File "C:\Users\sya\AppData\Local\Programs\Python\Python36\lib\threading.py", line 864, in run
[15:04:41]      self._target(*self._args, **self._kwargs)
[15:04:41]    File "C:\Users\sya\Desktop\Image-Downloader-master\image_downloader.py", line 54, in main
[15:04:41]      browser=args.driver)
[15:04:41]    File "C:\Users\sya\Desktop\Image-Downloader-master\crawler.py", line 300, in crawl_image_urls
[15:04:41]      driver = webdriver.Chrome(chrome_path, chrome_options=chrome_options)
[15:04:41]    File "C:\Users\sya\Desktop\Image-Downloader-master\venv\lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 73, in init
[15:04:41]      self.service.start()
[15:04:41]    File "C:\Users\sya\Desktop\Image-Downloader-master\venv\lib\site-packages\selenium\webdriver\common\service.py", line 83, in start
[15:04:41]      os.path.basename(self.path), self.start_error_message)
[15:04:41]  selenium.common.exceptions.WebDriverException: Message: 'chromedriver' executable needs to be in PATH. Please see https://sites.google.com/a/chromium.org/chromedriver/home
[15:04:42]  stopped

Has your problem been solved? And how did you solve it?

Has your problem been solved? And how did you solve it?

This error message says you need to add  'chromedriver' executable  to your PATH. To do so, first download the chromedriver  executable from https://sites.google.com/a/chromium.org/chromedriver/downloads . My chrome version is 89.xxxx so I download this one: https://chromedriver.storage.googleapis.com/index.html?path=89.0.4389.23/  .  Then you need to place the downloaded chromedriver executable to your PATH.
Please refer to this: https://zwbetz.com/download-chromedriver-binary-and-add-to-your-path-for-automated-functional-testing/


(Fix) Add reserved tokens object, if user forgot to click +

If you are reporting a problem with ICO Wizard, please include the following information:
Which network did you use? (Mainnet, Kovan, Rinkeby, etc.)
Sokol POA, but the behavior is the same on every network
If you were able to create it, what is the URL of your crowdsale?
https://wizard.poa.network/invest?addr=0xFfCCdB7b03077630851FB97d59e60cdDe8ee27Ff&networkID=77
Do you have screenshots showing the problem?
No. Reserved token object is not added to reserved tokens list, if user forgot to click "+" button.
Do you see errors in the dev console? If yes, please include a screenshot
(To open the dev console in Google Chrome, press F12, or go to View -> Developer -> Developer Tools, and open the Console tab)
No

@fvictorio I look into reserved block form as an input form. In this case, maybe, let's simply rename "+" button to "submit" or "save"? In this case, it is obvious, that data is not submitted until the user will press the button. What do you think about this solution from UI/UX perspective?


Events: event data must conform to data protection and access controls.

Adds a guideline to ensure that sensitive data is not published
without first checking it is ok to do so.

This topics looks quite Zalando specific and Nakadai specific. I'm not sure if APi guidelines is the right place for this.
Furthermore, it's problematic to forbid sensible data when Nakadi is used for service-to-service communication. Also I think at the moment it's a tooling problem: we miss access scopes in events, right?

I'm not sure if APi guidelines is the right place for this.

It is Zalando specific; that's true, but that's not unique in the guidelines.
In any case, I've updated to match @tfrauenstein's feedback in d4d6481; just moved some sentences around, so imo it's  ready to merge. And fwiw I'm +0 on whether it goes here or somewhere else; my only observation is that this is one place teams are likely to see it, as well as API reviewers who can query event data as needed.
/ @fmueller @valgog @whiskeysierra

@fmueller @valgog @whiskeysierra @tfrauenstein small edits in 8ecbc69

👍

:+1:


Update README.md

Hi Mistral Team,
I'm a PhD student from LMSys & Skypilot team. Congrats again on all the great work and achievement!
We saw you guys recently added Mistral's Arena Elo rating/MT-bench in the arxiv preprint. We're very honored to be included!
Our website has been serving Mistral since the day it was announced and we've added support on FastChat. It'd be awesome if you could add a link to our website chat.lmsys.org and repo. See this PR change.
Also, sorry for another ask, but would you mind adding a citation in your Arxiv paper? Thanks!
https://lmsys.org/blog/2023-05-03-arena/#citation

Hi Wei-Lin,
Thank you for the PR!
Sorry, not citing lmsys in the paper was an oversight. We will add the citation in the next iteration of the paper and thank you for the great work!
PR merged.


Image as title, adding more buttons to the titlebar

Would it be possible to add a constructor that allows for an image as a title (Useful for company logos etc.). Additionally, is there a way to similarly add more buttons to the title bar.

Hi @desaianand1 !
Thanks for your suggestion, and yes, it would be possible to allow the users to use an image as title (or set an icon in the title-bar rather).
Currently, you can access all the nodes within the CustomStage itself, through stage.lookup() function, but yes, I will work on it as well :)


add missing dependency for certifi

certifi is used in "networking", and if you install using plain pip,
it is missing

mistune must be managed to <2. Upstream (m2r) has an issue mentioning this, but I saw no activity regarding fixing this.

Thank you. Meh, we should get rid of this md to rst convertion. Let's assume that everyone has setuptools actual enough. I've seen #392. It shows interest from the community in removing this feature.

Ditch mistune, add related pandoc call to docs (or even call out to pandoc, replacing the current code).

I think we can just drop this conversion. Setuptools and pypi support markdown already long enough.


How to get Api_id and Api_Hash for new user?

Hello.
I am trying to get access api_id and Api Hash for new user.This function I saw from some tools which is on youtube for previewing.

And I am using a tool which created by someone also able to get api_id and api_hash without creating telegram app on my.telegram.org

I want to get Api_id and api_hash through telegram Clients Api for new user which just have done for register. Not by manually access to https://my.telegram.org/ . it will be great if able to do with WTelegramClient

I have been stuck on this, someone here please tell me if this is possible and how?
Thanks a lot

The only official way to obtain API id/hash is through https://my.telegram.org/.
We don't support other ways or tools.
One API id/hash represents your application and can be used to manage different users. So you shouldn't worry about creating many API id/hash, just create one for the app you're writing.


Move install scripts from install repo into /install directory in this repo

No need to have these in a separate repo:
https://github.com/OpenAdaptAI/install

Duplicate Issue:
Already created here: https://github.com/MLDSAI/OpenAdapt/issues/212


Feature request: introduce a special $kind for inline notes/annotations/documentation

Is your feature request related to a problem? Please describe.
As a Composer user, I would like to be able to add inline "notes" or "annotations" ala code comments.  I would like to be able to add notes at any step of the dialog and have them visible whenever I view the dialog in Composer.  Here is a mockup of how we would like to use them:

Describe the solution you'd like
I believe this should be implemented in the SDK so that the adaptive loader can be instructed to ignore these nodes instead of instantiating noop actions.
Describe alternatives you've considered
It is possible for us to achieve this by bundling a custom action/schema extension with the Composer runtime, however this would require us to create a noop class to handle this which seems inelegant.

See related Composer issue: https://github.com/microsoft/BotFramework-Composer/issues/3419

Need to find out what is the priority of this item and when should it be delivered.

Assigned to @boydc2014 for discussion to evaluate if this will be done.

After triaging with Tom, we should push off the decision into a dedicated review of new actions combining with a few other new actions proposal.

@darrenj please see the comment above and prioritize this. Thank you.


[Idea]Centralized voicebank, resampler and plugin package manager (aka "Store") / 中心化的音源、引擎与插件商店

For utau users, downloading voicebanks, resamplers and plugins from different sites and installing them is inconvenient. So we can set up a "OpenUTAU Store", like "Microsoft Store" or "apt-get".
Firstly, voicebank developers publish their voicebanks on Github, or anywhere that can be directly downloaded with a link. Then, we can set up a github repo which contains manifests linking to these voicebank download sites, like Winget. OpenUTAU can find and search voicebanks from this repo.

目前Utau用户需要手动到各个网站下载与安装音源，较为繁琐。所以可以设立一个“OpenUTAU商店”作为统一的分发源，就像微软商店和apt-get那样。
首先，音源开发者用Github或其他支持直链下载的平台发布音源。然后，设立一个Github仓库，提供各音源下载地址的链接，就像Winget。OpenUTAU从这个Github仓库调取与搜索音源。

I have to share some thought about current utau community and OSS community here.
Though both these communities are highly technical and both driven by enthusiasts, utau community are much less open than OSS community.
Forexample:

OSS developers share they softwares with open-source licenses, which allow anyone to re-distribute the software.
However, utau users usually forbid other users to redistribute their voicebanks/reclists/tutorials/etc. If they want to share these resources, they have to provide links to the original author's mainpage. As a result, Building a UTAU resource collection site in Chinese with a good user experience is impossible. If the original link of a resource was shutdown by its host company (for example, baidu netdisk), and the original author doesn't notice it, users will be unable to download that resource at all.


The English version of the docs are not displayed

When I try to change the language of the docs to the English version it still shows me the Chinese version of the docs. This was not the case yesterday.

I am having the same problem, using a older version solved it for me.
https://mmdetection.readthedocs.io/en/v2.18.1/tutorials/config.html

Ohh thanks for the link. I just saw they rolled an update a few hours ago, which caused this change. I am using the older one now as well.

Sorry for that. After refactoring the doc folder in #6774. The docs pages were generated incorrectly. We will fix it as soon as possible.

The docs have been recompiled. Try to refresh the page.