Spaces:
Running
Running
File size: 1,252 Bytes
5fe0328 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
#!/usr/bin/env python3
"""
Simple verification script for TrackioConfig update fix
"""
try:
import trackio
print("β
Trackio imported successfully")
# Test config access
config = trackio.config
print(f"β
Config accessed: {type(config)}")
# Test update method exists
print(f"β
Update method exists: {hasattr(config, 'update')}")
# Test update with keyword arguments (TRL style)
config.update(allow_val_change=True, test_attr='test_value')
print(f"β
Update with kwargs worked: allow_val_change={config.allow_val_change}, test_attr={config.test_attr}")
# Test update with dictionary
config.update({'project_name': 'test_project', 'new_attr': 'dict_value'})
print(f"β
Update with dict worked: project_name={config.project_name}, new_attr={config.new_attr}")
# Test TRL functions
print(f"β
Init function exists: {hasattr(trackio, 'init')}")
print(f"β
Log function exists: {hasattr(trackio, 'log')}")
print(f"β
Finish function exists: {hasattr(trackio, 'finish')}")
print("\nπ All tests passed! The fix is working correctly.")
except Exception as e:
print(f"β Test failed: {e}")
import traceback
traceback.print_exc() |