Skip to content

Commit

Permalink
0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
fenke committed Jan 27, 2025
1 parent c3d6d0e commit 7b7da8c
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 145 deletions.
2 changes: 1 addition & 1 deletion corebridge/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.3.5"
__version__ = "0.4.0"
10 changes: 6 additions & 4 deletions corebridge/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,12 @@ class AICoreModuleBase:

# %% ../nbs/00_core.ipynb 56
@patch
def __init__(self:AICoreModuleBase,
save_dir:str, # path where the module can keep files
assets_dir:str, # path to support files (scripts, metadata, etc)
*args, **kwargs):
def __init__(
self:AICoreModuleBase,
save_dir:str, # path where the module can keep files
assets_dir:str, # path to support files (scripts, metadata, etc)
*args, **kwargs
):

self.init_time = datetime.datetime.now(datetime.UTC)
self.aicorebridge_version = __version__
Expand Down
68 changes: 35 additions & 33 deletions nbs/00_core.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
" dtype='datetime64[ns, Europe/Berlin]', name='time', freq=None)"
]
},
"execution_count": null,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -413,7 +413,7 @@
"2023-05-04 10:44:53+00:00 16.55"
]
},
"execution_count": null,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -449,7 +449,7 @@
" dtype='datetime64[ns, UTC]', name='time', freq=None)"
]
},
"execution_count": null,
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -516,7 +516,7 @@
"2023-05-04 12:44:53+02:00 16.55"
]
},
"execution_count": null,
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -552,7 +552,7 @@
" dtype='datetime64[ns, Europe/Amsterdam]', name='time', freq=None)"
]
},
"execution_count": null,
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -616,7 +616,7 @@
" dtype='datetime64[ns, Europe/Amsterdam]', freq='s')"
]
},
"execution_count": null,
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -639,7 +639,7 @@
" dtype='object')"
]
},
"execution_count": null,
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -662,7 +662,7 @@
" dtype='datetime64[ns, UTC+02:00]', freq=None)"
]
},
"execution_count": null,
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -682,7 +682,7 @@
"Index(['2018-04-10T07:01:01Z', '2018-04-10T07:01:02Z', '2018-04-10T07:01:03Z'], dtype='object')"
]
},
"execution_count": null,
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -726,7 +726,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"111 ms ± 1.17 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)\n"
"116 ms ± 1.28 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)\n"
]
}
],
Expand All @@ -744,7 +744,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"75.3 ms ± 261 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)\n"
"76.5 ms ± 338 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)\n"
]
}
],
Expand Down Expand Up @@ -871,7 +871,7 @@
"2023-05-04 10:44:53+00:00 NaN"
]
},
"execution_count": null,
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -914,7 +914,7 @@
" dtype='datetime64[ns, UTC]', name='time', freq=None)"
]
},
"execution_count": null,
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -986,7 +986,7 @@
"2023-05-04 10:44:53+00:00 NaN"
]
},
"execution_count": null,
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -1029,7 +1029,7 @@
" dtype='datetime64[ns, UTC]', name='time', freq=None)"
]
},
"execution_count": null,
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -1101,7 +1101,7 @@
"2023-05-04 10:44:53+00:00 NaN"
]
},
"execution_count": null,
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -1150,7 +1150,7 @@
" {'time': '2023-05-04T10:44:53Z'}]"
]
},
"execution_count": null,
"execution_count": 29,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -1222,7 +1222,7 @@
"2023-05-04 10:44:53+00:00 NaN"
]
},
"execution_count": null,
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -1271,7 +1271,7 @@
" {'time': '2023-05-04T12:44:53.000+02:00'}]"
]
},
"execution_count": null,
"execution_count": 31,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -1295,7 +1295,7 @@
" dtype='datetime64[ns, UTC]', name='time', freq=None)"
]
},
"execution_count": null,
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -1367,7 +1367,7 @@
"2023-05-04 10:44:53+00:00 NaN"
]
},
"execution_count": null,
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -1419,7 +1419,7 @@
" 'index_names': ['time']}"
]
},
"execution_count": null,
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -1461,7 +1461,7 @@
" 'index_names': ['time']}"
]
},
"execution_count": null,
"execution_count": 36,
"metadata": {},
"output_type": "execute_result"
}
Expand All @@ -1484,7 +1484,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"72.2 µs ± 126 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)\n"
"73.3 µs ± 314 ns per loop (mean ± std. dev. of 7 runs, 10,000 loops each)\n"
]
}
],
Expand Down Expand Up @@ -1683,7 +1683,7 @@
"2023-05-04 11:44:53+00:00 16.38 NaN NaN"
]
},
"execution_count": null,
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
Expand Down Expand Up @@ -1718,10 +1718,12 @@
"source": [
"#| exports\n",
"@patch\n",
"def __init__(self:AICoreModuleBase, \n",
" save_dir:str, # path where the module can keep files \n",
" assets_dir:str, # path to support files (scripts, metadata, etc)\n",
" *args, **kwargs):\n",
"def __init__(\n",
" self:AICoreModuleBase, \n",
" save_dir:str, # path where the module can keep files \n",
" assets_dir:str, # path to support files (scripts, metadata, etc)\n",
" *args, **kwargs\n",
" ):\n",
" \n",
" self.init_time = datetime.datetime.now(datetime.UTC)\n",
" self.aicorebridge_version = __version__\n",
Expand Down Expand Up @@ -1751,22 +1753,22 @@
},
{
"cell_type": "code",
"execution_count": 46,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"{'init_time': datetime.datetime(2025, 1, 25, 11, 39, 20, 701627, tzinfo=datetime.timezone.utc),\n",
" 'aicorebridge_version': '0.3.4',\n",
"{'init_time': datetime.datetime(2025, 1, 27, 9, 12, 35, 566628, tzinfo=datetime.timezone.utc),\n",
" 'aicorebridge_version': '0.4.0',\n",
" 'init_args': (1, 2),\n",
" 'init_kwargs': {'num_1': 3,\n",
" 'num_2': 4,\n",
" 'assets_dir': None,\n",
" 'save_dir': '/home/fenke/repos/corebridge/nbs/cache'}}"
]
},
"execution_count": 46,
"execution_count": 44,
"metadata": {},
"output_type": "execute_result"
}
Expand Down
Loading

0 comments on commit 7b7da8c

Please sign in to comment.