Skip to content

Instantly share code, notes, and snippets.

View samhita-alla's full-sized avatar

Samhita Alla samhita-alla

View GitHub Profile
@samhita-alla
samhita-alla / langchain_flyte_pipeline.py
Last active November 10, 2023 22:07
LangChain x Flyte
import json
import os
from functools import partial
import flytekit
from flytekit import ImageSpec, Resources, Secret, map_task, task, workflow
embed_image = ImageSpec(
name="langchain-flyte-vectordb",
packages=[
@samhita-alla
samhita-alla / streamlined_ingestion.py
Created July 7, 2023 06:13
LangChain x Flyte: Streamlined Ingestion
import json
import os
from functools import partial
import flytekit
from flytekit import ImageSpec, Resources, Secret, dynamic, map_task, task, workflow
load_data_image = ImageSpec(
name="langchain-flyte-load-data",
packages=[
from dataclasses import dataclass
from typing import Dict, List
import flytekit
import matplotlib.pyplot as plt
import mpld3
import numpy as np
import pandas as pd
import pyarrow as pa
import vaex
def to_literal(
self,
ctx: FlyteContext,
python_val: T,
python_type: Type[T],
expected: LiteralType,
) -> Literal:
meta = BlobMetadata(
type=_core_types.BlobType(
format=self.TENSORFLOW_FORMAT,
...
ONNX_MODEL = "onnx_geolocator"
VERSION = "latest"
class GeoLocatorRunnable(bentoml.Runnable):
"""
Custom BentoML runner to fetch multiple ONNX outputs
"""
@samhita-alla
samhita-alla / keras-part-one.ipynb
Created December 11, 2020 11:58
keras-part-one.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@samhita-alla
samhita-alla / keras-part-one.ipynb
Created December 11, 2020 09:38
keras-part-one.ipynb
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.