opengradient 0.3.11__py3-none-any.whl → 0.3.13__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
opengradient/__init__.py CHANGED
@@ -5,7 +5,7 @@ from .defaults import DEFAULT_INFERENCE_CONTRACT_ADDRESS, DEFAULT_RPC_URL
5
5
  from .types import InferenceMode, LLM
6
6
  from . import llm
7
7
 
8
- __version__ = "0.3.11"
8
+ __version__ = "0.3.13"
9
9
 
10
10
  _client = None
11
11
 
@@ -73,4 +73,25 @@ def login(email: str, password: str):
73
73
  def list_files(model_name: str, version: str) -> List[Dict]:
74
74
  if _client is None:
75
75
  raise RuntimeError("OpenGradient client not initialized. Call og.init() first.")
76
- return _client.list_files(model_name, version)
76
+ return _client.list_files(model_name, version)
77
+
78
+ def generate_image(model: str, prompt: str, height: Optional[int] = None, width: Optional[int] = None) -> bytes:
79
+ """
80
+ Generate an image using the specified model and prompt.
81
+
82
+ Args:
83
+ model (str): The model identifier (e.g. "stabilityai/stable-diffusion-xl-base-1.0")
84
+ prompt (str): The text prompt to generate the image from
85
+ height (Optional[int]): Height of the generated image. Default is None.
86
+ width (Optional[int]): Width of the generated image. Default is None.
87
+
88
+ Returns:
89
+ bytes: The raw image data bytes
90
+
91
+ Raises:
92
+ RuntimeError: If the client is not initialized
93
+ OpenGradientError: If the image generation fails
94
+ """
95
+ if _client is None:
96
+ raise RuntimeError("OpenGradient client not initialized. Call og.init() first.")
97
+ return _client.generate_image(model, prompt, height=height, width=width)
@@ -1 +1 @@
1
- [{"anonymous":false,"inputs":[{"components":[{"components":[{"internalType":"string","name":"name","type":"string"},{"components":[{"internalType":"int128","name":"value","type":"int128"},{"internalType":"int128","name":"decimals","type":"int128"}],"internalType":"struct TensorLib.Number[]","name":"values","type":"tuple[]"},{"internalType":"uint32[]","name":"shape","type":"uint32[]"}],"internalType":"struct TensorLib.MultiDimensionalNumberTensor[]","name":"numbers","type":"tuple[]"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string[]","name":"values","type":"string[]"}],"internalType":"struct TensorLib.StringTensor[]","name":"strings","type":"tuple[]"},{"internalType":"bool","name":"is_simulation_result","type":"bool"}],"indexed":false,"internalType":"struct ModelOutput","name":"output","type":"tuple"}],"name":"InferenceResult","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"string","name":"finish_reason","type":"string"},{"components":[{"internalType":"string","name":"role","type":"string"},{"internalType":"string","name":"content","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"tool_call_id","type":"string"},{"components":[{"internalType":"string","name":"id","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"arguments","type":"string"}],"internalType":"struct ToolCall[]","name":"tool_calls","type":"tuple[]"}],"internalType":"struct ChatMessage","name":"message","type":"tuple"}],"indexed":false,"internalType":"struct LLMChatResponse","name":"response","type":"tuple"}],"name":"LLMChatResult","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"string","name":"answer","type":"string"}],"indexed":false,"internalType":"struct LLMCompletionResponse","name":"response","type":"tuple"}],"name":"LLMCompletionResult","type":"event"},{"inputs":[{"internalType":"string","name":"modelId","type":"string"},{"internalType":"enum ModelInferenceMode","name":"inferenceMode","type":"uint8"},{"components":[{"components":[{"internalType":"string","name":"name","type":"string"},{"components":[{"internalType":"int128","name":"value","type":"int128"},{"internalType":"int128","name":"decimals","type":"int128"}],"internalType":"struct TensorLib.Number[]","name":"values","type":"tuple[]"},{"internalType":"uint32[]","name":"shape","type":"uint32[]"}],"internalType":"struct TensorLib.MultiDimensionalNumberTensor[]","name":"numbers","type":"tuple[]"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string[]","name":"values","type":"string[]"}],"internalType":"struct TensorLib.StringTensor[]","name":"strings","type":"tuple[]"}],"internalType":"struct ModelInput","name":"modelInput","type":"tuple"}],"name":"run","outputs":[{"components":[{"components":[{"internalType":"string","name":"name","type":"string"},{"components":[{"internalType":"int128","name":"value","type":"int128"},{"internalType":"int128","name":"decimals","type":"int128"}],"internalType":"struct TensorLib.Number[]","name":"values","type":"tuple[]"},{"internalType":"uint32[]","name":"shape","type":"uint32[]"}],"internalType":"struct TensorLib.MultiDimensionalNumberTensor[]","name":"numbers","type":"tuple[]"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string[]","name":"values","type":"string[]"}],"internalType":"struct TensorLib.StringTensor[]","name":"strings","type":"tuple[]"},{"internalType":"bool","name":"is_simulation_result","type":"bool"}],"internalType":"struct ModelOutput","name":"","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"enum LLMInferenceMode","name":"mode","type":"uint8"},{"internalType":"string","name":"modelCID","type":"string"},{"components":[{"internalType":"string","name":"role","type":"string"},{"internalType":"string","name":"content","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"tool_call_id","type":"string"},{"components":[{"internalType":"string","name":"id","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"arguments","type":"string"}],"internalType":"struct ToolCall[]","name":"tool_calls","type":"tuple[]"}],"internalType":"struct ChatMessage[]","name":"messages","type":"tuple[]"},{"components":[{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"parameters","type":"string"}],"internalType":"struct ToolDefinition[]","name":"tools","type":"tuple[]"},{"internalType":"string","name":"tool_choice","type":"string"},{"internalType":"uint32","name":"max_tokens","type":"uint32"},{"internalType":"string[]","name":"stop_sequence","type":"string[]"},{"internalType":"uint32","name":"temperature","type":"uint32"}],"internalType":"struct LLMChatRequest","name":"request","type":"tuple"}],"name":"runLLMChat","outputs":[{"components":[{"internalType":"string","name":"finish_reason","type":"string"},{"components":[{"internalType":"string","name":"role","type":"string"},{"internalType":"string","name":"content","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"tool_call_id","type":"string"},{"components":[{"internalType":"string","name":"id","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"arguments","type":"string"}],"internalType":"struct ToolCall[]","name":"tool_calls","type":"tuple[]"}],"internalType":"struct ChatMessage","name":"message","type":"tuple"}],"internalType":"struct LLMChatResponse","name":"","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"enum LLMInferenceMode","name":"mode","type":"uint8"},{"internalType":"string","name":"modelCID","type":"string"},{"internalType":"string","name":"prompt","type":"string"},{"internalType":"uint32","name":"max_tokens","type":"uint32"},{"internalType":"string[]","name":"stop_sequence","type":"string[]"},{"internalType":"uint32","name":"temperature","type":"uint32"}],"internalType":"struct LLMCompletionRequest","name":"request","type":"tuple"}],"name":"runLLMCompletion","outputs":[{"components":[{"internalType":"string","name":"answer","type":"string"}],"internalType":"struct LLMCompletionResponse","name":"","type":"tuple"}],"stateMutability":"nonpayable","type":"function"}]
1
+ [{"anonymous":false,"inputs":[{"components":[{"components":[{"internalType":"string","name":"name","type":"string"},{"components":[{"internalType":"int128","name":"value","type":"int128"},{"internalType":"int128","name":"decimals","type":"int128"}],"internalType":"struct TensorLib.Number[]","name":"values","type":"tuple[]"},{"internalType":"uint32[]","name":"shape","type":"uint32[]"}],"internalType":"struct TensorLib.MultiDimensionalNumberTensor[]","name":"numbers","type":"tuple[]"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string[]","name":"values","type":"string[]"}],"internalType":"struct TensorLib.StringTensor[]","name":"strings","type":"tuple[]"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"value","type":"string"}],"internalType":"struct TensorLib.JsonScalar[]","name":"jsons","type":"tuple[]"},{"internalType":"bool","name":"is_simulation_result","type":"bool"}],"indexed":false,"internalType":"struct ModelOutput","name":"output","type":"tuple"}],"name":"InferenceResult","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"string","name":"finish_reason","type":"string"},{"components":[{"internalType":"string","name":"role","type":"string"},{"internalType":"string","name":"content","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"tool_call_id","type":"string"},{"components":[{"internalType":"string","name":"id","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"arguments","type":"string"}],"internalType":"struct ToolCall[]","name":"tool_calls","type":"tuple[]"}],"internalType":"struct ChatMessage","name":"message","type":"tuple"}],"indexed":false,"internalType":"struct LLMChatResponse","name":"response","type":"tuple"}],"name":"LLMChatResult","type":"event"},{"anonymous":false,"inputs":[{"components":[{"internalType":"string","name":"answer","type":"string"}],"indexed":false,"internalType":"struct LLMCompletionResponse","name":"response","type":"tuple"}],"name":"LLMCompletionResult","type":"event"},{"inputs":[{"internalType":"string","name":"modelId","type":"string"},{"internalType":"enum ModelInferenceMode","name":"inferenceMode","type":"uint8"},{"components":[{"components":[{"internalType":"string","name":"name","type":"string"},{"components":[{"internalType":"int128","name":"value","type":"int128"},{"internalType":"int128","name":"decimals","type":"int128"}],"internalType":"struct TensorLib.Number[]","name":"values","type":"tuple[]"},{"internalType":"uint32[]","name":"shape","type":"uint32[]"}],"internalType":"struct TensorLib.MultiDimensionalNumberTensor[]","name":"numbers","type":"tuple[]"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string[]","name":"values","type":"string[]"}],"internalType":"struct TensorLib.StringTensor[]","name":"strings","type":"tuple[]"}],"internalType":"struct ModelInput","name":"modelInput","type":"tuple"}],"name":"run","outputs":[{"components":[{"components":[{"internalType":"string","name":"name","type":"string"},{"components":[{"internalType":"int128","name":"value","type":"int128"},{"internalType":"int128","name":"decimals","type":"int128"}],"internalType":"struct TensorLib.Number[]","name":"values","type":"tuple[]"},{"internalType":"uint32[]","name":"shape","type":"uint32[]"}],"internalType":"struct TensorLib.MultiDimensionalNumberTensor[]","name":"numbers","type":"tuple[]"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string[]","name":"values","type":"string[]"}],"internalType":"struct TensorLib.StringTensor[]","name":"strings","type":"tuple[]"},{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"value","type":"string"}],"internalType":"struct TensorLib.JsonScalar[]","name":"jsons","type":"tuple[]"},{"internalType":"bool","name":"is_simulation_result","type":"bool"}],"internalType":"struct ModelOutput","name":"","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"enum LLMInferenceMode","name":"mode","type":"uint8"},{"internalType":"string","name":"modelCID","type":"string"},{"components":[{"internalType":"string","name":"role","type":"string"},{"internalType":"string","name":"content","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"tool_call_id","type":"string"},{"components":[{"internalType":"string","name":"id","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"arguments","type":"string"}],"internalType":"struct ToolCall[]","name":"tool_calls","type":"tuple[]"}],"internalType":"struct ChatMessage[]","name":"messages","type":"tuple[]"},{"components":[{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"parameters","type":"string"}],"internalType":"struct ToolDefinition[]","name":"tools","type":"tuple[]"},{"internalType":"string","name":"tool_choice","type":"string"},{"internalType":"uint32","name":"max_tokens","type":"uint32"},{"internalType":"string[]","name":"stop_sequence","type":"string[]"},{"internalType":"uint32","name":"temperature","type":"uint32"}],"internalType":"struct LLMChatRequest","name":"request","type":"tuple"}],"name":"runLLMChat","outputs":[{"components":[{"internalType":"string","name":"finish_reason","type":"string"},{"components":[{"internalType":"string","name":"role","type":"string"},{"internalType":"string","name":"content","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"tool_call_id","type":"string"},{"components":[{"internalType":"string","name":"id","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"arguments","type":"string"}],"internalType":"struct ToolCall[]","name":"tool_calls","type":"tuple[]"}],"internalType":"struct ChatMessage","name":"message","type":"tuple"}],"internalType":"struct LLMChatResponse","name":"","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"enum LLMInferenceMode","name":"mode","type":"uint8"},{"internalType":"string","name":"modelCID","type":"string"},{"internalType":"string","name":"prompt","type":"string"},{"internalType":"uint32","name":"max_tokens","type":"uint32"},{"internalType":"string[]","name":"stop_sequence","type":"string[]"},{"internalType":"uint32","name":"temperature","type":"uint32"}],"internalType":"struct LLMCompletionRequest","name":"request","type":"tuple"}],"name":"runLLMCompletion","outputs":[{"components":[{"internalType":"string","name":"answer","type":"string"}],"internalType":"struct LLMCompletionResponse","name":"","type":"tuple"}],"stateMutability":"nonpayable","type":"function"}]
opengradient/cli.py CHANGED
@@ -604,6 +604,44 @@ def list_files(client: Client, repo_name: str, version: str):
604
604
  click.echo(f"Error listing files: {str(e)}")
605
605
 
606
606
 
607
+ @cli.command()
608
+ @click.option('--model', '-m', required=True, help='Model identifier for image generation')
609
+ @click.option('--prompt', '-p', required=True, help='Text prompt for generating the image')
610
+ @click.option('--output-path', '-o', required=True, type=click.Path(path_type=Path),
611
+ help='Output file path for the generated image')
612
+ @click.option('--width', type=int, default=1024, help='Output image width')
613
+ @click.option('--height', type=int, default=1024, help='Output image height')
614
+ @click.pass_context
615
+ def generate_image(ctx, model: str, prompt: str, output_path: Path, width: int, height: int):
616
+ """
617
+ Generate an image using a diffusion model.
618
+
619
+ Example usage:
620
+ opengradient generate-image --model stabilityai/stable-diffusion-xl-base-1.0
621
+ --prompt "A beautiful sunset over mountains" --output-path sunset.png
622
+ """
623
+ client: Client = ctx.obj['client']
624
+ try:
625
+ click.echo(f"Generating image with model \"{model}\"")
626
+ image_data = client.generate_image(
627
+ model_cid=model,
628
+ prompt=prompt,
629
+ width=width,
630
+ height=height
631
+ )
632
+
633
+ # Save the image
634
+ with open(output_path, 'wb') as f:
635
+ f.write(image_data)
636
+
637
+ click.echo() # Add a newline for better spacing
638
+ click.secho("✅ Image generation successful", fg="green", bold=True)
639
+ click.echo(f"Image saved to: {output_path}")
640
+
641
+ except Exception as e:
642
+ click.echo(f"Error generating image: {str(e)}")
643
+
644
+
607
645
  if __name__ == '__main__':
608
646
  logging.getLogger().setLevel(logging.WARN)
609
647
  cli()
opengradient/client.py CHANGED
@@ -14,6 +14,14 @@ from opengradient import utils
14
14
  from opengradient.exceptions import OpenGradientError
15
15
  from opengradient.types import InferenceMode, LLM
16
16
 
17
+ import grpc
18
+ import time
19
+ import uuid
20
+ from google.protobuf import timestamp_pb2
21
+
22
+ from opengradient.proto import infer_pb2
23
+ from opengradient.proto import infer_pb2_grpc
24
+ from .defaults import DEFAULT_IMAGE_GEN_HOST, DEFAULT_IMAGE_GEN_PORT
17
25
 
18
26
  class Client:
19
27
  FIREBASE_CONFIG = {
@@ -319,6 +327,7 @@ class Client:
319
327
  Raises:
320
328
  OpenGradientError: If the inference fails.
321
329
  """
330
+ # TODO (Kyle): Add input support for JSON tensors
322
331
  try:
323
332
  logging.debug("Entering infer method")
324
333
  self._initialize_web3()
@@ -705,4 +714,129 @@ class Client:
705
714
  status_code=e.response.status_code if hasattr(e, 'response') else None)
706
715
  except Exception as e:
707
716
  logging.error(f"Unexpected error during file listing: {str(e)}", exc_info=True)
708
- raise OpenGradientError(f"Unexpected error during file listing: {str(e)}")
717
+ raise OpenGradientError(f"Unexpected error during file listing: {str(e)}")
718
+
719
+ def generate_image(
720
+ self,
721
+ model_cid: str,
722
+ prompt: str,
723
+ host: str = DEFAULT_IMAGE_GEN_HOST,
724
+ port: int = DEFAULT_IMAGE_GEN_PORT,
725
+ width: int = 1024,
726
+ height: int = 1024,
727
+ timeout: int = 300, # 5 minute timeout
728
+ max_retries: int = 3
729
+ ) -> bytes:
730
+ """
731
+ Generate an image using a diffusion model through gRPC.
732
+
733
+ Args:
734
+ model_cid (str): The model identifier (e.g. "stabilityai/stable-diffusion-xl-base-1.0")
735
+ prompt (str): The text prompt to generate the image from
736
+ host (str, optional): gRPC host address. Defaults to DEFAULT_IMAGE_GEN_HOST.
737
+ port (int, optional): gRPC port number. Defaults to DEFAULT_IMAGE_GEN_PORT.
738
+ width (int, optional): Output image width. Defaults to 1024.
739
+ height (int, optional): Output image height. Defaults to 1024.
740
+ timeout (int, optional): Maximum time to wait for generation in seconds. Defaults to 300.
741
+ max_retries (int, optional): Maximum number of retry attempts. Defaults to 3.
742
+
743
+ Returns:
744
+ bytes: The raw image data bytes
745
+
746
+ Raises:
747
+ OpenGradientError: If the image generation fails
748
+ TimeoutError: If the generation exceeds the timeout period
749
+ """
750
+ def exponential_backoff(attempt: int, max_delay: float = 30.0) -> None:
751
+ """Calculate and sleep for exponential backoff duration"""
752
+ delay = min(0.1 * (2 ** attempt), max_delay)
753
+ time.sleep(delay)
754
+
755
+ channel = None
756
+ start_time = time.time()
757
+ retry_count = 0
758
+
759
+ try:
760
+ while retry_count < max_retries:
761
+ try:
762
+ # Initialize gRPC channel and stub
763
+ channel = grpc.insecure_channel(f'{host}:{port}')
764
+ stub = infer_pb2_grpc.InferenceServiceStub(channel)
765
+
766
+ # Create image generation request
767
+ image_request = infer_pb2.ImageGenerationRequest(
768
+ model=model_cid,
769
+ prompt=prompt,
770
+ height=height,
771
+ width=width
772
+ )
773
+
774
+ # Create inference request with random transaction ID
775
+ tx_id = str(uuid.uuid4())
776
+ request = infer_pb2.InferenceRequest(
777
+ tx=tx_id,
778
+ image_generation=image_request
779
+ )
780
+
781
+ # Send request with timeout
782
+ response_id = stub.RunInferenceAsync(
783
+ request,
784
+ timeout=min(30, timeout) # Initial request timeout
785
+ )
786
+
787
+ # Poll for completion
788
+ attempt = 0
789
+ while True:
790
+ # Check timeout
791
+ if time.time() - start_time > timeout:
792
+ raise TimeoutError(f"Image generation timed out after {timeout} seconds")
793
+
794
+ status_request = infer_pb2.InferenceTxId(id=response_id.id)
795
+ try:
796
+ status = stub.GetInferenceStatus(
797
+ status_request,
798
+ timeout=min(5, timeout) # Status check timeout
799
+ ).status
800
+ except grpc.RpcError as e:
801
+ logging.warning(f"Status check failed (attempt {attempt}): {str(e)}")
802
+ exponential_backoff(attempt)
803
+ attempt += 1
804
+ continue
805
+
806
+ if status == infer_pb2.InferenceStatus.STATUS_COMPLETED:
807
+ break
808
+ elif status == infer_pb2.InferenceStatus.STATUS_ERROR:
809
+ raise OpenGradientError("Image generation failed on server")
810
+ elif status != infer_pb2.InferenceStatus.STATUS_IN_PROGRESS:
811
+ raise OpenGradientError(f"Unexpected status: {status}")
812
+
813
+ exponential_backoff(attempt)
814
+ attempt += 1
815
+
816
+ # Get result
817
+ result = stub.GetInferenceResult(
818
+ response_id,
819
+ timeout=min(30, timeout) # Result fetch timeout
820
+ )
821
+ return result.image_generation_result.image_data
822
+
823
+ except (grpc.RpcError, TimeoutError) as e:
824
+ retry_count += 1
825
+ if retry_count >= max_retries:
826
+ raise OpenGradientError(f"Image generation failed after {max_retries} retries: {str(e)}")
827
+
828
+ logging.warning(f"Attempt {retry_count} failed: {str(e)}. Retrying...")
829
+ exponential_backoff(retry_count)
830
+
831
+ except grpc.RpcError as e:
832
+ logging.error(f"gRPC error: {str(e)}")
833
+ raise OpenGradientError(f"Image generation failed: {str(e)}")
834
+ except TimeoutError as e:
835
+ logging.error(f"Timeout error: {str(e)}")
836
+ raise
837
+ except Exception as e:
838
+ logging.error(f"Error in generate image method: {str(e)}", exc_info=True)
839
+ raise OpenGradientError(f"Image generation failed: {str(e)}")
840
+ finally:
841
+ if channel:
842
+ channel.close()
opengradient/defaults.py CHANGED
@@ -1,7 +1,8 @@
1
-
2
1
  # Default variables
3
2
  DEFAULT_RPC_URL="http://18.218.115.248:8545"
4
3
  DEFAULT_OG_FAUCET_URL="http://18.218.115.248:8080/?address="
5
4
  DEFAULT_HUB_SIGNUP_URL="https://hub.opengradient.ai/signup"
6
- DEFAULT_INFERENCE_CONTRACT_ADDRESS="0xF78F7d5a7e9f484f0924Cc21347029715bD3B8f4"
5
+ DEFAULT_INFERENCE_CONTRACT_ADDRESS="0x3fDCb0394CF4919ff4361f4EbA0750cEc2e3bBc7"
7
6
  DEFAULT_BLOCKCHAIN_EXPLORER="http://3.145.62.2/tx/"
7
+ DEFAULT_IMAGE_GEN_HOST="18.217.25.69"
8
+ DEFAULT_IMAGE_GEN_PORT=5125
@@ -0,0 +1,2 @@
1
+ from .infer_pb2 import *
2
+ from .infer_pb2_grpc import *
@@ -0,0 +1,50 @@
1
+ syntax = "proto3";
2
+
3
+ package inference;
4
+
5
+ // The inference service definition
6
+ service InferenceService {
7
+ rpc RunInferenceAsync(InferenceRequest) returns (InferenceTxId);
8
+ rpc GetInferenceStatus(InferenceTxId) returns (InferenceStatus);
9
+ rpc GetInferenceResult(InferenceTxId) returns (InferenceResult);
10
+ }
11
+
12
+ // Request messages
13
+ message InferenceRequest {
14
+ string tx = 1;
15
+ ImageGenerationRequest image_generation = 6; // Field number 6 matches original proto
16
+ }
17
+
18
+ message ImageGenerationRequest {
19
+ string model = 1;
20
+ string prompt = 2;
21
+ optional int32 height = 3;
22
+ optional int32 width = 4;
23
+ }
24
+
25
+ message InferenceTxId {
26
+ string id = 1;
27
+ }
28
+
29
+ // Status messages
30
+ message InferenceStatus {
31
+ enum Status {
32
+ STATUS_UNSPECIFIED = 0;
33
+ STATUS_IN_PROGRESS = 1;
34
+ STATUS_COMPLETED = 2;
35
+ STATUS_ERROR = 3;
36
+ }
37
+ Status status = 1;
38
+ optional string error_message = 2; // For error handling
39
+ }
40
+
41
+ // Result messages
42
+ message InferenceResult {
43
+ ImageGenerationResponse image_generation_result = 5; // Field number 5 matches original proto
44
+ optional string public_key = 7;
45
+ optional string signature = 8;
46
+ }
47
+
48
+ message ImageGenerationResponse {
49
+ bytes image_data = 1;
50
+ }
@@ -0,0 +1,50 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # NO CHECKED-IN PROTOBUF GENCODE
4
+ # source: infer.proto
5
+ # Protobuf Python Version: 5.27.2
6
+ """Generated protocol buffer code."""
7
+ from google.protobuf import descriptor as _descriptor
8
+ from google.protobuf import descriptor_pool as _descriptor_pool
9
+ from google.protobuf import runtime_version as _runtime_version
10
+ from google.protobuf import symbol_database as _symbol_database
11
+ from google.protobuf.internal import builder as _builder
12
+ _runtime_version.ValidateProtobufRuntimeVersion(
13
+ _runtime_version.Domain.PUBLIC,
14
+ 5,
15
+ 27,
16
+ 2,
17
+ '',
18
+ 'infer.proto'
19
+ )
20
+ # @@protoc_insertion_point(imports)
21
+
22
+ _sym_db = _symbol_database.Default()
23
+
24
+
25
+
26
+
27
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0binfer.proto\x12\tinference\"[\n\x10InferenceRequest\x12\n\n\x02tx\x18\x01 \x01(\t\x12;\n\x10image_generation\x18\x06 \x01(\x0b\x32!.inference.ImageGenerationRequest\"u\n\x16ImageGenerationRequest\x12\r\n\x05model\x18\x01 \x01(\t\x12\x0e\n\x06prompt\x18\x02 \x01(\t\x12\x13\n\x06height\x18\x03 \x01(\x05H\x00\x88\x01\x01\x12\x12\n\x05width\x18\x04 \x01(\x05H\x01\x88\x01\x01\x42\t\n\x07_heightB\x08\n\x06_width\"\x1b\n\rInferenceTxId\x12\n\n\x02id\x18\x01 \x01(\t\"\xd4\x01\n\x0fInferenceStatus\x12\x31\n\x06status\x18\x01 \x01(\x0e\x32!.inference.InferenceStatus.Status\x12\x1a\n\rerror_message\x18\x02 \x01(\tH\x00\x88\x01\x01\"`\n\x06Status\x12\x16\n\x12STATUS_UNSPECIFIED\x10\x00\x12\x16\n\x12STATUS_IN_PROGRESS\x10\x01\x12\x14\n\x10STATUS_COMPLETED\x10\x02\x12\x10\n\x0cSTATUS_ERROR\x10\x03\x42\x10\n\x0e_error_message\"\xa4\x01\n\x0fInferenceResult\x12\x43\n\x17image_generation_result\x18\x05 \x01(\x0b\x32\".inference.ImageGenerationResponse\x12\x17\n\npublic_key\x18\x07 \x01(\tH\x00\x88\x01\x01\x12\x16\n\tsignature\x18\x08 \x01(\tH\x01\x88\x01\x01\x42\r\n\x0b_public_keyB\x0c\n\n_signature\"-\n\x17ImageGenerationResponse\x12\x12\n\nimage_data\x18\x01 \x01(\x0c\x32\xf6\x01\n\x10InferenceService\x12J\n\x11RunInferenceAsync\x12\x1b.inference.InferenceRequest\x1a\x18.inference.InferenceTxId\x12J\n\x12GetInferenceStatus\x12\x18.inference.InferenceTxId\x1a\x1a.inference.InferenceStatus\x12J\n\x12GetInferenceResult\x12\x18.inference.InferenceTxId\x1a\x1a.inference.InferenceResultb\x06proto3')
28
+
29
+ _globals = globals()
30
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, _globals)
31
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'infer_pb2', _globals)
32
+ if not _descriptor._USE_C_DESCRIPTORS:
33
+ DESCRIPTOR._loaded_options = None
34
+ _globals['_INFERENCEREQUEST']._serialized_start=26
35
+ _globals['_INFERENCEREQUEST']._serialized_end=117
36
+ _globals['_IMAGEGENERATIONREQUEST']._serialized_start=119
37
+ _globals['_IMAGEGENERATIONREQUEST']._serialized_end=236
38
+ _globals['_INFERENCETXID']._serialized_start=238
39
+ _globals['_INFERENCETXID']._serialized_end=265
40
+ _globals['_INFERENCESTATUS']._serialized_start=268
41
+ _globals['_INFERENCESTATUS']._serialized_end=480
42
+ _globals['_INFERENCESTATUS_STATUS']._serialized_start=366
43
+ _globals['_INFERENCESTATUS_STATUS']._serialized_end=462
44
+ _globals['_INFERENCERESULT']._serialized_start=483
45
+ _globals['_INFERENCERESULT']._serialized_end=647
46
+ _globals['_IMAGEGENERATIONRESPONSE']._serialized_start=649
47
+ _globals['_IMAGEGENERATIONRESPONSE']._serialized_end=694
48
+ _globals['_INFERENCESERVICE']._serialized_start=697
49
+ _globals['_INFERENCESERVICE']._serialized_end=943
50
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,186 @@
1
+ # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
2
+ """Client and server classes corresponding to protobuf-defined services."""
3
+ import grpc
4
+ import warnings
5
+
6
+ from . import infer_pb2 as infer__pb2
7
+
8
+ GRPC_GENERATED_VERSION = '1.66.2'
9
+ GRPC_VERSION = grpc.__version__
10
+ _version_not_supported = False
11
+
12
+ try:
13
+ from grpc._utilities import first_version_is_lower
14
+ _version_not_supported = first_version_is_lower(GRPC_VERSION, GRPC_GENERATED_VERSION)
15
+ except ImportError:
16
+ _version_not_supported = True
17
+
18
+ if _version_not_supported:
19
+ raise RuntimeError(
20
+ f'The grpc package installed is at version {GRPC_VERSION},'
21
+ + f' but the generated code in infer_pb2_grpc.py depends on'
22
+ + f' grpcio>={GRPC_GENERATED_VERSION}.'
23
+ + f' Please upgrade your grpc module to grpcio>={GRPC_GENERATED_VERSION}'
24
+ + f' or downgrade your generated code using grpcio-tools<={GRPC_VERSION}.'
25
+ )
26
+
27
+
28
+ class InferenceServiceStub(object):
29
+ """The inference service definition
30
+ """
31
+
32
+ def __init__(self, channel):
33
+ """Constructor.
34
+
35
+ Args:
36
+ channel: A grpc.Channel.
37
+ """
38
+ self.RunInferenceAsync = channel.unary_unary(
39
+ '/inference.InferenceService/RunInferenceAsync',
40
+ request_serializer=infer__pb2.InferenceRequest.SerializeToString,
41
+ response_deserializer=infer__pb2.InferenceTxId.FromString,
42
+ _registered_method=True)
43
+ self.GetInferenceStatus = channel.unary_unary(
44
+ '/inference.InferenceService/GetInferenceStatus',
45
+ request_serializer=infer__pb2.InferenceTxId.SerializeToString,
46
+ response_deserializer=infer__pb2.InferenceStatus.FromString,
47
+ _registered_method=True)
48
+ self.GetInferenceResult = channel.unary_unary(
49
+ '/inference.InferenceService/GetInferenceResult',
50
+ request_serializer=infer__pb2.InferenceTxId.SerializeToString,
51
+ response_deserializer=infer__pb2.InferenceResult.FromString,
52
+ _registered_method=True)
53
+
54
+
55
+ class InferenceServiceServicer(object):
56
+ """The inference service definition
57
+ """
58
+
59
+ def RunInferenceAsync(self, request, context):
60
+ """Missing associated documentation comment in .proto file."""
61
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
62
+ context.set_details('Method not implemented!')
63
+ raise NotImplementedError('Method not implemented!')
64
+
65
+ def GetInferenceStatus(self, request, context):
66
+ """Missing associated documentation comment in .proto file."""
67
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
68
+ context.set_details('Method not implemented!')
69
+ raise NotImplementedError('Method not implemented!')
70
+
71
+ def GetInferenceResult(self, request, context):
72
+ """Missing associated documentation comment in .proto file."""
73
+ context.set_code(grpc.StatusCode.UNIMPLEMENTED)
74
+ context.set_details('Method not implemented!')
75
+ raise NotImplementedError('Method not implemented!')
76
+
77
+
78
+ def add_InferenceServiceServicer_to_server(servicer, server):
79
+ rpc_method_handlers = {
80
+ 'RunInferenceAsync': grpc.unary_unary_rpc_method_handler(
81
+ servicer.RunInferenceAsync,
82
+ request_deserializer=infer__pb2.InferenceRequest.FromString,
83
+ response_serializer=infer__pb2.InferenceTxId.SerializeToString,
84
+ ),
85
+ 'GetInferenceStatus': grpc.unary_unary_rpc_method_handler(
86
+ servicer.GetInferenceStatus,
87
+ request_deserializer=infer__pb2.InferenceTxId.FromString,
88
+ response_serializer=infer__pb2.InferenceStatus.SerializeToString,
89
+ ),
90
+ 'GetInferenceResult': grpc.unary_unary_rpc_method_handler(
91
+ servicer.GetInferenceResult,
92
+ request_deserializer=infer__pb2.InferenceTxId.FromString,
93
+ response_serializer=infer__pb2.InferenceResult.SerializeToString,
94
+ ),
95
+ }
96
+ generic_handler = grpc.method_handlers_generic_handler(
97
+ 'inference.InferenceService', rpc_method_handlers)
98
+ server.add_generic_rpc_handlers((generic_handler,))
99
+ server.add_registered_method_handlers('inference.InferenceService', rpc_method_handlers)
100
+
101
+
102
+ # This class is part of an EXPERIMENTAL API.
103
+ class InferenceService(object):
104
+ """The inference service definition
105
+ """
106
+
107
+ @staticmethod
108
+ def RunInferenceAsync(request,
109
+ target,
110
+ options=(),
111
+ channel_credentials=None,
112
+ call_credentials=None,
113
+ insecure=False,
114
+ compression=None,
115
+ wait_for_ready=None,
116
+ timeout=None,
117
+ metadata=None):
118
+ return grpc.experimental.unary_unary(
119
+ request,
120
+ target,
121
+ '/inference.InferenceService/RunInferenceAsync',
122
+ infer__pb2.InferenceRequest.SerializeToString,
123
+ infer__pb2.InferenceTxId.FromString,
124
+ options,
125
+ channel_credentials,
126
+ insecure,
127
+ call_credentials,
128
+ compression,
129
+ wait_for_ready,
130
+ timeout,
131
+ metadata,
132
+ _registered_method=True)
133
+
134
+ @staticmethod
135
+ def GetInferenceStatus(request,
136
+ target,
137
+ options=(),
138
+ channel_credentials=None,
139
+ call_credentials=None,
140
+ insecure=False,
141
+ compression=None,
142
+ wait_for_ready=None,
143
+ timeout=None,
144
+ metadata=None):
145
+ return grpc.experimental.unary_unary(
146
+ request,
147
+ target,
148
+ '/inference.InferenceService/GetInferenceStatus',
149
+ infer__pb2.InferenceTxId.SerializeToString,
150
+ infer__pb2.InferenceStatus.FromString,
151
+ options,
152
+ channel_credentials,
153
+ insecure,
154
+ call_credentials,
155
+ compression,
156
+ wait_for_ready,
157
+ timeout,
158
+ metadata,
159
+ _registered_method=True)
160
+
161
+ @staticmethod
162
+ def GetInferenceResult(request,
163
+ target,
164
+ options=(),
165
+ channel_credentials=None,
166
+ call_credentials=None,
167
+ insecure=False,
168
+ compression=None,
169
+ wait_for_ready=None,
170
+ timeout=None,
171
+ metadata=None):
172
+ return grpc.experimental.unary_unary(
173
+ request,
174
+ target,
175
+ '/inference.InferenceService/GetInferenceResult',
176
+ infer__pb2.InferenceTxId.SerializeToString,
177
+ infer__pb2.InferenceResult.FromString,
178
+ options,
179
+ channel_credentials,
180
+ insecure,
181
+ call_credentials,
182
+ compression,
183
+ wait_for_ready,
184
+ timeout,
185
+ metadata,
186
+ _registered_method=True)
opengradient/types.py CHANGED
@@ -75,7 +75,8 @@ class Abi:
75
75
  return result
76
76
 
77
77
  class LLM(str, Enum):
78
- META_LLAMA3_8B_INSTRUCT = "meta-llama/Meta-Llama-3-8B-Instruct"
78
+ META_LLAMA_3_8B_INSTRUCT = "meta-llama/Meta-Llama-3-8B-Instruct"
79
79
  LLAMA_3_2_3B_INSTRUCT = "meta-llama/Llama-3.2-3B-Instruct"
80
80
  MISTRAL_7B_INSTRUCT_V3 = "mistralai/Mistral-7B-Instruct-v0.3"
81
- HERMES_3_LLAMA_3_1_70B = "NousResearch/Hermes-3-Llama-3.1-70B"
81
+ HERMES_3_LLAMA_3_1_70B = "NousResearch/Hermes-3-Llama-3.1-70B"
82
+ META_LLAMA_3_1_70B_INSTRUCT = "meta-llama/Llama-3.1-70B-Instruct"
opengradient/utils.py CHANGED
@@ -1,6 +1,7 @@
1
1
  import logging
2
2
  from decimal import Decimal
3
3
  from typing import Dict, List, Tuple
4
+ import json
4
5
 
5
6
  import numpy as np
6
7
  from web3.datastructures import AttributeDict
@@ -52,6 +53,7 @@ def convert_to_model_input(
52
53
  logging.debug("Converting the following input dictionary to ModelInput: %s", inputs)
53
54
  number_tensors = []
54
55
  string_tensors = []
56
+ json_tensors = []
55
57
  for tensor_name, tensor_data in inputs.items():
56
58
  # Convert to NP array if list or single object
57
59
  if isinstance(tensor_data, list):
@@ -151,7 +153,18 @@ def convert_to_model_output(event_data: AttributeDict) -> Dict[str, np.ndarray]:
151
153
  values = tensor.get('values', [])
152
154
  output_dict[name] = np.array(values).reshape(shape)
153
155
  else:
154
- logging.warning(f"Unexpected tensor type: {type(tensor)}")
156
+ logging.warning(f"Unexpected tensor type: {type(tensor)}")
157
+
158
+ # Parse JSON dicts
159
+ for tensor in output.get('jsons', []):
160
+ logging.debug(f"Processing JSON tensor: {tensor}")
161
+ if isinstance(tensor, AttributeDict):
162
+ name = tensor.get('name')
163
+ value = tensor.get('value')
164
+ output_dict[name] = np.array(json.loads(value))
165
+ else:
166
+ logging.warning(f"Unexpected tensor type: {type(tensor)}")
167
+
155
168
  else:
156
169
  logging.warning(f"Unexpected output type: {type(output)}")
157
170
 
@@ -1,7 +1,8 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.3
2
2
  Name: opengradient
3
- Version: 0.3.11
3
+ Version: 0.3.13
4
4
  Summary: Python SDK for OpenGradient decentralized model management & inference services
5
+ Project-URL: Homepage, https://opengradient.ai
5
6
  Author-email: OpenGradient <oliver@opengradient.ai>
6
7
  License: MIT License
7
8
 
@@ -24,8 +25,6 @@ License: MIT License
24
25
  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
26
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
27
  SOFTWARE.
27
-
28
- Project-URL: Homepage, https://opengradient.ai
29
28
  Classifier: Development Status :: 3 - Alpha
30
29
  Classifier: Intended Audience :: Developers
31
30
  Classifier: License :: OSI Approved :: MIT License
@@ -33,15 +32,13 @@ Classifier: Programming Language :: Python :: 3.10
33
32
  Classifier: Programming Language :: Python :: 3.11
34
33
  Classifier: Programming Language :: Python :: 3.12
35
34
  Requires-Python: >=3.10
36
- Description-Content-Type: text/markdown
37
- License-File: LICENSE
38
35
  Requires-Dist: aiohappyeyeballs==2.4.3
39
36
  Requires-Dist: aiohttp==3.10.8
40
37
  Requires-Dist: aiosignal==1.3.1
41
38
  Requires-Dist: annotated-types==0.7.0
42
39
  Requires-Dist: attrs==24.2.0
43
40
  Requires-Dist: bitarray==2.9.2
44
- Requires-Dist: CacheControl==0.14.0
41
+ Requires-Dist: cachecontrol==0.14.0
45
42
  Requires-Dist: cachetools==5.5.0
46
43
  Requires-Dist: certifi==2024.8.30
47
44
  Requires-Dist: cffi==1.17.1
@@ -55,6 +52,7 @@ Requires-Dist: cryptography==43.0.1
55
52
  Requires-Dist: cytoolz==0.12.3
56
53
  Requires-Dist: distlib==0.3.8
57
54
  Requires-Dist: dulwich==0.21.7
55
+ Requires-Dist: eth-abi==5.1.0
58
56
  Requires-Dist: eth-account==0.13.4
59
57
  Requires-Dist: eth-hash==0.7.0
60
58
  Requires-Dist: eth-keyfile==0.8.1
@@ -62,7 +60,6 @@ Requires-Dist: eth-keys==0.5.1
62
60
  Requires-Dist: eth-rlp==2.1.0
63
61
  Requires-Dist: eth-typing==5.0.0
64
62
  Requires-Dist: eth-utils==5.0.0
65
- Requires-Dist: eth-abi==5.1.0
66
63
  Requires-Dist: fastjsonschema==2.20.0
67
64
  Requires-Dist: fastparquet==2024.5.0
68
65
  Requires-Dist: filelock==3.16.1
@@ -77,13 +74,14 @@ Requires-Dist: google-cloud-storage==2.18.2
77
74
  Requires-Dist: google-crc32c==1.6.0
78
75
  Requires-Dist: google-resumable-media==2.7.2
79
76
  Requires-Dist: googleapis-common-protos==1.65.0
77
+ Requires-Dist: grpcio-tools==1.66.2
80
78
  Requires-Dist: grpcio==1.66.2
81
- Requires-Dist: grpcio-status==1.66.2
82
79
  Requires-Dist: hexbytes==1.2.1
83
80
  Requires-Dist: idna==3.10
84
- Requires-Dist: jaraco.classes==3.4.0
81
+ Requires-Dist: jaraco-classes==3.4.0
85
82
  Requires-Dist: jwcrypto==1.5.6
86
83
  Requires-Dist: keyring==24.3.1
84
+ Requires-Dist: langchain==0.3.7
87
85
  Requires-Dist: more-itertools==10.5.0
88
86
  Requires-Dist: msgpack==1.1.0
89
87
  Requires-Dist: multidict==6.1.0
@@ -97,23 +95,24 @@ Requires-Dist: pkginfo==1.11.1
97
95
  Requires-Dist: platformdirs==4.3.6
98
96
  Requires-Dist: proto-plus==1.24.0
99
97
  Requires-Dist: protobuf==5.28.2
98
+ Requires-Dist: protobuf>=4.24.0
100
99
  Requires-Dist: ptyprocess==0.7.0
101
100
  Requires-Dist: pyarrow==17.0.0
102
- Requires-Dist: pyasn1==0.6.1
103
101
  Requires-Dist: pyasn1-modules==0.4.1
102
+ Requires-Dist: pyasn1==0.6.1
104
103
  Requires-Dist: pycparser==2.22
105
104
  Requires-Dist: pycryptodome==3.21.0
106
- Requires-Dist: pydantic==2.9.2
107
105
  Requires-Dist: pydantic-core==2.23.4
106
+ Requires-Dist: pydantic==2.9.2
108
107
  Requires-Dist: pyproject-hooks==1.2.0
109
108
  Requires-Dist: python-dateutil==2.9.0.post0
110
109
  Requires-Dist: python-jwt==4.1.0
111
110
  Requires-Dist: pytz==2024.2
112
111
  Requires-Dist: pyunormalize==16.0.0
113
- Requires-Dist: RapidFuzz==3.10.0
112
+ Requires-Dist: rapidfuzz==3.10.0
114
113
  Requires-Dist: regex==2024.9.11
115
- Requires-Dist: requests==2.32.3
116
114
  Requires-Dist: requests-toolbelt==1.0.0
115
+ Requires-Dist: requests==2.32.3
117
116
  Requires-Dist: rlp==4.0.1
118
117
  Requires-Dist: rsa==4.9
119
118
  Requires-Dist: shellingham==1.5.4
@@ -129,6 +128,7 @@ Requires-Dist: web3==7.3.0
129
128
  Requires-Dist: websockets==13.1
130
129
  Requires-Dist: xattr==1.1.0
131
130
  Requires-Dist: yarl==1.13.1
131
+ Description-Content-Type: text/markdown
132
132
 
133
133
  # OpenGradient Python SDK
134
134
  Python SDK for the OpenGradient platform provides decentralized model management & inference services. Python SDK allows programmatic access to our model repository and decentralized AI infrastructure.
@@ -227,4 +227,4 @@ opengradient infer QmbUqS93oc4JTLMHwpVxsE39mhNxy6hpf6Py3r9oANr8aZ VANILLA --inpu
227
227
  opengradient llm --model "meta-llama/Meta-Llama-3-8B-Instruct" --prompt "Translate to French: Hello, how are you?" --max-tokens 50 --temperature 0.7
228
228
  ```
229
229
 
230
- For more information read the OpenGradient [documentation](https://docs.opengradient.ai/).
230
+ For more information read the OpenGradient [documentation](https://docs.opengradient.ai/).
@@ -0,0 +1,20 @@
1
+ opengradient/__init__.py,sha256=5aeZn5QVFepwTyjcO7GBHGlYUVwJCQa8QWYSHUaHqdM,4015
2
+ opengradient/account.py,sha256=2B7rtCXQDX-yF4U69h8B9-OUreJU4IqoGXG_1Hn9nWs,1150
3
+ opengradient/cli.py,sha256=kdYR_AFKHV99HtO_son7vHpM5jWVZe8FO0iMWxJ7pJE,24444
4
+ opengradient/client.py,sha256=RdlTz60NJKVJihYY6oVYLfNOg6RGnJbfG-2UIxUk-ws,37069
5
+ opengradient/defaults.py,sha256=6tsW9Z84z6YtITCsULTTgnN0KRUZjfSoeWJZqdWkYCo,384
6
+ opengradient/exceptions.py,sha256=v4VmUGTvvtjhCZAhR24Ga42z3q-DzR1Y5zSqP_yn2Xk,3366
7
+ opengradient/types.py,sha256=QTEsygwT5AnIf8Dg9mexvVUe49nCo9N0pgZOOIp3trc,2214
8
+ opengradient/utils.py,sha256=lUDPmyPqLwpZI-owyN6Rm3QvUjOn5pLN5G1QyriVm-E,6994
9
+ opengradient/abi/inference.abi,sha256=MR5u9npZ-Yx2EqRW17_M-UnGgFF3mMEMepOwaZ-Bkgc,7040
10
+ opengradient/llm/__init__.py,sha256=n_11WFPoU8YtGc6wg9cK6gEy9zBISf1183Loip3dAbI,62
11
+ opengradient/llm/chat.py,sha256=Ia-K0og-DkZ1_IFgbgscn_gpLMXZX54F3fvfSrUq5M8,3849
12
+ opengradient/proto/__init__.py,sha256=AhaSmrqV0TXGzCKaoPV8-XUvqs2fGAJBM2aOmDpkNbE,55
13
+ opengradient/proto/infer.proto,sha256=13eaEMcppxkBF8yChptsX9HooWFwJKze7oLZNl-LEb8,1217
14
+ opengradient/proto/infer_pb2.py,sha256=wg2vjLQCNv6HRhYuIqgj9xivi3nO4IPz6E5wh2dhDqY,3446
15
+ opengradient/proto/infer_pb2_grpc.py,sha256=y5GYwD1EdNs892xx58jdfyA0fO5QC7k3uZOtImTHMiE,6891
16
+ opengradient-0.3.13.dist-info/METADATA,sha256=XiQ5o2HcbeKfAX27tiHRQ9oQyJNYmkQSnmLPtl_Elz8,7612
17
+ opengradient-0.3.13.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
18
+ opengradient-0.3.13.dist-info/entry_points.txt,sha256=yUKTaJx8RXnybkob0J62wVBiCp_1agVbgw9uzsmaeJc,54
19
+ opengradient-0.3.13.dist-info/licenses/LICENSE,sha256=xEcvQ3AxZOtDkrqkys2Mm6Y9diEnaSeQRKvxi-JGnNA,1069
20
+ opengradient-0.3.13.dist-info/RECORD,,
@@ -1,5 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.5.0)
2
+ Generator: hatchling 1.26.3
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
-
@@ -1,17 +0,0 @@
1
- opengradient/__init__.py,sha256=D5AItNKf3klN25oWw3YAQMSYM9uOYBLGIaw7X6TD2-Q,3129
2
- opengradient/account.py,sha256=2B7rtCXQDX-yF4U69h8B9-OUreJU4IqoGXG_1Hn9nWs,1150
3
- opengradient/cli.py,sha256=0SRt9iQcCHxR1QmsF54-KhdpqHx9_va0UyckoPQcYwg,22937
4
- opengradient/client.py,sha256=yaexPTr-CSPQXR5AOrhHDmygKCq37Q_FIVy8Mtq6THk,31253
5
- opengradient/defaults.py,sha256=jweJ6QyzNY0oO22OUA8B-uJPA90cyedhMT9J38MmGjw,319
6
- opengradient/exceptions.py,sha256=v4VmUGTvvtjhCZAhR24Ga42z3q-DzR1Y5zSqP_yn2Xk,3366
7
- opengradient/types.py,sha256=kRCkxJ2xD6Y5eLmrrS61t66qm7jzNF0Qbnntl1_FMKk,2143
8
- opengradient/utils.py,sha256=_dEIhepJXjJFfHLGTUwXloZJXnlQbvwqHSPu08548jI,6532
9
- opengradient/abi/inference.abi,sha256=VMxv4pli9ESYL2hCpbU41Z_WweCBy_3EcTYkCWCb-rU,6623
10
- opengradient/llm/__init__.py,sha256=n_11WFPoU8YtGc6wg9cK6gEy9zBISf1183Loip3dAbI,62
11
- opengradient/llm/chat.py,sha256=Ia-K0og-DkZ1_IFgbgscn_gpLMXZX54F3fvfSrUq5M8,3849
12
- opengradient-0.3.11.dist-info/LICENSE,sha256=xEcvQ3AxZOtDkrqkys2Mm6Y9diEnaSeQRKvxi-JGnNA,1069
13
- opengradient-0.3.11.dist-info/METADATA,sha256=RDat9N9hKfSIWgrx9JOwXmBcKrLtvbDM8wqdCzSgPNA,7581
14
- opengradient-0.3.11.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
15
- opengradient-0.3.11.dist-info/entry_points.txt,sha256=yUKTaJx8RXnybkob0J62wVBiCp_1agVbgw9uzsmaeJc,54
16
- opengradient-0.3.11.dist-info/top_level.txt,sha256=oC1zimVLa2Yi1LQz8c7x-0IQm92milb5ax8gHBHwDqU,13
17
- opengradient-0.3.11.dist-info/RECORD,,
@@ -1 +0,0 @@
1
- opengradient