Skip to content

Commit 4417d27

Browse files
gustavocidornelaswhoseoyster
authored andcommitted
Fix pylint issues and bump version
1 parent d1535f8 commit 4417d27

File tree

6 files changed

+12
-9
lines changed

6 files changed

+12
-9
lines changed

openlayer/__init__.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@
4040
from .projects import Project
4141
from .schemas import BaselineModelSchema, DatasetSchema, ModelSchema
4242
from .tasks import TaskType
43-
44-
# from validators import models as model_validators
4543
from .validators import (
4644
baseline_model_validators,
4745
commit_validators,

openlayer/inference_pipelines.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Module for the InferencePipeline class.
22
"""
3-
from . import tasks
43

54

65
class InferencePipeline:
@@ -13,6 +12,7 @@ def __init__(self, json, upload, client, task_type):
1312
self.project_id = json["projectId"]
1413
self.upload = upload
1514
self.client = client
15+
# pylint: disable=invalid-name
1616
self.taskType = task_type
1717

1818
def __getattr__(self, name):

openlayer/projects.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ def add_model(
5454
5555
- A **full model** is comprised of metadata and artifacts. Thus, the model config, model package, and sample data arguments are needed.
5656
57-
- A **direct-to-API model** applies only to **LLMs**. Only the model config argument is required, but the model config must contain all the information needed to make predictions -- such as the ``prompt``, the ``modelProvider``, and others.
57+
- A **direct-to-API model** applies only to **LLMs**. Only the model config argument is required, but the model
58+
config must contain all the information needed to make predictions -- such as the ``prompt``, the ``modelProvider``, and others.
5859
5960
Parameters
6061
----------
@@ -449,7 +450,8 @@ def commit(self, *args, **kwargs):
449450
450451
Notes
451452
-----
452-
- To use this method, you must first add a model and/or dataset to the staging area using one of the ``add_*`` methods (e.g., :obj:`add_model`, :obj:`add_dataset`, :obj:`add_dataframe`).
453+
- To use this method, you must first add a model and/or dataset to the staging
454+
area using one of the ``add_*`` methods (e.g., :obj:`add_model`, :obj:`add_dataset`, :obj:`add_dataframe`).
453455
454456
Examples
455457
--------

openlayer/schemas.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ class ReferenceDatasetSchema(maos.OneOfSchema):
555555
Returns the correct schema based on the task type."""
556556

557557
type_field = "task_type"
558-
# pylint: ignore=line-too-long
558+
# pylint: disable=line-too-long
559559
type_schemas = {
560560
TaskType.TabularClassification.value: TabularClassificationReferenceDatasetSchema,
561561
TaskType.TabularRegression.value: TabularRegressionReferenceDatasetSchema,

openlayer/validators/dataset_validators.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# pylint: disable=bare-except
12
"""Implements the dataset specific validation classes.
23
"""
34
import ast
@@ -125,7 +126,8 @@ def _load_dataset_config(self):
125126
self.dataset_config_file_path, "r", encoding="UTF-8"
126127
) as stream:
127128
self.dataset_config = yaml.safe_load(stream)
128-
except:
129+
# pylint: disable=broad-exception-caught
130+
except Exception:
129131
self.failed_validations.append(
130132
f"File `{self.dataset_config_file_path}` is not a valid .yaml file."
131133
)
@@ -255,7 +257,8 @@ def _timestamps_are_unix_epoch_seconds(
255257
try:
256258
# Note the unit="s" argument
257259
pd.to_datetime(dataset_df[timestamp_column_name], unit="s")
258-
except:
260+
# pylint: disable=broad-exception-caught
261+
except Exception:
259262
return False
260263
return True
261264

openlayer/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@
2222
data=data,
2323
)
2424
"""
25-
__version__ = "0.1.0a9"
25+
__version__ = "0.1.0a10"

0 commit comments

Comments
 (0)