| FeatureMetadata |
Ran ran on a synthesized input · constructed an object; no result was computed |
lzcemma/lemda/core/src/autogluon/core/augmentation/distill_utils.py code served (permissive licence) · get_code("c3a5691752afb687") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, FeatureMetadata: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import logging
import numpy as np
import pandas as pd
from collections import defaultdict
# Set up logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
# Create a small sample DataFrame for testing
np.random.seed(0)
# Sample data with various feature types
data = {
'int_feature': [1, 2, 3, 4, 5],
'float_feature': [1.1, 2.2, 3.3, 4.4, 5.5],
'category_feature': pd.Categorical(['a', 'b', 'a', 'c', 'b']),
'object_feature': ['hello', 'world', 'test', 'data', 'here'],
'datetime_feature': pd.to_datetime(['2021-01-01', '2021-01-02', '2021-01-03', '2021-01-04', '2021-01-05']),
}
df = pd.DataFrame(data)
# Create type_map_raw
type_map_raw = {
'int_feature': 'int',
'float_feature': 'float',
'category_feature': 'category',
'object_feature': 'object',
'datetime_feature': 'datetime',
}
# Create type_group_map_special
type_group_map_special = {
'text': ['object_feature'],
'datetime_as_object': [],
}
# Create type_map_special as an alternative representation
type_map_special = {
'object_feature': ['text'],
}
# Arguments for FeatureMetadata constructor
ARGS = {
'type_map_raw': type_map_raw,
'type_group_map_special': type_group_map_special,
'type_map_special': None, # Only one of type_group_map_special or type_map_special should be provided
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type FeatureMetadata — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a FeatureMetadata output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| check_if_datetime_as_object_feature |
Ran ran, violated the contract we drafted |
lzcemma/lemda/core/src/autogluon/core/augmentation/distill_utils.py code served (permissive licence) · get_code("d12c187041543caf") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import logging
import numpy as np
import pandas as pd
from pandas import DataFrame, Series
logging.basicConfig(level=logging.ERROR)
# Create test data - a Series with object dtype containing datetime-like strings
X = pd.Series([
'2023-01-01',
'2023-01-02',
'2023-01-03',
'2023-01-04',
'2023-01-05'
], dtype='object')
ARGS = {
'X': X
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| check_if_nlp_feature |
Ran ran, violated the contract we drafted |
lzcemma/lemda/core/src/autogluon/core/augmentation/distill_utils.py code served (permissive licence) · get_code("7d2c61e10c7dedda") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import logging
import numpy as np
import pandas as pd
from pandas import DataFrame, Series
logging.basicConfig(level=logging.ERROR)
# Create a Series with NLP-like content
# This series should have:
# - dtype of 'object'
# - high unique ratio (> 0.01)
# - average words per entry >= 3
nlp_data = [
"this is a long text with many words",
"another example with several words here",
"yet another text sample with content",
"more text data with multiple words",
"final example with enough words",
"additional text with more content",
"another sample with several words",
"more examples with text content",
"additional data with words here",
"final text with multiple words"
]
X = Series(nlp_data, dtype='object')
ARGS = {
'X': X
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1
- Imports
- numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_type_family_raw |
Ran ran; our contract draft was wrong, not the code |
lzcemma/lemda/core/src/autogluon/core/augmentation/distill_utils.py code served (permissive licence) · get_code("dc8b9153485cadb8") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import logging
import numpy as np
import pandas as pd
logging.basicConfig(level=logging.ERROR)
logger = logging.getLogger(__name__)
# Test with various dtype objects
dtype_int = np.dtype('int64')
dtype_float = np.dtype('float32')
dtype_bool = np.dtype('bool')
dtype_object = np.dtype('object')
dtype_category = pd.CategoricalDtype(categories=['a', 'b', 'c'])
dtype_datetime = np.dtype('datetime64[ns]')
dtype_string = pd.StringDtype()
dtype_sparse = pd.SparseDtype(np.dtype('float64'), fill_value=0.0)
# We'll test with an integer dtype as the primary example
test_dtype = dtype_int
ARGS = {
'dtype': test_dtype
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_type_group_map |
Ran ran; our contract draft was wrong, not the code |
lzcemma/lemda/core/src/autogluon/core/augmentation/distill_utils.py code served (permissive licence) · get_code("a48376b2d4e3af99") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned defaultdict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
from collections import defaultdict
# Construct a valid type_map argument
# The function iterates through key-value pairs where values can be either
# single items or lists of items, and builds a reverse mapping from feature_type to keys
type_map = {
"group_a": ["feature_1", "feature_2"],
"group_b": "feature_3",
"group_c": ["feature_4"],
"group_d": "feature_5",
}
ARGS = {
"type_map": type_map,
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_type_group_map_special |
Ran ran; our contract draft was wrong, not the code |
lzcemma/lemda/core/src/autogluon/core/augmentation/distill_utils.py code served (permissive licence) · get_code("1f5792e2cc532804") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned defaultdict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import logging
import numpy as np
import pandas as pd
from typing import Dict, List, Tuple
from collections import defaultdict
from pandas import DataFrame, Series
# Set up logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
# Create a small DataFrame with various column types
df = pd.DataFrame({
'datetime_col': pd.Series(['2023-01-01', '2023-01-02', '2023-01-03', '2023-01-04', '2023-01-05']),
'text_col': pd.Series([
'This is a longer text with multiple words here',
'Another text with several words included now',
'More text content with words and more content',
'Yet another text sample with multiple words',
'Final text example with words and content here'
]),
'numeric_col': pd.Series([1, 2, 3, 4, 5]),
'float_col': pd.Series([1.1, 2.2, 3.3, 4.4, 5.5]),
'category_col': pd.Series(pd.Categorical(['A', 'B', 'A', 'B', 'A'])),
})
# Define the arguments for get_type_group_map_special
ARGS = {
'df': df
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type defaultdict — a defaultdict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a defaultdict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_type_map_raw |
Ran ran; our contract draft was wrong, not the code |
lzcemma/lemda/core/src/autogluon/core/augmentation/distill_utils.py code served (permissive licence) · get_code("3196d80d7d4cd616") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import logging
import numpy as np
import pandas as pd
from pandas import DataFrame, Series
# Set up logging
logging.basicConfig(level=logging.DEBUG)
logger = logging.getLogger(__name__)
# Create a small DataFrame with various dtypes
df = pd.DataFrame({
'int_col': pd.array([1, 2, 3], dtype='int64'),
'float_col': pd.array([1.5, 2.5, 3.5], dtype='float64'),
'bool_col': pd.array([True, False, True], dtype='bool'),
'str_col': pd.array(['a', 'b', 'c'], dtype='object'),
'category_col': pd.Categorical(['cat1', 'cat2', 'cat1']),
'datetime_col': pd.to_datetime(['2021-01-01', '2021-01-02', '2021-01-03']),
})
ARGS = {
'df': df
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_type_map_special |
Ran ran; our contract draft was wrong, not the code |
lzcemma/lemda/core/src/autogluon/core/augmentation/distill_utils.py code served (permissive licence) · get_code("298dc9e7e784d15e") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import logging
import numpy as np
import pandas as pd
from typing import Dict, List, Tuple
from pandas import DataFrame, Series
# Set up logger
logger = logging.getLogger(__name__)
# Create a small DataFrame with various column types for testing
X = pd.DataFrame({
'numeric_col': [1, 2, 3, 4, 5],
'datetime_as_object_col': ['2021-01-01', '2021-01-02', '2021-01-03', '2021-01-04', '2021-01-05'],
'text_col': ['This is a longer text sample', 'Another text with multiple words', 'Yet another example', 'Some more content here', 'Final text example'],
'category_col': ['A', 'B', 'A', 'B', 'A'],
'sparse_col': pd.arrays.SparseArray([1, 0, 0, 1, 0]),
})
ARGS = {
'X': X
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| get_types_special |
Ran ran; our contract draft was wrong, not the code |
lzcemma/lemda/core/src/autogluon/core/augmentation/distill_utils.py code served (permissive licence) · get_code("0745c3b8daaa7e69") How it ranRan in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.
import logging
import numpy as np
import pandas as pd
from typing import Dict, List, Tuple
from pandas import DataFrame, Series
logging.basicConfig(level=logging.ERROR)
logger = logging.getLogger(__name__)
def get_type_family_raw(dtype) -> str:
"""From dtype, gets the dtype family."""
try:
if isinstance(dtype, pd.SparseDtype):
dtype = dtype.subtype
if dtype.name == 'category':
return 'category'
if 'datetime' in dtype.name:
return 'datetime'
if 'string' in dtype.name:
return 'object'
elif np.issubdtype(dtype, np.integer):
return 'int'
elif np.issubdtype(dtype, np.floating):
return 'float'
except Exception as err:
logger.error(f'Warning: dtype {dtype} is not recognized as a valid dtype by numpy! AutoGluon may incorrectly handle this feature...')
logger.error(err)
if dtype.name in ['bool', 'bool_']:
return 'bool'
elif dtype.name in ['str', 'string', 'object']:
return 'object'
else:
return dtype.name
def check_if_datetime_as_object_feature(X: Series) -> bool:
type_family = get_type_family_raw(X.dtype)
if X.isnull().all():
return False
if type_family != 'object':
return False
try:
pd.to_numeric(X)
except:
try:
if len(X) > 500:
X = X.sample(n=500, random_state=0)
result = pd.to_datetime(X, errors='coerce')
if result.isnull().mean() > 0.8:
return False
return True
except:
return False
else:
return False
def check_if_nlp_feature(X: Series) -> bool:
type_family = get_type_family_raw(X.dtype)
if type_family != 'object':
return False
if len(X) > 5000:
X = X.sample(n=5000, random_state=0)
X_unique = X.unique()
num_unique = len(X_unique)
num_rows = len(X)
unique_ratio = num_unique / num_rows
if unique_ratio <= 0.01:
return False
try:
avg_words = Series(X_unique).str.split().str.len().mean()
except AttributeError:
return False
if avg_words < 3:
return False
return True
def get_types_special(X: Series) -> List[str]:
types_special = []
if isinstance(X.dtype, pd.SparseDtype):
types_special.append('sparse')
if check_if_datetime_as_object_feature(X):
types_special.append('datetime_as_object')
elif check_if_nlp_feature(X):
types_special.append('text')
return types_special
# Create a Series with object dtype containing text (NLP feature)
# This should return ['text']
X_text = pd.Series([
'this is a longer text string',
'another text with multiple words',
'yet another text sample here',
'one more text string sample',
'final text example with words'
] * 10)
ARGS = {
'X': X_text
}
- Setup block drafted by
- a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
- Imports
- numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
- Returned
- type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
- dtype family
- int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
- Environment
- image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
|
| spunge_augment |
Not yet run unverified (harvested, no recorded run) |
lzcemma/lemda/core/src/autogluon/core/augmentation/distill_utils.py code served (permissive licence) · get_code("7d535eca508a8f22") How it ran |