Package: skyfi-modelship
SkyFi ModelShip libraryIntroductionSkyFi ModelShipis a Python library designed to helpSkyfi Insightspartners integrate privately and securely their ML models into SkyFi's infrastructure. It will simplify and optimize the service communication and provide standard input and output parameters to speed up the model development and shorten the time to market for ourInsightspartners. Become a partner for ourInsightssolution onbizdev@skyfi.comKey FeaturesEasy Integration:SkyFi ModelShip will help you integrate your machine learning model into SkyFi's infrastructure using common application structure and input/output parameter types.Model Versioning:The integration can call an optional bootstrap method, where each integration can decide to check for new versions, download new weights or take other model preparation steps.InstallationYou can install SkyFi ModelShip from PyPI using pip:pipinstallskyfi-modelshipGetting StartedCreate a SkyFi application and decorate your functions:importskyfi_modelshipasskyfiapp=skyfi.SkyfiApp()@app.bootstrapdefdownload():"""Download the model, Optional"""logger.info("Downloading model...")@app.inferencedefexec(image:skyfi.GeoTIFF)->skyfi.GeoTIFFOutput:logger.info("Running inference... ")returnskyfi.GeoTIFFOutput(...)ModelShip TypesThe inference function should adhere toPEP-484and declare type hints. All types of the parameters and return types should be members of theskyfi_modelshippackage or lists of them.Input typesThe inference decorated function will receive parameters only from the ModelShip supported input types, or lists of them. They're exported in theskyfi_modelshippackage:skyfi_modelship.int- Store an integer value.skyfi_modelship.float- Store a float value.skyfi_modelship.str- Store a str value.skyfi_modelship.Polygon- Store a polygon as a wkt string.skyfi_modelship.GeoJSON- Store a GeoJSON Feature Object.skyfi_modelship.PNG- Store a PNG image path and metadata xml.skyfi_modelship.GeoTIFF- Store a GeoTIFF image path and metadata xml.skyfi_modelship.ENVI- Store an ENVI path and header.Output typesThe inference decorated function should return objects that are from the ModelShip output types or lists of them. They're exported in theskyfi_modelshippackage:skyfi_modelship.IntOutput- Output class for integers.skyfi_modelship.FloatOutput- Output class for floats.skyfi_modelship.StrOutput- Output class for strings.skyfi_modelship.PolygonOutput- Output class for polygons.skyfi_modelship.GeoJSONOutput- Output class for GeoJSON features.skyfi_modelship.PNGOutput- Output class for images.skyfi_modelship.GeoTIFFOutput- Output class for images.skyfi_modelship.ENVIOutput- Output class for images.DistributionCreate aDockerfilefor your project, e.g.:FROM python:3.9.5-slim-buster

WORKDIR /app

COPY requirements.txt main.py ./
RUN python -m pip install --no-cache-dir -v -r requirements.txt

CMD ["python", "main.py"]Send your container image to SkyFi
Please contactbizdev@skyfi.comand discuss how we can privately access the container image.ExamplesCheck out theexampledirectory to see a working example and get inspired!LicenseThis project is licensed under theMIT License.ContactIf you have any questions or feedback, feel free to reach out atbizdev@skyfi.com.Unlock the true potential of your models with SkyFi Insights - Get started now!