Home Blog Page 3896

cisco – SSH Config on Nexus Swap


That is the documentation for the essential setup:
https://www.cisco.com/en/US/docs/switches/datacenter/nexus5000/sw/configuration/information/cli_rel_4_1/Cisco_Nexus_5000_Series_Switch_CLI_Software_Configuration_Guide_chapter20.html

That’s for a really outdated model so there could also be some adjustments in newer releases of the NXOS software program however the primary instructions ought to be just about the identical.

You might must set a hostname for the change after which allow the SSH function set. The change might include a default key already setup but when not, it’s essential to have it generate a key for it to make use of to start out the SSH service:

change# configure terminal
change(config)# hostname switch1
switch1(config)# function ssh
switch1(config)# ssh key rsa 2048
switch1(config)# exit

As soon as these are carried out, it is best to have the ability to entry the change through SSH. You may additionally must create person accounts for extra customers outdoors of the admin person account.

It’s also possible to create keys related to new person accounts, that’s lined within the documentation I linked.

Relying on the mannequin of change you could have, you could be utilizing a Administration community interface for administration entry to the change. You have to to verify the Administration community interface is configured for the correct IP tackle settings and default route so as to make it reachable out of your networks.

If you’re utilizing the Administration community interface, this web page has a pleasant, concise information on the setup of the Administration interface for a primary community design:

https://humairahmed.com/weblog/?p=6337

Have a look there and see if it matches your expectations.

If you wish to use Layer-3 Swap Digital Interfaces (SVI) on the change, you will have to allow the function set for that:

change# configure terminal
switch1(config)# function interface-vlan
switch1(config)# exit

After which create and configure desired VLANs and VLAN Interfaces:

change# configure terminal
switch1(config)# vlan 500
switch1(config)# interface vlan 500
switch1(config)# ip tackle 10.10.10.1/24
switch1(config)# no shutdown
switch1(config)# exit

That’s an instance for a VLAN quantity 500 and related Layer-3 interface with IP tackle configuration. You would need to use that VLAN on some change interface to attach gadgets that want entry to that community. By default, these gadgets (as soon as on-line) will have the ability to join through SSH to the IP tackle of the VLAN Interface (10.10.10.1). To dam entry through SSH to the change SVI IP addresses, you would wish to create entry lists that block or limit site visitors to port 22 destined to the change IP addresses.

New approach helps robots pack objects into a good area

0


New approach helps robots pack objects into a good area

MIT researchers are utilizing generative AI fashions to assist robots extra effectively clear up complicated object manipulation issues, akin to packing a field with totally different objects. Picture: courtesy of the researchers.

By Adam Zewe | MIT Information

Anybody who has ever tried to pack a family-sized quantity of bags right into a sedan-sized trunk is aware of it is a arduous drawback. Robots battle with dense packing duties, too.

For the robotic, fixing the packing drawback includes satisfying many constraints, akin to stacking baggage so suitcases don’t topple out of the trunk, heavy objects aren’t positioned on prime of lighter ones, and collisions between the robotic arm and the automobile’s bumper are averted.

Some conventional strategies deal with this drawback sequentially, guessing a partial resolution that meets one constraint at a time after which checking to see if another constraints had been violated. With an extended sequence of actions to take, and a pile of bags to pack, this course of will be impractically time consuming.   

MIT researchers used a type of generative AI, referred to as a diffusion mannequin, to resolve this drawback extra effectively. Their methodology makes use of a group of machine-learning fashions, every of which is educated to symbolize one particular sort of constraint. These fashions are mixed to generate world options to the packing drawback, bearing in mind all constraints directly.

Their methodology was in a position to generate efficient options quicker than different strategies, and it produced a better variety of profitable options in the identical period of time. Importantly, their approach was additionally in a position to clear up issues with novel mixtures of constraints and bigger numbers of objects, that the fashions didn’t see throughout coaching.

As a result of this generalizability, their approach can be utilized to show robots find out how to perceive and meet the general constraints of packing issues, such because the significance of avoiding collisions or a need for one object to be subsequent to a different object. Robots educated on this approach may very well be utilized to a big selection of complicated duties in numerous environments, from order success in a warehouse to organizing a bookshelf in somebody’s dwelling.

“My imaginative and prescient is to push robots to do extra sophisticated duties which have many geometric constraints and extra steady selections that should be made — these are the sorts of issues service robots face in our unstructured and numerous human environments. With the highly effective software of compositional diffusion fashions, we are able to now clear up these extra complicated issues and get nice generalization outcomes,” says Zhutian Yang, {an electrical} engineering and laptop science graduate pupil and lead writer of a paper on this new machine-learning approach.

Her co-authors embody MIT graduate college students Jiayuan Mao and Yilun Du; Jiajun Wu, an assistant professor of laptop science at Stanford College; Joshua B. Tenenbaum, a professor in MIT’s Division of Mind and Cognitive Sciences and a member of the Pc Science and Synthetic Intelligence Laboratory (CSAIL); Tomás Lozano-Pérez, an MIT professor of laptop science and engineering and a member of CSAIL; and senior writer Leslie Kaelbling, the Panasonic Professor of Pc Science and Engineering at MIT and a member of CSAIL. The analysis can be offered on the Convention on Robotic Studying.

Constraint problems

Steady constraint satisfaction issues are notably difficult for robots. These issues seem in multistep robotic manipulation duties, like packing gadgets right into a field or setting a dinner desk. They usually contain reaching a lot of constraints, together with geometric constraints, akin to avoiding collisions between the robotic arm and the atmosphere; bodily constraints, akin to stacking objects so they’re steady; and qualitative constraints, akin to putting a spoon to the best of a knife.

There could also be many constraints, they usually differ throughout issues and environments relying on the geometry of objects and human-specified necessities.

To unravel these issues effectively, the MIT researchers developed a machine-learning approach referred to as Diffusion-CCSP. Diffusion fashions study to generate new knowledge samples that resemble samples in a coaching dataset by iteratively refining their output.

To do that, diffusion fashions study a process for making small enhancements to a possible resolution. Then, to resolve an issue, they begin with a random, very unhealthy resolution after which step by step enhance it.

Utilizing generative AI fashions, MIT researchers created a method that might allow robots to effectively clear up steady constraint satisfaction issues, akin to packing objects right into a field whereas avoiding collisions, as proven on this simulation. Picture: Courtesy of the researchers.

For instance, think about randomly putting plates and utensils on a simulated desk, permitting them to bodily overlap. The collision-free constraints between objects will end in them nudging one another away, whereas qualitative constraints will drag the plate to the middle, align the salad fork and dinner fork, and many others.

Diffusion fashions are well-suited for this type of steady constraint-satisfaction drawback as a result of the influences from a number of fashions on the pose of 1 object will be composed to encourage the satisfaction of all constraints, Yang explains. By ranging from a random preliminary guess every time, the fashions can acquire a various set of fine options.

Working collectively

For Diffusion-CCSP, the researchers wished to seize the interconnectedness of the constraints. In packing for example, one constraint would possibly require a sure object to be subsequent to a different object, whereas a second constraint would possibly specify the place a type of objects have to be situated.

Diffusion-CCSP learns a household of diffusion fashions, with one for every sort of constraint. The fashions are educated collectively, in order that they share some information, just like the geometry of the objects to be packed.

The fashions then work collectively to seek out options, on this case areas for the objects to be positioned, that collectively fulfill the constraints.

“We don’t at all times get to an answer on the first guess. However whenever you preserve refining the answer and a few violation occurs, it ought to lead you to a greater resolution. You get steerage from getting one thing flawed,” she says.

Coaching particular person fashions for every constraint sort after which combining them to make predictions significantly reduces the quantity of coaching knowledge required, in comparison with different approaches.

Nevertheless, coaching these fashions nonetheless requires a considerable amount of knowledge that display solved issues. People would wish to resolve every drawback with conventional sluggish strategies, making the associated fee to generate such knowledge prohibitive, Yang says.

As a substitute, the researchers reversed the method by arising with options first. They used quick algorithms to generate segmented bins and match a various set of 3D objects into every phase, guaranteeing tight packing, steady poses, and collision-free options.

“With this course of, knowledge technology is nearly instantaneous in simulation. We will generate tens of 1000’s of environments the place we all know the issues are solvable,” she says.

Educated utilizing these knowledge, the diffusion fashions work collectively to find out areas objects needs to be positioned by the robotic gripper that obtain the packing activity whereas assembly all the constraints.

They carried out feasibility research, after which demonstrated Diffusion-CCSP with an actual robotic fixing a lot of troublesome issues, together with becoming 2D triangles right into a field, packing 2D shapes with spatial relationship constraints, stacking 3D objects with stability constraints, and packing 3D objects with a robotic arm.

This determine reveals examples of 2D triangle packing. These are collision-free configurations. Picture: courtesy of the researchers.

This determine reveals 3D object stacking with stability constraints. Researchers say a minimum of one object is supported by a number of objects. Picture: courtesy of the researchers.

Their methodology outperformed different strategies in lots of experiments, producing a better variety of efficient options that had been each steady and collision-free.

Sooner or later, Yang and her collaborators wish to take a look at Diffusion-CCSP in additional sophisticated conditions, akin to with robots that may transfer round a room. Additionally they wish to allow Diffusion-CCSP to deal with issues in several domains with out the should be retrained on new knowledge.

“Diffusion-CCSP is a machine-learning resolution that builds on current highly effective generative fashions,” says Danfei Xu, an assistant professor within the Faculty of Interactive Computing on the Georgia Institute of Expertise and a Analysis Scientist at NVIDIA AI, who was not concerned with this work. “It could shortly generate options that concurrently fulfill a number of constraints by composing identified particular person constraint fashions. Though it’s nonetheless within the early phases of growth, the continuing developments on this strategy maintain the promise of enabling extra environment friendly, secure, and dependable autonomous techniques in varied purposes.”

This analysis was funded, partially, by the Nationwide Science Basis, the Air Pressure Workplace of Scientific Analysis, the Workplace of Naval Analysis, the MIT-IBM Watson AI Lab, the MIT Quest for Intelligence, the Middle for Brains, Minds, and Machines, Boston Dynamics Synthetic Intelligence Institute, the Stanford Institute for Human-Centered Synthetic Intelligence, Analog Gadgets, JPMorgan Chase and Co., and Salesforce.


MIT Information

The way to parse JSON in Swift utilizing Codable protocol?



· 1 min learn


On this Swift tutorial, I would like to provide you an instance about getting and parsing JSON knowledge utilizing URLSession and Codable protocol.

Dependencies

To start with only a few phrases about dependencies. From Swift 4 you don’t want any dependency to parse JSON knowledge, as a result of there are built-in protocols to handle every little thing. If you’re nonetheless utilizing some type of Third-party it’s best to positively ditch it for the sake of simplicity. By the way in which earlier than you add any exterior dependency into your undertaking, please assume twice. 🤔

Networking

In case your activity is solely to load some type of JSON doc by means of HTTP from across the internet, – shock – you gained’t want Alamofire in any respect. You should utilize the built-in URLSession class to make the request, and get again every little thing that you just’ll want. The Basis networking stack is already a fancy and really helpful stack, don’t make issues much more sophisticated with additional layers.

JSON parsing

Now, after the brief intro, let’s dive in and get some actual faux JSON knowledge from the JSONPlaceholder internet service. I’m going to position the entire thing proper right here, you’ll be able to choose it, copy and paste right into a Swift playground file.

import Basis
import PlaygroundSupport

PlaygroundPage.present.needsIndefiniteExecution = true

struct Submit: Codable {

    enum CodingKeys: String, CodingKey {
        case id
        case title
        case physique
        case userIdentifier = "userId"
    }

    let id: Int
    let title: String
    let physique: String
    let userIdentifier: Int
}

let url = URL(string: "https://jsonplaceholder.typicode.com/posts")!

URLSession.shared.dataTask(with: url) { knowledge, response, error in
    if let error = error {
        print("Error: (error.localizedDescription)")
        PlaygroundPage.present.finishExecution()
    }
    guard 
        let httpResponse = response as? HTTPURLResponse, 
        httpResponse.statusCode == 200 
    else {
        print("Error: invalid HTTP response code")
        PlaygroundPage.present.finishExecution()
    }
    guard let knowledge = knowledge else {
        print("Error: lacking knowledge")
        PlaygroundPage.present.finishExecution()
    }

    // be at liberty to uncomment this for debugging knowledge
    // print(String(knowledge: knowledge, encoding: .utf8))

    do {
        let decoder = JSONDecoder()
        let posts = strive decoder.decode([Post].self, from: knowledge)

        print(posts.map { $0.title })
        PlaygroundPage.present.finishExecution()
    }
    catch {
        print("Error: (error.localizedDescription)")
        PlaygroundPage.present.finishExecution()
    }
}.resume()

As you’ll be able to see downloading and parsing JSON from the online is a very easy activity. This entire code snippet is round 50 traces of code. After all it’s only a proof of idea, but it surely works and also you don’t want any dependency. It’s pure Swift and Basis.

NOTE: To save some typing, you may as well generate the ultimate objects instantly from the JSON construction with these wonderful Xcode extensions.

The Codable protocol – which is definitely a compound typealias from Encodable & Decodable protocols – makes the method of parsing JSON knowledge in Swift magical. 💫

Associated posts


Be taught every little thing about logical sorts and the Boolean algebra utilizing the Swift programming language and a few primary math.


Learn to talk with API endpoints utilizing the model new SwiftHttp library, together with async / await assist.


The one and solely tutorial that you’re going to ever have to study increased order capabilities like: map, flatMap, compactMap, scale back, filter and extra.


Be taught the very fundamentals about protocols, existentials, opaque sorts and the way they’re associated to generic programming in Swift.

Researchers Establish Over 20 Provide Chain Vulnerabilities in MLOps Platforms

0


Researchers Establish Over 20 Provide Chain Vulnerabilities in MLOps Platforms

Cybersecurity researchers are warning in regards to the safety dangers within the machine studying (ML) software program provide chain following the invention of greater than 20 vulnerabilities that could possibly be exploited to focus on MLOps platforms.

These vulnerabilities, that are described as inherent- and implementation-based flaws, may have extreme penalties, starting from arbitrary code execution to loading malicious datasets.

MLOps platforms supply the power to design and execute an ML mannequin pipeline, with a mannequin registry appearing as a repository used to retailer and version-trained ML fashions. These fashions can then be embedded inside an software or permit different shoppers to question them utilizing an API (aka model-as-a-service).

“Inherent vulnerabilities are vulnerabilities which are attributable to the underlying codecs and processes used within the goal know-how,” JFrog researchers stated in an in depth report.

Some examples of inherent vulnerabilities embody abusing ML fashions to run code of the attacker’s selection by profiting from the truth that fashions help automated code execution upon loading (e.g., Pickle mannequin recordsdata).

This habits additionally extends to sure dataset codecs and libraries, which permit for automated code execution, thereby doubtlessly opening the door to malware assaults when merely loading a publicly-available dataset.

Cybersecurity

One other occasion of inherent vulnerability considerations JupyterLab (previously Jupyter Pocket book), a web-based interactive computational setting that permits customers to execute blocks (or cells) of code and look at the corresponding outcomes.

“An inherent problem that many have no idea about, is the dealing with of HTML output when operating code blocks in Jupyter,” the researchers identified. “The output of your Python code could emit HTML and [JavaScript] which can be fortunately rendered by your browser.”

The issue right here is that the JavaScript end result, when run, isn’t sandboxed from the guardian net software and that the guardian net software can mechanically run arbitrary Python code.

In different phrases, an attacker may output a malicious JavaScript code such that it provides a brand new cell within the present JupyterLab pocket book, injects Python code into it, after which executes it. That is notably true in circumstances when exploiting a cross-site scripting (XSS) vulnerability.

To that finish, JFrog stated it recognized an XSS flaw in MLFlow (CVE-2024-27132, CVSS rating: 7.5) that stems from a scarcity of enough sanitization when operating an untrusted recipe, leading to client-side code execution in JupyterLab.

MLOps Platforms

“One among our principal takeaways from this analysis is that we have to deal with all XSS vulnerabilities in ML libraries as potential arbitrary code execution, since information scientists could use these ML libraries with Jupyter Pocket book,” the researchers stated.

The second set of flaws relate to implementation weaknesses, reminiscent of lack of authentication in MLOps platforms, doubtlessly allowing a menace actor with community entry to acquire code execution capabilities by abusing the ML Pipeline function.

These threats aren’t theoretical, with financially motivated adversaries abusing such loopholes, as noticed within the case of unpatched Anyscale Ray (CVE-2023-48022, CVSS rating: 9.8), to deploy cryptocurrency miners.

A second sort of implementation vulnerability is a container escape concentrating on Seldon Core that permits attackers to transcend code execution to maneuver laterally throughout the cloud setting and entry different customers’ fashions and datasets by importing a malicious mannequin to the inference server.

The online final result of chaining these vulnerabilities is that they might not solely be weaponized to infiltrate and unfold inside a corporation, but in addition compromise servers.

“If you happen to’re deploying a platform that enables for mannequin serving, you must now know that anyone that may serve a brand new mannequin also can really run arbitrary code on that server,” the researchers stated. “Make it possible for the setting that runs the mannequin is totally remoted and hardened in opposition to a container escape.”

Cybersecurity

The disclosure comes as Palo Alto Networks Unit 42 detailed two now-patched vulnerabilities within the open-source LangChain generative AI framework (CVE-2023-46229 and CVE-2023-44467) that would have allowed attackers to execute arbitrary code and entry delicate information, respectively.

Final month, Path of Bits additionally revealed 4 points in Ask Astro, a retrieval augmented era (RAG) open-source chatbot software, that would result in chatbot output poisoning, inaccurate doc ingestion, and potential denial-of-service (DoS).

Simply as safety points are being uncovered in synthetic intelligence-powered functions, strategies are additionally being devised to poison coaching datasets with the last word aim of tricking giant language fashions (LLMs) into producing weak code.

“In contrast to latest assaults that embed malicious payloads in detectable or irrelevant sections of the code (e.g., feedback), CodeBreaker leverages LLMs (e.g., GPT-4) for classy payload transformation (with out affecting functionalities), guaranteeing that each the poisoned information for fine-tuning and generated code can evade sturdy vulnerability detection,” a bunch of teachers from the College of Connecticut stated.

Discovered this text fascinating? Comply with us on Twitter and LinkedIn to learn extra unique content material we submit.



The 7 finest iPhones of all time

0