Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jul 2, 2024
1 parent fd64171 commit 541313c
Show file tree
Hide file tree
Showing 16 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion docs/code_of_conduct.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
level of experience, education, socioeconomic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Pipeline Modificaiton based from the diffusers 0.12.1 StableDiffusionInstructPix2PixPipeline"""
"""Pipeline Modification based from the diffusers 0.12.1 StableDiffusionInstructPix2PixPipeline"""

import inspect
from typing import Callable, List, Optional, Union
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ python run_executor.py --ir_path=./qat_int8_ir --mode=latency --input_model=runw
## 3. Accuracy
Frechet Inception Distance(FID) metric is used to evaluate the accuracy. This case we check the FID scores between the pytorch image and engine image.

By setting --accuracy to check FID socre.
By setting --accuracy to check FID score.
Python API command as follows:
```python
# FP32 IR
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Pipeline Modificaiton based from the diffusers 0.12.1 StableDiffusionImg2ImgPipeline"""
"""Pipeline Modification based from the diffusers 0.12.1 StableDiffusionImg2ImgPipeline"""

import inspect
from typing import Callable, List, Optional, Union
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Install requirements that have denpendency on stock pytorch"
"Install requirements that have dependency on stock pytorch"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Install requirements that have denpendency on stock pytorch"
"Install requirements that have dependency on stock pytorch"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ mkdir /home/nfs_images
export IMAGE_SERVER_IP="your.server.ip"
```

# Configurate photoai.yaml
# Configure photoai.yaml

You can customize the configuration file `photoai.yaml` to match your environment setup. Here's a table to help you understand the configurable options:

Expand All @@ -91,9 +91,9 @@ You can customize the configuration file `photoai.yaml` to match your environmen
| tasks_list | ['voicechat', 'photoai'] |


# Configurate Environment Variables
# Configure Environment Variables

Configurate all of the environment variables in file `run.sh` using `export XXX=xxx`. Here's a table of all the variables needed to configurate.
Configure all of the environment variables in file `run.sh` using `export XXX=xxx`. Here's a table of all the variables needed to configure.

| Variable | Value |
| ------------------- | ---------------------------------------|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Parse and Evalate."""
"""Parse and Evaluate."""
import os
import json

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Parse and Evalate."""
"""Parse and Evaluate."""
import os
import json
import shlex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Pipeline Modificaiton based from the diffusers 0.12.1 StableDiffusionInstructPix2PixPipeline."""
"""Pipeline Modification based from the diffusers 0.12.1 StableDiffusionInstructPix2PixPipeline."""

import inspect
from typing import Callable, List, Optional, Union
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def get_environ_info():


def search_straight_pattern(input_pattern, graph):
"""Search user specified patterns on internal grpah structure.
"""Search user specified patterns on internal graph structure.
Attention: the input computation chain in the graph which can be called pattern, there must be
straight (or sequence). It means it has not any subgraph nodes. Otherwise this
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def get_initializer_children_names(model, initializer):
def graph_node_names_details(model):
"""Parse the graph nodes ans get the graph_nodes_dict.
Be used for Grpah class with creating a new graph.
Be used for Graph class with creating a new graph.
The node_name is the key, node in value is for getting the Const
tensor value and the input_tensor source op; output_names in value
is the node output name list; outputs in value is for output_tensor dest op
Expand Down Expand Up @@ -155,7 +155,7 @@ def bias_to_int32(bias_node, a_scale, b_scale):
bias_node: bias_add in graph (from onnx framework)
a_scale: matmul node input matrice a scale tensor
b_scale: matmul node input matrice b scale tensor
model: Grpah class
model: Graph class
Returns:
int32 bias numpy array
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def create_tf_node(op, name, inputs):
def graph_node_names_details(nodes):
"""Parse the graph nodes ans get the graph_nodes_dict.
Be used for Grpah class when converting a tensorflow computation graph to an engine graph.
Be used for Graph class when converting a tensorflow computation graph to an engine graph.
The node_name is the key, node in value is for getting the Const
tensor value and the input_tensor source op; outputs in value is for
output_tensor dest op.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ PI32_CONST256(inv_mant_mask, ~0x7f800000);

PI32_CONST256(0x7f, 0x7f);

// evaluation of 8 sines at once using AVX intrisics
// evaluation of 8 sines at once using AVX intrinsics
__m256 sinf(__m256 x) {
__m256 sign_bit = x;
// take the absolute value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{"answer_id": "UMZod8JaWia9KB2EVXdYrF", "model_id": "vicuna-13b:20230322-clean-lang", "question_id": 5, "text": "Quantum computing is a type of computing that uses quantum-mechanical phenomena, such as superposition and entanglement, to perform operations on data. Unlike classical computers, which use binary digits (bits) that can only be in one of two states (0 or 1), quantum computers use quantum bits (qubits) that can exist in multiple states simultaneously. This allows quantum computers to perform certain types of calculations much faster than classical computers.\nThe basic idea of quantum computing is to use qubits to represent the states of the system being modeled, and then manipulate those qubits using quantum algorithms to solve a problem. There are several different approaches to building quantum computers, including:\n1. Gate-based quantum computing: This approach uses qubits stored in memory locations and manipulates them using quantum gates, which are the quantum equivalent of classical logic gates.\n2. Topological quantum computing: This approach uses qubits that are linked by quantum connections, and manipulates them using topological quantum operations.\n3. Adiabatic quantum computing: This approach uses a quantum circuit that evolves gradually over time, and manipulates the qubits using quantum gates at specific points in the evolution.\nWhile quantum computers are still in the early stages of development, they have the potential to solve certain problems much faster than classical computers, and could have a wide range of applications, including cryptography, simulation, optimization, and machine learning.", "metadata": {"huggingface_argument": {"do_sample": true, "temperature": 0.7, "max_new_tokens": 1024}}}
{"answer_id": "WXRCqF34f4UUJzd3xbgAqT", "model_id": "vicuna-13b:20230322-clean-lang", "question_id": 6, "text": "Plant-based protein sources are derived from plant-based foods, such as legumes, grains, nuts, and seeds, while animal-based protein sources are derived from animals, such as meat, dairy, and eggs. Here are some key differences between the two:\n1. Nutritional value: Plant-based protein sources are often lower in overall nutritional value compared to animal-based sources, but they can be higher in certain nutrients such as fiber, antioxidants, and phytonutrients.\n2. Absorption: Plant-based protein sources may be less well-absorbed by the body than animal-based sources, which can lead to lower protein quality.\n3. Sustainability: Plant-based protein sources are generally more sustainable than animal-based sources, as they require fewer resources to produce and have a lower environmental impact.\n4. Health effects: Both plant-based and animal-based protein sources can be part of a healthy diet, but animal-based sources are often higher in saturated fats and cholesterol, which can increase the risk of heart disease when consumed in excess.\n5. Ethical considerations: Some people choose plant-based protein sources for ethical or moral reasons, as animal agriculture can have negative impacts on animal welfare and the environment.\n6. Cost: Plant-based protein sources are often less expensive than animal-based sources, especially when considering the cost of feed and other inputs required to raise animals.", "metadata": {"huggingface_argument": {"do_sample": true, "temperature": 0.7, "max_new_tokens": 1024}}}
{"answer_id": "JREJbG5ZKXCNMoWoiJQxbC", "model_id": "vicuna-13b:20230322-clean-lang", "question_id": 7, "text": "Developing your critical thinking skills can help you to better analyze information, make more informed decisions, and solve complex problems. Here are some tips for improving your critical thinking skills:\n1. Practice active listening: Pay attention to what others are saying and try to understand their perspective.\n2. Ask questions: Be curious and ask questions to clarify information and better understand a situation.\n3. Analyze information: Take time to carefully analyze information and consider different viewpoints.\n4. Seek out diverse viewpoints: Expose yourself to a variety of viewpoints and ideas to challenge your own assumptions and biases.\n5. Practice logic and reasoning: Use logic and reasoning to evaluate arguments and make decisions.\n6. Learn from your mistakes: Be open to learning from your mistakes and using them as opportunities for growth.\n7. Read and watch a variety of sources: Read and watch a variety of sources to expand your knowledge and expose yourself to different perspectives.\n8. Engage in debates and discussions: Engage in debates and discussions with others to practice critical thinking and develop your skills.\n9. Take breaks and reflect: Take breaks and reflect on your thinking process to improve your critical thinking skills.\n10. Practice mindfulness: Mindfulness can help you to be more aware of your thoughts and biases, which can help you to think more critically.", "metadata": {"huggingface_argument": {"do_sample": true, "temperature": 0.7, "max_new_tokens": 1024}}}
{"answer_id": "mmVwmX6TGJ2Y72gCNac4EQ", "model_id": "vicuna-13b:20230322-clean-lang", "question_id": 8, "text": "The education sector faces a number of challenges today, including:\n\n1. Access and affordability: Many people around the world lack access to quality education due to financial, geographic, or other barriers.\n2. Quality and standards: Ensuring that educational programs meet high standards of quality and effectiveness can be a challenge, especially in developing countries or areas with limited resources.\n3. Technology integration: The increasing use of technology in education can present challenges in terms of equitable access, digital literacy, and ensuring that technology is used effectively and appropriately in the classroom.\n4. Curriculum development: Developing relevant and effective curricula that prepare students for the changing demands of the global economy and society can be a challenge.\n5. Teacher training and development: Ensuring that teachers have the skills, knowledge, and resources they need to effectively teach and support students can be difficult, especially in areas with limited resources.\n6. Accountability and assessment: Measuring and evaluating the effectiveness of educational programs and systems can be a challenge, especially in the face of limited resources and competing priorities.\n7. Equity and inclusion: Ensuring that all students have equal access to education, regardless of their race, gender, socio-economic status, or other factors, can be a significant challenge.\n8. Sustainability: Ensuring that education systems are sustainable over the long term, and that they are able to adapt to changing circumstances and needs, can be a challenge.", "metadata": {"huggingface_argument": {"do_sample": true, "temperature": 0.7, "max_new_tokens": 1024}}}
{"answer_id": "mmVwmX6TGJ2Y72gCNac4EQ", "model_id": "vicuna-13b:20230322-clean-lang", "question_id": 8, "text": "The education sector faces a number of challenges today, including:\n\n1. Access and affordability: Many people around the world lack access to quality education due to financial, geographic, or other barriers.\n2. Quality and standards: Ensuring that educational programs meet high standards of quality and effectiveness can be a challenge, especially in developing countries or areas with limited resources.\n3. Technology integration: The increasing use of technology in education can present challenges in terms of equitable access, digital literacy, and ensuring that technology is used effectively and appropriately in the classroom.\n4. Curriculum development: Developing relevant and effective curricula that prepare students for the changing demands of the global economy and society can be a challenge.\n5. Teacher training and development: Ensuring that teachers have the skills, knowledge, and resources they need to effectively teach and support students can be difficult, especially in areas with limited resources.\n6. Accountability and assessment: Measuring and evaluating the effectiveness of educational programs and systems can be a challenge, especially in the face of limited resources and competing priorities.\n7. Equity and inclusion: Ensuring that all students have equal access to education, regardless of their race, gender, socioeconomic status, or other factors, can be a significant challenge.\n8. Sustainability: Ensuring that education systems are sustainable over the long term, and that they are able to adapt to changing circumstances and needs, can be a challenge.", "metadata": {"huggingface_argument": {"do_sample": true, "temperature": 0.7, "max_new_tokens": 1024}}}
{"answer_id": "DMTZyzd4rRAFV43xtBJ9ns", "model_id": "vicuna-13b:20230322-clean-lang", "question_id": 9, "text": "There are several primary factors that can influence consumer behavior, including:\n\n1. Personal factors: These include individual characteristics such as age, gender, education, income, personality, and values.\n2. Psychological factors: These include emotional, cognitive, and perceptual factors that can influence how a consumer perceives and processes information about products and services.\n3. Social factors: These include cultural, social, and environmental factors that can affect how consumers view and use products and services.\n4. Economic factors: These include factors such as the price of a product or service, the availability of alternative products or services, and the consumer's purchasing power.\n5. Marketing factors: These include the way a product or service is marketed, including advertising, packaging, and distribution.\n6. Product and service factors: These include the quality, features, and benefits of a product or service, as well as its design, performance, and warranty.\n\nUnderstanding these factors can help businesses and organizations develop effective marketing strategies and tailor their products and services to meet the needs and preferences of their target audience.", "metadata": {"huggingface_argument": {"do_sample": true, "temperature": 0.7, "max_new_tokens": 1024}}}
{"answer_id": "dETAsj4xHnUCSTkZezz8aM", "model_id": "vicuna-13b:20230322-clean-lang", "question_id": 10, "text": "Conflict resolution in the workplace is the process of addressing and resolving disagreements or conflicts between employees or between employees and management. Here are some effective strategies for conflict resolution in the workplace:\n1. Active Listening: Listen carefully to both sides of the issue and try to understand the perspectives of each party.\n2. Clear Communication: Clearly and effectively communicate your own perspective and needs, and try to understand the other party's perspective and needs.\n3. Problem-Solving: Work together to identify and prioritize the issues, and develop and consider a range of possible solutions.\n4. Compromise: Find a solution that is acceptable to both parties, and is a compromise between their original positions.\n5. Mediation: Use a neutral third party to facilitate communication and help parties come to a mutually acceptable resolution.\n6. Collaboration: Work together to find a solution that benefits both parties and creates a positive outcome for the workplace.\n7. Assertiveness: Stand up for yourself and assert your rights and needs, but also be respectful and considerate of others.\n8. Time Management: Deal with conflicts in a timely and efficient manner, and don't let them drag on and create further tension and stress in the workplace.", "metadata": {"huggingface_argument": {"do_sample": true, "temperature": 0.7, "max_new_tokens": 1024}}}
{"answer_id": "C8ksZxg3LshMUWiLxPanbt", "model_id": "vicuna-13b:20230322-clean-lang", "question_id": 11, "text": "Using a single-use plastic bottle versus a reusable bottle can have significant implications on both the environment and human health. Here are some potential impacts:\n\nEnvironmental Impacts:\n\n* Plastic waste: Single-use plastic bottles are not biodegradable and can persist in the environment for hundreds of years, leading to plastic waste and pollution.\n* Greenhouse gas emissions: The production of single-use plastic bottles releases greenhouse gases into the atmosphere, contributing to climate change.\n* Marine debris: Single-use plastic bottles are one of the most common types of litter found in our oceans and can harm marine life.\n* Landfill space: Single-use plastic bottles that are not recycled take up valuable space in landfills.\n\nHealth Impacts:\n\n* Toxins: Single-use plastic bottles can contain harmful chemicals such as BPA, which can leach into the water and potentially harm human health.\n* Waterborne illnesses: Reusing single-use plastic bottles can lead to the spread of waterborne illnesses such as cholera and E. coli.\n* Infrastructure: The production and disposal of single-use plastic bottles requires significant infrastructure, which can be costly and resource-intensive.\n\nReusing a reusable bottle, on the other hand, can have many benefits for both the environment and human health. Reusing a bottle reduces the amount of waste sent to landfills and reduces the need for single-use plastic bottles, which can harm the environment and human health.", "metadata": {"huggingface_argument": {"do_sample": true, "temperature": 0.7, "max_new_tokens": 1024}}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def raise_warning_for_old_weights(model_path, model):
"current fschat.\nYou can try one of the following methods:\n"
"1. Upgrade your weights to the new Vicuna-v1.1: https://github.com/lm-sys/FastChat#vicuna-weights.\n"
"2. Use the old conversation template by `python3 -m fastchat.serve.cli --model-path /path/to/vicuna-v0 --conv-template conv_one_shot`\n"
"3. Downgrade fschat to fschat==0.1.10 (Not recommonded).\n"
"3. Downgrade fschat to fschat==0.1.10 (Not recommended).\n"
)


Expand Down

0 comments on commit 541313c

Please sign in to comment.