-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Public API contract #55
Comments
@danielholanda @ramkrishna2910 one more thing to consider: in our semantic versioning, we define:
I could be wrong, but due to the advent of the plugin API, there are vanishingly few cases where the minor version number would be updated instead of the major version number. For example, if I change a field in Should we change the semantic versioning?
Thoughts? |
Your versioning system seems to mix elements of semantic versioning with additional marketing-driven changes (major version changes being defined by big announcements). The major version in semantic versioning usually indicates backward-incompatible changes. The proposed major version seems to be more aligned with major milestones or significant marketing events, which might not strictly adhere to the semantic versioning rules. That being said, I'm okay to have a customized versioning approach that suits our needs, even if it doesn't strictly adhere to semantic versioning standards. |
Actions:
|
Introduction
This issue describes a public API contract that will be enshrined into code.
The public API is:
src/turnkeyml/__init__.py
src/turnkeyml/__init__.py
constitutes a breaking change to TurnkeyML and a rev of the major version numbersrc/turnkeyml/__init__.py
is not considered a breaking change.Contract
The following classes, functions, and data are already in the public API:
turnkeycli
: theturnkey
CLIbenchmark_files()
build_models()
load_state()
API for loading build stateturnkeyml.version
We will be adding the following:
run
module:BaseRT
classcommon.filesystem
module:get_available_builds()
make_cache_dir()
MODELS_DIR
: the location of turnkey's corpus on diskStats
Keys
: the common keys for the Stats dictscommon.printing
module:log_info()
log_warning()
log_error()
build.export
module:onnx_dir()
ExportPlaceholder(Stage)
OptimizeOnnxModel(Stage)
ConvertOnnxToFp16(Stage)
build.stage
module:Sequence
Stage
common.build
module:State
logged_subprocess()
BTW this is only ever used in runtime plugins, so why is it in the build module?? Will move it...common.exceptions
module:StageError
ModelRuntimeError
run.plugin_helpers
everythingCondaError
SubprocessError
get_python_path()
run_subprocess()
HardwareError
Not in contract
There are some helper functions used in external tests that I dont want to expose in the public API. They just dont seem like "official turnkey functions" because they are too generic. They are:
In the
filesystem
module:get_all()
: finds all the files with a given file extensionrmdir()
: delete a directory from the filesystemexpand_inputs()
In the
export
module:check_model()
: just a wrapper foronnx.checker..check_model()
base_onnx_file()
: location on disk of the fp32 onnx file (this shouldnt be public info; Stages should only get to know where the intermediate result is, not a specific past result)My advice would be for external code to either copy the internal code or replace it with something more generic.
The text was updated successfully, but these errors were encountered: