Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions netspresso/np_qai/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def upload_dataset(self, data, name=None) -> Dataset:
Dataset: Returns a dataset object if successful.

Note:
For details, see `upload_dataset in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.upload_dataset.html>`_.
For details, see [upload_dataset in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.upload_dataset.html).
"""
dataset = hub.upload_dataset(data=data, name=name)

Expand All @@ -40,7 +40,7 @@ def get_dataset(self, dataset_id: str) -> Dataset:
Dataset: Returns a dataset object if successful.

Note:
For details, see `get_dataset in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.get_dataset.html>`_.
For details, see [get_dataset in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.get_dataset.html).
"""
dataset = hub.get_dataset(dataset_id=dataset_id)

Expand All @@ -58,7 +58,7 @@ def get_datasets(self, offset: int = 0, limit: int = 50) -> List[Dataset]:
List[Dataset]: Returns a list of dataset objects if successful.

Note:
For details, see `get_datasets in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.get_datasets.html>`_.
For details, see [get_datasets in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.get_datasets.html).
"""
datasets = hub.get_datasets(offset=offset, limit=limit)

Expand All @@ -76,7 +76,7 @@ def upload_model(self, model: Union[SourceModel, str], name: Optional[str] = Non
Model: Returns a model object if successful.

Note:
For details, see `upload_model in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.upload_model.html>`_.
For details, see [upload_model in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.upload_model.html).
"""
model = hub.upload_model(model=model, name=name)

Expand All @@ -94,7 +94,7 @@ def get_models(self, offset: int = 0, limit: int = 50) -> List[Model]:
List[Model]: Returns a list of model objects if successful.

Note:
For details, see `get_models in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.get_models.html>`_.
For details, see [get_models in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.get_models.html).
"""
models = hub.get_models(offset=offset, limit=limit)

Expand All @@ -111,7 +111,7 @@ def get_model(self, model_id: str) -> Model:
Model: Returns a model object if successful.

Note:
For details, see `get_model in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.get_model.html>`_.
For details, see [get_model in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.get_model.html).
"""
model = hub.get_model(model_id=model_id)

Expand All @@ -130,7 +130,7 @@ def get_devices(self, name: str = "", os: str = "", attributes: Union[str, List[
List[Device]: Returns a list of device objects if successful.

Note:
For details, see `get_devices in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.get_devices.html>`_.
For details, see [get_devices in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.get_devices.html).
"""
if attributes is None:
attributes = []
Expand All @@ -146,7 +146,7 @@ def get_device_attributes(self) -> List[str]:
List[str]: Returns a list of device attribute strings if successful.

Note:
For details, see `get_device_attributes in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.get_device_attributes.html>`_.
For details, see [get_device_attributes in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.get_device_attributes.html).
"""
device_attributes = hub.get_device_attributes()

Expand All @@ -167,7 +167,7 @@ def get_job_summaries(
List[JobSummary]: Returns a list of job summary objects if successful.

Note:
For details, see `get_job_summaries in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.get_job_summaries.html>`_.
For details, see [get_job_summaries in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.get_job_summaries.html).
"""
job_summaries = hub.get_job_summaries(offset=offset, limit=limit, creator=creator, state=state, type=type)

Expand All @@ -184,7 +184,7 @@ def get_job(self, job_id: str) -> Job:
Job: Returns a job object if successful.

Note:
For details, see `get_job in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.get_job.html>`_.
For details, see [get_job in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.get_job.html).
"""
job = hub.get_job(job_id=job_id)

Expand Down
12 changes: 6 additions & 6 deletions netspresso/np_qai/benchmarker.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def download_benchmark_results(self, job: ProfileJob, artifacts_dir: str) -> Pro
ProfileJobResult: The benchmark results.

Note:
For details, see `download_results in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.ProfileJob.html#qai_hub.ProfileJob.download_results>`_.
For details, see [download_results in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.ProfileJob.html#qai_hub.ProfileJob.download_results).
"""
results = job.download_results(artifacts_dir=artifacts_dir)

Expand All @@ -47,7 +47,7 @@ def download_profile(self, job: ProfileJob):
The profile data.

Note:
For details, see `download_profile in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.ProfileJob.html#qai_hub.ProfileJob.download_profile>`_.
For details, see [download_profile in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.ProfileJob.html#qai_hub.ProfileJob.download_profile).
"""
profile = job.download_profile()

Expand All @@ -64,7 +64,7 @@ def get_benchmark_task_status(self, benchmark_task_id: str) -> JobStatus:
JobStatus: The status of the benchmark task.

Note:
For details, see `JobStatus in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.JobStatus.html>`_.
For details, see [JobStatus in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.JobStatus.html).
"""
job: ProfileJob = hub.get_job(benchmark_task_id)
status = job.get_status()
Expand Down Expand Up @@ -134,7 +134,7 @@ def benchmark_model(
Union[BenchmarkerMetadata, List[BenchmarkerMetadata]]: Returns a benchmarker metadata object if successful.

Note:
For details, see `submit_profile_job in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.submit_profile_job.html>`_.
For details, see [submit_profile_job in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.submit_profile_job.html).
"""
netspresso_analytics.send_event(
event_name="benchmark_model_using_qai",
Expand Down Expand Up @@ -199,7 +199,7 @@ def get_inference_task_status(self, inference_task_id: str) -> JobStatus:
JobStatus: The status of the inference task.

Note:
For details, see `JobStatus in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.JobStatus.html>`_.
For details, see [JobStatus in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.JobStatus.html).
"""
job: InferenceJob = hub.get_job(inference_task_id)
status = job.get_status()
Expand Down Expand Up @@ -230,7 +230,7 @@ def inference_model(
Union[InferenceJob, List[InferenceJob]]: Returns an inference job object if successful.

Note:
For details, see `submit_inference_job in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.submit_inference_job.html>`_.
For details, see [submit_inference_job in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.submit_inference_job.html).
"""
netspresso_analytics.send_event(
event_name="inference_model_using_qai",
Expand Down
6 changes: 3 additions & 3 deletions netspresso/np_qai/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_convert_task_status(self, convert_task_id: str) -> JobStatus:
JobStatus: The status of the convert task.

Note:
For details, see `JobStatus in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.JobStatus.html>`_.
For details, see [JobStatus in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.JobStatus.html).
"""
job: CompileJob = hub.get_job(convert_task_id)
status = job.get_status()
Expand Down Expand Up @@ -103,7 +103,7 @@ def convert_model(
Union[ConverterMetadata, List[ConverterMetadata]]: Returns a converter metadata object if successful.

Note:
For details, see `submit_compile_job in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.submit_compile_job.html>`_.
For details, see [submit_compile_job in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.submit_compile_job.html).
"""
netspresso_analytics.send_event(
event_name="convert_model_using_qai",
Expand Down Expand Up @@ -172,6 +172,6 @@ def download_model(self, job: CompileJob, filename: str):
filename: The filename to save the model to.

Note:
For details, see `download_target_model in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.CompileJob.html#qai_hub.CompileJob.download_target_model>`_.
For details, see [download_target_model in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.CompileJob.html#qai_hub.CompileJob.download_target_model).
"""
job.download_target_model(filename=filename)
2 changes: 1 addition & 1 deletion netspresso/np_qai/options/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class CommonOptions:
compute_unit: Specifies the target compute unit(s)

Note:
For details, see `CommonOptions in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/api.html#common-options>`_.
For details, see [CommonOptions in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/api.html#common-options).
"""

compute_unit: Optional[List[ComputeUnit]] = None
Expand Down
2 changes: 1 addition & 1 deletion netspresso/np_qai/options/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class CompileOptions(CommonOptions):
Compile options for the model.

Note:
For details, see `CompileOptions in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/api.html#compile-options>`_.
For details, see [CompileOptions in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/api.html#compile-options).
"""

target_runtime: Optional[Runtime] = Runtime.TFLITE
Expand Down
4 changes: 2 additions & 2 deletions netspresso/np_qai/options/profile.py
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ class ProfileOptions(ProfileCommonOptions):
Profile options for the model.

Note:
For details, see `ProfileOptions in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/api.html#profile-inference-options>`_.
For details, see [ProfileOptions in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/api.html#profile-inference-options).
"""

pass
Expand All @@ -532,7 +532,7 @@ class InferenceOptions(ProfileCommonOptions):
Inference options for the model.

Note:
For details, see `InferenceOptions in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/api.html#profile-inference-options>`_.
For details, see [InferenceOptions in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/api.html#profile-inference-options).
"""

pass
2 changes: 1 addition & 1 deletion netspresso/np_qai/options/quantize.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class QuantizeOptions:
Quantize options for the model.

Note:
For details, see `QuantizeOptions in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/api.html#quantize-options>`_.
For details, see [QuantizeOptions in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/api.html#quantize-options).
"""

range_scheme: Optional[RangeScheme] = RangeScheme.AUTO
Expand Down
6 changes: 3 additions & 3 deletions netspresso/np_qai/quantizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def get_quantize_task_status(self, quantize_task_id: str) -> JobStatus:
JobStatus: The status of the quantize task.

Note:
For details, see `JobStatus in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.JobStatus.html>`_.
For details, see [JobStatus in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.JobStatus.html).
"""
job: QuantizeJob = hub.get_job(quantize_task_id)
status = job.get_status()
Expand Down Expand Up @@ -89,7 +89,7 @@ def quantize_model(
Union[NPQAIQuantizerMetadata, List[NPQAIQuantizerMetadata]]: Returns a quantizer metadata object if successful.

Note:
For details, see `submit_quantize_job in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.submit_quantize_job.html>`_.
For details, see [submit_quantize_job in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.submit_quantize_job.html).
"""
netspresso_analytics.send_event(
event_name="quantize_model_using_qai",
Expand Down Expand Up @@ -142,6 +142,6 @@ def download_model(self, job: QuantizeJob, filename: str):
filename: The filename to save the model to.

Note:
For details, see `download_target_model in QAI Hub API <https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.QuantizeJob.html#qai_hub.QuantizeJob.download_target_model>`_.
For details, see [download_target_model in QAI Hub API](https://app.aihub.qualcomm.com/docs/hub/generated/qai_hub.QuantizeJob.html#qai_hub.QuantizeJob.download_target_model).
"""
job.download_target_model(filename=filename)