This repository has been archived by the owner on Aug 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 138
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
johnandersen777
commented
Aug 6, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## Abstract
Federation is the act of communicating data about multiple streams of topics. Federation enables decentralized social networking and is the act of creating, updating, deleting, and delivering notifications and content. This CONTRIBUTING document details [trust boundaries](https://threat-modeling.com/data-flow-diagrams-in-threat-modeling/) and evaluation guidelines to determine security properties of arbitrary entities so as optimally facilitate secure communication and collaboration towards shared goals while maintaining integrity of all trust boundaries of all entities engaged. These methodologies enable work on this project to progress in a self-directed nature where all contributing and reliant entities maintain agency and often distinct strategic plans, principles and values for themselves and their long term or ad-hoc formed organizations.
This document outlines best practices for poly-repo maintainers and contributors, detailing strategic plans and principles for federated code repositories. It emphasizes continuous trust evaluation, automated CI/CD workflows, and federated transparency receipts to ensure alignment with community-agreed values and strategic objectives. The document also addresses developer and maintainer expectations, federation triggers, and the integration of automated checks into CI/CD processes.
- Trust boundaries are evaluated continuously, and misalignment triggers retraining of AI models and potential blocking of data events.
- Developers and maintainers must document issues, federate forges, and adhere to CI/CD best practices for decentralized governance.
- Federation triggers and automated workflows ensure optimal notification and alignment with community values and strategic plans.
Conditions that may result in a lack of federation include:
- Misalignment with Strategic Plans: Entities that do not align with the project's strategic values, plans, and principles can be blocked from federating new data events.
- Detection of Malicious Intent: Entities suspected of malicious activities or failing to respect shared resources and time may be excluded from federation.
- Lack of Contact: When there is no contact with an entity, attempts at federation may be blocked to ensure security and integrity.
### Towards More Optimal Communication
Generic best practices for poly-repo maintainers and contributors. 👩🌟🛠️
This doc details the DFFML upstream default strategic plans and principles for entities
our code repository federates with. We treat this document as the community's default
policy, you or the organizations you are engaged with MAY apply additional context
dependent policies. Using these methodologies N entities without previous information
about each other can successfully establish trust within previously unknown execution
contexts and successfully collaborate towards shared goals (software development). These
methods foster innovation, preserve entity agency and alignment to strategic plans,
principles, and values across this poly-repo ecosystem and other concurrent repositories / work.
These methodologies are practiced to maintain trust, security, and alignment with community goals.
When there is no contact with an entity, we block all attempts at federating new data events.
This applies both directly and when detected through bill of materials (BOM) graph analysis
of past data events. This is our trigger for retraining the models, which is why it's
referred to as AI Looped In CI/CD Execution. Overlays may define additional consequences.
When overlays are used, they are added to all data event BOMs, and Trusted Computing Base (TCB)
evaluations are conducted continuously. These evaluations are retroactively invalidated if
we learn that nodes in a graph do not align with our strategic plans, principles, and values.
liceoa
approved these changes
Aug 6, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
…ic Development Practices
…paragraph to finish last sentence
Sure, let's create a script that sends and receives JSON blobs, ensuring that both the request and response include top-level First, ensure you have the necessary libraries installed: pip install openai jsonschema Here is the Python code: import openai
import json
from jsonschema import validate, ValidationError
# Set your OpenAI API key here
api_key = 'your-openai-api-key'
openai.api_key = api_key
# JSON schema for validation
schema = {
"type": "object",
"properties": {
"contents": {"type": "string"},
"metadata": {"type": "object"}
},
"required": ["contents", "metadata"]
}
def validate_json(json_data, schema):
try:
validate(instance=json_data, schema=schema)
return True, ""
except ValidationError as e:
return False, e.message
def generate_response(input_json, model="gpt-4", max_tokens=150):
is_valid, error_message = validate_json(input_json, schema)
if not is_valid:
return {"error": f"Invalid JSON input: {error_message}"}
prompt = input_json["contents"]
try:
response = openai.Completion.create(
engine=model,
prompt=prompt,
max_tokens=max_tokens,
n=1,
stop=None,
temperature=0.7,
)
output_json = {
"contents": response.choices[0].text.strip(),
"metadata": input_json["metadata"]
}
return output_json
except Exception as e:
return {"error": str(e)}
if __name__ == "__main__":
# Example input JSON
input_json = {
"contents": "Write a Python script that prints 'Hello, World!'",
"metadata": {
"client": "example_client",
"request_id": "12345"
}
}
# Generate response from OpenAI
response_json = generate_response(input_json)
# Print the response JSON
print("Response JSON:\n")
print(json.dumps(response_json, indent=4)) Instructions:
This ensures that the data sent and received between the client and the LLM always adheres to the expected structure. |
…ay via ActivityPub Related: #1315
…nd: What We Do When 1+1 No Longer Equals 2
…ion: Add prioritizer
…ion: Software Engineer: Person -> Entity
…ke Form for OSS Projects OpenSSF Vuln Disclosures WG Issue Related: ossf/wg-vulnerability-disclosures#94
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Jump to viewing this new content: https://github.com/intel/dffml/blob/c9e0a27313998dee83ed5d556bb26befb3f2f95c/CONTRIBUTING.md#abstract