Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Propose to include nmstate-yamlsmith project to the nmstate organizaiton #4

Open
4 tasks done
liangwen12year opened this issue Apr 23, 2024 · 10 comments
Open
4 tasks done

Comments

@liangwen12year
Copy link

liangwen12year commented Apr 23, 2024

I propose to add nmstate-yamlsmith
as a project under the nmstate organization

nmstate-yamlsmith is a project intended to create the Nmstate YAMLsmith Model for
translating natural language into nmstate states in real-time and low latency, and the
generated states will also conform to nmstate state syntax.

nmstate-yamlsmith project will make network management more intuitive and less
daunting than traditional network management tools. The YAMLsmith model can
significantly speed up the process of network configuration by reducing the
complexity and time required to write and debug YAML configuration files manually.

  • CI enabled and passed.
  • Has integration test cases proving valid use cases. (I honest do not know what integration test should be added now)
  • Licensed under LGPL-2.0+ or Apache-2.0+(preferred).
  • Please name at lease two maintainers for this new repository.
@liangwen12year
Copy link
Author

@ffmancera @tyll @cathay4t , your opinion matters, please vote at your convenience.

@ffmancera
Copy link
Member

+1

@tyll
Copy link
Member

tyll commented Apr 29, 2024

I'm fine with what @ffmancera or @cathay4t decide.

@tyll
Copy link
Member

tyll commented Apr 29, 2024

debug YAML configuration files manually.

Can/will the model also accept incorrect YAML and correct it?

@tyll
Copy link
Member

tyll commented Apr 29, 2024

Regarding the integration test: Can it train a minimal model with just one example to show that it works?

@liangwen12year
Copy link
Author

debug YAML configuration files manually.

Can/will the model also accept incorrect YAML and correct it?

I need to take a look at the service/model from Ansible lightspeed team to see if they also support taking the tasks/playbooks in YAML format as the input besides the natural language description. Also, I need to see if the user
provides tasks/playbooks in incorrect YAML format, how their model will behave in this situation.

At the current stage, for our own model, we may not expect the model to take the natural language description and the YAML state examples to generate the desired YAML state. Maybe you are asking what if the model generates the YAML state example in incorrect YAML format?

First of all, I think that it depends on whether the pretraining will suffice to make the model generate the output in the correct YAML format all the time. I can not say for sure without actually testing the model after the training.

If there are indeed some simple style issues (e.g. indentation), I think that we can use the standard indentation and style rules set by ruamel.yaml to automatically correct the issues. Unfortunately, yamllint can only detect and report the formating issues in the YAML file but not fixing them.

@liangwen12year
Copy link
Author

Regarding the integration test: Can it train a minimal model with just one example to show that it works?

Ok, let me curate/create some data and train it to see if it works practically.

@liangwen12year
Copy link
Author

liangwen12year commented May 6, 2024

Regarding the integration test: Can it train a minimal model with just one example to show that it works?

I made a lot of progress on it, the following is generated by model:

Question: Configure eth4 to use the DHCP4, write this as a desired state for Nmstate
Generated Answer:
 ---
interfaces:
  - name: eth2
    type: ethernet
    state: up
    ipv4:
      dhcp: true
      enabled: true

Question: Setup eth1 with 192.168.3.2/24
Generated Answer:
 ---
interfaces:
  - name: eth1
    type: ethernet
    state: up
    ipv4:
      address:
        - ip: 192.168.3.2
          prefix-length: 24
      dhcp: false
      enabled: true

Question: Configure eth1 and eth2 as active-backup bond with bond name bond0, write this as a desired state for Nmstatedelete all routes on eth1 using nmstate configuration profiles
Generated Answer:
 ---
interfaces:
  - name: bond0
    type: bond
    state: up
    link-aggregation:
      mode: active-backup
      options:
        miimon: 140
      port:
        - eth1
        - eth2
  - name: eth1
    type: ethernet
    state: up
  - name: eth2
    type: ethernet
    state: up

Question: Configure eth1 to use the IP address 192.10.1.51/24, write this as a desired state for Nmstate
Generated Answer:
 ---
interfaces:
  - name: eth1
    type: ethernet
    state: up
    ipv4:
      address:
        - ip: 192.10.1.51
          prefix-length: 24
      dhcp: false
      enabled: true

@liangwen12year
Copy link
Author

Regarding the integration test: Can it train a minimal model with just one example to show that it works?

The pertaining integration test is added. liangwen12year/nmstate-yamlsmith#7

@liangwen12year
Copy link
Author

liangwen12year commented May 27, 2024

Regarding the integration test: Can it train a minimal model with just one example to show that it works?

The integration tests were added to the pretaining pipeline, training pipeline, and evaluation pipeline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants