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
17 changes: 17 additions & 0 deletions .github/workflows/python.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,23 @@ jobs:
runs-on: ubuntu-latest

steps:
# TODO figure out why dev-framework requires so much disk space and fix that
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false

# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true

- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ description = "ValidMind Developer Framework"
license = "Commercial License"
name = "validmind"
readme = "README.pypi.md"
version = "1.27.2"
version = "1.27.3"

[tool.poetry.dependencies]
aiohttp = {extras = ["speedups"], version = "^3.8.4"}
Expand Down
2 changes: 1 addition & 1 deletion validmind/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "1.27.2"
__version__ = "1.27.3"
5 changes: 5 additions & 0 deletions validmind/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ def init_dataset(
type="dataset",
metadata=get_dataset_info(vm_dataset),
)

input_registry.add(key=obj_key, obj=vm_dataset)
vm_dataset.input_id = obj_key

return vm_dataset


Expand Down Expand Up @@ -187,7 +190,9 @@ def init_model(
type="model",
metadata=get_model_info(vm_model),
)

input_registry.add(key=obj_key, obj=vm_model)
vm_model.input_id = obj_key

return vm_model

Expand Down
2 changes: 2 additions & 0 deletions validmind/vm_models/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ class VMDataset(ABC):
Abstract base class for VM datasets.
"""

input_id: str = None

@property
@abstractmethod
def raw_dataset(self):
Expand Down
2 changes: 2 additions & 0 deletions validmind/vm_models/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ class VMModel:
device_type(str, optional) The device where model is trained
"""

input_id: str = None

def __init__(
self,
model: object = None,
Expand Down
5 changes: 3 additions & 2 deletions validmind/vm_models/test_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class TestInput:
def __init__(self, inputs):
"""Initialize with either a dictionary of inputs"""
for key, value in inputs.items():
# retrieve input object from input registry if input_id is provide
# retrieve input object from input registry if input_id is provided
if isinstance(value, str):
value = input_registry.get(key=value)
setattr(self, key, value)
Expand All @@ -110,7 +110,8 @@ def __init__(self, inputs):
def __getattr__(self, name):
# Track access only if the attribute actually exists in the inputs
if hasattr(self._inputs, name):
self._accessed.add(name)
input = getattr(self._inputs, name)
self._accessed.add(input.input_id)
return getattr(self._inputs, name)

raise AttributeError(
Expand Down