FTPS client not working on vsftpd

Hello,
I've created an FTPS server on ubuntu by following this tutorial.
I've tested it on Filezilla by using explicit encryption. Everything works fine.
But when I test it with FluentFTP by using explicit encryption, I get the following error when the client is trying to connect to the remote FTPS server:
Unable to read data from the transport connection : An existing connection was forcibly closed by the remote host
Can you please help me to solve this issue?
Kind regards,

Can you provide your login details in order for me to test? If not then can you create a test FTP account on your server and provide that? Its really difficult to debug such use-case issues without connecting to the actual server. You could just add a comment with it, and delete the comment immediately after. I will get the details by email. I will need the server hostname/IP, the user name and the password.

Hi,
I've set up an ftps accounting for you to test.
Host: spreadbs.ddns.net
Port: 21
Encryption: Explicit
User: ftpuser
Pass: password
FileZilla connects successfully. It cannot list directory content but it's not a problem since it connects. Here are FileZilla logs:
Status: Address resolution for spreadbs.ddns.net
Status: Connection to <IP_ADDRESS>:21 ...
Status of the company:
Response: 220 (vsFTPd 3.0.3)
Order: AUTH TLS
Response: 234 Carry out the negotiation.
Status: Initializing TLS ...
Status: Certificate Verification ...
Command: USER ftpuser
Status: TLS / SSL connection established.
Answer: 331 Please specify the password.
Order: PASS ********
Answer: 230 Successful connection.
Status: The server does not support non-ASCII characters.
Order: PBSZ 0
Answer: 200 PBSZ set to 0.
Order: PROT P
Answer: 200 PROT now Private.
Status: Connected
Status: Retrieving folder contents ...
Command: PWD
Answer: 257 "/" is the current directory
Order: TYPE I
Answer: 200 Switch to binary mode.
Order: PASV
Answer: 227 Switch to passive mode (192, 168, 1, 15, 167, 10).
Status: The server sent a passive response with a non-routable address. Address replaced by server.
Command: LIST
Error: Connection of data can not be established: ECONNREFUSED - Connection refused by the server
But with FluentFtp, I get this error when It tries to connect to the remote FTPS server.
Here is the code I'm using for testing:
FtpClient client = new FtpClient();
client.Host = "spreadbs.ddns.net";
client.Port = 21;
client.Credentials = new NetworkCredential("ftpuser", "password");
client.EncryptionMode = FtpEncryptionMode.Explicit;
client.Connect();
Here is the error:
Unable to read data from the transport connection : An existing connection was forcibly closed by the remote host
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
at FluentFTP.FtpSocketStream.ActivateEncryption(String targethost, X509CertificateCollection clientCerts, SslProtocols sslProtocols)
at FluentFTP.FtpClient.Connect()
Kind regards,

Fantastic. I'll test it today and let you know if I can fix this. Since I have a test account it should be easier to debug.

I'm testing this right now. Will get back to you once I configure FTPS. Since I'm not the original author of the lib and I've never used FTPS before, I'll have to figure it out myself!

I cannot list files with GetListing() since it simply times out waiting for a reply. I could connect however, here is the code I used:
static void TestNameListingFTPS() {
	using (FtpClient cl = new FtpClient()) {

		cl.Credentials = new NetworkCredential(m_user, m_pass);
		cl.Host = m_host;
		cl.ValidateCertificate += OnValidateCertificate;
		cl.DataConnectionType = FtpDataConnectionType.PASV;
		cl.EncryptionMode = FtpEncryptionMode.Explicit;
		cl.Connect();

		//Console.WriteLine("Sleeping for 10 seconds to force timeout.");
		//Thread.Sleep(10000);

		foreach (FtpListItem item in cl.GetListing()) {
			Console.WriteLine(item.FullName);
			//Console.WriteLine(item.Modified.Kind);
			//Console.WriteLine(item.Modified);
		}
	}
}
static void OnValidateCertificate(FtpClient control, FtpSslValidationEventArgs e) {
	e.Accept = true;
}

And here are the logs:

InterNetwork: <IP_ADDRESS>
220 (vsFTPd 3.0.2)
AUTH TLS
234 Proceed with negotiation.
Time to activate encryption: 0h 0m 0s, Total Seconds: 0.8736015.
USER ftpuser
331 Please specify the password.
PASS
230 Login successful.
PBSZ 0
200 PBSZ set to 0.
PROT P
200 PROT now Private.
FEAT
211-Features:
AUTH TLS
EPRT
EPSV
MDTM
PASV
PBSZ
PROT
REST STREAM
SIZE
TVFS
UTF8
211 End
Text encoding: System.Text.UTF8Encoding
OPTS UTF8 ON
200 Always in UTF8 mode.
PWD
257 "/"
PWD
257 "/"
The thread '' (0xadc) has exited with code 0 (0x0).
TYPE I
200 Switching to Binary mode.
PASV
227 Entering Passive Mode (192,168,1,16,250,43).
.....

Hello,
I've just tested again with your code but I'm still having the same error. I'm using FluentFTP 16.0.12 wich I downloaded from here.
I solved the LIST issue on the FTPS server. Now you can list and upload files to /public/.
Could you upload the DLL that you're using to /public/ folder on the FTPS server so I can test with it.
I'm using Visual Studio 2010 and .NET Framework 4.0.
Kind regards,

Releases is very old. Download from Nuget. Download the nuget.exe client and then open command prompt:
nuget Install FluentFTP

Alright, I updated the releases page. See https://github.com/hgupta9/FluentFTP/releases
Download the latest and see if your issues persist.

Hi,
I've tested with the new release and I'm still having the same error.
Here is the code I'm using for testing:
class Program
    {
        static void Main(string[] args)
        {
            const string m_host = "spreadbs.ddns.net";
            const string m_user = "ftpuser";
            const string m_pass = "password";

            using (FtpClient cl = new FtpClient())
            {
                cl.Credentials = new NetworkCredential(m_user, m_pass);
                cl.Host = m_host;
                cl.ValidateCertificate += OnValidateCertificate;
                cl.DataConnectionType = FtpDataConnectionType.PASV;
                cl.EncryptionMode = FtpEncryptionMode.Explicit;
                cl.Connect();

                //Console.WriteLine("Sleeping for 10 seconds to force timeout.");
                //Thread.Sleep(10000);

                foreach (FtpListItem item in cl.GetListing())
                {
                    Console.WriteLine(item.FullName);
                    //Console.WriteLine(item.Modified.Kind);
                    //Console.WriteLine(item.Modified);
                }
            }
        }

        static void OnValidateCertificate(FtpClient control, FtpSslValidationEventArgs e)
        {
            e.Accept = true;
        }
    }

Here is the error I'm having:
System.IO.IOException

Unable to read transport connection data: An existing connection has become closed by the remote host

at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
at FluentFTP.FtpSocketStream.ActivateEncryption(String targethost, X509CertificateCollection clientCerts, SslProtocols sslProtocols)
at FluentFTP.FtpClient.Connect()

Regards,

I've attached a version of the FluentFTP library and test project that works for me. Just open the solution and run it and see if you can connect. Perhaps your .NET Framework version or something else is getting in the way. If even this does not work, then it must be a local issue, ie the server is rejecting your IP or your NAT/firewall/network is getting in the way. Hope this works for you.
FluentFTP_FTPS_Test.zip
This is the log I'm getting. (Output window) You should get a similar output.
InterNetwork: <IP_ADDRESS>
220 (vsFTPd 3.0.2)
AUTH TLS
234 Proceed with negotiation.
Time to activate encryption: 0h 0m 0s, Total Seconds: 0.4368008.
USER ftpuser
331 Please specify the password.
PASS <omitted>
230 Login successful.
PBSZ 0
200 PBSZ set to 0.
PROT P
200 PROT now Private.
FEAT
211-Features:
 AUTH TLS
 EPRT
 EPSV
 MDTM
 PASV
 PBSZ
 PROT
 REST STREAM
 SIZE
 TVFS
 UTF8
211 End
Text encoding: System.Text.UTF8Encoding
OPTS UTF8 ON
200 Always in UTF8 mode.
PWD
257 "/"
PWD
257 "/"
TYPE I
200 Switching to Binary mode.
EPSV
229 Entering Extended Passive Mode (|||64224|).
InterNetwork: <IP_ADDRESS>
LIST /
150 Here comes the directory listing.
Time to activate encryption: 0h 0m 0s, Total Seconds: 0.2184004.
drwxr-xr-x    2 1001     1001         4096 Jan 21 12:23 public
226 Directory send OK.
Disposing FtpSocketStream...
public
Disposing FtpClient object...
QUIT
221 Goodbye.
Disposing FtpSocketStream...
The thread 'vshost.RunParkingWindow' (0x1318) has exited with code 0 (0x0).
The thread '<No Name>' (0x1330) has exited with code 0 (0x0).
Disposing FtpSocketStream...

Can you check with the code I provided?

Hi,
I tested with the code that you provided and I'm still having the same error at FtpSocketStream.cs line 680 (m_sslStream.AuthenticateAsClient).
Can you please test again?
Here are the details of the error:
System.IO.IOException
Unable to read transport connection data: An existing connection had to be closed by the remote host.

at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.Net.FixedSizeReader.ReadPacket(Byte[] buffer, Int32 offset, Int32 count)
at System.Net.Security.SslState.StartReadFrame(Byte[] buffer, Int32 readBytes, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartReceiveBlob(Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.CheckCompletionBeforeNextReceive(ProtocolToken message, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.StartSendBlob(Byte[] incoming, Int32 count, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ForceAuthentication(Boolean receiveFirst, Byte[] buffer, AsyncProtocolRequest asyncRequest)
at System.Net.Security.SslState.ProcessAuthentication(LazyAsyncResult lazyResult)
at System.Net.Security.SslStream.AuthenticateAsClient(String targetHost, X509CertificateCollection clientCertificates, SslProtocols enabledSslProtocols, Boolean checkCertificateRevocation)
at FluentFTP.FtpSocketStream.ActivateEncryption(String targethost, X509CertificateCollection clientCerts, SslProtocols sslProtocols) dans C:\dev\FluentFTP\FluentFTP\FtpSocketStream.cs:ligne 680
at FluentFTP.FtpClient.Connect() dans C:\dev\FluentFTP\FluentFTP\FtpClient.cs:ligne 854
at Tests.Program.TestNameListingFTPS() dans C:\dev\FluentFTP\FluentFTP.Tests\Program.cs:ligne 546
at Tests.Program.Main(String[] args) dans C:\dev\FluentFTP\FluentFTP.Tests\Program.cs:ligne 65

Regards,

Since it works on my end and not on your PC, it seems to be a local issue. Disable/uninstall any firewall or antivirus program. Also check if the FTP host has blacklisted your IP / IP range. There seems to be nothing I can do atm.


Improve UI

changed the Navbar and header as requested

@all-contributors please add @T-Rahul-prabhu-38  for design


Operator Overloading in C++

Description 📜
I would like to create documentation on Operator Overloading in Cpp

Domain of Contribution 📊

[ x] C/CPP

/assign

Hey! I want to work on this issue.

Hey! I want to work on this issue.

Please take or create(Make sure there should not be any duplicates) another one ! two contributors cannot work on same issues !!!!!!!!!!!!!!!!


With knipse sjakk

Lichess uses English variant names.
I started to define the Flick-Chess ruleset, however so far I have not decided how to encode a Flick using a Uci object (in the move list, for spectators) nor how to implement takebacks!

Oops, PRd to the wrong branch.


[Typo] Docs Typo Fix

[Typo] format changed as custom format in docs/ref/settings.txt
Old version:
A full Python path to a Python package that contains format definitions for
Fixed version:
A full Python path to a Python package that contains custom format definitions for

https://github.com/django/django/pull/9399/ makes the same change along with some others.


⚠ Bofrost.at has degraded performance

In 3ed5bbb, Bofrost.at (https://www.bofrost.at) experienced degraded performance:

HTTP code: 200
Response time: 1580 ms

Resolved: Bofrost.at performance has improved in 2cc7881 after 6 minutes.


Trouble running training jobs

Hi HKUNLP,
First off, really awesome paper on leveraging instructions to improve embedding quality across domains and tasks.
I am trying to train a model by following the directions to train a model. I downloaded the MTEB dataset, installed the requirements and am running the train job and continue to run into this error:
ValueError: Unable to create tensor, you should probably activate truncation and/or padding with 'padding=True' 'truncation=True' to have batched tensors with the same length.
Any idea why this is happening?
Thanks!

Hi, Thanks a lot for your interest in the INSTRUCTOR model!
You may want to download the MEDI data instead of the MTEB data for training a model.
Feel free to add any further question or comment!

Hi Harry,
Yeah that was a semantic mistake, I was using MEDI data.
Thanks,
Alex
On Tue, Feb 28, 2023 at 6:06 PM Harry-hash @.***> wrote:

Hi, Thanks a lot for your interest in the INSTRUCTOR model!
You may want to download the MEDI data
https://drive.google.com/file/d/1vZ5c2oJNonGOvXzppNg5mHz24O6jcc52/view?usp=sharing
instead of the MTEB data for training a model.
Feel free to add any further question or comment!
—
Reply to this email directly, view it on GitHub
https://github.com/HKUNLP/instructor-embedding/issues/19#issuecomment-1449161750,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AV7HRZNHOJ5YIOCW6RPA4TLWZ2OK5ANCNFSM6AAAAAAVLI2S34
.
You are receiving this because you authored the thread.Message ID:
@.***>

Feel free to reopen the issue if there is any further question or comment!


Blog Migration: Redirects to mesosphere.com and blog removal

Description

Created redirects for each blog post to its new destination at mesosphere.com/blog
Removed now inaccessible blogs
Created redirect for blog index page to mesosphere.com/blog

Urgency

[ ] Blocker
[ ] High
[ ] Medium

Requirements

Test all commands and procedures.
Build content locally and test for formatting/links.
Add redirects to dcos-website/redirect-files.
Change all affected versions (e.g. 1.7, 1.8, and 1.9).
See the contribution guidelines.

Can one of the admins verify this patch?


[style]: scroll to top

What's the style idea?
We need to improve the animation scroll to top button and color of the button on hover, so user can know its working!
Add screenshots
Before Hover:

After Hover:

Code of Conduct

[X] I agree to follow this project's Code of Conduct

I believe users can understand the scroll to the top button without needing an animation.


scopeslot and slot

Version
2.5.17
Reproduction link
https://jsfiddle.net/50wL7mdz/681226/
Steps to reproduce

        <tb-heading  :list="data">
            <template slot="a">
                hello world
            </template>

HELLO worldSSS

hello

            <template slot-scope="scope">

                    {{scope.row}}

            </template>
        </tb-heading>

What is expected?
所有的slot标签都应该被渲染出来
What is actually happening?
作用域插槽和具名插槽有被渲染 匿名插槽无法渲染出来，此问题只存在与template语法中 用render不存在该问题

Actually we cannot have a slot and a scoped slot with the same name, in this case, default. When rendering slots/scoped slots from a template, Vue looks for scoped slot by the specified name first, and then slot. When providing both an anonymous slot and scoped slot, the slot won’t have a chance to render.
See render-slot.js.
This caveat seems to be missing in the docs and I think we should add it. /cc @chrisvfritz

emmmmm,    all right   but I have   render  and it is fine

When you use render functions, you are actually picking the exact slot to render by yourself so it's working.


[Discussion] Basics: Circular Movement

Discussion for http://godotrecipes.com/basics/rotation/

For the 2D version, how would you make the godot icon stay vertical while rotating?
And how would you add a CollisionShape2D to it? (mine stays centered and doesn't inherit the offset)

Thank you :) This does work.
As for the CollisionShape2D, I just wanted to add it to the sprite so that a vehicle could collide with the sprite and gain some powerup or whatnot.
I got it working like so.

I personally think you should remove the first sprite and get the minimal working example. I was confused for a while as to what exactly the pivot was doing (eg. should it also be offset?)

I'm working on a space game and trying to make an elliptical orbit.
Would I be able to use this method somehow with two pivot points, one nested on another (something like the pic below) or would I have to take a different approach to this?

If I can use this, what might the code look like for it?

Hello, I am new to GitHub, but I need help in creating an 2D air ring with x-z axial revolution by using Particles2D. Can someone help me?


Request for discussion: Lazy Services Configuration and Separation of Concerns

Currently lazy_services configuration holds the class_map,  proxies_namespace, proxies_target_dir and write_proxy_files. The class_map is a service manager concern but the other settings are  configuration for @Ocramius ProxyManager library, which is external.
Wouldn't it be cleaner to have a lazy_services configuration for ServiceManager which only holds the classmap like
'lazy_services' => [
    'service1'  => Service1::class,
    ...
]

and provide the other configuration settings from elsewhere? ServiceManager is ServiceManager, I think, it is out of scope to have to know about configuration details of external libraries.
private function createLazyServiceDelegatorFactory()
{
    ...
}

is a factory embedded in the ServiceManger core. It deals with the class map and the other settings. By means of separation of concerns or modularization wouldn't it be worth to consider to put this factory in a separate class?

It used to be an external factory (and namespace), so I suggest looking at where the change was introduced in order to follow the reasoning behind it (I really don't remember when it was squashed into SM internals)

See below commit message when createLazyServiceFactory was introduced to ServiceManager internals was introduced by @weierophinney.
It seems to be a contradiction to separation of concerns.
I'd propose, to move LazyService configuration (paths, etc) out again. LazyServices configuration in ServiceManager could be simplified by removing the requirement of defining a delegator for a lazy services. A configuration like
'lazy_services' => [
    Buzzer::class => Buzzer::class,
    ...
],

holding the lazy_services class map would be all that is needed to make a service lazy. This would maintain and even leverage lazy service's first class citizen status.
Doing so, positive effects on performance could be achieved. Currently, there is a hard string compare in the delegator creation loop:
        if ($delegatorFactory === Proxy\LazyServiceFactory::class) {
            $delegatorFactory = $this->createLazyServiceDelegatorFactory();
        }

which would get obsolete. Technically, lazy_services would remain delegators, but an explicite definition would not be necessary.

commit 6f8827efba9c582d528063c38370130d238340ec
Author: Matthew Weier O'Phinney<EMAIL_ADDRESS>2015-09-16 00:06:15
Committer: Matthew Weier O'Phinney<EMAIL_ADDRESS>2015-09-16 00:06:15
Parent: 7db3473d6ebf5c6365491d9306d64a9c461a334f (Completed second pass on documentation)
Branches: FIX-Make-tests-platform-agnostic, FORK-Adjust-Environment, FORK-setup-documentation, PERF-Config-Array, PERF-Service-Resolution, REFACTOR-CONFIG, Rest-of-#211, TEST-Applying-Config-Twice-Is-Invariant, TEST-Prefconfiguration-gets-applied, TEST-Stability-Over-Internal-State-Changes, master, mxc-master, umaster, zend-dev, zend-master, mxc-servicemanager/dev-4.0, mxc-servicemanager/develop, mxc-servicemanager/master, origin/ENH-Cleanup-after-first-wave-of-config-speedup, origin/ENHANCEMENT-has()-performance, origin/FIX-Alias-Resolution-#221, origin/FIX-Make-tests-platform-agnostic and 39 more branches

Refactor of lazy services

Lazy services were added after the ServiceManager had an established API, and
as such had to rely on optional integration. This patch alters that relationship
to make lazy service configuration a first-class citizen of the ServiceManager.

This allows:

Removing the LazyServiceFactoryFactory.
Passing lazy_services configuration to the constructor or withConfig()
method.
Direct instantiation of the LazyServiceFactory when first encountered as a
delegator factory, using the lazy_services configuration composed in the
ServiceManager itself.

The usage is thus simplified, as all configuration for all service types is now
directly handled by the ServiceManager itself.

And if it was a request to transport pathes et al. also, I'd propose to make delegator configuration flat, so that array_merge_recursive in configure would get obsolete, so all service manager config could get merged with a single array_merge instead of six or so currently.
This could also be used to establish a resolution-logic-cache, so that service resolution could be condensed to a single step. More or less.
I already experiment with that and the measures look promising.

@fhein the delegators config is not flat on purpose, because each delegator is added on top of a single service, so you always have:
[
    'delegators' => [
        \Name\Of\The\Service::class => [
            Delegator1::class,
            Delegator2::class,
            Delegator3::class,
        ],
    ],
]

Yes, I know about that cascade. Making that flat would mean to allow delegators referencing delegators.

But I think, that should if at all be discussed separately.

delegators referencing delegators.

Don't understand this bit. In general, delegators:

shouldn't care about each other
are in a stack, so they are already in some sort of relation
are executed in a stack also at runtime

Can you make an example of what a flat config would look like, and what it would do?

Idea is like this. Delegator definitions aggregate a linked list of factories (instead of a stack).  Drawback would be that the same factory can not appear twice. But that would be  almost meaningless anyway.
If we'd allow delegators to be declarative also, we would not even need seperate factory definitions.
    $config = [
        'delegators' => [
            Factory1::class => Factory::class,
            Factory2::class => Factory1::class,
            Factory::class => Factory2::class,
        ]
    ];

    function createDelegatorFromName($name, $options) {

        while (isset($this->delegators[$name])) {
            if (! is_cyclic($this->delegators[$name])
                return $this->createDelegatorFromName($this->delegators[$name], $options);
        }

        // create the factory here and the creationCallback here

        $this->delegators[$name] = $delegatorFactory;

        return function () use ($delegatorFactory, $name, $creationCallback, $options) {
            return $delegatorFactory($this->creationContext, $name, $creationCallback, $options);
        };
    }

Please let me know, if you need a working example.

Ah, you want to unify factories and delegators. I don't think these should be unified, as they are completely distinct concepts (although "delegator" is the wrong name, as I've blogged/explained in https://ocramius.github.io/blog/zend-framework-2-delegator-factories-explained/ ).
One applies a decorator around a service, the other builds a service with just the container as aid.

Unification is not the primary goal. Delegator linked lists would get resolved. We could remain with that keys, which don't reference a delegator must be declared factory (as current).

Having a flat configuration is what I'm striving for here. That would provide a good starting point to make ServiceManager faster. Allthough there's some room for improvement left without changing to the config structure.

What do you about the original question, lazy services, separation of concerns and simplification of lazy services config?

No response at all? Interesting. I wonder and wonder again, what reasoning could be  behind that silence. Quite difficult to imagine. ;)

Closing as per https://github.com/zendframework/zend-servicemanager/pull/254#issuecomment-364026562


SPI_Write to Pi4

SPI writes are not  behaving as expected.

When Pi reads from Pico, received data is shifted by 4 bytes to the right. So first 4 bytes are always 0x00, then expected bytes apear and flow over to nexttime Pi reads from pico.


Fixed horizontal scrollbar reducing circular progress size on medium …

…devices.
Issue
here
Description
Just make 10 px small circular-progress-badge for Medium Devices
Test Evidence
Evidences on the issue

I can still see the scrollbar on small device. This PR doesn't seems to fix the issue.

Thank you @toniop99 for the PR. Btw, I can still see the scrollbar on small device. Can you please make sure you it fixes the issue?

Of course, I'll look at it further.


De-emphasize the downloadable files

Currently on PyPI and Warehouse the list of files to download is a major part of the project detail page. However an overwhelming majority of downloads of files come from automated clients (see below) which will never use this list. It seems to me that we would be better off finding a way to de-emphasize this list of files in some way (behind a modal? I don't know). After talking with @r1chardj0n3s I don't believe flat out removing this list of files is the right answer.

Done on the new UI!


Upgrade to Odoc 2.0.0

In Odoc 2.0.0 (which is not released yet), the parser will be packaged separately and the API will change slightly. The API might change a bit again, I'll update this PR accordingly.
An other change is the "metadata" field, allowing to attach informations on every code blocks:
{@ocaml labels... [ ... ]}

This PR updates the code to work with the new version and handle the metadata field.
An other change in this PR is that code blocks without header are no longer run. Existing code blocks that were running before need to be changed. Perhaps this change is out of scope and should be removed ?

Thanks for taking care of this!
I haven't looked at the code but there are a couple of high level things I'd like to discuss.
My first concern is compatibility with older code. I'd like the behaviour of MDX not to change after this patch, as much as possible. Blocks with no headers should run exactly the same as before.
My understanding was that the content between {@ and [ would not be interpreted by odoc at all. I'm guessing that if you're considering forcing the first component to be a language header, that means you do intend to interpret it somehow in odoc. If so, what will odoc do with this header?
If odoc does want the first bit to be a language header, then maybe it's better to make the parser aware of that so that we don't have to deal with this here and can get a pair made of the language header and the rest (which is the part we care the most about here). It's also probably a good idea to have a clear separation between language header and custom headers, so that you can have one without the other. I don't see a good reason for forcing MDX users to add a language if they want to use MDX features.
The last point is more of an open quesiton but I'm wondering if we should not use language headers at all in mli files and rely on the kind label instead. I guess the answer here does depend on whether odoc plans on using language headers. If not, I don't think MDX should introduce them as they don't have an actual semantic value on their own. They were used to infer block types but this has proved not to be such a good idea, leading to bad error reporting and other similar issues.
We could keep supporting toplevel blocks with no labels and enforce any other blocks to at least have the kind label for MDX to interpret it. I think overall it would improve MDX behaviour and make MDX document more readable for people maintaining them.

I'd like the behaviour of MDX not to change after this patch, as much as possible. Blocks with no headers should run exactly the same as before.

I agree that this change was a bit out of scope. I'll revert it.
My concern was that some blocks might not be intended to run or might not be OCaml code. That would make Mdx not work by default if it were run in CI for example.

what will odoc do with this header?

The first word would be the language tag and it might be used for syntax highlighting in the html backend.

make the parser aware of that so that we don't have to deal with this here and can get a pair made of the language header and the rest

Yes, that's what I meant.

We could keep supporting toplevel blocks with no labels and enforce any other blocks to at least have the kind label for MDX to interpret it.

That would be great! Do you think we should change the syntax to have the language tag optional to avoid passing informations twice in this case ?
We don't have clear plans yet for the language tag, it looked interesting to add because Mdx might use it.

You're right. I think supporting an optional language tag in odoc, so that it can be used to generate the right, syntax highlighted HTML is a perfectly valid reason to allow adding language tag to code blocks.
I think it should be optional indeed, both for compatibility reasons and because sometimes there might be blocks we don't know how to highlight and for which there isn't really a point in adding a language tag but where you might still want to add headers. For example, an MDX file include block that's importing the content of a text file.
To clarify I feel like users should be able to write blocks with just a language tag, just custom headers, both or none. The syntax probably need to be changed for that to work well, e.g. have a symbol marking the beginning of the header. I don't have any particular opinion on what it should look like and I trust you to make the right choice here!
I think the kind label doesn't necessarily dispense one from adding a language tag as they might still want to have it properly highlighted in the generated documentation.
Remains the question of how to highlight toplevel blocks, which aren't strictly speaking valid ocaml syntax but we can work this one out I guess.
Regarding simple blocks and MDX, if I remember correctly, the current behaviour is that blocks are inspected: if they follow the toplevel blocks syntax, they are evaluated by MDX, otherwise they are simply ignored. I think we should preserve this with this patch. The good news is that now, users are able to add a skip label to blocks they don't want MDX to temper with. I feel like it's a win-win situation!
This all looks really promising, I'm fairly excited to get that out! Let me know if there's anything I can do to help with this on either sides (MDX or odoc)!

Thanks for looking this over @NathanReb! I'm curious about the problems you encountered with the language tag? I can't immediately see a useful difference between {@ocaml foo=bar[...]} and {@kind=ocaml foo=bar[...]}, but perhaps I'm misinterpreting what you're suggesting? It would be helpful to see some examples of the distinction you mean.

In Markdown, the language tag is used for markdown interpeters to generate the styling for the code blocks. MDX used this information to infer how to interpret the content of the block, along with the syntax of the block content itself but it has not strong semantic meaning. There are 4 different ways to interpret a block for MDX:

It's an ocaml toplevel block, made of toplevel phrases interleaved with their printed evaluation, similar to what one gets running an interactive toplevel
A raw OCaml block, made of any valid ocaml structure. MDX will make sure this block compile by running it as a toplevel phrase but won't print any output.
A file include block, it's made of a bit of arbitrary text that MDX imported from a file as specified by the labels
A shell block, which is similar to a toplevel block except that it's made of shell commands interleaved with their standard output and error.

For example, the first 3 blocks can contain OCaml code, or something you'd want to style as OCaml code. The language tag is too ambiguous on its own and MDX can't rely on that only to find out how to interpret the block. At some point it will have to make a guess, which might differ from what the user wanted. This guess will affect how MDX report errors and it can lead to a great deal of confusion when MDX and the user had different expectations for that block.
Another issue with this is that, atm, toplevel blocks have a different syntax than the raw OCaml one, and can't be styled the same way.
In short, the block type and the language tag are two different piece of information, used for different purposes and this is why I believe they should be handled differently.
I believe the block kind is clear and explicit as to what MDX is going to do with that block both for user and for MDX itself, which in return allows MDX to guide users when they make mistake such as forgetting to specify a mandatory label or use the wrong syntax for that specific kind of block.
For compat reasons, we'll maintain that behaviour in markdown files but we'd like to encourage our users to slowly migrate to the prefered block kind approach. If I can avoid doing the same mistakes in mli files from the start, I would much rather do that!

Does this mean that if a block is included it can't be treated as a block of ocaml? That is, I can't interpret it and add to the environment for a subsequent block to use?

I think this PR should be split - one PR to switch to odoc-parser (with no support of code-block metadata) and a follow up with the rest of the changes.

@jonludlam this definitely sounds sensible!

The parser is released, I updated this PR and removed the commit about the metadata field, it is ignored for now.

Ouh also, could you please rebase on top of master so the 4.13 build succeeds?

I don't think there was a bug fix required for odoc-parser - it was just a difference in expectations about what the initial location meant.

Rebased, changelog update and alias removed. Good to merge for me.

This is due to the master branch updating the dune lang version!

Okay, let's merge this!
Huge thanks to both of you @Julow @jonludlam for taking care of this!


[Component] Text-field

ZeroHeight: https://spark.adevinta.com/1186e1705/p/773c60-input--text-field/b/0658e2
Figma: https://www.figma.com/file/NsGfE3UnbhEyAPpVf3B60P/Spark-Components?type=design&node-id=123%3A6806&t=9aDWd2QH5gqb5ORS-1
Details:

Basic asterisk * is used on label for mandatory field
Intents will have status icon at the end of the field, regardless of the field being active or inactive)
Intents will change the color of status icon, label, helper text, and field border
Clear button is optional (Slack conversation)
Trailing element will be replaced by status icon if the field has a state (Slack conversation)
Focus should only wrap input area, addons are separately focusable

To be discussed:

VoiceOver behavior on addons and text area - Client will decide themself how VO behaves
To have floating label or not - No
Label and placeholder behavior:
- On Android, the label is placed inside the text area, regardless of placeholder existing or not, in inactive & empty state. Once the field becomes active, the label moves up and the placeholder is shown when the field is still empty.
- On Web, the label is always on the top and the placeholder is always shown when the field is empty. - Do this for iOS

Results after a first testing session :

dark mode does not work, @jacklyn-situmorang is investigating
cursor is blue, no matter the intent : can we change this color ? @jacklyn-situmorang is investigating

some questions for design (especially the selected state) : waiting for an answer here

cc: @elisa-hery
Will be fixed in this ticket:
- Active state
- Cursor color
Will be fixed in #607 :
- Disabled state for add-on
Will be fixed in #622 :
- Composability
- Demo app on dark mode


Ability to return a custom HTTPResponse as result of a validation inside the HTTPValidator response

Feature Request
HTTPValidator responses include the ability to retry a call, fail the chain or move successfully to the next validator.
Sometimes you may want to slightly modify the received response by altering some values or return a custom subclass of the HTTPResponse with some data inside.
This involves some changes:

The HTTPResponse struct becomes a class so we can inherit from it
Some properties of the HTTPResponse must be marked as open
HTTPValidator allows a new return value of HTTPResponseValidatorResult called nextValidatorWithResponse which allows to return a new HTTPResponse instance which is forwarded along any subsequent validator until the end.

The important change is the transformation to struct which implies changes from the memory management side.

Example
This is an example of the flow which can return a custom subclass of the HTTPResponse with a parsed JSON data.
Our test web service return an error field inside the response with a messages in case of some logic errors.
We would use HTTPValidator to validate the response and, in the meantime, avoid to do multiple parses of the data.
So we return a custom HTTPResponse subclass with the JSON inside


Add SPHERE support to "sox_io" backend

Relates to #868

Merging this par the confirmation https://github.com/pytorch/audio/issues/868#issuecomment-671874561


fix: This requires the 'super-parameters' language feature to be enabled.

Description
Getting errors This requires the 'super-parameters' language feature to be enabled on very_good create app1
I am on latest flutter channel master and have done the flutter upgrade.
current version
Flutter 3.1.0-0.0.pre.1615 • channel master • https://github.com/flutter/flutter.git
Framework • revision faabe2b6e5 (2 hours ago) • 2022-07-12 06:05:07 -0400
Engine • revision 2ee0b934b9
Tools • Dart 2.18.0 (build 2.18.0-271.0.dev) • DevTools 2.15.0
Steps To Reproduce

very_good create app1
in app.dart, super.key gives the error This requires the 'super-parameters' language feature to be enabled.
Also i10n.dart has errors like Target of URI doesn't exist: 'package:flutter_gen/gen_l10n/app_localizations.dart'.

Expected Behavior
clean working starter app on very_good create app1
Additional Context
running all this on windows environment

Depending on the version of very_good_cli you have installed you may have to adjust the created sample if you are using an old version fo flutter (which is your case). What is the very_good_cli version you are using?

Closing this as the above comment would solve your issue, or updating your flutter version would work as well.


Draw text on top of everything else in TrafficGraphWidget

It's hard to read what the actual rate is when traffic graph reaches the left side. This should fix it.
Before:

After:

Added before/after pics to illustrate the issue and the result.


report: Introduce markdown support.

Depends on https://github.com/iterative/dvc-render/pull/69
Closes #91
The new default value for report is auto.
If CI env var is set, use md else use html.
import random
import time

from dvclive import Live
from PIL import Image
from PIL import ImageDraw

live = Live(report="md")

for i in range(2):
    live.log("foo", i + random.random())
    live.log("bar", i + random.random())

    img = Image.new("RGB", (50, 50), (255, 255, 255))
    draw = ImageDraw.Draw(img)
    draw.text((20, 20), f"{i  + random.random():.1f}", (0,0,0))
    live.log_image("img.png", img)
    live.next_step()
    time.sleep(5)

Codecov Report

Merging #266 (524403b) into main (b16f60a) will decrease coverage by 0.57%.
The diff coverage is 89.28%.

@@            Coverage Diff             @@
##             main     #266      +/-   ##
==========================================
- Coverage   90.62%   90.05%   -0.58%
==========================================
  Files          21       21
  Lines         736      744       +8
==========================================
+ Hits          667      670       +3
- Misses         69       74       +5

Impacted Files
Coverage Δ

dvclive/report.py
93.65% <82.35%> (-4.50%)
:arrow_down:

dvclive/live.py
97.16% <100.00%> (ø)

dvclive/utils.py
95.00% <0.00%> (-5.00%)
:arrow_down:

dvclive/dvc.py
20.00% <0.00%> (+0.64%)
:arrow_up:

Continue to review full report at Codecov.

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

Does the markdown report get generated automatically on live.next_step()? Do we need to follow up on https://github.com/iterative/dvclive/issues/231 to clarify behavior in this scenario now that we have non-html reports?

PIL will fail when writing to paths where the intermediate dirs don't exist yet. This is causing problems especially when using the dvclive callbacks since they automatically use intermediate dirs. Traceback:
eback (most recent call last):
  File "/Users/dave/Code/lstm_seq2seq/train.py", line 96, in <module>
    model.fit(
  File "/Users/dave/miniforge3/envs/tensorflow/lib/python3.10/site-packages/keras/utils/traceback_utils.py", line 67, in error_handler
    raise e.with_traceback(filtered_tb) from None
  File "/Users/dave/Code/dvclive/dvclive/keras.py", line 49, in on_epoch_end
    self.dvclive.next_step()
  File "/Users/dave/Code/dvclive/dvclive/live.py", line 150, in next_step
    self.set_step(self.get_step() + 1)
  File "/Users/dave/Code/dvclive/dvclive/live.py", line 142, in set_step
    self.make_report()
  File "/Users/dave/Code/dvclive/dvclive/live.py", line 207, in make_report
    make_report(
  File "/Users/dave/Code/dvclive/dvclive/report.py", line 85, in make_report
    render_markdown(renderers, output_path)
  File "/Users/dave/Code/dvc-render/src/dvc_render/markdown.py", line 68, in render_markdown
    renderer.generate_markdown(output_path=output_path)
  File "/Users/dave/Code/dvc-render/src/dvc_render/vega.py", line 118, in generate_markdown
    plt.savefig(output_file)
  File "/Users/dave/miniforge3/envs/tensorflow/lib/python3.10/site-packages/matplotlib/pyplot.py", line 979, in savefig
    res = fig.savefig(*args, **kwargs)
  File "/Users/dave/miniforge3/envs/tensorflow/lib/python3.10/site-packages/matplotlib/figure.py", line 3046, in savefig
    self.canvas.print_figure(fname, **kwargs)
  File "/Users/dave/miniforge3/envs/tensorflow/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 2319, in print_figure
    result = print_method(
  File "/Users/dave/miniforge3/envs/tensorflow/lib/python3.10/site-packages/matplotlib/backend_bases.py", line 1648, in wrapper
    return func(*args, **kwargs)
  File "/Users/dave/miniforge3/envs/tensorflow/lib/python3.10/site-packages/matplotlib/_api/deprecation.py", line 415, in wrapper
    return func(*inner_args, **inner_kwargs)
  File "/Users/dave/miniforge3/envs/tensorflow/lib/python3.10/site-packages/matplotlib/backends/backend_agg.py", line 541, in print_png
    mpl.image.imsave(
  File "/Users/dave/miniforge3/envs/tensorflow/lib/python3.10/site-packages/matplotlib/image.py", line 1675, in imsave
    image.save(fname, **pil_kwargs)
  File "/Users/dave/miniforge3/envs/tensorflow/lib/python3.10/site-packages/PIL/Image.py", line 2297, in save
    fp = builtins.open(filename, "w+b")
FileNotFoundError: [Errno 2] No such file or directory: 'results/train/loss.png'

Can we reorganize the structure of the markdown output and images? Using the keras callback, I end up with a dvclive dir that looks like:
$ tree results # name of the dvclive dir
results
├── eval
│   ├── accuracy.png
│   └── loss.png
├── report.md
├── scalars
│   ├── eval
│   │   ├── accuracy.tsv
│   │   └── loss.tsv
│   └── train
│       ├── accuracy.tsv
│       └── loss.tsv
└── train
    ├── accuracy.png
    └── loss.png

Could all of the md-related info be in one dir?
Also, is there any way we can create some consistency between where html and md get written?

ValueError: generate_markdowncan only be used withLinearTemplate``
live.log_plot("confusion_matrix") is not supported?

It is not. The initial scope was meant for step scenarios and log_plot can't be used in those. We could open an issue to follow up adding markdown support for confusion matrix template in https://github.com/iterative/dvc-render

The new default value for report is auto.
If CI env var is set, use md else use html.

Isn't that a bit extreme? 🤔 I would prefer a less astonishing behavior.

Isn't that a bit extreme? 🤔 I would prefer a less astonishing behavior.

Users have the ability to select the value for report between {None, html, md, auto}.
In auto, we make the assumption that html format is useful for local runs and md useful for CI. If we don't have something like that, we would require users to change the code between local and CI runs manually.
We could make it less extreme by not making auto the default, so users have to explicitly opt in.
Alternatively, report could be configured via an ENV var (i.e. DVCLIVE_REPORT) that overrides the value in Python code (I like the auto mode better than this)

Could the format be detected instead by using the file extension?

DVCLive doesn't know about the file CML is watching, it only knows the value passed to the report argument in the Python code.

Alternatively, report could be configured via an ENV var (i.e. DVCLIVE_REPORT) that overrides the value in Python code (I like the auto mode better than this)
Thoughts ^ @dberenbaum

Agree with your comment @daavoo. We could add this environment variable (let's wait to see if it's needed), but it seems like reasonable default behavior if we document it. It's not unusual at least in ML libraries like sklearn to have "auto" options with conditional logic like this.

it only knows the value passed to the report argument in the Python code

Wouldn't that be enough to infer the format? E.g. if report ends with .md ...

We could make it less extreme by not making auto the default, so users have to explicitly opt in.

If users are going to copy/paste a snippet anyway from the documentation, requiring an explicit format="md" doesn't seem that bad to me. Anyway, just a nitpick. 💅🏼


Godot Engine runs slow

Hello,
So i have the problem that godot runs slow like 15fps (Estimated) and it runs slower when using tilemap editing
Godot version:
3.0.2
OS/device including version:
Windows 10
CPU: i3 3220
RAM: 8gb 1600mhz DDR3 Ram
GPU: asus radeon hd 6850 Directcu
Mainboard: ASRock H61M-GS
*i didnt use a big project

Godot runs decently on my computer, but I noticed slowness too in tilemap editing: https://github.com/godotengine/godot/issues/12391

6850 and i3 3220...

Hi @DroidPlayer12, this could be a graphic driver issue. Are your graphic drivers up to date?

No i have the newest drivers available

@DroidPlayer12 Can you tell if there is any significant difference between 2.x and 3.x version of Godot?

Just another driver-related issue.. Godot is not slow if you use fresh drivers, non-damaged hard drive and your system is not under virus attack. Closed, also because the discussion is stopped


Check data representation chapter for formatting and update text

Formatting fixed, minor wording fixes, moved lingering snippets of NZ material to appendix.
commit c77e860a70829cdc3488ca8cee3aaf3ad755d4aa


SDL - banned API memcpy

Hi, we noticed that DirectX Tool Kit in few places uses functions (e.g. memcpy) that we try to globally ban in our projects. In case of memcpy it seems that parts of the kit already uses memcpy_s, can you please prioritize transforming the rest? Thank you.

Hi Chuck, our SDL tooling is flagging only memcpy in WICTextureLoader.cpp. I think usage there is fine but since it's just couple of places, would be nice to avoid it if possible. Thanks.

Seems legit to use memcpy_s for file parsing code, so sure.

Yeah, it seems odd to do memcpy_s when the parameter for both DestinationSize and SourceSize is the same thing. It does make sense if they are two different things...

See this commit.
Also looking at other GitHub projects.

Thanks Chuck, I agree memcpy was fine in this case - thanks anyway for the change.


Bullet points are missing from our docs (develop only)

Seems to be on each and every page with bullet points...
Stable

Hotfix 1.11.7 (as of https://github.com/dockstore/dockstore-documentation/commit/9c3686545136e3b69741ab8756381114659bc37d), via make html

Develop

Expected behavior
Not this.
┆Issue is synchronized with this Jira Story
┆friendlyId: DOCK-2064
┆sprint: S4 - C again
┆taskType: Story

Everything seemed fine locally until I recreated a venv, now bullets are gone locally too. Something is going wrong in the installation process. Might be the recent changes to requirements.txt?

Undoing the most recent commit on develop results in the bullet points reappearing, but also throws two warnings.

writing output... [100%] wdl_instructions
/Users/ash/Repos/dockstore-documentation/docs/docker_instructions.md:9: WARNING: 'myst' reference target not found: #part-a-readings
/Users/ash/Repos/dockstore-documentation/docs/docker_instructions.md:39: WARNING: 'myst' reference target not found: #part-b-readings

These reference what appears to be valid markdown syntax for headers that do indeed exist...

I've narrowed it down to the pinned versions in the new requirements.txt. Unpinned versions grab newer numbers and the bullet points are back, while sphinx==4.4.0 myst-parser==0.16.1 sphinx_rtd_theme==0.4.3 is resulting in no bullet points.

Merged in dockstore/dockstore-documentation#168


Loss is significantly worse when calculated manually in train_step compared to passed into model.compile

Click to expand!
Issue Type
Bug
Source
binary
Tensorflow Version
2.8.2
Custom Code
Yes
OS Platform and Distribution
Linux Ubuntu 18.04.5
Mobile device
No response
Python version
Python 3.7.13
Bazel version
No response
GCC/Compiler version
No response
CUDA/cuDNN version
No response
GPU model and memory
No response
Current Behaviour?
I am following the steps here for customizing what happens in `train_step` when you customize a model:

https://www.tensorflow.org/guide/keras/customizing_what_happens_in_fit

The issue is, I am getting very different results for the loss when I am using the exact same tensorflow.keras.losses.mean_squared_error function in different locations.

When I use mean_squared_error "manually" during train_step (I am calling this the non-compiled mse), the loss is significantly worse than if I  pass it into the compile method, e.g. `model.compile(optimizer="adam", loss=mean_squared_error)` (I am calling this the compiled mse).

tensorflow.keras.metrics.MeanSquaredError yields roughly the same result as the compiled version of mse, but it is still not exactly the same.

My expectation is that the loss should be the same whether it is passed into `.compile`, defined during `train_step`, or used as a metric. But it is significantly worse if I do not pass it into `.compile` and I don't know why. I am following the documentation exactly and as far as I can tell, I am not doing anything incorrectly.

Why is the loss so different when it is and is not passed into `.compile`?

Standalone code to reproduce the issue
I have reproduced this behavior in this google colab notebook, but will also paste the code below. The plot shows that non-compiled mse is systematically worse than compiled mse.

https://colab.research.google.com/drive/1c1L8KJYQbAldphKvFvmw5cHi9EyBQP0X?usp=sharing

import tensorflow as tf
from tensorflow.keras.metrics import Mean, MeanSquaredError
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Dense, Dropout, Input
from tensorflow.keras.optimizers import Adam
from tensorflow.keras.losses import mean_squared_error
import matplotlib.pyplot as plt

seed = 113
epochs = 30
batch_size = 10

n = 5
history_dict = {}

# load dataset
(x_train, y_train), (x_test, y_test) = tf.keras.datasets.boston_housing.load_data(
    path="boston_housing.npz", test_split=0.2, seed=seed,
)
n_validate = int(0.1 * len(x_train))
train_dataset = tf.data.Dataset.from_tensor_slices(
    (x_train[:-n_validate], y_train[:-n_validate])
).batch(batch_size)
valid_dataset = tf.data.Dataset.from_tensor_slices(
    (x_train[-n_validate:], y_train[-n_validate:])
).batch(batch_size)
test_dataset = tf.data.Dataset.from_tensor_slices(
    (x_test, y_test)
).batch(batch_size)

for i in range(n):

    tf.keras.backend.clear_session()

    mse_tracker = Mean(name="non_compiled_mse")
    mse_tracker_metric = MeanSquaredError(name="mse_metric")

    class CustomModel(Model):

        @tf.function
        def train_step(self, data):
            x, y_true = data
            with tf.GradientTape() as tape:
                y_pred = self(x, training=True)
                compiled_mse = self.compiled_loss(y_true, y_pred)
                non_compiled_mse = mean_squared_error(y_true, y_pred)
                mse_tracker.update_state(non_compiled_mse)
                mse_tracker_metric.update_state(y_true, y_pred)
            gradients = tape.gradient(compiled_mse, self.trainable_variables)
            self.optimizer.apply_gradients(zip(gradients, self.trainable_variables))
            return {m.name: m.result() for m in self.metrics}

        @tf.function()
        def test_step(self, data):
            x, y_true = data
            y_pred = self(x, training=False)
            compiled_mse = self.compiled_loss(y_true, y_pred)
            non_compiled_mse = mean_squared_error(y_true, y_pred)
            mse_tracker.update_state(non_compiled_mse)
            mse_tracker_metric.update_state(y_true, y_pred)
            return {m.name: m.result() for m in self.metrics}

        @property
        def metrics(self):
            return super().metrics + [mse_tracker, mse_tracker_metric]

    input_layer = Input(shape=x_train.shape[1:])
    x = Dense(8, activation='linear')(input_layer)
    x = Dense(8, activation='linear')(x)
    output_layer = Dense(units=1, activation='linear')(x)
    model = CustomModel(input_layer, output_layer)
    model.compile(optimizer=Adam(learning_rate=1e-3), loss=mean_squared_error)
    history = model.fit(
        train_dataset,
        validation_data=valid_dataset,
        epochs=epochs,
        verbose=0,
    )
    history_dict[f"compiled_mse_{i}"] = history.history["loss"]
    history_dict[f"non_compiled_mse_{i}"] = history.history["non_compiled_mse"]
    history_dict[f"mse_metric_{i}"] = history.history["mse_metric"]

plot_start_epoch = 5
plt.figure(figsize=(12, 6))
for i in range(n):
    plt.plot(
        range(epochs)[plot_start_epoch:],
        history_dict[f"compiled_mse_{i}"][plot_start_epoch:],
        label=f"compiled_mse" if i == 0 else None,
        color="black",
    )
    plt.plot(
        range(epochs)[plot_start_epoch:],
        history_dict[f"non_compiled_mse_{i}"][plot_start_epoch:],
        label=f"non_compiled_mse" if i == 0 else None,
        color="orange",
    )
    plt.plot(
        range(epochs)[plot_start_epoch:],
        history_dict[f"mse_metric_{i}"][plot_start_epoch:],
        label=f"mse_metric" if i == 0 else None,
        color="red",
        linestyle="dashed",
    )
plt.ylabel("loss")
plt.xlabel("epoch")
plt.title("compiled vs non-compiled mse vs mse metric")
plt.legend()
plt.show()

Relevant log output
No response

@Yacalis I was able to replicate this issue, please find the gist here and
post this issue on keras-team/keras repo.
To know more see;
https://discuss.tensorflow.org/t/keras-project-moved-to-new-repository-in-https-github-com-keras-team-keras/1999
Thank you!

@sushreebarsa Thank you, I have opened a new issue at keras-team/keras, and it actually looks like you were automatically assigned to it:
https://github.com/keras-team/keras/issues/16836

@Yacalis Thank you for the update!
Please move this issue to closed status as we will track the other ticket there.
Thank you!


GenerateExternalAzureStorageTableCreateOrAlterCommand creates invalid partition by definition

When passing a partitionList it will generate a partition by clause like this: partition by p1, p2, p3, ... which is not accepted by ADX. The partitions need to be enclosed in parenthesis like this partition by (p1, p2, p3, ...)

Checking.

We've already fixed this bug in the latest SDK (released earlier this month).
Please upgrade to the latest SDK version, and it will work for you.

Ack, this is a bug.
We'll fix, and will release a new SDK version in January.
I'll update here when we do.

@chriswue, the bug is fixed in the latest SDK version.
Again, thanks for reporting.


Revert "feat(container): update container image docker.io/library/influxdb to v2.6"

Reverts ahgraber/homelab-gitops-k3s#1217

issue was OOMkill not update


"If the ANSI code page is configured for UTF-8, -A APIs operate in UTF-8" - far too sweeping (i.e., wrong)

This statement is (currently, Windows 10 10.0.19042.746) far too inclusive, and thus, it is wrong.
Just to name one API (set) that does not "operate in UTF-8": Find{First,Next}FileA.  It returns file name (components) in some non UTF-8 encoding even if the process code pages is set to UTF-8 as described on this page.

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

ID: 8a28119a-77f2-160c-a4f1-f90ef9153423
Version Independent ID: 28b24e82-f0ef-cceb-2136-f8dbfabfcadc
Content: Use the Windows UTF-8 code page - UWP applications
Content Source: windows-apps-src/design/globalizing/use-utf8-code-page.md
Product: uwp
Technology: design
GitHub Login: @Karl-Bridge-Microsoft
Microsoft Alias: kbridge

Thanks @david-bakin - topic has been revised to be less absolute.


ModuleNotFoundError: No module named 'familia'

i want to use the sentenceLDA model.
i run the command:
$ sh build.sh
$ cd model
$ sh download_model.sh
$ cd ..
when building ,it arised some warnings but no error.
then i run this command in python(import familia),it arised ModuleNotFoundError.what's wrong?

Hello. I also try to import familia, but met other problems. It seems hard for everyone to use correctly. Actually, I implement the python version Familia. If you want to use LDA model, you can use PaddleHub: https://www.paddlepaddle.org.cn/hublist?filter=en_category&value=SemanticModel . However, if you want to use SLDA model, you can visit here: https://github.com/DesmonDay/Familia_PaddleHub
I will try to optimize the SLDA model later, and add it to the official PaddleHub.

thanks you, I want to use SLDA model to calculating similarity of two sentence.
I look up the code at https://github.com/DesmonDay/Familia_PaddleHub,and found SLDA model only supply two functions: infer_doc_topic_distribution() and show_topic_keywords().
Will you supply  other methods in SLDA model such as cal_doc_distance(), cal_doc_keywords_similarity(), cal_query_doc_similarity()  in LDA model.

Ok. I will tell you once done.

Thank you  very much!

Hi. I provide the other three functions for SLDA model. But remember to read README.md(where I add some notes.) first.


Added configuration to copy static files to build result - fixes #941

added copy-webpack-plugin to address the issue mentioned in #941

Coverage remained the same at 98.468% when pulling a092087edf93c1047d12b1b1c583975d39c7c769 on lucidlemon:master into c561483d73291e9c5aac9b1109af73d84cc5bb6b on mxstbr:master.

https://github.com/mxstbr/react-boilerplate/issues/941#issuecomment-244310696


imagenet_r dataset added

This change resolves #284  by adding the option to load ImageNet-R dataset and also includes the pytest for the same.

Hi @ranarag ,
Thanks for you PR ! :)
Sorry for not looking at your PR earlier.
If I understand correctly you want to reproduce an existing scenario from 'https://github.com/GT-RIPL/CODA-Prompt' ?
Maybe as Imagenet_R was not proposed in https://github.com/GT-RIPL/CODA-Prompt but in another paper, it would be better to only stick to the original data in the dataset class.
The data specific to the scenario could be provided in a scenario class similarly to ALMA in https://github.com/Continvvm/continuum/blob/master/continuum/scenarios/specific_scenarios.py file.
Also, adding a description of the scenario in the doc would be nice :)
have a nice day
Timothée


🐞 dagger init should not create a LICENSE file by default

What is the issue?
Yes, I know https://github.com/dagger/dagger/issues/7703 was debated.  Not sure if the typescript SDK is not fixed yet or what.
Dagger is a build system for end-user projects.  You should never arbitrarily add a LICENSE file if one does not exist.
@helderco  -- your comments specify the exact behavior end users expect:

dagger init --sdk .... -- no license file created
dagger init --sdk ... --license -- create a license file

I get the daggerverse angle, but you can't
Dagger version
dagger v0.13.3 (registry.dagger.io/engine:v0.13.3) linux/amd64
Steps to reproduce
internal-dagger  dagger @ dd63e5a ⩮ ❯ dagger init --sdk=typescript --source=./.dagger
✔ connect 0.3s
✔ moduleSource(refString: "."): ModuleSource! 0.0s
✔ ModuleSource.kind: ModuleSourceKind! 0.0s
✔ ModuleSource.resolveContextPathFromCaller: String! 0.0s
✔ ModuleSource.withName(name: "internal-dagger"): ModuleSource! 0.0s
✔ ModuleSource.withSDK(sdk: "typescript"): ModuleSource! 0.0s
✔ ModuleSource.withInit: ModuleSource! 0.0s
✔ ModuleSource.withSourceSubpath(path: ".dagger"): ModuleSource! 0.0s
✔ ModuleSource.resolveFromCaller: ModuleSource! 1.1s
✔ ModuleSource.asModule(engineVersion: "latest"): Module! 47.7s
✔ Module.generatedContextDiff: Directory! 0.0s
✔ Directory.export(path: "/home/mcrowe/Programming/Pinnacle/internal-dagger"): String! 5.3s

07:19:41 WRN no LICENSE file found; generating one for you, feel free to change or remove license=Apache-2.0
Initialized module internal-dagger in .

internal-dagger  dagger @ dd63e5a ⩮⋄ 55s ❯ git status
On branch dagger
Untracked files:
  (use "git add <file>..." to include in what will be committed)
        .dagger/
        LICENSE
        dagger.json

Log output
No response

This happens in the CLI, for every SDK. There's nothing specific to TypeScript.
But what you ask is actually in alignment with:

https://github.com/dagger/dagger/issues/8452
https://github.com/dagger/dagger/issues/8511

I know this has been discussed internally in relation to the Daggerverse, but I don’t know if anything’s been decided yet. \cc @jpadams, @shykes

Yes , I agree with @helderco , got the same warning while using go SDK ( common for every SDK) .
12:46:58 WRN no LICENSE file found; generating one for you, feel free to change or remove license=Apache-2.0
As Dagger generated a default LICENSE file  with the Apache-2.0 license , it's a common behavior when creating new projects or modules.
What I'm debating is , can I safely remove this LICENSE file without any issues ?

What I'm debating is , can I safely remove this LICENSE file without any issues ?

Yes -- the goal of dagger is to not litter your source.  If the LICENSE was not present before dagger, you are safe to remove it

Thankyou @drmikecrowe for the confirmation
Can we   Introduce a command-line flag (e.g., --no-license) that users can specify when running dagger init to skip generating the LICENSE file.
Alternatively, moving the creation of the LICENSE file to the dagger develop command would ensure that it only appears when actual code is being generated as discussed in #6666.
Change would helps in  streamlining  project initialization and reduce unnecessary clutter in repositories.

These are my personal opinions as an end user:

Bottom line: NEVER add a license to an end user's production code unless the user adds the --license.  Changing a proprietary project to open-source would be one of the worst things you could do (this is what happened to me).
The dagger init/develop --license is the correct approach
If you are trying to address Daggerverse modules, Daggerverse is broken beyond the LICENSE aspect and not very useful in the node/TypeScript world (sorry to say).  For example, this kind of content isn't very useful.  I can expand on this if you are interested

Can we Introduce a command-line flag (e.g., --no-license) that users can specify when running dagger init to skip generating the LICENSE file.

You can actually skip creating the license with an empty value to --license:
dagger init --sdk=go --license=

(--license= is that same as --license "")
But I realize that this is neither intuitive nor documented in --help. The reason for this is in:

https://github.com/dagger/dagger/pull/7719#discussion_r1649268408

Basically, we decided not to change the default at the time. That PR was fixing a regression where the LICENSE was being created every time, not just on init. But I suggested taking the opportunity to allow opting out so that users didn’t feel stuck with it. However, I failed to follow up with either docs or a better solution.
I think this issue does that. We should either:

Create a --no-license flag to prevent creating the LICENSE
Stop creating it by default, requiring an explicit --license

The second one is my preference:

dagger init --sdk=go → don’t create license
dagger init --sdk=go --license → create license, defaulting to Apache-2.0
dagger init --sdk=go --license=MIT → create MIT license
dagger init --sdk=go --license= → 🤷 empty | proprietary | no-op | error | use default

Alternatively, moving the creation of the LICENSE file to the dagger develop command would ensure that it only appears when actual code is being generated as discussed in #6666.

Both dagger init and dagger develp can generate code, what triggers it is the --sdk flag:
dagger init
dagger develop --sdk=go

It’s just hat dagger init can do those steps in one go.

I'm struggling with why you are trying to create a LICENSE file.
Here's my new-user view of my dagger journey. I'm your target demographic -- a devops experienced user that is looking for a better CI/CD solution
Scenario 1
dagger init inside the project directory
/my-project
  |- src/
  |- .git/
  |- README.md
  |- LICENSE (or lack thereof)
  |- dagger.json

Scenario 2
dagger init above the project directory
/dagger-folder
  |- my-project/
    |- src/
    |- .git/
    |- README.md
  |- LICENSE (or lack thereof)
  |- dagger.json

Scenario 3
Dagger module development (I'm not even there yet)

I think the license flag is targeting scenario 3, but I'm not sure.  It's not appropriate for new users in either scenario 1 or 2.  Moreover, I don't know how you know the context to distinguish between these different scenarios,  Is dagger init appropriate for 1 and 2 and dagger develop more for option 3?  Would I ever use dagger develop in options 1 and 2?  These are points of confusion regarding dagger module development.
New users will start in scenarios 1 or 2 (I started with scenario 1, which complicated my learning of dagger).  In neither of these cases should a LICENSE ever be created.  In my case, you changed my proprietary code to open-source during dagger init -- that's just wrong.  I think @helderco second set of bullets is right on the mark and should be the default.  --no-license is too dangerous

@drmikecrowe, you're right if I understand you correctly, in that the LICENSE file is intended for the use case of standalone and reusable Dagger modules, that get indexed on the Daggerverse. However, we don't have a good way today to distinguish which case is yours, and the discussion around how to integrate with existing projects is still in flux so things aren't set in stone.