From 13e590f75fd298b2fa9320d071f6067809416875 Mon Sep 17 00:00:00 2001 From: Jonathan Lessinger Date: Wed, 3 Jan 2024 19:44:12 -0500 Subject: [PATCH 1/2] [RFC][AIC-py] hf summarization model parser Very similar to text gen Test: ``` ... { "name": "test_hf_sum", "input": "HMS Duncan was a D-class destroyer ...", # [contents of https://en.wikipedia.org/wiki/HMS_Duncan_(D99)] "metadata": { "model": { "name": "stevhliu/my_awesome_billsum_model", "settings": { "min_length": 100, "max_length": 200, "num_beams": 1 } } } }, ... } ``` ``` import asyncio from aiconfig_extension_hugging_face.local_inference.text_summarization import HuggingFaceTextSummarizationTransformer from aiconfig import AIConfigRuntime, InferenceOptions, CallbackManager # Load the aiconfig. mp = HuggingFaceTextSummarizationTransformer() AIConfigRuntime.register_model_parser(mp, "stevhliu/my_awesome_billsum_model") config = AIConfigRuntime.load("/Users/jonathan/Projects/aiconfig/cookbooks/Getting-Started/travel.aiconfig.json") config.callback_manager = CallbackManager([]) def print_stream(data, _accumulated_data, _index): print(data, end="", flush=True) async def run(): print("Stream") options = InferenceOptions(stream=True, stream_callback=print_stream) out = await config.run("test_hf_sum", options=options) print("Output:\n", out) print("no stream") options = InferenceOptions(stream=False) out = await config.run("test_hf_sum", options=options) print("Output:\n", out) asyncio.run(run()) # OUT: Stream Token indices sequence length is longer than the specified maximum sequence length for this model (2778 > 512). Running this sequence through the model will result in indexing errors /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages/transformers/generation/configuration_utils.py:430: UserWarning: `num_beams` is set to 1. However, `early_stopping` is set to `True` -- this flag is only used in beam-based generation modes. You should set `num_beams>1` or unset `early_stopping`. warnings.warn( /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages/transformers/generation/configuration_utils.py:449: UserWarning: `num_beams` is set to 1. However, `length_penalty` is set to `2.0` -- this flag is only used in beam-based generation modes. You should set `num_beams>1` or unset `length_penalty`. warnings.warn( escorted the 13th Destroyer Flotilla in the Mediterranean and escorited the carrier Argus to Malta during the war The ship was recalled home to be converted into an escoter destroyer in late 1942. The vessel was repaired and given a refit at Gibraltar on 16 November, and was sold for scrap later that year. The crew of the ship escores the ship to the Middle East, and the ship is a 'disaster' of the Output: [ExecuteResult(output_type='execute_result', execution_count=0, data=" escorted the 13th Destroyer Flotilla in the Mediterranean and escorited the carrier Argus to Malta during the war The ship was recalled home to be converted into an escoter destroyer in late 1942. The vessel was repaired and given a refit at Gibraltar on 16 November, and was sold for scrap later that year. The crew of the ship escores the ship to the Middle East, and the ship is a 'disaster' of the ", mime_type=None, metadata={})] no stream Output: [ExecuteResult(output_type='execute_result', execution_count=0, data="escorted the 13th Destroyer Flotilla in the Mediterranean and escorited the carrier Argus to Malta during the war . The ship was recalled home to be converted into an escoter destroyer in late 1942. The vessel was repaired and given a refit at Gibraltar on 16 November, and was sold for scrap later that year. The crew of the ship escores the ship to the Middle East, and the ship is a 'disaster' of the .", mime_type=None, metadata={})] ``` --- .../__init__.py | 5 +- .../local_inference/text_summarization.py | 305 ++++++++++++++++++ 2 files changed, 309 insertions(+), 1 deletion(-) create mode 100644 extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/local_inference/text_summarization.py diff --git a/extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/__init__.py b/extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/__init__.py index d08f71857..43e3bf721 100644 --- a/extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/__init__.py +++ b/extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/__init__.py @@ -1,7 +1,10 @@ from .local_inference.text_2_image import HuggingFaceText2ImageDiffusor from .local_inference.text_generation import HuggingFaceTextGenerationTransformer from .remote_inference_client.text_generation import HuggingFaceTextGenerationClient +from .local_inference.text_summarization import HuggingFaceTextSummarizationTransformer -LOCAL_INFERENCE_CLASSES = ["HuggingFaceText2ImageDiffusor", "HuggingFaceTextGenerationTransformer"] +# from .remote_inference_client.text_generation import HuggingFaceTextGenerationClient + +LOCAL_INFERENCE_CLASSES = ["HuggingFaceText2ImageDiffusor", "HuggingFaceTextGenerationTransformer", "HuggingFaceTextSummarizationTransformer"] REMOTE_INFERENCE_CLASSES = ["HuggingFaceTextGenerationClient"] __ALL__ = LOCAL_INFERENCE_CLASSES + REMOTE_INFERENCE_CLASSES diff --git a/extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/local_inference/text_summarization.py b/extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/local_inference/text_summarization.py new file mode 100644 index 000000000..bba735b4f --- /dev/null +++ b/extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/local_inference/text_summarization.py @@ -0,0 +1,305 @@ +import copy +import json +import threading +from typing import TYPE_CHECKING, Any, Dict, List, Optional +from transformers import ( + AutoTokenizer, + Pipeline, + pipeline, + TextIteratorStreamer, +) + +from aiconfig.default_parsers.parameterized_model_parser import ParameterizedModelParser +from aiconfig.model_parser import InferenceOptions +from aiconfig.schema import ( + ExecuteResult, + Output, + OutputDataWithValue, + Prompt, + PromptMetadata, +) +from aiconfig.util.params import resolve_prompt + +# Circuluar Dependency Type Hints +if TYPE_CHECKING: + from aiconfig.Config import AIConfigRuntime + + +# Step 1: define Helpers +def refine_chat_completion_params(model_settings: Dict[str, Any]) -> Dict[str, Any]: + """ + Refines the completion params for the HF text summarization api. Removes any unsupported params. + The supported keys were found by looking at the HF text summarization api. `huggingface_hub.InferenceClient.text_summarization()` + """ + + supported_keys = { + "max_length", + "max_new_tokens", + "min_length", + "min_new_tokens", + "early_stopping", + "max_time", + "do_sample", + "num_beams", + "num_beam_groups", + "penalty_alpha", + "use_cache", + "temperature", + "top_k", + "top_p", + "typical_p", + "epsilon_cutoff", + "eta_cutoff", + "diversity_penalty", + "repetition_penalty", + "encoder_repetition_penalty", + "length_penalty", + "no_repeat_ngram_size", + "bad_words_ids", + "force_words_ids", + "renormalize_logits", + "constraints", + "forced_bos_token_id", + "forced_eos_token_id", + "remove_invalid_values", + "exponential_decay_length_penalty", + "suppress_tokens", + "begin_suppress_tokens", + "forced_decoder_ids", + "sequence_bias", + "guidance_scale", + "low_memory", + "num_return_sequences", + "output_attentions", + "output_hidden_states", + "output_scores", + "return_dict_in_generate", + "pad_token_id", + "bos_token_id", + "eos_token_id", + "encoder_no_repeat_ngram_size", + "decoder_start_token_id", + "num_assistant_tokens", + "num_assistant_tokens_schedule", + } + + completion_data = {} + for key in model_settings: + if key.lower() in supported_keys: + completion_data[key.lower()] = model_settings[key] + + return completion_data + + +def construct_regular_output(result: Dict[str, str], execution_count: int) -> Output: + """ + Construct regular output per response result, without streaming enabled + """ + output = ExecuteResult( + **{ + "output_type": "execute_result", + "data": result["summary_text"], + "execution_count": execution_count, + "metadata": {}, + } + ) + return output + + +def construct_stream_output( + streamer: TextIteratorStreamer, + options: InferenceOptions, +) -> Output: + """ + Constructs the output for a stream response. + + Args: + streamer (TextIteratorStreamer): Streams the output. See: + https://huggingface.co/docs/transformers/v4.35.2/en/internal/summarization_utils#transformers.TextIteratorStreamer + options (InferenceOptions): The inference options. Used to determine + the stream callback. + + """ + output = ExecuteResult( + **{ + "output_type": "execute_result", + "data": "", # We update this below + "execution_count": 0, # Multiple outputs are not supported for streaming + "metadata": {}, + } + ) + accumulated_message = "" + for new_text in streamer: + if isinstance(new_text, str): + accumulated_message += new_text + options.stream_callback(new_text, accumulated_message, 0) + + output.data = accumulated_message + return output + + +class HuggingFaceTextSummarizationTransformer(ParameterizedModelParser): + """ + A model parser for HuggingFace models of type text summarization task using transformers. + """ + + def __init__(self): + """ + Returns: + HuggingFaceTextSummarizationTransformer + + Usage: + 1. Create a new model parser object with the model ID of the model to use. + parser = HuggingFaceTextSummarizationTransformer() + 2. Add the model parser to the registry. + config.register_model_parser(parser) + """ + super().__init__() + self.summarizers: dict[str, Pipeline] = {} + + def id(self) -> str: + """ + Returns an identifier for the Model Parser + """ + return "HuggingFaceTextSummarizationTransformer" + + async def serialize( + self, + prompt_name: str, + data: Any, + ai_config: "AIConfigRuntime", + parameters: Optional[Dict[str, Any]] = None, + **kwargs, + ) -> List[Prompt]: + """ + Defines how a prompt and model inference settings get serialized in the .aiconfig. + + Args: + prompt_name (str): The prompt to be serialized. + inference_settings (dict): Model-specific inference settings to be serialized. + + Returns: + List[Prompt]: Serialized representation of the prompt and inference settings. + """ + data = copy.deepcopy(data) + + # assume data is completion params for HF text summarization + prompt_input = data["prompt"] + + # Prompt is handled, remove from data + data.pop("prompt", None) + + model_metadata = ai_config.get_model_metadata(data, self.id()) + prompt = Prompt( + name=prompt_name, + input=prompt_input, + metadata=PromptMetadata(model=model_metadata, parameters=parameters, **kwargs), + ) + return [prompt] + + async def deserialize( + self, + prompt: Prompt, + aiconfig: "AIConfigRuntime", + _options, + params: Optional[Dict[str, Any]] = {}, + ) -> Dict[str, Any]: + """ + Defines how to parse a prompt in the .aiconfig for a particular model + and constructs the completion params for that model. + + Args: + serialized_data (str): Serialized data from the .aiconfig. + + Returns: + dict: Model-specific completion parameters. + """ + # Build Completion data + model_settings = self.get_model_settings(prompt, aiconfig) + completion_data = refine_chat_completion_params(model_settings) + + # Add resolved prompt + resolved_prompt = resolve_prompt(prompt, params, aiconfig) + completion_data["prompt"] = resolved_prompt + return completion_data + + async def run_inference(self, prompt: Prompt, aiconfig: "AIConfigRuntime", options: InferenceOptions, parameters: Dict[str, Any]) -> List[Output]: + """ + Invoked to run a prompt in the .aiconfig. This method should perform + the actual model inference based on the provided prompt and inference settings. + + Args: + prompt (str): The input prompt. + inference_settings (dict): Model-specific inference settings. + + Returns: + InferenceResponse: The response from the model. + """ + completion_data = await self.deserialize(prompt, aiconfig, options, parameters) + inputs = completion_data.pop("prompt", None) + + model_name: str = aiconfig.get_model_name(prompt) + if isinstance(model_name, str) and model_name not in self.summarizers: + self.summarizers[model_name] = pipeline("summarization", model=model_name) + summarizer = self.summarizers[model_name] + + # if stream enabled in runtime options and config, then stream. Otherwise don't stream. + streamer = None + should_stream = (options.stream if options else False) and (not "stream" in completion_data or completion_data.get("stream") != False) + if should_stream: + tokenizer: AutoTokenizer = AutoTokenizer.from_pretrained(model_name) + streamer = TextIteratorStreamer(tokenizer) + completion_data["streamer"] = streamer + + outputs: List[Output] = [] + output = None + + def _summarize(): + return summarizer(inputs, **completion_data) + + if not should_stream: + response: List[Any] = _summarize() + for count, result in enumerate(response): + output = construct_regular_output(result, count) + outputs.append(output) + else: + if completion_data.get("num_return_sequences", 1) > 1: + raise ValueError("Sorry, TextIteratorStreamer does not support multiple return sequences, please set `num_return_sequences` to 1") + if not streamer: + raise ValueError("Stream option is selected but streamer is not initialized") + + # For streaming, cannot call `summarizer` directly otherwise response will be blocking + thread = threading.Thread(target=_summarize) + thread.start() + output = construct_stream_output(streamer, options) + if output is not None: + outputs.append(output) + + prompt.outputs = outputs + return prompt.outputs + + def get_output_text( + self, + prompt: Prompt, + aiconfig: "AIConfigRuntime", + output: Optional[Output] = None, + ) -> str: + if output is None: + output = aiconfig.get_latest_output(prompt) + + if output is None: + return "" + + # TODO (rossdanlm): Handle multiple outputs in list + # https://github.com/lastmile-ai/aiconfig/issues/467 + if output.output_type == "execute_result": + output_data = output.data + if isinstance(output_data, str): + return output_data + if isinstance(output_data, OutputDataWithValue): + if isinstance(output_data.value, str): + return output_data.value + # HuggingFace Text summarization does not support function + # calls so shouldn't get here, but just being safe + return json.dumps(output_data.value, indent=2) + return "" From 02325cfd3066891a75342c99ca91f06d0c2f7e59 Mon Sep 17 00:00:00 2001 From: Jonathan Lessinger Date: Wed, 3 Jan 2024 19:44:19 -0500 Subject: [PATCH 2/2] [test stuff][RFC][AIC-py] hf summarization model parser Very similar to text gen Test: ``` ... { "name": "test_hf_sum", "input": "HMS Duncan was a D-class destroyer ...", # [contents of https://en.wikipedia.org/wiki/HMS_Duncan_(D99)] "metadata": { "model": { "name": "stevhliu/my_awesome_billsum_model", "settings": { "min_length": 100, "max_length": 200, "num_beams": 1 } } } }, ... } ``` ``` import asyncio from aiconfig_extension_hugging_face.local_inference.text_summarization import HuggingFaceTextSummarizationTransformer from aiconfig import AIConfigRuntime, InferenceOptions, CallbackManager # Load the aiconfig. mp = HuggingFaceTextSummarizationTransformer() AIConfigRuntime.register_model_parser(mp, "stevhliu/my_awesome_billsum_model") config = AIConfigRuntime.load("/Users/jonathan/Projects/aiconfig/cookbooks/Getting-Started/travel.aiconfig.json") config.callback_manager = CallbackManager([]) def print_stream(data, _accumulated_data, _index): print(data, end="", flush=True) async def run(): print("Stream") options = InferenceOptions(stream=True, stream_callback=print_stream) out = await config.run("test_hf_sum", options=options) print("Output:\n", out) print("no stream") options = InferenceOptions(stream=False) out = await config.run("test_hf_sum", options=options) print("Output:\n", out) asyncio.run(run()) # OUT: Stream Token indices sequence length is longer than the specified maximum sequence length for this model (2778 > 512). Running this sequence through the model will result in indexing errors /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages/transformers/generation/configuration_utils.py:430: UserWarning: `num_beams` is set to 1. However, `early_stopping` is set to `True` -- this flag is only used in beam-based generation modes. You should set `num_beams>1` or unset `early_stopping`. warnings.warn( /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages/transformers/generation/configuration_utils.py:449: UserWarning: `num_beams` is set to 1. However, `length_penalty` is set to `2.0` -- this flag is only used in beam-based generation modes. You should set `num_beams>1` or unset `length_penalty`. warnings.warn( escorted the 13th Destroyer Flotilla in the Mediterranean and escorited the carrier Argus to Malta during the war The ship was recalled home to be converted into an escoter destroyer in late 1942. The vessel was repaired and given a refit at Gibraltar on 16 November, and was sold for scrap later that year. The crew of the ship escores the ship to the Middle East, and the ship is a 'disaster' of the Output: [ExecuteResult(output_type='execute_result', execution_count=0, data=" escorted the 13th Destroyer Flotilla in the Mediterranean and escorited the carrier Argus to Malta during the war The ship was recalled home to be converted into an escoter destroyer in late 1942. The vessel was repaired and given a refit at Gibraltar on 16 November, and was sold for scrap later that year. The crew of the ship escores the ship to the Middle East, and the ship is a 'disaster' of the ", mime_type=None, metadata={})] no stream Output: [ExecuteResult(output_type='execute_result', execution_count=0, data="escorted the 13th Destroyer Flotilla in the Mediterranean and escorited the carrier Argus to Malta during the war . The ship was recalled home to be converted into an escoter destroyer in late 1942. The vessel was repaired and given a refit at Gibraltar on 16 November, and was sold for scrap later that year. The crew of the ship escores the ship to the Middle East, and the ship is a 'disaster' of the .", mime_type=None, metadata={})] ``` --- .../Getting-Started/getting_started.ipynb | 343 +++++++++++++++++- .../Getting-Started/travel.aiconfig.json | 70 +++- .../__init__.py | 1 - 3 files changed, 392 insertions(+), 22 deletions(-) diff --git a/cookbooks/Getting-Started/getting_started.ipynb b/cookbooks/Getting-Started/getting_started.ipynb index dcb134092..086381d43 100644 --- a/cookbooks/Getting-Started/getting_started.ipynb +++ b/cookbooks/Getting-Started/getting_started.ipynb @@ -43,17 +43,343 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 10, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[33mWARNING: Ignoring invalid distribution -etuptools (/opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages)\u001b[0m\u001b[33m\n", + "\u001b[0mObtaining file:///Users/jonathan/Projects/aiconfig/python\n", + " Installing build dependencies ... \u001b[?25ldone\n", + "\u001b[?25h Checking if build backend supports build_editable ... \u001b[?25ldone\n", + "\u001b[?25h Getting requirements to build editable ... \u001b[?25ldone\n", + "\u001b[?25h Preparing editable metadata (pyproject.toml) ... \u001b[?25ldone\n", + "\u001b[?25hRequirement already satisfied: black in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (23.11.0)\n", + "Requirement already satisfied: flake8 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (6.1.0)\n", + "Requirement already satisfied: flask-cors in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (4.0.0)\n", + "Requirement already satisfied: flask[async] in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (3.0.0)\n", + "Requirement already satisfied: google-generativeai in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (0.2.2)\n", + "Requirement already satisfied: huggingface-hub in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (0.19.4)\n", + "Requirement already satisfied: hypothesis==6.91.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (6.91.0)\n", + "Requirement already satisfied: lastmile-utils==0.0.14 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (0.0.14)\n", + "Requirement already satisfied: mock in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (5.1.0)\n", + "Requirement already satisfied: nest-asyncio in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (1.5.8)\n", + "Requirement already satisfied: nltk in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (3.8.1)\n", + "Requirement already satisfied: openai<1.5,>=1.0.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (1.3.6)\n", + "Requirement already satisfied: prompt-toolkit in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (3.0.41)\n", + "Requirement already satisfied: pybars3 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (0.9.7)\n", + "Requirement already satisfied: pydantic>=2.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (2.4.2)\n", + "Requirement already satisfied: pylint in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (3.0.2)\n", + "Requirement already satisfied: pytest in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (7.4.3)\n", + "Requirement already satisfied: pytest-asyncio in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (0.21.1)\n", + "Requirement already satisfied: python-dotenv in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (1.0.0)\n", + "Requirement already satisfied: pyyaml in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (6.0.1)\n", + "Requirement already satisfied: requests in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (2.30.0)\n", + "Requirement already satisfied: result in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig==1.1.8) (0.15.0)\n", + "Requirement already satisfied: attrs>=19.2.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from hypothesis==6.91.0->python-aiconfig==1.1.8) (23.1.0)\n", + "Requirement already satisfied: sortedcontainers<3.0.0,>=2.1.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from hypothesis==6.91.0->python-aiconfig==1.1.8) (2.4.0)\n", + "Requirement already satisfied: exceptiongroup>=1.0.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from hypothesis==6.91.0->python-aiconfig==1.1.8) (1.2.0)\n", + "Requirement already satisfied: chardet==5.2.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from lastmile-utils==0.0.14->python-aiconfig==1.1.8) (5.2.0)\n", + "Requirement already satisfied: isort==5.12.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from lastmile-utils==0.0.14->python-aiconfig==1.1.8) (5.12.0)\n", + "Requirement already satisfied: jsoncomment==0.4.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from lastmile-utils==0.0.14->python-aiconfig==1.1.8) (0.4.2)\n", + "Requirement already satisfied: pandas==2.1.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from lastmile-utils==0.0.14->python-aiconfig==1.1.8) (2.1.2)\n", + "Requirement already satisfied: pyright==1.1.335 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from lastmile-utils==0.0.14->python-aiconfig==1.1.8) (1.1.335)\n", + "Requirement already satisfied: autoflake==2.2.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from lastmile-utils==0.0.14->python-aiconfig==1.1.8) (2.2.1)\n", + "Requirement already satisfied: click>=8.0.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from black->python-aiconfig==1.1.8) (8.1.7)\n", + "Requirement already satisfied: mypy-extensions>=0.4.3 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from black->python-aiconfig==1.1.8) (1.0.0)\n", + "Requirement already satisfied: packaging>=22.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from black->python-aiconfig==1.1.8) (23.2)\n", + "Requirement already satisfied: pathspec>=0.9.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from black->python-aiconfig==1.1.8) (0.12.1)\n", + "Requirement already satisfied: platformdirs>=2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from black->python-aiconfig==1.1.8) (4.1.0)\n", + "Requirement already satisfied: tomli>=1.1.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from black->python-aiconfig==1.1.8) (2.0.1)\n", + "Requirement already satisfied: typing-extensions>=4.0.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from black->python-aiconfig==1.1.8) (4.9.0)\n", + "Requirement already satisfied: mccabe<0.8.0,>=0.7.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from flake8->python-aiconfig==1.1.8) (0.7.0)\n", + "Requirement already satisfied: pycodestyle<2.12.0,>=2.11.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from flake8->python-aiconfig==1.1.8) (2.11.1)\n", + "Requirement already satisfied: pyflakes<3.2.0,>=3.1.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from flake8->python-aiconfig==1.1.8) (3.1.0)\n", + "Requirement already satisfied: annotated-types>=0.4.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pydantic>=2.1->python-aiconfig==1.1.8) (0.6.0)\n", + "Requirement already satisfied: pydantic-core==2.10.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pydantic>=2.1->python-aiconfig==1.1.8) (2.10.1)\n", + "Requirement already satisfied: astroid<=3.1.0-dev0,>=3.0.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pylint->python-aiconfig==1.1.8) (3.0.2)\n", + "Requirement already satisfied: tomlkit>=0.10.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pylint->python-aiconfig==1.1.8) (0.12.3)\n", + "Requirement already satisfied: dill>=0.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pylint->python-aiconfig==1.1.8) (0.3.7)\n", + "Requirement already satisfied: iniconfig in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pytest->python-aiconfig==1.1.8) (2.0.0)\n", + "Requirement already satisfied: pluggy<2.0,>=0.12 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pytest->python-aiconfig==1.1.8) (1.3.0)\n", + "Requirement already satisfied: json-spec in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from jsoncomment==0.4.2->lastmile-utils==0.0.14->python-aiconfig==1.1.8) (0.11.0)\n", + "Requirement already satisfied: numpy<2,>=1.22.4 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pandas==2.1.2->lastmile-utils==0.0.14->python-aiconfig==1.1.8) (1.26.2)\n", + "Requirement already satisfied: python-dateutil>=2.8.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pandas==2.1.2->lastmile-utils==0.0.14->python-aiconfig==1.1.8) (2.8.2)\n", + "Requirement already satisfied: pytz>=2020.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pandas==2.1.2->lastmile-utils==0.0.14->python-aiconfig==1.1.8) (2023.3.post1)\n", + "Requirement already satisfied: tzdata>=2022.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pandas==2.1.2->lastmile-utils==0.0.14->python-aiconfig==1.1.8) (2023.3)\n", + "Requirement already satisfied: nodeenv>=1.6.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pyright==1.1.335->lastmile-utils==0.0.14->python-aiconfig==1.1.8) (1.8.0)\n", + "Requirement already satisfied: anyio<4,>=3.5.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from openai<1.5,>=1.0.0->python-aiconfig==1.1.8) (3.7.1)\n", + "Requirement already satisfied: distro<2,>=1.7.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from openai<1.5,>=1.0.0->python-aiconfig==1.1.8) (1.8.0)\n", + "Requirement already satisfied: httpx<1,>=0.23.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from openai<1.5,>=1.0.0->python-aiconfig==1.1.8) (0.25.2)\n", + "Requirement already satisfied: sniffio in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from openai<1.5,>=1.0.0->python-aiconfig==1.1.8) (1.3.0)\n", + "Requirement already satisfied: tqdm>4 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from openai<1.5,>=1.0.0->python-aiconfig==1.1.8) (4.66.1)\n", + "Requirement already satisfied: Werkzeug>=3.0.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from flask[async]->python-aiconfig==1.1.8) (3.0.1)\n", + "Requirement already satisfied: Jinja2>=3.1.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from flask[async]->python-aiconfig==1.1.8) (3.1.2)\n", + "Requirement already satisfied: itsdangerous>=2.1.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from flask[async]->python-aiconfig==1.1.8) (2.1.2)\n", + "Requirement already satisfied: blinker>=1.6.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from flask[async]->python-aiconfig==1.1.8) (1.7.0)\n", + "Requirement already satisfied: asgiref>=3.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from flask[async]->python-aiconfig==1.1.8) (3.7.2)\n", + "Requirement already satisfied: google-ai-generativelanguage==0.3.3 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-generativeai->python-aiconfig==1.1.8) (0.3.3)\n", + "Requirement already satisfied: google-auth in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-generativeai->python-aiconfig==1.1.8) (2.24.0)\n", + "Requirement already satisfied: google-api-core in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-generativeai->python-aiconfig==1.1.8) (2.14.0)\n", + "Requirement already satisfied: protobuf in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-generativeai->python-aiconfig==1.1.8) (4.25.1)\n", + "Requirement already satisfied: proto-plus<2.0.0dev,>=1.22.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-ai-generativelanguage==0.3.3->google-generativeai->python-aiconfig==1.1.8) (1.22.3)\n", + "Requirement already satisfied: filelock in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from huggingface-hub->python-aiconfig==1.1.8) (3.13.1)\n", + "Requirement already satisfied: fsspec>=2023.5.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from huggingface-hub->python-aiconfig==1.1.8) (2023.10.0)\n", + "Requirement already satisfied: joblib in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from nltk->python-aiconfig==1.1.8) (1.3.2)\n", + "Requirement already satisfied: regex>=2021.8.3 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from nltk->python-aiconfig==1.1.8) (2023.10.3)\n", + "Requirement already satisfied: wcwidth in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from prompt-toolkit->python-aiconfig==1.1.8) (0.2.12)\n", + "Requirement already satisfied: PyMeta3>=0.5.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pybars3->python-aiconfig==1.1.8) (0.5.1)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from requests->python-aiconfig==1.1.8) (3.3.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from requests->python-aiconfig==1.1.8) (3.6)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from requests->python-aiconfig==1.1.8) (2.1.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from requests->python-aiconfig==1.1.8) (2023.11.17)\n", + "Requirement already satisfied: googleapis-common-protos<2.0.dev0,>=1.56.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-api-core->google-generativeai->python-aiconfig==1.1.8) (1.61.0)\n", + "Requirement already satisfied: cachetools<6.0,>=2.0.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-auth->google-generativeai->python-aiconfig==1.1.8) (5.3.2)\n", + "Requirement already satisfied: pyasn1-modules>=0.2.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-auth->google-generativeai->python-aiconfig==1.1.8) (0.3.0)\n", + "Requirement already satisfied: rsa<5,>=3.1.4 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-auth->google-generativeai->python-aiconfig==1.1.8) (4.9)\n", + "Requirement already satisfied: httpcore==1.* in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from httpx<1,>=0.23.0->openai<1.5,>=1.0.0->python-aiconfig==1.1.8) (1.0.2)\n", + "Requirement already satisfied: h11<0.15,>=0.13 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from httpcore==1.*->httpx<1,>=0.23.0->openai<1.5,>=1.0.0->python-aiconfig==1.1.8) (0.14.0)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from Jinja2>=3.1.2->flask[async]->python-aiconfig==1.1.8) (2.1.3)\n", + "Requirement already satisfied: grpcio<2.0dev,>=1.33.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0dev,>=1.34.0->google-ai-generativelanguage==0.3.3->google-generativeai->python-aiconfig==1.1.8) (1.59.3)\n", + "Requirement already satisfied: grpcio-status<2.0.dev0,>=1.33.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0dev,>=1.34.0->google-ai-generativelanguage==0.3.3->google-generativeai->python-aiconfig==1.1.8) (1.59.3)\n", + "Requirement already satisfied: setuptools in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from nodeenv>=1.6.0->pyright==1.1.335->lastmile-utils==0.0.14->python-aiconfig==1.1.8) (69.0.2)\n", + "Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pyasn1-modules>=0.2.1->google-auth->google-generativeai->python-aiconfig==1.1.8) (0.5.1)\n", + "Requirement already satisfied: six>=1.5 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-dateutil>=2.8.2->pandas==2.1.2->lastmile-utils==0.0.14->python-aiconfig==1.1.8) (1.16.0)\n", + "Requirement already satisfied: importlib-metadata<6.0.0,>=5.0.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from json-spec->jsoncomment==0.4.2->lastmile-utils==0.0.14->python-aiconfig==1.1.8) (5.2.0)\n", + "Requirement already satisfied: zipp>=0.5 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from importlib-metadata<6.0.0,>=5.0.0->json-spec->jsoncomment==0.4.2->lastmile-utils==0.0.14->python-aiconfig==1.1.8) (3.17.0)\n", + "Building wheels for collected packages: python-aiconfig\n", + " Building editable for python-aiconfig (pyproject.toml) ... \u001b[?25ldone\n", + "\u001b[?25h Created wheel for python-aiconfig: filename=python_aiconfig-1.1.8-0.editable-py3-none-any.whl size=9978 sha256=80676ae1aed07f818ba42cc365e6304f4ea91b4c0bc92f37347180e0cc775168\n", + " Stored in directory: /private/var/folders/c_/yx7wt1_d3p78kh4zswyxmvwm0000gn/T/pip-ephem-wheel-cache-jqsdkqw8/wheels/a4/4c/dd/864cc5d4b5b9d637d1a341ee61bd745d4d3102211fb017d1ca\n", + "Successfully built python-aiconfig\n", + "\u001b[33mWARNING: Ignoring invalid distribution -etuptools (/opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages)\u001b[0m\u001b[33m\n", + "\u001b[0mInstalling collected packages: python-aiconfig\n", + " Attempting uninstall: python-aiconfig\n", + " Found existing installation: python-aiconfig 1.1.8\n", + " Uninstalling python-aiconfig-1.1.8:\n", + " Successfully uninstalled python-aiconfig-1.1.8\n", + "Successfully installed python-aiconfig-1.1.8\n" + ] + } + ], + "source": [ + "!pip install -e ../../python" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\u001b[33mWARNING: Ignoring invalid distribution -etuptools (/opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages)\u001b[0m\u001b[33m\n", + "\u001b[0mObtaining file:///Users/jonathan/Projects/aiconfig/extensions/HuggingFace/python\n", + " Installing build dependencies ... \u001b[?25ldone\n", + "\u001b[?25h Checking if build backend supports build_editable ... \u001b[?25ldone\n", + "\u001b[?25h Getting requirements to build editable ... \u001b[?25ldone\n", + "\u001b[?25h Preparing editable metadata (pyproject.toml) ... \u001b[?25ldone\n", + "\u001b[?25hRequirement already satisfied: black in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from aiconfig_extension_hugging_face==0.0.1) (23.11.0)\n", + "Requirement already satisfied: pylint in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from aiconfig_extension_hugging_face==0.0.1) (3.0.2)\n", + "Requirement already satisfied: python-aiconfig in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from aiconfig_extension_hugging_face==0.0.1) (1.1.8)\n", + "Requirement already satisfied: huggingface-hub in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from aiconfig_extension_hugging_face==0.0.1) (0.19.4)\n", + "Requirement already satisfied: accelerate in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from aiconfig_extension_hugging_face==0.0.1) (0.25.0)\n", + "Requirement already satisfied: diffusers in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from aiconfig_extension_hugging_face==0.0.1) (0.25.0)\n", + "Requirement already satisfied: torch in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from aiconfig_extension_hugging_face==0.0.1) (2.1.2)\n", + "Requirement already satisfied: torchvision in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from aiconfig_extension_hugging_face==0.0.1) (0.16.2)\n", + "Requirement already satisfied: torchaudio in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from aiconfig_extension_hugging_face==0.0.1) (2.1.2)\n", + "Requirement already satisfied: transformers in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from aiconfig_extension_hugging_face==0.0.1) (4.36.2)\n", + "Requirement already satisfied: asyncio in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from aiconfig_extension_hugging_face==0.0.1) (3.4.3)\n", + "Requirement already satisfied: numpy>=1.17 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from accelerate->aiconfig_extension_hugging_face==0.0.1) (1.26.2)\n", + "Requirement already satisfied: packaging>=20.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from accelerate->aiconfig_extension_hugging_face==0.0.1) (23.2)\n", + "Requirement already satisfied: psutil in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from accelerate->aiconfig_extension_hugging_face==0.0.1) (5.9.5)\n", + "Requirement already satisfied: pyyaml in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from accelerate->aiconfig_extension_hugging_face==0.0.1) (6.0.1)\n", + "Requirement already satisfied: safetensors>=0.3.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from accelerate->aiconfig_extension_hugging_face==0.0.1) (0.4.1)\n", + "Requirement already satisfied: filelock in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from torch->aiconfig_extension_hugging_face==0.0.1) (3.13.1)\n", + "Requirement already satisfied: typing-extensions in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from torch->aiconfig_extension_hugging_face==0.0.1) (4.9.0)\n", + "Requirement already satisfied: sympy in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from torch->aiconfig_extension_hugging_face==0.0.1) (1.12)\n", + "Requirement already satisfied: networkx in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from torch->aiconfig_extension_hugging_face==0.0.1) (3.2.1)\n", + "Requirement already satisfied: jinja2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from torch->aiconfig_extension_hugging_face==0.0.1) (3.1.2)\n", + "Requirement already satisfied: fsspec in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from torch->aiconfig_extension_hugging_face==0.0.1) (2023.10.0)\n", + "Requirement already satisfied: click>=8.0.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from black->aiconfig_extension_hugging_face==0.0.1) (8.1.7)\n", + "Requirement already satisfied: mypy-extensions>=0.4.3 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from black->aiconfig_extension_hugging_face==0.0.1) (1.0.0)\n", + "Requirement already satisfied: pathspec>=0.9.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from black->aiconfig_extension_hugging_face==0.0.1) (0.12.1)\n", + "Requirement already satisfied: platformdirs>=2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from black->aiconfig_extension_hugging_face==0.0.1) (4.1.0)\n", + "Requirement already satisfied: tomli>=1.1.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from black->aiconfig_extension_hugging_face==0.0.1) (2.0.1)\n", + "Requirement already satisfied: importlib-metadata in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from diffusers->aiconfig_extension_hugging_face==0.0.1) (5.2.0)\n", + "Requirement already satisfied: regex!=2019.12.17 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from diffusers->aiconfig_extension_hugging_face==0.0.1) (2023.10.3)\n", + "Requirement already satisfied: requests in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from diffusers->aiconfig_extension_hugging_face==0.0.1) (2.30.0)\n", + "Requirement already satisfied: Pillow in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from diffusers->aiconfig_extension_hugging_face==0.0.1) (10.1.0)\n", + "Requirement already satisfied: tqdm>=4.42.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from huggingface-hub->aiconfig_extension_hugging_face==0.0.1) (4.66.1)\n", + "Requirement already satisfied: astroid<=3.1.0-dev0,>=3.0.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pylint->aiconfig_extension_hugging_face==0.0.1) (3.0.2)\n", + "Requirement already satisfied: isort<6,>=4.2.5 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pylint->aiconfig_extension_hugging_face==0.0.1) (5.12.0)\n", + "Requirement already satisfied: mccabe<0.8,>=0.6 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pylint->aiconfig_extension_hugging_face==0.0.1) (0.7.0)\n", + "Requirement already satisfied: tomlkit>=0.10.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pylint->aiconfig_extension_hugging_face==0.0.1) (0.12.3)\n", + "Requirement already satisfied: dill>=0.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pylint->aiconfig_extension_hugging_face==0.0.1) (0.3.7)\n", + "Requirement already satisfied: flake8 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (6.1.0)\n", + "Requirement already satisfied: flask-cors in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (4.0.0)\n", + "Requirement already satisfied: flask[async] in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (3.0.0)\n", + "Requirement already satisfied: google-generativeai in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (0.2.2)\n", + "Requirement already satisfied: hypothesis==6.91.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (6.91.0)\n", + "Requirement already satisfied: lastmile-utils==0.0.14 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (0.0.14)\n", + "Requirement already satisfied: mock in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (5.1.0)\n", + "Requirement already satisfied: nest-asyncio in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (1.5.8)\n", + "Requirement already satisfied: nltk in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (3.8.1)\n", + "Requirement already satisfied: openai<1.5,>=1.0.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (1.3.6)\n", + "Requirement already satisfied: prompt-toolkit in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (3.0.41)\n", + "Requirement already satisfied: pybars3 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (0.9.7)\n", + "Requirement already satisfied: pydantic>=2.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (2.4.2)\n", + "Requirement already satisfied: pytest in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (7.4.3)\n", + "Requirement already satisfied: pytest-asyncio in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (0.21.1)\n", + "Requirement already satisfied: python-dotenv in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (1.0.0)\n", + "Requirement already satisfied: result in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (0.15.0)\n", + "Requirement already satisfied: attrs>=19.2.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from hypothesis==6.91.0->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (23.1.0)\n", + "Requirement already satisfied: sortedcontainers<3.0.0,>=2.1.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from hypothesis==6.91.0->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (2.4.0)\n", + "Requirement already satisfied: exceptiongroup>=1.0.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from hypothesis==6.91.0->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (1.2.0)\n", + "Requirement already satisfied: chardet==5.2.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from lastmile-utils==0.0.14->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (5.2.0)\n", + "Requirement already satisfied: jsoncomment==0.4.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from lastmile-utils==0.0.14->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (0.4.2)\n", + "Requirement already satisfied: pandas==2.1.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from lastmile-utils==0.0.14->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (2.1.2)\n", + "Requirement already satisfied: pyright==1.1.335 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from lastmile-utils==0.0.14->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (1.1.335)\n", + "Requirement already satisfied: autoflake==2.2.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from lastmile-utils==0.0.14->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (2.2.1)\n", + "Requirement already satisfied: pycodestyle<2.12.0,>=2.11.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from flake8->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (2.11.1)\n", + "Requirement already satisfied: pyflakes<3.2.0,>=3.1.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from flake8->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (3.1.0)\n", + "Requirement already satisfied: annotated-types>=0.4.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pydantic>=2.1->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (0.6.0)\n", + "Requirement already satisfied: pydantic-core==2.10.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pydantic>=2.1->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (2.10.1)\n", + "Requirement already satisfied: iniconfig in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pytest->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (2.0.0)\n", + "Requirement already satisfied: pluggy<2.0,>=0.12 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pytest->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (1.3.0)\n", + "Requirement already satisfied: json-spec in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from jsoncomment==0.4.2->lastmile-utils==0.0.14->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (0.11.0)\n", + "Requirement already satisfied: python-dateutil>=2.8.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pandas==2.1.2->lastmile-utils==0.0.14->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (2.8.2)\n", + "Requirement already satisfied: pytz>=2020.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pandas==2.1.2->lastmile-utils==0.0.14->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (2023.3.post1)\n", + "Requirement already satisfied: tzdata>=2022.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pandas==2.1.2->lastmile-utils==0.0.14->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (2023.3)\n", + "Requirement already satisfied: nodeenv>=1.6.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pyright==1.1.335->lastmile-utils==0.0.14->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (1.8.0)\n", + "Requirement already satisfied: tokenizers<0.19,>=0.14 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from transformers->aiconfig_extension_hugging_face==0.0.1) (0.15.0)\n", + "Requirement already satisfied: anyio<4,>=3.5.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from openai<1.5,>=1.0.0->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (3.7.1)\n", + "Requirement already satisfied: distro<2,>=1.7.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from openai<1.5,>=1.0.0->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (1.8.0)\n", + "Requirement already satisfied: httpx<1,>=0.23.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from openai<1.5,>=1.0.0->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (0.25.2)\n", + "Requirement already satisfied: sniffio in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from openai<1.5,>=1.0.0->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (1.3.0)\n", + "Requirement already satisfied: Werkzeug>=3.0.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from flask[async]->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (3.0.1)\n", + "Requirement already satisfied: itsdangerous>=2.1.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from flask[async]->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (2.1.2)\n", + "Requirement already satisfied: blinker>=1.6.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from flask[async]->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (1.7.0)\n", + "Requirement already satisfied: asgiref>=3.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from flask[async]->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (3.7.2)\n", + "Requirement already satisfied: MarkupSafe>=2.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from jinja2->torch->aiconfig_extension_hugging_face==0.0.1) (2.1.3)\n", + "Requirement already satisfied: google-ai-generativelanguage==0.3.3 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-generativeai->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (0.3.3)\n", + "Requirement already satisfied: google-auth in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-generativeai->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (2.24.0)\n", + "Requirement already satisfied: google-api-core in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-generativeai->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (2.14.0)\n", + "Requirement already satisfied: protobuf in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-generativeai->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (4.25.1)\n", + "Requirement already satisfied: proto-plus<2.0.0dev,>=1.22.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-ai-generativelanguage==0.3.3->google-generativeai->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (1.22.3)\n", + "Requirement already satisfied: zipp>=0.5 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from importlib-metadata->diffusers->aiconfig_extension_hugging_face==0.0.1) (3.17.0)\n", + "Requirement already satisfied: joblib in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from nltk->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (1.3.2)\n", + "Requirement already satisfied: wcwidth in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from prompt-toolkit->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (0.2.12)\n", + "Requirement already satisfied: PyMeta3>=0.5.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pybars3->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (0.5.1)\n", + "Requirement already satisfied: charset-normalizer<4,>=2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from requests->diffusers->aiconfig_extension_hugging_face==0.0.1) (3.3.2)\n", + "Requirement already satisfied: idna<4,>=2.5 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from requests->diffusers->aiconfig_extension_hugging_face==0.0.1) (3.6)\n", + "Requirement already satisfied: urllib3<3,>=1.21.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from requests->diffusers->aiconfig_extension_hugging_face==0.0.1) (2.1.0)\n", + "Requirement already satisfied: certifi>=2017.4.17 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from requests->diffusers->aiconfig_extension_hugging_face==0.0.1) (2023.11.17)\n", + "Requirement already satisfied: mpmath>=0.19 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from sympy->torch->aiconfig_extension_hugging_face==0.0.1) (1.3.0)\n", + "Requirement already satisfied: googleapis-common-protos<2.0.dev0,>=1.56.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-api-core->google-generativeai->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (1.61.0)\n", + "Requirement already satisfied: cachetools<6.0,>=2.0.0 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-auth->google-generativeai->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (5.3.2)\n", + "Requirement already satisfied: pyasn1-modules>=0.2.1 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-auth->google-generativeai->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (0.3.0)\n", + "Requirement already satisfied: rsa<5,>=3.1.4 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-auth->google-generativeai->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (4.9)\n", + "Requirement already satisfied: httpcore==1.* in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from httpx<1,>=0.23.0->openai<1.5,>=1.0.0->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (1.0.2)\n", + "Requirement already satisfied: h11<0.15,>=0.13 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from httpcore==1.*->httpx<1,>=0.23.0->openai<1.5,>=1.0.0->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (0.14.0)\n", + "Requirement already satisfied: grpcio<2.0dev,>=1.33.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0dev,>=1.34.0->google-ai-generativelanguage==0.3.3->google-generativeai->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (1.59.3)\n", + "Requirement already satisfied: grpcio-status<2.0.dev0,>=1.33.2 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from google-api-core[grpc]!=2.0.*,!=2.1.*,!=2.10.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,<3.0.0dev,>=1.34.0->google-ai-generativelanguage==0.3.3->google-generativeai->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (1.59.3)\n", + "Requirement already satisfied: setuptools in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from nodeenv>=1.6.0->pyright==1.1.335->lastmile-utils==0.0.14->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (69.0.2)\n", + "Requirement already satisfied: pyasn1<0.6.0,>=0.4.6 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from pyasn1-modules>=0.2.1->google-auth->google-generativeai->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (0.5.1)\n", + "Requirement already satisfied: six>=1.5 in /opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages (from python-dateutil>=2.8.2->pandas==2.1.2->lastmile-utils==0.0.14->python-aiconfig->aiconfig_extension_hugging_face==0.0.1) (1.16.0)\n", + "Building wheels for collected packages: aiconfig_extension_hugging_face\n", + " Building editable for aiconfig_extension_hugging_face (pyproject.toml) ... \u001b[?25ldone\n", + "\u001b[?25h Created wheel for aiconfig_extension_hugging_face: filename=aiconfig_extension_hugging_face-0.0.1-0.editable-py3-none-any.whl size=3622 sha256=acc8d69b8ac687e8750b6f23fe262c2153ea56888026507f78c90e4e9538f543\n", + " Stored in directory: /private/var/folders/c_/yx7wt1_d3p78kh4zswyxmvwm0000gn/T/pip-ephem-wheel-cache-sxfald_p/wheels/d2/68/34/c7d50811ea60a79ffd42dc4b98a5206d0ac7d5b1680c8b8acc\n", + "Successfully built aiconfig_extension_hugging_face\n", + "\u001b[33mWARNING: Ignoring invalid distribution -etuptools (/opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages)\u001b[0m\u001b[33m\n", + "\u001b[0mInstalling collected packages: aiconfig_extension_hugging_face\n", + " Attempting uninstall: aiconfig_extension_hugging_face\n", + " Found existing installation: aiconfig_extension_hugging_face 0.0.1\n", + " Uninstalling aiconfig_extension_hugging_face-0.0.1:\n", + " Successfully uninstalled aiconfig_extension_hugging_face-0.0.1\n", + "Successfully installed aiconfig_extension_hugging_face-0.0.1\n", + "Note: you may need to restart the kernel to use updated packages.\n" + ] + } + ], + "source": [ + "pip install -e ../../extensions/HuggingFace/python" + ] + }, + { + "cell_type": "code", + "execution_count": 6, + "metadata": {}, + "outputs": [ + { + "ename": "KeyError", + "evalue": "'aiconfig_extension_hugging_face'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[6], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01maiconfig_extension_hugging_face\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mlocal_inference\u001b[39;00m\u001b[38;5;21;01m.\u001b[39;00m\u001b[38;5;21;01mtext_summarization\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m \u001b[38;5;241m*\u001b[39m\n\u001b[1;32m 2\u001b[0m \u001b[38;5;66;03m# HuggingFaceTextSummarizationTransformer\u001b[39;00m\n", + "File \u001b[0;32m:1027\u001b[0m, in \u001b[0;36m_find_and_load\u001b[0;34m(name, import_)\u001b[0m\n", + "File \u001b[0;32m:1002\u001b[0m, in \u001b[0;36m_find_and_load_unlocked\u001b[0;34m(name, import_)\u001b[0m\n", + "File \u001b[0;32m:945\u001b[0m, in \u001b[0;36m_find_spec\u001b[0;34m(name, path, target)\u001b[0m\n", + "File \u001b[0;32m:1439\u001b[0m, in \u001b[0;36mfind_spec\u001b[0;34m(cls, fullname, path, target)\u001b[0m\n", + "File \u001b[0;32m:1405\u001b[0m, in \u001b[0;36m_get_spec\u001b[0;34m(cls, fullname, path, target)\u001b[0m\n", + "File \u001b[0;32m:1255\u001b[0m, in \u001b[0;36m__iter__\u001b[0;34m(self)\u001b[0m\n", + "File \u001b[0;32m:1242\u001b[0m, in \u001b[0;36m_recalculate\u001b[0;34m(self)\u001b[0m\n", + "File \u001b[0;32m:1238\u001b[0m, in \u001b[0;36m_get_parent_path\u001b[0;34m(self)\u001b[0m\n", + "\u001b[0;31mKeyError\u001b[0m: 'aiconfig_extension_hugging_face'" + ] + } + ], + "source": [ + "from aiconfig_extension_hugging_face.local_inference.text_summarization import *\n", + "# HuggingFaceTextSummarizationTransformer" + ] + }, + { + "cell_type": "code", + "execution_count": 3, "metadata": { "id": "go9T1xivF4S2" }, - "outputs": [], + "outputs": [ + { + "ename": "KeyError", + "evalue": "'HuggingFaceTextSummarizationTransformer'", + "output_type": "error", + "traceback": [ + "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", + "\u001b[0;31mKeyError\u001b[0m Traceback (most recent call last)", + "Cell \u001b[0;32mIn[3], line 4\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[38;5;28;01mfrom\u001b[39;00m \u001b[38;5;21;01maiconfig\u001b[39;00m \u001b[38;5;28;01mimport\u001b[39;00m AIConfigRuntime, InferenceOptions, CallbackManager\n\u001b[1;32m 3\u001b[0m \u001b[38;5;66;03m# Load the aiconfig.\u001b[39;00m\n\u001b[0;32m----> 4\u001b[0m config \u001b[38;5;241m=\u001b[39m \u001b[43mAIConfigRuntime\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mload\u001b[49m\u001b[43m(\u001b[49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[38;5;124;43mtravel.aiconfig.json\u001b[39;49m\u001b[38;5;124;43m'\u001b[39;49m\u001b[43m)\u001b[49m\n\u001b[1;32m 5\u001b[0m config\u001b[38;5;241m.\u001b[39mcallback_manager \u001b[38;5;241m=\u001b[39m CallbackManager([])\n", + "File \u001b[0;32m/opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages/aiconfig/Config.py:107\u001b[0m, in \u001b[0;36mAIConfigRuntime.load\u001b[0;34m(cls, config_filepath)\u001b[0m\n\u001b[1;32m 104\u001b[0m \u001b[38;5;66;03m# load the file as bytes and let pydantic handle the parsing\u001b[39;00m\n\u001b[1;32m 105\u001b[0m \u001b[38;5;66;03m# validated_data = AIConfig.model_validate_json(file.read())\u001b[39;00m\n\u001b[1;32m 106\u001b[0m aiconfigruntime \u001b[38;5;241m=\u001b[39m \u001b[38;5;28mcls\u001b[39m\u001b[38;5;241m.\u001b[39mmodel_validate_json(data)\n\u001b[0;32m--> 107\u001b[0m \u001b[43mupdate_model_parser_registry_with_config_runtime\u001b[49m\u001b[43m(\u001b[49m\u001b[43maiconfigruntime\u001b[49m\u001b[43m)\u001b[49m\n\u001b[1;32m 109\u001b[0m \u001b[38;5;66;03m# set the file path. This is used when saving the config\u001b[39;00m\n\u001b[1;32m 110\u001b[0m aiconfigruntime\u001b[38;5;241m.\u001b[39mfile_path \u001b[38;5;241m=\u001b[39m config_filepath\n", + "File \u001b[0;32m/opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages/aiconfig/registry.py:126\u001b[0m, in \u001b[0;36mupdate_model_parser_registry_with_config_runtime\u001b[0;34m(config_runtime)\u001b[0m\n\u001b[1;32m 124\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m\n\u001b[1;32m 125\u001b[0m \u001b[38;5;28;01mfor\u001b[39;00m model_id, model_parser_id \u001b[38;5;129;01min\u001b[39;00m config_runtime\u001b[38;5;241m.\u001b[39mmetadata\u001b[38;5;241m.\u001b[39mmodel_parsers\u001b[38;5;241m.\u001b[39mitems():\n\u001b[0;32m--> 126\u001b[0m retrieved_model_parser \u001b[38;5;241m=\u001b[39m \u001b[43mModelParserRegistry\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43mget_model_parser\u001b[49m\u001b[43m(\u001b[49m\n\u001b[1;32m 127\u001b[0m \u001b[43m \u001b[49m\u001b[43mmodel_parser_id\u001b[49m\n\u001b[1;32m 128\u001b[0m \u001b[43m \u001b[49m\u001b[43m)\u001b[49m \u001b[38;5;66;03m# Fix\u001b[39;00m\n\u001b[1;32m 129\u001b[0m \u001b[38;5;28;01mif\u001b[39;00m retrieved_model_parser \u001b[38;5;129;01mis\u001b[39;00m \u001b[38;5;28;01mNone\u001b[39;00m:\n\u001b[1;32m 130\u001b[0m error_message \u001b[38;5;241m=\u001b[39m (\n\u001b[1;32m 131\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mUnable to load AIConfig: It specifies \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mconfig_runtime\u001b[38;5;241m.\u001b[39mmetadata\u001b[38;5;241m.\u001b[39mmodel_parsers\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m, \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 132\u001b[0m \u001b[38;5;124mf\u001b[39m\u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mbut ModelParser \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mmodel_parser_id\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m for \u001b[39m\u001b[38;5;132;01m{\u001b[39;00mmodel_id\u001b[38;5;132;01m}\u001b[39;00m\u001b[38;5;124m does not exist. \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 133\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mMake sure you have registered the ModelParser using AIConfigRuntime.registerModelParser \u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 134\u001b[0m \u001b[38;5;124m\"\u001b[39m\u001b[38;5;124mbefore loading the AIConfig.\u001b[39m\u001b[38;5;124m\"\u001b[39m\n\u001b[1;32m 135\u001b[0m )\n", + "File \u001b[0;32m/opt/homebrew/Caskroom/miniconda/base/envs/aiconfig/lib/python3.10/site-packages/aiconfig/registry.py:61\u001b[0m, in \u001b[0;36mModelParserRegistry.get_model_parser\u001b[0;34m(model_id)\u001b[0m\n\u001b[1;32m 50\u001b[0m \u001b[38;5;129m@staticmethod\u001b[39m\n\u001b[1;32m 51\u001b[0m \u001b[38;5;28;01mdef\u001b[39;00m \u001b[38;5;21mget_model_parser\u001b[39m(model_id: \u001b[38;5;28mstr\u001b[39m) \u001b[38;5;241m-\u001b[39m\u001b[38;5;241m>\u001b[39m ModelParser:\n\u001b[1;32m 52\u001b[0m \u001b[38;5;250m \u001b[39m\u001b[38;5;124;03m\"\"\"\u001b[39;00m\n\u001b[1;32m 53\u001b[0m \u001b[38;5;124;03m Retrieves a model parser from the ModelParserRegistry.\u001b[39;00m\n\u001b[1;32m 54\u001b[0m \n\u001b[0;32m (...)\u001b[0m\n\u001b[1;32m 59\u001b[0m \u001b[38;5;124;03m ModelParser: The retrieved model parser\u001b[39;00m\n\u001b[1;32m 60\u001b[0m \u001b[38;5;124;03m \"\"\"\u001b[39;00m\n\u001b[0;32m---> 61\u001b[0m \u001b[38;5;28;01mreturn\u001b[39;00m \u001b[43mModelParserRegistry\u001b[49m\u001b[38;5;241;43m.\u001b[39;49m\u001b[43m_parsers\u001b[49m\u001b[43m[\u001b[49m\u001b[43mmodel_id\u001b[49m\u001b[43m]\u001b[49m\n", + "\u001b[0;31mKeyError\u001b[0m: 'HuggingFaceTextSummarizationTransformer'" + ] + } + ], "source": [ "from aiconfig import AIConfigRuntime, InferenceOptions, CallbackManager\n", "\n", "# Load the aiconfig.\n", "config = AIConfigRuntime.load('travel.aiconfig.json')\n", - "config.callback_manager = CallbackManager([])" + "config.callback_manager = CallbackManager([])\n", + "\n", + "AIConfigRuntime.register_model_parser()" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "config.run()" ] }, { @@ -391,7 +717,16 @@ "name": "python3" }, "language_info": { - "name": "python" + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.10.13" } }, "nbformat": 4, diff --git a/cookbooks/Getting-Started/travel.aiconfig.json b/cookbooks/Getting-Started/travel.aiconfig.json index c6b0bbc3f..6c15aea34 100644 --- a/cookbooks/Getting-Started/travel.aiconfig.json +++ b/cookbooks/Getting-Started/travel.aiconfig.json @@ -4,35 +4,71 @@ "schema_version": "latest", "metadata": { "models": { - "gpt-3.5-turbo": { - "model": "gpt-3.5-turbo", - "top_p": 1, - "temperature": 1 - }, - "gpt-4": { - "model": "gpt-4", + "gpt2": { + "model": "gpt2", "max_tokens": 3000, - "system_prompt": "You are an expert travel coordinator with exquisite taste." + "system_prompt": "Some random system prompt" + }, + "runwayml/stable-diffusion-v1-5": { + "model": "runwayml/stable-diffusion-v1-5" + }, + "stabilityai/stable-diffusion-xl-base-1.0": { + "model": "stabilityai/stable-diffusion-xl-base-1.0" + }, + "stevhliu/my_awesome_billsum_model": { + "model": "stevhliu/my_awesome_billsum_model" } }, - "default_model": "gpt-3.5-turbo" + "model_parsers": { + "stevhliu/my_awesome_billsum_model": "HuggingFaceTextSummarizationTransformer" + }, + "default_model": "gpt2" }, "prompts": [ { - "name": "get_activities", - "input": "Tell me 10 fun attractions to do in NYC." + "name": "test_hf_sum", + "input": "HMS Duncan was a D-class destroyer leader built for the Royal Navy in the early 1930s. The ship was initially assigned to the Mediterranean Fleet before she was transferred to the China Station in early 1935 where she remained until mid-1939. Duncan returned to the Mediterranean Fleet just after World War II began in September 1939. She was transferred to the Home Fleet in December 1939, although she was badly damaged in a collision the following month, and required repairs that lasted until July 1940. The ship joined Force H at Gibraltar in October, escorting the larger ships and various convoys until March 1941 when she was transferred to West Africa for convoy escort duties for a few months. Duncan rejoined the 13th Destroyer Flotilla at Gibraltar in July and escorted several convoys to Malta during the rest of the year. After a refit, she briefly returned to the 13th Destroyer Flotilla before joining the Eastern Fleet in the Indian Ocean to participate in Operation Ironclad in May 1942. The ship was recalled home to be converted into an escort destroyer in late 1942.\n\nDuncan was assigned to Escort Group B-7 in the North Atlantic after her conversion was complete in May 1943. She escorted a number of convoys before she required a lengthy refit from November to May 1944. She helped to sink two German submarines in October 1943. The ship was assigned to anti-submarine duties in the Western Approaches after her refit was finished in May 1944, and Duncan remained there until April 1945. At that time she was transferred to coastal anti-submarine patrols to counter any last-gasp effort by the Kriegsmarine to interfere with the Allied supply lines to the Continent. Placed in reserve the following month, Duncan was in bad shape and was sold for scrap later that year. The demolition, however, was not completed until 1949.\n\nDesign and construction\nDuncan displaced 1,400 long tons (1,400 t) at standard load. The ship had an overall length of 329 feet (100.3 m), a beam of 33 feet (10.1 m) and a draught of 12 feet 6 inches (3.8 m). She was powered by Parsons geared steam turbines, driving two shafts, which developed a total of 36,000 shaft horsepower (27,000 kW) and gave a maximum speed of 36 knots (67 km/h; 41 mph). Steam for the turbines was provided by three Admiralty 3-drum boilers. Duncan carried a maximum of 390 long tons (400 t) of fuel oil that gave her a range of 5,870 nautical miles (10,870 km; 6,760 mi) at 15 knots (28 km/h; 17 mph). The ship's complement was 175 officers and men.[1]\n\nThe ship mounted four 45-calibre 4.7-inch Mk IX guns in single mounts designated 'A', 'B', 'X' and 'Y' from front to rear. For anti-aircraft (AA) defence, Duncan had a single 12-pounder AA gun between her funnels and two quadruple Mark I mounts for the QF 0.5-inch Vickers Mark III machine guns mounted on the sides of her bridge. She was fitted with two above-water quadruple torpedo tube mounts for 21-inch torpedoes.[1] One depth charge rail and two throwers were fitted; 20 depth charges were originally carried, but this increased to 35 shortly after the war began.[2] In 1936, the 12-pounder was replaced by two QF 2-pounder Mk II AA guns. Sometime after the Dunkirk evacuation, the ship's rear torpedo tube mount was removed and replaced by a 12-pounder AA gun and the quadruple 0.5-inch machine guns were replaced by 20-millimetre (0.79 in) Oerlikon AA guns.[3]\n\nDuncan was ordered under the 1930 Naval Estimates on 2 February 1931 from Portsmouth Dockyard. She was laid down on 25 September 1931, launched on 7 July 1932 and finally commissioned into the Navy on 31 March 1933. Built as a flotilla leader, she displaced 25 long tons more than the rest of her class and carried an extra 30 personnel. These personnel formed the staff of the Captain (D) of the flotilla.[4]\n\nCareer\nThe ship was initially assigned as the leader of the 1st Destroyer Flotilla in the Mediterranean and made a brief deployment to the Persian Gulf and Red Sea in September–November 1933. After refitting at Portsmouth between 3 September and 23 October, Duncan led most of her flotilla to the China Station, arriving at Hong Kong on 3 January 1935. The next few years were spent showing the flag around the Far East, and visiting Japan, the Philippines, the Dutch East Indies, Singapore, Thailand and Malaya. The ship was under repairs between 14 December 1936 and 4 January 1937 from damage sustained when testing refuelling at sea techniques. She was in Shanghai during the Japanese invasion of 1937 and evacuated British civilians to Woosung, together with the sloop HMS Falmouth. On 28 October 1938, Duncan was struck by the Greek steamer Pipina whilst lying at anchor at Foo Chow, China. The ship was repaired and given a refit at Hong Kong between 31 October and 14 January 1939. She was lightly damaged when struck by a high-speed target at Wei Hai Wei, China, in July 1939.[5]\n\nWorld War II\nWith the outbreak of war, Duncan and her sisters Diana, Daring, and Dainty, were transferred to the Mediterranean Fleet, arriving at Alexandria on 30 September. All the ships were in poor condition, and, after repair, they conducted contraband control duties. In December Duncan, along with her sister Duchess, was assigned to escort the battleship Barham back to the UK, and they departed Gibraltar on 6 December. During the morning of 10 December, Barham collided with Duchess off the Mull of Kintyre in heavy fog, sinking the destroyer with the loss of 124 lives. Duncan was assigned to the 3rd Destroyer Flotilla of the Home Fleet on 12 December.[6]\n\nShe was damaged in a collision with a merchant vessel on 17 January whilst escorting Convoy ON18, causing a twenty-foot hole in her side but fortunately she did not sink and was taken under tow.[7] After temporary repairs at Invergordon, she was towed to Grangemouth for repairs that were not completed until 22 July. She carried out post-refit trials and returned to Scapa Flow to rejoin the 3rd Destroyer Flotilla. She transferred to the 13th Destroyer Flotilla based at Gibraltar in October, escorting the aircraft carrier Ark Royal, Barham, the heavy cruiser Berwick, and the light cruisers Glasgow and Sheffield from the Firth of Clyde to Gibraltar. Joining Force H, she escorted Ark Royal during Operation Coat, the carrier Argus when she flew off Hawker Hurricane fighters to Malta during Operation White and escorted Force F to Malta during Collar during November. During the Battle of Cape Spartivento in late November, Duncan was detailed to escort the convoy away from the Italians.[8]\n\nOn 1 January 1941, she led four ships of the 13th Destroyer Flotilla as they intercepted a Vichy French convoy near Mellila and seized all four merchant ships of the convoy.[9] A few days later she took part in Operation Excess, a military convoy taking stores to Piraeus and Alexandria.[5] During Operation Grog in early February, the ship escorted the larger ships of Force H as they bombarded Genoa.[10] She then escorted the battlecruiser Repulse and the carrier Furious from Gibraltar to West Africa in early March and remained there afterwards. Based at Freetown, the ship escorted convoys through West African waters until July when she was recalled to the Mediterranean to escort the Operation Substance convoy from Gibraltar to Malta in July 1941[5] Reassigned to the 13th Destroyer Flotilla, Duncan remained at Gibraltar and was part of the close escort for the Operation Halberd convoy in late September.[11]\n\nIn October she was assigned as part of the escort for Convoy HG 75, from Gibraltar to Liverpool,[12] because she was scheduled for a refit in the Sheerness Dockyard. It began on 16 November and lasted until 23 January 1942, after which Duncan rejoined the 13th Destroyer Flotilla at Gibraltar.[13] In late February and March, the ship escorted the carriers Eagle and Argus as they flew off fighters for Malta.[14] The following month, Duncan was transferred to the 22nd Destroyer Flotilla of the Eastern Fleet to support Operation Ironclad, the invasion of Diego Suarez.[15] After four months of operations in the Indian Ocean, the Admiralty decided to convert her to an escort destroyer, and accordingly she returned to the United Kingdom via the Cape of Good Hope as an escort for the battleship Royal Sovereign. The ship arrived in Greenock on 16 November, but did not begin her conversion at Tilbury until 24 November.[13]\n\nThis involved the replacement of 'A' gun by a Hedgehog anti-submarine spigot mortar, the removal of her director-control tower and rangefinder above the bridge in exchange for a Type 271 target indication radar, exchanging her two 2-pounder AA guns mounted between her funnels for two Oerlikon 20 mm AA guns, the addition of two Oerlikon guns to her searchlight platform, and the removal of her 12-pounder AA gun.[16] 'Y' gun was also removed to allow her depth charge stowage to be increased to 98 depth charges.[17]\n\nIn March 1943, Duncan carried out sea trials and went to Tobermory to work up. In April she joined Escort Group B-7 as the Senior Officer's ship, with Commander Peter Gretton[18] in command at the height of the Battle of the Atlantic. She escorted Convoy ONS 5 in early May, a major convoy battle which saw the destruction of six U-boats for the loss of thirteen ships, although Duncan was forced to withdraw for lack of fuel before the battle was over. Later that month, she escorted Convoy SC 130, in which three U-boats were destroyed for the loss of no ships.[19] Duncan continued on North Atlantic escort duty until October 1943; on 16 October the ship rescued 15 survivors from U-470 which had been sunk earlier by a Consolidated B-24 Liberator bomber of the Royal Air Force.[13] Whilst defending Convoy ON 207 on 23 October, Duncan, together with the destroyer Vidette and a Liberator of No. 224 Squadron RAF, sank U-274.[20] Later the same month, on 29 October, Duncan shared the sinking of U-282 with Vidette and the corvette Sunflower whilst protecting Convoy ON 208.[13]\n\nBy this time the ship was in poor shape and required an extensive refit; the work last from 12 November to 17 May 1944 at the North Woolwich, London shipyard of Harland and Wolff. After working up, she was assigned to the 14th Escort Group for anti-submarine operations in the Western Approaches. Duncan conducted convoy escort and anti-submarine operations with the group through April 1945 when she was assigned to the Greenock Coastal Escort Pool. The ship was placed in reserve on 13 May, transferred to Barrow on 9 June and approved for immediate disposal on 8 July as she was leaking five tons of water a day. Duncan was turned over to BISCO for scrapping immediately afterwards, but demolition was not completed until 1949.[13]", + "metadata": { + "model": { + "name": "stevhliu/my_awesome_billsum_model", + "settings": { + "min_length": 100, + "max_length": 200, + "num_beams": 1 + } + } + } + }, + { + "name": "gen_image", + "input": "a cute {{animal}} holding 2 AKs with an explosion behind it", + "metadata": { + "model": { + "name": "runwayml/stable-diffusion-v1-5", + "settings": { + "num_images_per_prompt": 2 + } + }, + "parameters": { + "animal": "bunny" + } + } }, { - "name": "gen_itinerary", - "input": "Generate an itinerary ordered by {{order_by}} for these activities: {{get_activities.output}}.", + "name": "gen_image_sdxl", + "input": "a cute {{animal}} holding 2 AKs with an explosion behind it", "metadata": { - "model": "gpt-4", + "model": { + "name": "stabilityai/stable-diffusion-xl-base-1.0", + "settings": { + "num_images_per_prompt": 2, + "num_inference_steps": 50 + } + }, "parameters": { - "order_by": "geographic location" + "animal": "bunny" } } } ] } - - diff --git a/extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/__init__.py b/extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/__init__.py index 43e3bf721..0f4fff1c5 100644 --- a/extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/__init__.py +++ b/extensions/HuggingFace/python/src/aiconfig_extension_hugging_face/__init__.py @@ -1,6 +1,5 @@ from .local_inference.text_2_image import HuggingFaceText2ImageDiffusor from .local_inference.text_generation import HuggingFaceTextGenerationTransformer -from .remote_inference_client.text_generation import HuggingFaceTextGenerationClient from .local_inference.text_summarization import HuggingFaceTextSummarizationTransformer # from .remote_inference_client.text_generation import HuggingFaceTextGenerationClient